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
+8
View File
@@ -0,0 +1,8 @@
@extends('Layouts.master')
@section('content')
@include('Partials.Pages.create_page')
@endsection
@section('scripting')
@endsection
+48
View File
@@ -0,0 +1,48 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4" id="tables">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
<th>@lang('building')</th>
<th>@lang('room')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $object)
<tr>
<td class="align-middle">
<a href="{{route('buildings.show',['building' => $object->building->id])}}" target="_blank"
class="btn btn-success">{{$object->building->name}}</a>
</td>
<td class="align-middle">
<a href="{{route('rooms.show',['room' => $object])}}" target="_blank"
class="btn btn-success">{{$object->name}}</a>
</td>
<td>
@can(Request::segment(1).'_edit')
<a href="{{route(Request::segment(1).'.edit',[$data_name => $object])}}"
class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
@can(Request::segment(1).'_restore')
<a href="{{route(Request::segment(1).'.restore',[$data_name => $object])}}"
class="btn btn-outline-success">
@lang('restore')
</a>
@endcan
@can(Request::segment(1).'_delete_force')
@include('Partials.Form.Input.Modal.delete_force')
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
+8
View File
@@ -0,0 +1,8 @@
@extends('Layouts.master')
@section('content')
@include('Partials.Pages.edit_page')
@endsection
@section('scripting')
@endsection
@@ -0,0 +1,2 @@
@include('Partials.Form.Input.building')
@include('Partials.Form.Input.name')
+35
View File
@@ -0,0 +1,35 @@
@extends('Layouts.master')
@section('content')
<div class="main-container pb-4" id="tables">
@include('Partials.Pages.index_top')
<table class="table table-striped">
<thead>
<th>@lang('building')</th>
<th>@lang('room')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $room)
<tr>
<td class="align-middle">
<a href="{{route('buildings.show',['building' => $room->building->id])}}" target="_blank"
class="btn btn-success">{{$room->building->name}}</a>
</td>
<td class="align-middle">
<a href="{{route('rooms.show',['room' => $room])}}" target="_blank"
class="btn btn-success">{{$room->name}}</a>
</td>
<td>
<a href="{{route('rooms.edit',['room' => $room])}}" target="_blank"
class="btn btn-outline-success">@lang('edit')</a>
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection
+8
View File
@@ -0,0 +1,8 @@
@extends('Layouts.master')
@section('content')
@include('Partials.Pages.show_page')
@endsection
@section('scripting')
@endsection
+116
View File
@@ -0,0 +1,116 @@
<h2>
@lang('building') :
@can('buildings_view')
<a href="{{route('buildings.show',['building' => $data->building])}}" class="btn btn-success" target="_blank">
{{$data->building->name}}
</a>
@else
{{$data->building->name}}
@endcan
</h2>
<h2>@lang('reservations')</h2>
@if(count($data->reservations) >= 1)
<table class="table table-striped">
<thead>
<th>@lang('type')</th>
<th>@lang('item')</th>
<th class="text-center">@lang('amount')</th>
<th>@lang('date_start')</th>
<th>@lang('date_end')</th>
<th>@lang('status')</th>
</thead>
<tbody>
@foreach($reservations as $loan)
<tr>
<td class="col align-middle">
@switch($loan->loanable_type)
@case('App\Models\Product')
@can('products_viewAny')
<a href="{{route('products.index')}}" class="btn btn-outline-success" target="_blank">@lang('product')</a>
@else
@lang('product')
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_viewAny')
<a href="{{route('cabels.index')}}" class="btn btn-outline-success" target="_blank">@lang('cabel')</a>
@else
@lang('cabel')
@endcan
@break
@endswitch
</td>
<td class="col align-middle">
@switch($loan->loanable_type)
@case('App\Models\Product')
@can('products_view')
<a href="{{route('products.show',['product' => $loan->loanable->id])}}" target="_blank" class="btn btn-outline-success">
@if(config('app.barcode_mode') == 'dynamic')
{{$loan->loanable->category->name}}.@if(!empty($loan->loanable->subcategory)){{$loan->loanable->subcategory->name}}.@endif{{$loan->loanable->brand->name}}.{{$loan->loanable->model->name}}@if(!empty($loan->loanable->name)).{{$loan->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$loan->loanable->barcode}}
@endif
</a>
@else
@if(config('app.barcode_mode') == 'dynamic')
{{$loan->loanable->category->name}}.@if(!empty($loan->loanable->subcategory)){{$loan->loanable->subcategory->name}}.@endif{{$loan->loanable->brand->name}}.{{$loan->loanable->model->name}}@if(!empty($loan->loanable->name)).{{$loan->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$loan->loanable->barcode}}
@endif
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_view')
<a href="{{route('cabels.show',['cabel' => $loan->loanable->id])}}" target="_blank" class="btn btn-outline-success">
{{$loan->loanable->category->name}}.{{$loan->loanable->name}}
</a>
@else
{{$loan->loanable->category->name}}.{{$loan->loanable->name}}
@endcan
@break
@endswitch
</td>
<td class="col align-middle text-center">
{{$loan->amount}}
</td>
<td class="col align-middle">
{{date('d.m.Y',strtotime($loan->date_start))}}
</td>
<td class="col align-middle">
{{date('d.m.Y',strtotime($loan->date_end))}}
</td>
<td class="col align-middle">
@switch($loan->type->name)
@case('Reservation - Awaiting')
@lang('validation')
- @lang('deadline') :
@if(!empty($loan->date_deadline))
{{date('d.m.Y H:i:s',strtotime($loan->date_deadline))}}
@endif
@break
@case('Reservation - Set Up')
@lang('awaiting') @lang('setup')
@break
@case('Reservation - Pick Up')
@lang('awaiting') @lang('pickup')
@break
@endswitch
</td>
</tr>
@endforeach
<tr>
<td class="col fw-bold" colspan="2">Total : </td>
<td class="col text-center fw-bold">{{count($data->reservations)}}</td>
<td colspan="3"></td>
</tr>
</tbody>
</table>
@else
@lang('no_amount') @lang('reservations')
@endif