From 7b79a32d66a31ad0b270f28435709c00aab6c3b6 Mon Sep 17 00:00:00 2001 From: riyadhafraa <49757212-riyadhafraa@users.noreply.replit.com> Date: Tue, 5 May 2026 07:51:36 +0000 Subject: [PATCH] Update site colors and add order notification badge Updates primary color to navy, adjusts icon tile shadows, and adds a real-time notification badge for incoming orders to the home page. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: dde9ba68-1907-4b4b-928d-4ea5bca215a7 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/UggHvbd Replit-Helium-Checkpoint-Created: true --- artifacts/tx-os/src/index.css | 12 +++++------ artifacts/tx-os/src/pages/home.tsx | 27 ++++++++++++++++++------ attached_assets/image_1777967058321.png | Bin 0 -> 1366 bytes attached_assets/image_1777967123954.png | Bin 0 -> 32625 bytes attached_assets/image_1777967138468.png | Bin 0 -> 32625 bytes attached_assets/image_1777967492557.png | Bin 0 -> 12089 bytes 6 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 attached_assets/image_1777967058321.png create mode 100644 attached_assets/image_1777967123954.png create mode 100644 attached_assets/image_1777967138468.png create mode 100644 attached_assets/image_1777967492557.png diff --git a/artifacts/tx-os/src/index.css b/artifacts/tx-os/src/index.css index 06dd7068..7b446e28 100644 --- a/artifacts/tx-os/src/index.css +++ b/artifacts/tx-os/src/index.css @@ -69,7 +69,7 @@ --card-foreground: 222 47% 11%; --popover: 0 0% 100%; --popover-foreground: 222 47% 11%; - --primary: 217 91% 60%; /* #3B82F6 */ + --primary: 218 70% 15%; /* #0B1E3F */ --primary-foreground: 0 0% 100%; --secondary: 173 80% 40%; /* teal-500 */ --secondary-foreground: 0 0% 100%; @@ -81,16 +81,16 @@ --destructive-foreground: 0 0% 100%; --border: 214 32% 91%; /* #E2E8F0 */ --input: 214 32% 91%; - --ring: 217 91% 60%; + --ring: 218 70% 15%; --sidebar: 0 0% 100%; --sidebar-foreground: 222 47% 11%; --sidebar-border: 214 32% 91%; - --sidebar-primary: 217 91% 60%; + --sidebar-primary: 218 70% 15%; --sidebar-primary-foreground: 0 0% 100%; --sidebar-accent: 210 40% 96%; --sidebar-accent-foreground: 222 47% 11%; - --sidebar-ring: 217 91% 60%; + --sidebar-ring: 218 70% 15%; /* * Site-wide default font. DIN Next LT Arabic ships locally via @@ -178,12 +178,12 @@ align-items: center; justify-content: center; border-radius: 1rem; - box-shadow: 0 6px 18px rgba(59, 130, 246, 0.18); + box-shadow: 0 6px 18px rgba(11, 30, 63, 0.18); transition: transform 0.2s ease, box-shadow 0.2s ease; } .icon-tile:hover { transform: translateY(-2px); - box-shadow: 0 10px 24px rgba(59, 130, 246, 0.22); + box-shadow: 0 10px 24px rgba(11, 30, 63, 0.22); } .icon-tile-blue { background: linear-gradient(135deg, #60A5FA, #3B82F6); } .icon-tile-purple { background: linear-gradient(135deg, #C084FC, #8B5CF6); } diff --git a/artifacts/tx-os/src/pages/home.tsx b/artifacts/tx-os/src/pages/home.tsx index e6e24457..8afe6eab 100644 --- a/artifacts/tx-os/src/pages/home.tsx +++ b/artifacts/tx-os/src/pages/home.tsx @@ -8,6 +8,8 @@ import { getGetHomeStatsQueryKey, useListNotifications, getListNotificationsQueryKey, + useListIncomingServiceOrders, + getListIncomingServiceOrdersQueryKey, useLogout, useUpdateLanguage, useUpdateMyAppOrder, @@ -391,6 +393,18 @@ export default function HomePage() { const { data: stats } = useGetHomeStats({ query: { queryKey: getGetHomeStatsQueryKey() } }); const { data: notifications } = useListNotifications({ query: { queryKey: getListNotificationsQueryKey() } }); + const isAdmin = user?.roles?.includes("admin") ?? false; + const canReceiveOrders = + isAdmin || (user?.roles?.includes("order_receiver") ?? false); + const { data: incomingOrders } = useListIncomingServiceOrders({ + query: { + queryKey: getListIncomingServiceOrdersQueryKey(), + enabled: canReceiveOrders, + }, + }); + const pendingOrdersCount = + incomingOrders?.filter((o) => o.status === "pending" && !o.assignedTo).length ?? 0; + const logout = useLogout(); const updateLanguage = useUpdateLanguage(); @@ -409,10 +423,6 @@ export default function HomePage() { ? (user?.displayNameAr ?? user?.username ?? "") : (user?.displayNameEn ?? user?.username ?? ""); - const isAdmin = user?.roles?.includes("admin") ?? false; - const canReceiveOrders = - isAdmin || (user?.roles?.includes("order_receiver") ?? false); - const handleLogout = () => { logout.mutate(undefined, { onSuccess: () => { @@ -496,9 +506,14 @@ export default function HomePage() { )}