Lager-v3/resources/views/notes/deleted.blade.php

119 lines
5.8 KiB
PHP

@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('user')</th>
<th>@lang('item') @lang('type')</th>
<th>@lang('item')</th>
<th>@lang('note') @lang('type')</th>
<th>@lang('note')</th>
<th>@lang('created_at')</th>
<th>@lang('action')</th>
</thead>
<tbody>
@foreach($data as $note)
<tr>
<td>
@can('users_view')
<a href="{{route('users.show',['user' => $note->user->id])}}" target="_blank" class="btn btn-success">
{{$note->user->username}}
</a>
@else
{{$note->user->username}}
@endcan
</td>
<td>
@switch($note->loanable_type)
@case('App\Models\Product')
@can('products_viewAny')
<a href="{{route('products.index')}}" class="btn btn-success" target="_blank">
@lang('product')
</a>
@else
@lang('product')
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_viewAny')
<a href="{{route('products.index')}}" class="btn btn-success" target="_blank">
@lang('cabel')
</a>
@else
@lang('cabel')
@endcan
@break
@endswitch
</td>
<td>
@switch($note->loanable_type)
@case('App\Models\Product')
@can('products_view')
<a href="{{route('products.show',['product' => $note->loanable->id])}}" target="_blank" class="btn btn-outline-success">
@if(config('app.barcode_mode') == 'dynamic')
{{$note->loanable->category->name}}.@if(!empty($note->loanable->subcategory)){{$note->loanable->subcategory->name}}.@endif{{$note->loanable->brand->name}}.{{$note->loanable->model->name}}@if(!empty($note->loanable->name)).{{$note->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$note->loanable->barcode}}
@endif
</a>
@else
@if(config('app.barcode_mode') == 'dynamic')
{{$note->loanable->category->name}}.@if(!empty($note->loanable->subcategory)){{$note->loanable->subcategory->name}}.@endif{{$note->loanable->brand->name}}.{{$note->loanable->model->name}}@if(!empty($note->loanable->name)).{{$note->loanable->name}}@endif
@endif
@if(config('app.barcode_mode') == 'static')
{{$note->loanable->barcode}}
@endif
@endcan
@break
@case('App\Models\Cabel')
@can('cabels_view')
<a href="{{route('cabels.show',['cabel' => $note->loanable->id])}}" target="_blank" class="btn btn-outline-success">
{{$note->loanable->category->name}}.{{$note->loanable->name}}
</a>
@else
{{$note->loanable->category->name}}.{{$note->loanable->name}}
@endcan
@break
@endswitch
</td>
<td>
@lang($note->type->name)
</td>
<td>
@lang($note->note)
</td>
<td>
{{date('d.m.Y',strtotime($note->created_at))}}
</td>
<td>
@can('notes_edit')
<a href="{{route('notes.edit',['note' => $note])}}" class="btn btn-outline-success">
@lang('edit')
</a>
@endcan
@can('notes_restore')
<a href="{{route('notes.restore',['note' => $note])}}" class="btn btn-outline-success">
@lang('restore')
</a>
@endcan
@can('notes_delete_force')
<a href="{{route('notes.forceDelete',['note' => $note])}}"
class="btn btn-outline-danger">
@lang('delete_force')
</a>
@endcan
</td>
</tr>
@endforeach
</tbody>
</table>
@include('Partials.Pages.display')
</div>
@endsection
@section('scripting')
@endsection