cat_name
This commit is contained in:
@ -74,7 +74,7 @@ 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, rltm.crt_d, rltm.crt crt_rltm,
|
||||
dvc.crt, dvc.simcard, fuel_curr, dvc.protocol
|
||||
dvc.crt, dvc.simcard, fuel_curr, dvc.protocol, v.cat_id, vc.name cat_name
|
||||
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
|
||||
@ -82,6 +82,7 @@ class VehiclesController extends Controller
|
||||
LEFT JOIN t_clients AS client ON vdr.client_group_id = client.id
|
||||
LEFT JOIN t_devices AS dvc ON v.device_id = dvc.device_id
|
||||
left join t_gps_tracks_rltm rltm on rltm.vhc_id = v.id
|
||||
LEFT JOIN t_vehicles_cats AS vc ON v.cat_id = vc.id
|
||||
WHERE v.dlt is null
|
||||
ORDER BY v.id ASC
|
||||
");
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<th class="">Vehicle</th>
|
||||
<th class="">Name</th>
|
||||
<th class="">Manufacture Year</th>
|
||||
<th class="">Type</th>
|
||||
<th class="">Category/<br>Type</th>
|
||||
<th class="">Service Start</th>
|
||||
@if ($user_role != \App\Models\Users::ROLE_VENDOR)
|
||||
<th class="">Device</th>
|
||||
@ -823,9 +823,9 @@
|
||||
searchable: true,
|
||||
render: function (data, type, row, meta) {
|
||||
return `
|
||||
<img src="${State.storage_lara}${row.fvhc_img}" class="img-fluid thumb-img-table" /><br>
|
||||
${row.nopol1} ${row.nopol2} ${row.nopol3}
|
||||
`;
|
||||
<img src="${State.storage_lara}${row.fvhc_img}" class="img-fluid thumb-img-table" /><br>
|
||||
${row.nopol1} ${row.nopol2} ${row.nopol3}
|
||||
`;
|
||||
},
|
||||
createdCell: function (td, cellData, rowData, row, col) {
|
||||
$(td).attr('data-vid', rowData.vid);
|
||||
@ -854,7 +854,11 @@
|
||||
searchable: true,
|
||||
render: function (data, type, row, meta) {
|
||||
// return (`${row.brand_name}<br>-<br>${data}`);
|
||||
return data;
|
||||
const a = `
|
||||
${row.cat_name}<br>
|
||||
${row.cat_name != row.type_name ? row.type_name : ''}
|
||||
`;
|
||||
return a;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user