@php $route = explode('.', Route::currentRouteName()); @endphp
@if(in_array($model->status,[1,4,5,6,7,9]) && Auth::user()->can($route[0].'.read')) {!! getIcon("printer", "text-success","duotune") !!} Label Dus {!! getIcon("printer", "text-primary","duotune") !!} Odner @if($model->status == 4 && Auth::user()->hasRole('otorisator')) {!! getIcon("cloud-download", "text-info","duotune") !!} Approve Download @elseif($model->status == 1 && Auth::user()->hasRole('operator')) {!! getIcon("cloud-download", "text-info","duotune") !!} Request Download @elseif($model->status == 5 && Auth::user()->hasRole('operator')) {!! getIcon("cloud-download", "text-success","duotune") !!} Download @endif @if(Auth::user()->can($route[0].'.read')) @if( Auth::user()->hasRole('operator')) @if($model->aktif == 1) {!! getIcon("check-square", "text-success","duotune") !!} Aktif @else {!! getIcon("cross-square", "text-danger","duotune") !!} Tidak Aktif @endif @elseif(Auth::user()->hasRole('otorisator') && $model->status == 9) {!! getIcon("check-square", "text-success","duotune") !!} Approve Non Aktif @endif @endif @if(Auth::user()->can($route[0].'.delete') || Auth::user()->can($route[0].'.authorize')) {!! Form::open(['method' => 'DELETE','route' => [$route[0].'.destroy', $model->id],'class'=>'']) !!} @if( Auth::user()->hasRole('operator')) {{ Form::button(getIcon("trash", "text-danger","duotune")." Reqeust Delete", ['type' => 'submit', 'class' => 'delete btn btn-bg-light btn-active-light-danger btn-sm'] ) }} @elseif(Auth::user()->hasRole('otorisator') && $model->status == 6) {{ Form::button(getIcon("trash", "text-danger","duotune")."Approve Delete", ['type' => 'submit', 'class' => 'approvedelete btn btn-bg-light btn-active-light-danger btn-sm'] ) }} @elseif(Auth::user()->hasRole('administrator') && $model->status == 7) {{ Form::button(getIcon("trash", "text-danger","duotune")."Approve Delete", ['type' => 'submit', 'class' => 'approveddelete btn btn-bg-light btn-active-light-danger btn-sm'] ) }} @endif {!! Form::close() !!} @if(in_array($model->status,[6,7,9]) && Auth::user()->can($route[0].'.read')) {!! getIcon("eye", "text-warning","duotune") !!} View @endif @endif @elseif($model->status == 0) @if(Auth::user()->hasRole('otorisator')) {!! getIcon("eye", "text-warning","duotune") !!} View @endif @endif