Initial Commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
@extends('Layouts.master')
|
||||
|
||||
@section('content')
|
||||
<div class="main-container pb-4">
|
||||
<form method="post" action="{{route('users.store')}}">
|
||||
@include('Partials.Form.Input.name')
|
||||
@include('Partials.Form.Input.user')
|
||||
@include('Partials.Form.Input.password')
|
||||
@include('Partials.Form.Input.role')
|
||||
@include('Partials.Form.Input.Submit.submit_create')
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,148 @@
|
||||
@extends('Layouts.master')
|
||||
|
||||
@section('content')
|
||||
<div class="main-container pb-4" id="tables">
|
||||
@include('Partials.Pages.index_top')
|
||||
<div class="table-responsive">
|
||||
<table id="userTable" class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@lang('username')</th>
|
||||
<th scope="col">@lang('name_full')</th>
|
||||
<th scope="col">@lang('role')</th>
|
||||
<th scope="col">@lang('action')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($data as $object)
|
||||
<tr>
|
||||
<td scope="row">{{$object->username}}</td>
|
||||
<td>{{$object->name}}</td>
|
||||
<td>{{$object->role->name}}</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')
|
||||
<button data-toggle="modal" data-target="#deleteModal_{{$object->id}}" class="btn btn-outline-danger">@lang('delete_force')</button>
|
||||
<div class="product-edit-buttons">
|
||||
<!-- Modal -->
|
||||
<div class="modal" tabindex="-1" role="dialog" id="deleteModal_{{$object->id}}">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="alert alert-danger" style="display:none"></div>
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">@lang('deletion_force') @lang('of') @lang($data_name)</h5>
|
||||
<button type="button" class="btn btn-secondary close fold" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@lang($data_name) {{$object->name}}
|
||||
<h2>@lang('loans')</h2>
|
||||
@if(count($object->loans) >= 1)
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
@foreach($object->loans as $loan)
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
@switch($loan->loanable_type)
|
||||
@case('App\Models\Product')
|
||||
<a href="{{route('products.show',['product' => $loan->loanable->id])}}" target="_blank" class="btn btn-success">
|
||||
@if(config('app.barcode_mode') == 'dynamic')
|
||||
{{$loan->loanable->category->name}}.@if(!empty($loan->loanable->subcategory->name)){{$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>
|
||||
@break
|
||||
@case('App\Models\Cabel')
|
||||
<a href="{{route('cabels.show',['cabel' => $loan->loanable->id])}}" target="_blank" class="btn btn-success">
|
||||
{{$loan->loanable->category->name}}.{{$loan->loanable->name}}
|
||||
</a>
|
||||
@break
|
||||
@endswitch
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
@lang('no_amount') @lang('loans')
|
||||
@endif
|
||||
<h2>@lang('reservations')</h2>
|
||||
|
||||
@if(count($object->reservations) >= 1)
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
@foreach($object->reservations as $loan)
|
||||
<tr>
|
||||
|
||||
<td class="align-middle">
|
||||
@switch($loan->loanable_type)
|
||||
@case('App\Models\Product')
|
||||
<a href="{{route('products.show',['product' => $loan->loanable->id])}}" target="_blank" class="btn btn-success">
|
||||
@if(config('app.barcode_mode') == 'dynamic')
|
||||
{{$loan->loanable->category->name}}.@if(!empty($loan->loanable->subcategory->name)){{$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>
|
||||
@break
|
||||
@case('App\Models\Cabel')
|
||||
<a href="{{route('cabels.show',['cabel' => $loan->loanable->id])}}" target="_blank" class="btn btn-success">
|
||||
{{$loan->loanable->category->name}}.{{$loan->loanable->name}}
|
||||
</a>
|
||||
@break
|
||||
@endswitch
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@else
|
||||
@lang('no_amount') @lang('reservations')
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">@lang('cancel')</button>
|
||||
<form method="get" action="{{route(Request::segment(1).".forceDelete", [$data_name => $object])}}" id="deleteForm" class="form-inline">
|
||||
@method('delete')
|
||||
@csrf
|
||||
<button class="btn btn-danger" id="ajaxSubmit" @if(count($object->loans) >= 1 OR count($object->loans) >= 1)disabled @endif>@lang('delete_force')</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
|
||||
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@include('Partials.Pages.display')
|
||||
</div>
|
||||
@endsection
|
||||
@section('scripting')
|
||||
@endsection
|
||||
@@ -0,0 +1,24 @@
|
||||
@extends('Layouts.master')
|
||||
|
||||
@section('content')
|
||||
<div class="main-container pb-4">
|
||||
<form method="post" action="{{route('users.update',['user' => $data])}}">
|
||||
@if($data->loanerType->name != "adUser")
|
||||
@can("users_edit_username")
|
||||
@include('Partials.Form.Input.name')
|
||||
@include('Partials.Form.Input.user')
|
||||
@endcan
|
||||
@include('Partials.Form.Input.password')
|
||||
@endif
|
||||
@can("users_edit_role")
|
||||
@if($data->id != Auth::user()->id)
|
||||
@include('Partials.Form.Input.role')
|
||||
@endif
|
||||
@endcan
|
||||
@include('Partials.Form.Input.Submit.submit_edit')
|
||||
</form>
|
||||
@can('users_delete')
|
||||
@include('Partials.Form.Input.Modal.delete')
|
||||
@endcan
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,56 @@
|
||||
@extends('Layouts.master')
|
||||
|
||||
@section('content')
|
||||
<div class="main-container pb-4" id="tables">
|
||||
@include('Partials.Pages.index_top')
|
||||
<div class="table-responsive">
|
||||
<table id="userTable" class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">@lang('username')</th>
|
||||
<th scope="col">@lang('name_full')</th>
|
||||
<th scope="col">@lang('role')</th>
|
||||
<th scope="col">@lang('action')</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($data as $user)
|
||||
<tr>
|
||||
<td scope="row">{{$user->username}}</td>
|
||||
<td>{{$user->name}}</td>
|
||||
<td>
|
||||
@can('roles_view')
|
||||
<a href="{{route('roles.show', ['role' => $user->role])}}"
|
||||
class="btn btn-success" target="_blank">
|
||||
{{$user->role->name}}
|
||||
</a>
|
||||
@else
|
||||
{{$user->role->name}}
|
||||
@endcan
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@can('view',\App\Models\User::class)
|
||||
<a href="{{route('users.show', ['user' => $user])}}"
|
||||
class="btn btn-success" target="_blank">
|
||||
@lang('show')
|
||||
</a>
|
||||
@endcan
|
||||
@can('edit',\App\Models\User::class)
|
||||
<a href="{{route('users.edit', ['user' => $user])}}"
|
||||
class="btn btn-outline-success">
|
||||
@lang('edit')
|
||||
</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@include('Partials.Pages.display')
|
||||
</div>
|
||||
@endsection
|
||||
@section('scripting')
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,438 @@
|
||||
@extends('Layouts.master')
|
||||
|
||||
@section('content')
|
||||
<div class="main-container">
|
||||
<div class="edit-profile">
|
||||
<div class="user-loan-lists">
|
||||
<div class="table-responsive">
|
||||
<h2>@lang('loans')</h2>
|
||||
@if(count($loans) >= 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>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($loans 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">
|
||||
@if(!empty($loan->date_end))
|
||||
{{date('d.m.Y',strtotime($loan->date_end))}}
|
||||
@else
|
||||
@lang('permanent')
|
||||
@endif
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td class="col fw-bold" colspan="2">Total : </td>
|
||||
<td class="col text-center fw-bold">{{count($data->loans)}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
@lang('no_amount') @lang('loans')
|
||||
@endif
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<h2>@lang('reservations')</h2>
|
||||
@if(count($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
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
<h2>@lang('contracts')</h2>
|
||||
@if(count($contracts) >= 1)
|
||||
@can('pdf_view')
|
||||
<table class="table table-striped" id="loanTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> @lang('date') </th>
|
||||
<th scope="col"> @lang('type') </th>
|
||||
<th scope="col"> @lang('action') </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($contracts as $file)
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
{{ date('d.m.Y H:i:s', $file->timestamp) }}
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
@if($file->type == 'contracts')
|
||||
@lang('loan')
|
||||
@elseif($file->type == 'laptops')
|
||||
@lang('laptop')
|
||||
@elseif($file->type == 'reservations')
|
||||
@lang('reservation')
|
||||
@endif
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
<a href="{{ route('pdf.show',['user' => $data->username,'timestamp' => $file->timestamp,'type' => $file->type]) }}" target="_BLANK" class="btn btn-xs btn-outline-info pull-right">
|
||||
@lang('show')
|
||||
</a>
|
||||
@can('delete', App\Models\PDF::class)
|
||||
<form method="post" action="{{ route('pdf.delete',['user' => $data->username,'timestamp' => $file->timestamp,'type' => $file->type]) }}" class="d-inline">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-outline-danger btn-xs pull-right">@lang('delete')</button>
|
||||
</form>
|
||||
@endcan
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td class="col fw-bold">Total : {{count($contracts)}}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endcan
|
||||
@cannot('pdf_view')
|
||||
@if(Auth::user()->id == $data->id)
|
||||
<table class="table table-striped table-hover table-size" id="loanTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> @lang('date') </th>
|
||||
<th scope="col"> @lang('type') </th>
|
||||
<th scope="col"> @lang('action') </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($contracts as $file)
|
||||
<tr>
|
||||
<td>{{ date('d.m.Y H:i:s', $file->timestamp) }}</td>
|
||||
<td>
|
||||
@if($file->type == 'contracts')
|
||||
@lang('loan')
|
||||
@elseif($file->type == 'laptops')
|
||||
@lang('laptop')
|
||||
@elseif($file->type == 'reservations')
|
||||
@lang('reservation')
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('pdf.show',['user' => $data->username,'timestamp' => $file->timestamp,'type' => $file->type]) }}" target="_BLANK" class="btn btn-xs btn-outline-info pull-right">
|
||||
@lang('show')
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td class="col fw-bold">Total : {{count($contracts)}}</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
@endcannot
|
||||
@else
|
||||
@lang('no_amount') @lang('contracts')
|
||||
@endif
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
|
||||
@can('notes_view')
|
||||
<h2>@lang('notes')</h2>
|
||||
@if(count($notes) >= 1)
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>@lang('item') @lang('type')</th>
|
||||
<th>@lang('item')</th>
|
||||
<th>@lang('note') @lang('type')</th>
|
||||
<th>@lang('note')</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($notes as $note)
|
||||
<tr>
|
||||
<td>
|
||||
@switch($note->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>
|
||||
@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>
|
||||
{{$note->type->name}}
|
||||
</td>
|
||||
<td>
|
||||
{{$note->note}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
@lang('no_amount') @lang('notes')
|
||||
@endif
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-inputs">
|
||||
<div class="mb-3 justify-content-center">
|
||||
<label for="Name" class="form-label">@lang('username'):</label>
|
||||
<input disabled type="text" class="form-control" placeholder="{{$data->username}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 justify-content-center">
|
||||
<label for="Name" class="form-label">@lang('name_full'):</label>
|
||||
<input disabled type="text" class="form-control" placeholder="{{$data->name}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 justify-content-center">
|
||||
<label for="Name" class="form-label">@lang('role'):</label>
|
||||
<input disabled type="text" class="form-control" placeholder="{{$data->role->name}}">
|
||||
</div>
|
||||
|
||||
<div class="mb-3 justify-content-center">
|
||||
<label for="Name" class="form-label">@lang('type'):</label>
|
||||
@switch($data->loanerType->name)
|
||||
@case('adUser')
|
||||
<input disabled type="text" class="form-control" placeholder="@lang('ADUser')">
|
||||
@break
|
||||
@case('nadUser')
|
||||
<input disabled type="text" class="form-control" placeholder="@lang('notADUser')">
|
||||
@break
|
||||
@endswitch
|
||||
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
@can('users_edit')
|
||||
@if($data->loanerType->name != 'adUser')
|
||||
<a href="{{route('users.edit', $data)}}" class="btn btn-outline-success">@lang('update')</a>
|
||||
@else
|
||||
@can('users_edit_role')
|
||||
@if(Auth::user()->id != $data->id)
|
||||
<a href="{{route('users.edit', $data)}}" class="btn btn-outline-success">@lang('update')</a>
|
||||
@endif
|
||||
@else
|
||||
<a disabled class="btn btn-outline-success disabled-button">@lang('update')</a>
|
||||
@endcan
|
||||
@endif
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripting')
|
||||
@endsection
|
||||
Reference in New Issue
Block a user