Initial Commit

This commit is contained in:
dann4624
2022-09-28 09:38:08 +02:00
parent cac476f80f
commit 2d04a269e6
355 changed files with 52166 additions and 25 deletions
@@ -0,0 +1,8 @@
@extends('Layouts.master')
@section('content')
@include('Partials.Pages.create_page')
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,15 @@
@include('Partials.Form.Input.user')
@include('Partials.Form.Input.room')
<br>
<hr>
<br>
@include('Partials.Form.Input.products')
<br>
<hr>
<br>
@include('Partials.Form.Input.cabels')
<br>
<hr>
<br>
@include('Partials.Form.Input.date_start')
@include('Partials.Form.Input.date_end')
@@ -0,0 +1,74 @@
@extends('Layouts.master')
<style>
.modal-backdrop {
opacity: 0.75 !important;
}
</style>
@section('content')
<div class="main-container pb-4">
<div class="head-section mb-2">
@include('Partials.Pages.Search.search_bar')
</div>
@include('Partials.Pages.reservation_selector')
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('room')</th>
<th>@lang('items')</th>
<th>@lang('date_start')</th>
<th>@lang('date_end')</th>
<th>@lang('status')</th>
</thead>
<tbody>
@foreach($data as $reservation)
<tr>
<td class="col-2 align-middle">
<a href="{{route('users.show',['user' => $reservation->user_id])}}" target="_blank"
class="btn btn-success">
{{$reservation->user->username}}
</a>
</td>
<td class="col-2 align-middle">
<a href="{{route('rooms.show',['room' => $reservation->room_id])}}" target="_blank"
class="btn btn-success">
{{$reservation->room->building->name}}.{{$reservation->room->name}}
</a>
</td>
<td class="col-2 align-middle">
@include('Partials.Pages.reservation_items')
</td>
<td class="col align-middle">
{{date('d.m.Y',strtotime($reservation->date_start))}}
</td>
<td class="col align-middle">
@if(!empty($reservation->date_end))
{{date('d.m.Y',strtotime($reservation->date_end))}}
@else
@lang('permanent')
@endif
</td>
<td class="col align-middle">
@switch($reservation->type->name)
@case('Reservation - Awaiting')
@lang('validation')
@break
@case('Reservation - Set Up')
@lang('setup')
@break
@case('Reservation - Pick Up')
@lang('pickup')
@break
@endswitch
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,61 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<div class="head-section mb-2">
@include('Partials.Pages.Search.search_bar')
</div>
@include('Partials.Pages.reservation_selector')
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('room')</th>
<th>@lang('items')</th>
<th>@lang('date_start')</th>
<th>@lang('date_end')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $reservation)
<tr>
<td class="col-2 align-middle">
<a href="{{route('users.show',['user' => $reservation->user_id])}}" target="_blank"
class="btn btn-success">
{{$reservation->user->username}}
</a>
</td>
<td class="col-2 align-middle">
<a href="{{route('rooms.show',['room' => $reservation->room_id])}}" target="_blank"
class="btn btn-success">
{{$reservation->room->building->name}}.{{$reservation->room->name}}
</a>
</td>
<td class="col-2 align-middle">
@include('Partials.Pages.reservation_items')
</td>
<td class="col align-middle">
{{date('d.m.Y',strtotime($reservation->date_start))}}
</td>
<td class="col align-middle">
@if(!empty($reservation->date_end))
{{date('d.m.Y',strtotime($reservation->date_end))}}
@else
@lang('permanent')
@endif
</td>
<td>
@can('reservations_pickup')
@include('Partials.Pages.reservation_pickup')
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,61 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<div class="head-section mb-2">
@include('Partials.Pages.Search.search_bar')
</div>
@include('Partials.Pages.reservation_selector')
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('room')</th>
<th>@lang('items')</th>
<th>@lang('date_start')</th>
<th>@lang('date_end')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $reservation)
<tr>
<td class="col-2 align-middle">
<a href="{{route('users.show',['user' => $reservation->user_id])}}" target="_blank"
class="btn btn-success">
{{$reservation->user->username}}
</a>
</td>
<td class="col-2 align-middle">
<a href="{{route('rooms.show',['room' => $reservation->room_id])}}" target="_blank"
class="btn btn-success">
{{$reservation->room->building->name}}.{{$reservation->room->name}}
</a>
</td>
<td class="col-2 align-middle">
@include('Partials.Pages.reservation_items')
</td>
<td class="col align-middle">
{{date('d.m.Y',strtotime($reservation->date_start))}}
</td>
<td class="col align-middle">
@if(!empty($reservation->date_end))
{{date('d.m.Y',strtotime($reservation->date_end))}}
@else
@lang('permanent')
@endif
</td>
<td>
@can('reservations_setup')
@include('Partials.Pages.reservation_setup')
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,93 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<div class="mb-3 row">
<span class="col-2 col-form-label fw-bold">@lang('user') : </span>
<div class="col-10">
{{$user->username}}
</div>
</div>
<div class="mb-3 row">
<span class="col-2 col-form-label fw-bold">@lang('room') : </span>
<div class="col-10">
{{$room->building->name}} - {{$room->name}}
</div>
</div>
<div class="mb-3 row">
<span class="col-2 col-form-label fw-bold">@lang('date_start') : </span>
<div class="col-10">
{{date('d.m.Y',strtotime($data->date_start))}}
</div>
</div>
<div class="mb-3 row">
<span class="col-2 col-form-label fw-bold">@lang('date_end') : </span>
<div class="col-10">
{{date('d.m.Y',strtotime($data->date_end))}}
</div>
</div>
<div class="mb-3 row">
<span class="col-2 col-form-label fw-bold">@lang('loans') : </span>
<div class="col-10">
<table class="table table-striped">
<thead class="thead-dark border-bottom border-1">
<th>@lang('type')</th>
<th>@lang('item')</th>
<th class="text-center">@lang('amount')</th>
</thead>
<tbody>
@foreach($reservations as $reservation)
<tr>
<td class="align-middle">
@switch($reservation->loanable_type)
@case('App\Models\Product')
@lang('product')
@break
@case('App\Models\Cabel')
@lang('cabel')
@break
@endswitch
</td>
<td class="align-middle">
@switch($reservation->loanable_type)
@case('App\Models\Product')
@if(config('app.barcode_mode') == 'dynamic')
{{$reservation->loanable->category->name}}.@if(!empty($reservation->loanable->subcategory->name)){{$reservation->loanable->subcategory->name}}.@endif{{$reservation->loanable->brand->name}}.{{$reservation->loanable->model->name}}@if(!empty($reservation->loanable->name)).{{$reservation->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$reservation->loanable->barcode}}
@endif
@break
@case('App\Models\Cabel')
{{$reservation->loanable->category->name}}.{{$reservation->loanable->name}}
@break
@endswitch
</td>
<td class="align-middle text-center">
{{$reservation->amount}}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<form action="{{route('reservations.validate.action',['reservation' => $data])}}" method="post">
@include('Partials.Form.Signature.loaner')
@include('Partials.Form.Signature.lender')
@include('Partials.Form.Signature.fake_full')
<div class="mt-3 row">
<span class="col-2 col-form-label fw-bold"></span>
<div class="col-10">
@csrf
<input type="submit" value="@lang('validate') @lang('reservation')" class="btn btn-success">
</div>
</div>
</form>
</div>
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,100 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<div class="head-section mb-2">
@include('Partials.Pages.Search.search_bar')
</div>
@include('Partials.Pages.reservation_selector')
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('room')</th>
<th>@lang('deadline')</th>
<th>@lang('date_start')</th>
<th>@lang('date_end')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $loan)
<tr>
<td class="col-2 align-middle">
<a href="{{route('users.show',['user' => $loan->user_id])}}" class="btn btn-success">
{{$loan->user->username}}
</a>
</td>
<td class="col-2 align-middle">
<a href="{{route('rooms.show',['room' => $loan->room_id])}}" class="btn btn-success">
{{$loan->room->building->name}}.{{$loan->room->name}}
</a>
</td>
<td class="col align-middle">
@if(!empty($loan->date_deadline))
{{date('d.m.Y H:i:s',strtotime($loan->date_deadline))}}
@endif
</td>
<td class="col align-middle">
{{date('d.m.Y',strtotime($loan->date_start))}}
</td>
<td class="col align-middle">
@if(!empty($loan->date_end))
{{date('d.m.Y',strtotime($loan->date_end))}}
@else
@lang('permanent')
@endif
</td>
<td>
@can('reservations_validate')
@if(NOW() < $loan->date_deadline)
<a href="{{route('reservations.validate.page',['reservation' => $loan->id])}}" class="btn btn-outline-success">
@lang('validate') @lang('reservation')
</a>
@endif
@endcan
@can('reservations_cancel')
@if(NOW() > $loan->date_deadline)
<div class="col-1">
<button data-toggle="modal" data-target="#deleteModal_{{$loan->id}}" class="btn btn-danger">@lang('delete')</button>
</div>
<div class="product-edit-buttons">
<!-- Modal -->
<div class="modal" tabindex="-1" role="dialog" id="deleteModal_{{$loan->id}}">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="alert alert-danger" style="display:none"></div>
<div class="modal-header">
<h5 class="modal-title">@lang('cancel') @lang('reservation')</h5>
<button type="button" class="btn btn-secondary close fold" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
{{date('d.m.Y',strtotime($loan->date_start))}} @lang('to') {{$loan->user->username}} @lang('in') {{$loan->room->building->name}} - {{$loan->room->name}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">@lang('cancel')</button>
<form method="post" action="{{route(Request::segment(1).'.validate.cancel', ['reservation' => $loan])}}" id="deleteForm" class="form-inline">
@method('delete')
@csrf
<button class="btn btn-danger" id="ajaxSubmit">@lang('cancel') @lang('reservation')</button>
</form>
</div>
</div>
</div>
</div>
</div>
@endif
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection