Lager-v3/resources/views/reservations/validate.blade.php

93 lines
4.3 KiB
PHP
Raw Permalink Normal View History

2022-09-28 07:38:08 +00:00
@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')
<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