From 2c892b93c304434d9831581b3d50e60658105a09 Mon Sep 17 00:00:00 2001 From: dharaneesh-r Date: Fri, 28 Aug 2026 16:42:19 +0530 Subject: [PATCH] updates on the map configuration and the design --- .../assistant/DoormileAI/AIMessage.jsx | 17 +- src/lib/PageNotFound.jsx | 169 +++++++++++++++--- src/pages/doormile/dispatch/Dispatch.css | 37 ++-- 3 files changed, 172 insertions(+), 51 deletions(-) diff --git a/src/components/assistant/DoormileAI/AIMessage.jsx b/src/components/assistant/DoormileAI/AIMessage.jsx index c97addc..feb58aa 100644 --- a/src/components/assistant/DoormileAI/AIMessage.jsx +++ b/src/components/assistant/DoormileAI/AIMessage.jsx @@ -1,7 +1,7 @@ import { memo, useState } from 'react'; import PropTypes from 'prop-types'; import { AiOutlineCopy as CopyOutlined } from 'react-icons/ai'; -import { LuChevronDown } from 'react-icons/lu'; +import { LuChevronDown, LuDownload } from 'react-icons/lu'; import { HStack } from '@astryxdesign/core/HStack'; import { VStack } from '@astryxdesign/core/VStack'; @@ -112,7 +112,9 @@ const AssistantMessage = ({ message, onCopy, onSubmitForm, onCancelAction, onCho {/* A conversational step that needs a dropdown rather than typing. */} {message.liveStop && ( - )} @@ -195,11 +197,16 @@ const AssistantMessage = ({ message, onCopy, onSubmitForm, onCancelAction, onCho {message.downloadRows?.length > 0 && ( )} diff --git a/src/lib/PageNotFound.jsx b/src/lib/PageNotFound.jsx index 95e9831..253de46 100644 --- a/src/lib/PageNotFound.jsx +++ b/src/lib/PageNotFound.jsx @@ -1,15 +1,17 @@ -import { useLocation, useNavigate } from 'react-router-dom'; -import { Home } from 'lucide-react'; -import { Button, EmptyState, Surface } from '@/components/ds'; +import React from 'react'; +import { useLocation, useNavigate, Link } from 'react-router-dom'; +import { + ArrowLeft, + Radio, + Package, + Bike, + BarChart3, + Home, + MapPin, + Truck +} from 'lucide-react'; import { useAuth } from '@/lib/AuthContext'; -/** - * The 404 page. - * - * Signed-in operators get a second line naming the route table, because a - * missing route in a console is nearly always a link that was renamed rather - * than a page that never existed. - */ export default function PageNotFound() { const location = useLocation(); const navigate = useNavigate(); @@ -17,26 +19,139 @@ export default function PageNotFound() { const path = location.pathname; - return ( -
- - navigate(isAuthenticated ? '/doormile/dispatch' : '/login')}> - {isAuthenticated ? 'Back to Dispatch' : 'Sign in'} - - } - /> + const quickLinks = [ + { + title: 'Live Dispatch', + desc: 'Real-time fleet tracking & active runs', + icon: Radio, + path: '/doormile/dispatch', + color: 'text-rose-600 bg-rose-50 border-rose-200/70 group-hover:bg-rose-100/70' + }, + { + title: 'Orders Management', + desc: 'Pending, assigned, and bulk bookings', + icon: Package, + path: '/doormile/orders', + color: 'text-blue-600 bg-blue-50 border-blue-200/70 group-hover:bg-blue-100/70' + }, + { + title: 'Live Deliveries', + desc: 'Active consignments & transit logs', + icon: Truck, + path: '/doormile/deliveries', + color: 'text-amber-600 bg-amber-50 border-amber-200/70 group-hover:bg-amber-100/70' + }, + { + title: 'Milers Fleet', + desc: 'Rider profiles, roster & status', + icon: Bike, + path: '/doormile/milers', + color: 'text-emerald-600 bg-emerald-50 border-emerald-200/70 group-hover:bg-emerald-100/70' + }, + { + title: 'Reports & Analytics', + desc: 'Daily summaries & financial KPIs', + icon: BarChart3, + path: '/doormile/reports/orderssummary', + color: 'text-purple-600 bg-purple-50 border-purple-200/70 group-hover:bg-purple-100/70' + } + ]; + return ( +
+ {/* Background subtle mesh & grid */} +
+
+ +
+ {/* Top Brand Pill */} +
+ + + Doormile Operations Console + +
+ + {/* Clean 404 Visual Graphic without any overlay icon */} +
+ + 404 + +
+ + {/* Heading & Context */} +

+ Page not found +

+ +

+ The requested destination is not registered in the console or has been moved to a new route. +

+ + {/* Target Path Badge */} +
+ + {path} +
+ + {/* Primary & Secondary Action CTAs */} +
+ + + +
+ + {/* Quick Operations Links */} {isAuthenticated && ( -

- If this address used to work, check the route table in src/App.jsx. -

+
+
+ + Quick Navigation + + Operational shortcuts +
+ +
+ {quickLinks.map((item) => { + const IconComponent = item.icon; + return ( + +
+ +
+
+
+ {item.title} +
+
+ {item.desc} +
+
+ + ); + })} +
+
)} - +
); } diff --git a/src/pages/doormile/dispatch/Dispatch.css b/src/pages/doormile/dispatch/Dispatch.css index 8c75f29..d0c318e 100644 --- a/src/pages/doormile/dispatch/Dispatch.css +++ b/src/pages/doormile/dispatch/Dispatch.css @@ -5237,12 +5237,12 @@ padding-right: 44px; } -/* --- Header: purple gradient with order id + status + rider --- */ +/* --- Header: red gradient with order id + status + rider --- */ .dispatch-container .dispatch-popup .pu-header { - background: var(--color-accent); + background: linear-gradient(135deg, #D81E06 0%, #C8102E 100%); padding: 14px 16px 12px; color: #fff; - border-radius: 5px 5px 0 0; + border-radius: 8px 8px 0 0; } .dispatch-container .dispatch-popup .pu-header-top { @@ -5254,8 +5254,7 @@ } .dispatch-container .dispatch-popup .pu-id { - /* Override the legacy pu-id styling — no separate background, sits on - the purple gradient instead. */ + /* Override the legacy pu-id styling — sits on the red header instead. */ background: transparent; border: 0; border-radius: 0; @@ -5374,13 +5373,13 @@ font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; - color: var(--color-accent); + color: #D81E06; } .dispatch-container .dispatch-popup .pu-header-step-value { font-size: 15px; font-weight: 800; - color: var(--color-accent); + color: #D81E06; white-space: nowrap; } @@ -5405,8 +5404,8 @@ font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; - color: var(--color-accent); - border-bottom: 1px solid rgba(123, 31, 162, 0.18); + color: #D81E06; + border-bottom: 1px solid rgba(216, 30, 6, 0.15); } /* --- Timeline: lay events out as a 2-column grid so the 6-row vertical @@ -5438,18 +5437,18 @@ align-items: flex-start; gap: 8px; padding: 8px 10px; - background: rgba(123, 31, 162, 0.05); - border: 1px solid rgba(123, 31, 162, 0.12); - border-radius: 5px; + background: rgba(216, 30, 6, 0.04); + border: 1px solid rgba(216, 30, 6, 0.1); + border-radius: 6px; min-width: 0; } .dispatch-container .dispatch-popup .pu-detail-icon { width: 26px; height: 26px; - border-radius: 5px; - background: rgba(123, 31, 162, 0.12); - color: var(--color-accent); + border-radius: 6px; + background: rgba(216, 30, 6, 0.1); + color: #D81E06; display: flex; align-items: center; justify-content: center; @@ -5492,7 +5491,7 @@ gap: 6px; margin-top: 8px; padding-top: 8px; - border-top: 1px dashed rgba(123, 31, 162, 0.18); + border-top: 1px dashed rgba(216, 30, 6, 0.18); } .dispatch-container .dispatch-popup .pu-distance-chip { @@ -5500,8 +5499,8 @@ align-items: center; gap: 5px; padding: 5px 10px; - background: linear-gradient(135deg, rgba(123, 31, 162, 0.08), rgba(156, 39, 176, 0.06)); - border: 1px solid rgba(123, 31, 162, 0.2); + background: rgba(216, 30, 6, 0.05); + border: 1px solid rgba(216, 30, 6, 0.15); border-radius: 999px; font-size: 11px; font-weight: 600; @@ -5509,7 +5508,7 @@ .dispatch-container .dispatch-popup .pu-distance-icon { display: inline-flex; - color: var(--color-accent); + color: #D81E06; } .dispatch-container .dispatch-popup .pu-distance-icon svg {