2024-12-12 18:18:26 +07:00
@ extends ( 'layouts.app' )
@ section ( 'title' )
Dashboard
@ endsection
@ section ( 'admin-content' )
< section class = " content-header " >
< div class = " container-fluid " >
< div class = " row mb-2 " >
< div class = " col-sm-6 " >
< h1 > Forms Up Country </ h1 >
</ div >
< div class = " col-sm-6 " >
< ol class = " breadcrumb float-sm-right " >
< li class = " breadcrumb-item " >< a href = " { { route('dashboard.index') }} " > Dashboard </ a ></ li >
</ li >
</ ol >
</ div >
</ div >
</ div >
</ section >
< section class = " content " >
< div class = " container-fluid " >
< div class = " card card-primary card-outline " >
< div class = " card-body " >
< h4 class = " header-title float-left " > List Data Forms Up Country Anda </ h4 >
< p class = " float-right mb-2 " >
2024-12-16 17:01:55 +07:00
@ if ( auth () -> user () -> can ( 'forms.country.create' ))
< a class = " btn btn-primary text-white " href = " { { route('forms.up-country.create') }} " >
Add New Expense Up Country
</ a >
@ endif
2024-12-12 18:18:26 +07:00
</ p >
< div class = " clearfix " ></ div >
< div class = " dataTables_wrapper dt-bootstrap4 mt-2 " >
@ include ( 'backend.layouts.partials.messages' )
< table id = " dataTable "
class = " table table-bordered table-striped table-head-fixed dataTable dtr-inline "
style = " width:100% " >
< thead class = " bg-light text-capitalize " >
< tr >
< th > #</th>
< th > Nama </ th >
< th > Rayon </ th >
< th > Tanggal </ th >
< th > Tujuan </ th >
< th > Jarak </ th >
< th > Allowance </ th >
2024-12-16 17:01:55 +07:00
< th > Total </ th >
2024-12-12 18:18:26 +07:00
< th > Bukti 1 </ th >
< th > Bukti 2 </ th >
< th > Bukti 3 </ th >
< th > Account Number </ th >
2024-12-16 17:01:55 +07:00
< th > Status </ th >
2024-12-12 18:18:26 +07:00
< th > Aksi </ th >
</ tr >
</ thead >
< tbody >
2024-12-18 12:56:16 +07:00
@ php
use App\Helpers\NextCloudHelper ;
@ endphp
2024-12-16 17:01:55 +07:00
@ foreach ( $forms as $item )
< tr >
< td > {{ $loop -> iteration }} </ td >
< td > {{ $item -> user -> name }} </ td >
< td > {{ $item -> rayon -> code }} </ td >
2024-12-18 12:56:16 +07:00
< td > {{ \Carbon\Carbon :: parse ( $item -> tanggal ) -> locale ( 'id' ) -> isoFormat ( 'D MMMM Y' ) }} </ td >
2024-12-16 17:01:55 +07:00
< td > {{ $item -> tujuan }} </ td >
< td > {{ $item -> jarak }} km </ td >
< td > {{ number_format ( $item -> allowance , 0 , ',' , '.' ) }} </ td >
< td > {{ number_format ( $item -> total , 0 , ',' , '.' ) }} </ td >
2024-12-18 12:56:16 +07:00
< td >
@ if ( $item -> bukti1 )
< a href = " { { NextCloudHelper::getFileUrl( $item->bukti1 ) }} " target = " _blank " >
Download
</ a >
@ else
-
@ endif
</ td >
< td >
@ if ( $item -> bukti2 )
< a href = " { { NextCloudHelper::getFileUrl( $item->bukti2 ) }} " target = " _blank " >
Download
</ a >
@ else
-
@ endif
</ td >
< td >
@ if ( $item -> bukti3 )
< a href = " { { NextCloudHelper::getFileUrl( $item->bukti3 ) }} " target = " _blank " >
Download
</ a >
@ else
-
@ endif
</ td >
2024-12-16 17:01:55 +07:00
< td > {{ $item -> account_number }} </ td >
< td >
@ if ( $item -> status == 'On Progress' )
< span class = " badge badge-warning text-white " > {{ $item -> status }} </ span >
@ elseif ( $item -> status == 'Completed' )
< span class = " badge badge-success text-white " > {{ $item -> status }} </ span >
@ else
< span class = " badge badge-danger text-white " > {{ $item -> status }} </ span >
@ endif
</ td >
< td >
@ if ( auth () -> user () -> can ( 'forms.country.edit' ))
< a href = " { { route('forms.up-country.edit', $item->id ) }} " class = " btn btn-warning btn-sm " >
< i class = " fas fa-edit text-white " ></ i >
</ a >
@ endif
@ if ( auth () -> user () -> can ( 'forms.country.delete' ))
< form action = " { { route('forms.up-country.destroy', $item->id ) }} " method = " POST " class = " d-inline " onsubmit = " return confirm('Are you sure you want to delete this item?'); " >
@ csrf
@ method ( 'DELETE' )
< button type = " submit " class = " btn btn-danger btn-sm " >
< i class = " fas fa-trash " ></ i >
</ button >
</ form >
@ endif
</ td >
</ tr >
@ endforeach
2024-12-12 18:18:26 +07:00
</ tbody >
</ table >
</ div >
</ div >
</ div >
</ div >
</ section >
@ endsection