47 lines
2.4 KiB
PHP
47 lines
2.4 KiB
PHP
@php
|
|
$route = explode('.', Route::currentRouteName());
|
|
@endphp
|
|
@if( Auth::user()->hasRole('operator'))
|
|
<div class="d-flex flex-row flex-center">
|
|
<a href="{{ route($route[0].'.edit',['directorat' => $model->id]) }}"
|
|
class="kt_edit_form btn btn-icon btn-bg-light btn-active-light-primary btn-sm me-1">
|
|
{!! getIcon("pencil", "fs-1 text-info","duotune") !!}
|
|
</a>
|
|
|
|
{!! Form::open(['method' => 'DELETE','route' => [$route[0].'.destroy', $model->id],'class'=>'']) !!}
|
|
{{ Form::button(getIcon("trash", "fs-1 text-danger","duotune"), ['type' => 'submit', 'class' => 'delete btn btn-icon btn-bg-light btn-active-light-danger btn-sm'] ) }}
|
|
{!! Form::close() !!}
|
|
</div>
|
|
@endif
|
|
|
|
@if(Auth::user()->hasRole('otorisator'))
|
|
@if($model->status == 0)
|
|
|
|
{!! Form::open(['method' => 'PUT','route' => [$route[0].'.update', $model->id],'class'=>'d-inline-block']) !!}
|
|
<input type="hidden" value="{{$model->kode}}" name="kode">
|
|
<input type="hidden" value="{{$model->name}}" name="name">
|
|
<input type="hidden" value="1" name="status">
|
|
<input type="hidden" value="1" name="approval">
|
|
<button type="submit" value="1" class="kt_approve_form btn btn-light-success btn-active-success btn-sm " style="--bs-btn-padding-y: .25rem !important; --bs-btn-padding-x: .5rem !important; --bs-btn-font-size: .75rem !important;">
|
|
<i class="ki-duotone ki-double-check">
|
|
<i class="path1"></i>
|
|
<i class="path2"></i>
|
|
</i> Approve
|
|
</button>
|
|
{!! Form::close() !!}
|
|
|
|
{!! Form::open(['method' => 'PUT','route' => [$route[0].'.update', $model->id],'class'=>'d-inline-block']) !!}
|
|
<input type="hidden" value="{{$model->kode}}" name="kode">
|
|
<input type="hidden" value="{{$model->name}}" name="name">
|
|
<input type="hidden" value="3" name="status">
|
|
<input type="hidden" value="1" name="approval">
|
|
<button type="submit" value="1" class="kt_reject_form btn btn-light-danger btn-active-danger btn-sm" style="--bs-btn-padding-y: .25rem !important; --bs-btn-padding-x: .5rem !important; --bs-btn-font-size: .75rem !important;">
|
|
<i class="ki-duotone ki-cross">
|
|
<i class="path1"></i>
|
|
<i class="path2"></i>
|
|
</i> Reject
|
|
</button>
|
|
{!! Form::close() !!}
|
|
@endif
|
|
@endif
|