Lager-v3/resources/views/loans/index.blade.php

55 lines
2.0 KiB
PHP

@extends('Layouts.master')
@section('content')
<div class="main-container pb-4">
<div class="head-section mb-2">
@include('Partials.Pages.Search.search_bar')
</div>
<table class="table table-striped">
<thead>
<th>@lang('user')</th>
<th>@lang('items')</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">
@include('Partials.Pages.loan_items')
</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('loans_adjust')
<a href="{{route('loans.adjust.page',['loan' => $loan->id])}}" class="btn btn-outline-success">
@lang('adjust') @lang('date_end')
</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection