update, fix

This commit is contained in:
Pringgosutono
2025-12-01 19:47:31 +07:00
parent fd5a88205c
commit 1b2321e420
2 changed files with 16 additions and 2 deletions

View File

@ -73,7 +73,8 @@ class VehiclesController extends Controller
}
$list = DB::select("SELECT
v.id, v.name, v.device_id, nopol1, nopol2, nopol3, v.sum_milleage,
fvhc_img, vyear, t.`desc` type_name, c_name company_name, crt_d, dvc.crt
fvhc_img, vyear, t.`desc` type_name, c_name company_name, crt_d,
dvc.crt, dvc.simcard
FROM t_vehicles as v
INNER JOIN t_vehicles_detail AS vd ON v.id = vd.vid
LEFT JOIN t_vehicles_types AS t ON v.type_id = t.id

View File

@ -50,6 +50,7 @@
<th class="">Service Start</th>
@if ($user_role != \App\Models\Users::ROLE_VENDOR)
<th class="">Device ID</th>
<th class="">SIM Card</th>
<th class="">Last Update</th>
@endif
<th class="">Type</th>
@ -809,6 +810,17 @@
return Helper.splitEvery4Char(data);
// return `<span class="d-none">${data}</span>` + Helper.splitEvery4Char(`${data}`);
},
},
{
data: 'simcard',
className: 'text-end text-nowrap',
visible: true,
orderable: true,
searchable: true,
render: function(data, type, row, meta) {
return Helper.splitEvery4Char(data);
// return `<span class="d-none">${data}</span>` + Helper.splitEvery4Char(`${data}`);
},
},
{
data: 'crt_d',
@ -817,7 +829,7 @@
orderable: true,
searchable: true,
render: function(data, type, row, meta) {
return moment.unix(data).format('DD MMM YYYY');
return data ? moment.unix(data).format('DD MMM YYYY HH:mm') : '-';
},
},
@endif
@ -1028,6 +1040,7 @@
// return data || 'All Group';
// }
// },
{ data: 'device_id', visible: false},
],
buttons: [
{