diff --git a/public/service-worker.js b/public/service-worker.js index 5cc8e2c..612d17f 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -1,8 +1,8 @@ const isLocalhost = self.location.hostname === "localhost" || self.location.hostname === "127.0.0.1"; if (!isLocalhost) { - const STATIC_CACHE = "construction-delivery-static-v11"; - const RUNTIME_CACHE = "construction-delivery-runtime-v11"; + const STATIC_CACHE = "construction-delivery-static-v49"; + const RUNTIME_CACHE = "construction-delivery-runtime-v49"; const APP_SHELL_URLS = ["/", "/index.html", "/manifest.webmanifest", "/icons/icon-192.png", "/icons/icon-512.png"]; self.addEventListener("install", (event) => { diff --git a/src/components/logistics/LogisticsReadinessBoard.jsx b/src/components/logistics/LogisticsReadinessBoard.jsx index 8bda277..eb5e035 100644 --- a/src/components/logistics/LogisticsReadinessBoard.jsx +++ b/src/components/logistics/LogisticsReadinessBoard.jsx @@ -110,19 +110,32 @@ const TableHeader = () => ( ); +// Stale = updatedAt > 24h and not in agreed/delivered/picked_up/cancelled +const STALE_STATUSES = ["delivery:agreed", "delivery:driver_assigned", "delivery:loaded", "delivery:on_route", "delivery:delivered", "delivery:picked_up", "delivery:pickup", "delivery:cancelled"]; +const isStale = (group) => { + const sv = getOrderGroupDisplayStatusValue(group); + if (STALE_STATUSES.includes(sv)) return false; + if (!group.updatedAt) return false; + const diff = Date.now() - new Date(group.updatedAt).getTime(); + return diff > 24 * 60 * 60 * 1000; +}; + +const isLinkOpened = (group) => !!(group.invitationOpenedAt || (group.invitationAccessCount && group.invitationAccessCount > 0)); + const renderRow = (group, onSelectSet) => ( + {hasFirstSms && !hasSecondSms && ( + + )} + + )} + + ); +}; \ No newline at end of file diff --git a/src/layouts/AppShell.jsx b/src/layouts/AppShell.jsx index 53a162d..0e70315 100644 --- a/src/layouts/AppShell.jsx +++ b/src/layouts/AppShell.jsx @@ -29,6 +29,7 @@ export const AppShell = ({ }) => { const shouldShowMobileNav = !isGuideOpen && navItems.length > 1; const [showNotifSettings, setShowNotifSettings] = React.useState(false); + const navigate = useNavigate(); if (showNotifSettings) { return ( diff --git a/src/styles/fontSettings.css b/src/styles/fontSettings.css index 6f71344..6a1c6b2 100644 --- a/src/styles/fontSettings.css +++ b/src/styles/fontSettings.css @@ -47,9 +47,18 @@ /* ── Zone overrides ────────────────────────────────────────────────────── .fs-zone-* wrappers override Tailwind text-* classes inside them. Specificity: .fs-zone-X .text-Y (0,2,0) > .text-Y (0,1,0). + Body zone FIRST — specific zones (table/card/nav/heading) come after + and win at equal specificity when nested inside body. This lets us scale fonts without patching every component. ────────────────────────────────────────────────────────────────────────── */ +/* Body zone — FIRST so specific zones inside body win at equal specificity */ +.fs-zone-body { font-size: calc(1rem * var(--fs-scale-body, 1)); } +.fs-zone-body .text-xs { font-size: calc(0.75rem * var(--fs-scale-body, 1)); } +.fs-zone-body .text-sm { font-size: calc(0.875rem * var(--fs-scale-body, 1)); } +.fs-zone-body .text-base { font-size: calc(1rem * var(--fs-scale-body, 1)); } +.fs-zone-body .text-lg { font-size: calc(1.125rem * var(--fs-scale-body, 1)); } + /* Table zone */ .fs-zone-table { font-size: calc(0.875rem * var(--fs-scale-table, 1)); } .fs-zone-table .text-xs { font-size: calc(0.75rem * var(--fs-scale-table, 1)); } @@ -91,11 +100,4 @@ /* Small text zone */ .fs-zone-small { font-size: calc(0.75rem * var(--fs-scale-small, 1)); } .fs-zone-small .text-xs { font-size: calc(0.75rem * var(--fs-scale-small, 1)); } -.fs-zone-small .text-sm { font-size: calc(0.875rem * var(--fs-scale-small, 1)); } - -/* Body zone — LAST so table/card/nav/heading zones inside body win at equal specificity */ -.fs-zone-body { font-size: calc(1rem * var(--fs-scale-body, 1)); } -.fs-zone-body .text-xs { font-size: calc(0.75rem * var(--fs-scale-body, 1)); } -.fs-zone-body .text-sm { font-size: calc(0.875rem * var(--fs-scale-body, 1)); } -.fs-zone-body .text-base { font-size: calc(1rem * var(--fs-scale-body, 1)); } -.fs-zone-body .text-lg { font-size: calc(1.125rem * var(--fs-scale-body, 1)); } \ No newline at end of file +.fs-zone-small .text-sm { font-size: calc(0.875rem * var(--fs-scale-small, 1)); } \ No newline at end of file