added form parking / toll
This commit is contained in:
@@ -101,6 +101,7 @@
|
||||
<th>Nama</th>
|
||||
<th>Cabang</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Type</th>
|
||||
<th>Liter</th>
|
||||
<th>Keterangan</th>
|
||||
<th>Total</th>
|
||||
@@ -135,6 +136,16 @@
|
||||
<td>{{ $item->user->name }}</td>
|
||||
<td>{{ $item->user->cabang->cabang->name }}</td>
|
||||
<td>{{ \Carbon\Carbon::parse($item->tanggal)->locale('id')->isoFormat('dddd, D MMMM Y HH:mm:ss') }}</td>
|
||||
<td>
|
||||
{{-- gunakan badge --}}
|
||||
@if ($item->type == 'gasoline')
|
||||
<span class="badge badge-info">Gasoline</span>
|
||||
@elseif ($item->type == 'parking_toll')
|
||||
<span class="badge badge-warning text-white">Parking / Toll</span>
|
||||
@else
|
||||
<span class="badge badge-secondary">Unknown</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->liter }}</td>
|
||||
<td>{{ $item->keterangan }}</td>
|
||||
<td>{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||
@@ -309,7 +320,7 @@
|
||||
<strong>User:</strong> <span id="user"></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Tipe:</strong> Vehicle Running Cost
|
||||
<strong>Tipe:</strong> <span id="type"></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Tanggal & Waktu:</strong> <span id="tanggal"></span>
|
||||
@@ -377,7 +388,7 @@
|
||||
<strong>User:</strong> <span id="final_user"></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Tipe:</strong> Vehicle Running Cost
|
||||
<strong>Tipe:</strong> <span id="final_type"></span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<strong>Tanggal & Waktu:</strong> <span id="final_tanggal"></span>
|
||||
@@ -491,6 +502,9 @@
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
}));
|
||||
|
||||
// untuk type gunakan badge
|
||||
$('#type').html(data.type.split('_').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' '));
|
||||
|
||||
$('#jarak').text(data.jarak);
|
||||
$('#liter').text(data.liter);
|
||||
@@ -545,6 +559,8 @@
|
||||
day: 'numeric'
|
||||
}));
|
||||
|
||||
$('#final_type').html(data.type.split('_').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' '));
|
||||
|
||||
$('#final_jarak').text(data.jarak);
|
||||
$('#final_liter').text(data.liter);
|
||||
$('#final_tipe_bensin').text(data.tipe_bensin);
|
||||
|
||||
Reference in New Issue
Block a user