Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/shopify-app/app/features/delivery/route-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function readRouteOptimizedSnapshot(value) {
export function getDefaultRouteGroupChildName(index, child) {
const routeIdx = numberOrUndefined(child?.routeIdx);
const sortOrder = numberOrUndefined(child?.sortOrder);
return `Route ${routeIdx ?? sortOrder ?? index + 1}`;
return `#${routeIdx ?? sortOrder ?? index + 1}`;
}

export function getRouteGroupChildRouteName(routeGroup, child, routePlan, index) {
Expand Down
4 changes: 2 additions & 2 deletions apps/shopify-app/app/routes/app.routes.$routeId.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ function getNextChildRouteDraft(routeRows) {
const routeNumber = (maxRouteIdx || routeRows.length) + 1;
return {
color: getUnusedRouteColor(null, usedColors, routeNumber - 1),
label: `Route ${routeNumber}`,
label: `#${routeNumber}`,
routeIdx: routeNumber,
routeIndex: routeNumber,
};
Expand Down Expand Up @@ -1381,7 +1381,7 @@ export default function RouteDetailPage() {
);
const routeGroupStopsSource = routeGroup ? allRouteGroupStops : orderedRouteStops;
const routeGroupChildRows = useMemo(() => buildRouteGroupChildRows(routeGroup, routeChildDetailsByRoutePlanId, routeGroupStopsSource), [routeChildDetailsByRoutePlanId, routeGroup, routeGroupStopsSource]);
const defaultRouteCandidateTitle = isRouteGroupDetail ? "Route 1" : routeDetailTitle;
const defaultRouteCandidateTitle = isRouteGroupDetail ? "#1" : routeDetailTitle;
const routeStartDateTimeValue = getRouteStartDateTimeValue(effectiveRoutePlan);
const routeStartTimeLabel = getRouteStartTimeLabel(routeStartDateTimeValue);
const routeDeliveredCount = countRouteStopsByStatus(orderedRouteStops, ["DELIVERED", "FULFILLED"]);
Expand Down
2 changes: 1 addition & 1 deletion apps/shopify-app/tests/routes-page.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ test("Route detail renders route lines and a stop timeline below the map", () =>
assert.match(routeDetailSource, />Total distance<\/th>/);
assert.match(routeDetailSource, />Total weight<\/th>/);
assert.match(routeDetailSource, />Created<\/th>/);
assert.match(routeDetailSource, /const defaultRouteCandidateTitle = isRouteGroupDetail \? "Route 1" : routeDetailTitle/);
assert.match(routeDetailSource, /const defaultRouteCandidateTitle = isRouteGroupDetail \? "#1" : routeDetailTitle/);
assert.match(routeDetailSource, /title: getRouteGroupChildRouteName\(routeGroup, child, detail\?\.routePlan \?\? child\?\.routePlan, index\)/);
assert.match(routeDetailSource, /aria-label="Change route driver"/);
assert.match(routeDetailSource, /aria-label="Change route vehicle"/);
Expand Down