diff --git a/src/pages/nearle/dispatch/Dispatch.js b/src/pages/nearle/dispatch/Dispatch.js index 3303593..919a875 100644 --- a/src/pages/nearle/dispatch/Dispatch.js +++ b/src/pages/nearle/dispatch/Dispatch.js @@ -3921,8 +3921,8 @@ const Dispatch = ({ // delivery, so the tiles reflect that one stop alone. const activeOnly = isAllActiveView ? getActiveOrder(focusedRider.orders) : null; const panelOrders = isAllActiveView ? (activeOnly ? [activeOnly] : []) : focusedRider.orders; - const totalKm = panelOrders.reduce((s, o) => s + parseFloat(o.actualkms || o.kms || 0), 0); - const totalRiderKm = panelOrders.reduce((s, o) => s + parseFloat(o.riderkms || 0), 0); + const totalPlannedKm = panelOrders.reduce((s, o) => s + parseFloat(o.kms || 0), 0); + const totalActualKm = panelOrders.reduce((s, o) => s + parseFloat(o.actualkms || 0), 0); return (
@@ -3932,13 +3932,13 @@ const Dispatch = ({
-
{totalKm.toFixed(1)}km
-
Distance
+
{totalPlannedKm.toFixed(1)}km
+
Planned KMs
-
{totalRiderKm.toFixed(1)}km
-
Rider KMs
+
{totalActualKm.toFixed(1)}km
+
Actual KMs
);