This commit is contained in:
@@ -29,7 +29,6 @@ const RoutesDashboard = () => {
|
||||
const drivers = useSelector(selectAllActiveDrivers);
|
||||
const vehicles = useSelector(selectAllActiveVehicles);
|
||||
const [showSyncCustomersLoading, setShowSyncCustomersLoading] = useState(false);
|
||||
const [hasAutoSynced, setHasAutoSynced] = useState(false);
|
||||
const [keyword, setKeyword] = useState('');
|
||||
|
||||
const [directorSignature, setDirectorSignature] = useState(undefined);
|
||||
@@ -553,12 +552,6 @@ const RoutesDashboard = () => {
|
||||
setRoutesForShowing(allRoutes);
|
||||
setRoutesInboundForShowing(inboundRoutes);
|
||||
setRoutesOutboundForShowing(processRoutesForAbsentCustomers(inboundRoutes, outboundRoutes));
|
||||
|
||||
// Auto-sync customer info for today's routes when they first load (only once)
|
||||
if (allRoutes && allRoutes.length > 0 && !hasAutoSynced && !showSyncCustomersLoading) {
|
||||
setHasAutoSynced(true);
|
||||
syncCustomersInfo();
|
||||
}
|
||||
} else {
|
||||
if (dateSelected > new Date()) {
|
||||
setRoutesForShowing(allTomorrowRoutes);
|
||||
|
||||
Reference in New Issue
Block a user