tgl filter 1

This commit is contained in:
Pringgosutono
2025-09-25 19:22:42 +07:00
parent 111c3e35a1
commit 1331e4a46e

View File

@ -1400,11 +1400,11 @@
$('#infoJob').addClass('d-none'); $('#infoJob').addClass('d-none');
$('#infoMovement').removeClass('d-none'); $('#infoMovement').removeClass('d-none');
$('#infoMovement').addClass('d-block'); $('#infoMovement').addClass('d-block');
// if (State.inShowVid) { if (State.inShowVid) {
// let cache = !(State.inShowVid != State.loadedLastMoveVid); let cache = !(State.inShowVid != State.loadedLastMoveVid);
// Trucks.bundleShowRouteTruck(cache); // jika data yang diload sebelumnya beda, maka tidak mengambil dari cache Trucks.bundleShowRouteTruck(cache, false); // jika data yang diload sebelumnya beda, maka tidak mengambil dari cache
// } }
Menu.clearListMovements(); // Menu.clearListMovements();
} }
}, },
eventListVehicle: function() { eventListVehicle: function() {
@ -2633,10 +2633,11 @@
// last movement // last movement
// $('#infoVehicles-infoMove').text('Last 24H from ' + moment.unix(truck?.lst_loc_crt).format('DD MMM YYYY HH:mm')); // $('#infoVehicles-infoMove').text('Last 24H from ' + moment.unix(truck?.lst_loc_crt).format('DD MMM YYYY HH:mm'));
}, },
bundleShowRouteTruck: async function(cache = false) { bundleShowRouteTruck: async function(cache = false, needUpdate = true) {
Menu.clearListMovements(); Menu.clearListMovements();
if (State.inShowVid != State.loadedLastMoveVid) $('#historyStartDate').trigger('clearFilterHistoryDate'); if (State.inShowVid != State.loadedLastMoveVid)$('#historyStartDate').trigger('clearFilterHistoryDate');
if(needUpdate){
const getLastMove = await Trucks.getLastMove(State.inShowVid, cache); const getLastMove = await Trucks.getLastMove(State.inShowVid, cache);
Trucks.last_move = getLastMove.flat() Trucks.last_move = getLastMove.flat()
@ -2646,6 +2647,7 @@
return false; return false;
} }
Trucks.showLastMoveToView(getLastMove); Trucks.showLastMoveToView(getLastMove);
}
}, },
getLastMove: async function(vid, cache = false) { getLastMove: async function(vid, cache = false) {
State.loadedLastMoveVid = vid; State.loadedLastMoveVid = vid;