2023-05-15 10:03:46 +00:00
|
|
|
@php
|
|
|
|
$route = explode('.', Route::currentRouteName());
|
|
|
|
@endphp
|
|
|
|
<div class="d-flex flex-row flex-center">
|
2023-07-20 02:42:53 +00:00
|
|
|
@if(!Auth::user()->hasRole('ad'))
|
|
|
|
<a href="{{ route($route[0].'.odner',$model->id) }}" target="_blank"
|
|
|
|
class="btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
2023-08-10 04:35:07 +00:00
|
|
|
{!! getIcon("printer", "text-primary","duotune") !!} Label Odner
|
2023-07-20 02:42:53 +00:00
|
|
|
</a>
|
|
|
|
@endif
|
2023-05-26 02:31:37 +00:00
|
|
|
@if(in_array($model->status,[1,4,5,6,7,9]) && Auth::user()->can($route[0].'.read'))
|
2023-07-20 02:42:53 +00:00
|
|
|
@if($model->status == 4 && Auth::user()->hasRole('dd') && $model->approval_flag==1)
|
2023-05-26 02:31:37 +00:00
|
|
|
<a href="{{ route($route[0].'.download',$model->id) }}"
|
|
|
|
class="approve-download btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
|
|
|
{!! getIcon("cloud-download", "text-info","duotune") !!} Approve Download
|
|
|
|
</a>
|
2023-07-20 02:42:53 +00:00
|
|
|
@elseif($model->status == 1 && Auth::user()->hasRole('eo') && $model->approval_flag==1)
|
2023-05-26 02:31:37 +00:00
|
|
|
<a href="{{ route($route[0].'.download',$model->id) }}"
|
|
|
|
class="btn-download btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
|
|
|
{!! getIcon("cloud-download", "text-info","duotune") !!} Request Download
|
|
|
|
</a>
|
2023-08-10 04:35:07 +00:00
|
|
|
@elseif($model->status == 5 || ($model->status==1 && $model->approval_flag!==1) || Auth::user()->hasRole('ad'))
|
2023-05-26 02:31:37 +00:00
|
|
|
<a href="{{ route($route[0].'.download',$model->id) }}" target="_blank"
|
|
|
|
class="btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
|
|
|
{!! getIcon("cloud-download", "text-success","duotune") !!} Download
|
|
|
|
</a>
|
|
|
|
@endif
|
2023-05-15 10:03:46 +00:00
|
|
|
|
2023-05-26 04:10:23 +00:00
|
|
|
@if(Auth::user()->can($route[0].'.read'))
|
2023-07-20 02:42:53 +00:00
|
|
|
@if( Auth::user()->hasRole('eo'))
|
2023-05-26 04:10:23 +00:00
|
|
|
@if($model->aktif == 1)
|
|
|
|
<a href="{{ route($route[0].'.aktif',$model->id) }}"
|
|
|
|
class="btn-aktif btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
2023-05-26 02:31:37 +00:00
|
|
|
{!! getIcon("check-square", "text-success","duotune") !!} Aktif
|
2023-05-26 04:10:23 +00:00
|
|
|
</a>
|
|
|
|
@else
|
|
|
|
<span
|
|
|
|
class="btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
2023-05-26 02:31:37 +00:00
|
|
|
{!! getIcon("cross-square", "text-danger","duotune") !!} Tidak Aktif
|
2023-05-26 04:10:23 +00:00
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
|
2023-07-20 02:42:53 +00:00
|
|
|
@elseif(Auth::user()->hasRole('dd') && $model->status == 9)
|
2023-05-26 02:31:37 +00:00
|
|
|
<a href="{{ route($route[0].'.aktif',$model->id) }}"
|
|
|
|
class="btn-approve-aktif btn btn-bg-light btn-active-light-primary btn-sm me-1">
|
|
|
|
{!! getIcon("check-square", "text-success","duotune") !!} Approve Non Aktif
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
@endif
|
|
|
|
|
2023-07-20 02:42:53 +00:00
|
|
|
@if(Auth::user()->can($route[0].'.delete'))
|
2023-05-26 02:31:37 +00:00
|
|
|
{!! Form::open(['method' => 'DELETE','route' => [$route[0].'.destroy', $model->id],'class'=>'']) !!}
|
2023-07-20 02:42:53 +00:00
|
|
|
@if( Auth::user()->hasRole('eo'))
|
|
|
|
{{ Form::button(getIcon("trash", "text-danger","duotune")."Delete", ['type' => 'submit', 'class' => 'delete btn btn-bg-light btn-active-light-danger btn-sm'] ) }}
|
|
|
|
@elseif(Auth::user()->hasRole('dd') && $model->status == 6)
|
2023-05-26 04:10:23 +00:00
|
|
|
{{ 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'] ) }}
|
2023-05-26 02:53:08 +00:00
|
|
|
@endif
|
2023-05-26 02:31:37 +00:00
|
|
|
{!! Form::close() !!}
|
2023-05-26 04:10:23 +00:00
|
|
|
|
|
|
|
@if(in_array($model->status,[6,7,9]) && Auth::user()->can($route[0].'.read'))
|
|
|
|
<a href="{{ route($route[0].'.edit',['document' => $model->id]) }}"
|
|
|
|
class="kt_edit_form btn btn-bg-light btn-active-light-warning btn-sm me-1">
|
|
|
|
{!! getIcon("eye", "text-warning","duotune") !!} View
|
|
|
|
</a>
|
|
|
|
@endif
|
2023-05-26 02:31:37 +00:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@elseif($model->status == 0)
|
2023-07-20 02:42:53 +00:00
|
|
|
@if(Auth::user()->hasRole('dd'))
|
2023-05-26 02:31:37 +00:00
|
|
|
<a href="{{ route($route[0].'.edit',['document' => $model->id]) }}"
|
|
|
|
class="kt_edit_form btn btn-bg-light btn-active-light-warning btn-sm me-1">
|
|
|
|
{!! getIcon("eye", "text-warning","duotune") !!} View
|
|
|
|
</a>
|
|
|
|
@endif
|
2023-05-25 01:53:06 +00:00
|
|
|
@endif
|
2023-05-26 02:31:37 +00:00
|
|
|
|
2023-05-15 10:03:46 +00:00
|
|
|
</div>
|