From d5849f0ab2b2d893107ab78df6cd374ac33eeff0 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Aug 2026 15:12:23 +0000 Subject: [PATCH] feat(logistics): highlight and filter orders with SMS problems --- public/service-worker.js | 4 ++-- .../logistics/LogisticsReadinessBoard.jsx | 12 ++++++++-- src/components/orders/OrderFilters.jsx | 13 ++++++++++ src/services/orderGroupViews.js | 24 +++++++++++++++++++ src/services/supabase/orderGroupRepository.js | 4 +++- 5 files changed, 52 insertions(+), 5 deletions(-) diff --git a/public/service-worker.js b/public/service-worker.js index afadd42..f826386 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-v99"; - const RUNTIME_CACHE = "construction-delivery-runtime-v99"; + const STATIC_CACHE = "construction-delivery-static-v100"; + const RUNTIME_CACHE = "construction-delivery-runtime-v100"; 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 7eac116..35a94e3 100644 --- a/src/components/logistics/LogisticsReadinessBoard.jsx +++ b/src/components/logistics/LogisticsReadinessBoard.jsx @@ -18,6 +18,7 @@ import { getOrderGroupDisplayStatusLabel, getOrderGroupDisplayStatusValue, getOrderGroupStatusTone, + getSmsProblemTone, ORDER_GROUP_DISPLAY_STATUS_OPTIONS, } from "../../services/orderGroupViews"; import { Badge } from "../UI/Badge"; @@ -159,13 +160,19 @@ const renderRow = (g, onSelectSet) => { const statusTone = getOrderGroupStatusTone(g); const stale = isStale(g); const databaseAge = getDatabaseAge(g); + const smsTone = getSmsProblemTone(g); + const smsRowClass = smsTone === "not_sent" + ? "bg-[rgba(239,68,68,0.08)]" + : smsTone === "not_delivered" + ? "bg-[rgba(245,158,11,0.08)]" + : ""; return (