From f62668e54ee3242711faf1ac22a4322a0464ee19 Mon Sep 17 00:00:00 2001 From: dharaneesh-r Date: Tue, 21 Jul 2026 16:26:45 +0530 Subject: [PATCH] reponsived the website and login fix done --- src/App.tsx | 17 +- src/components/DashboardView.tsx | 4 +- src/components/DeliveriesView.tsx | 2 +- src/components/DispatchHubView.tsx | 54 +- src/components/DispatchView.css | 22151 +++++++++++++------------ src/components/Header.tsx | 20 +- src/components/InventoryView.tsx | 4 +- src/components/LoginView.tsx | 101 +- src/components/OrderDetailsModal.css | 12 + src/components/OrdersView.tsx | 2 +- src/components/PosView.tsx | 4 +- src/components/SettingsView.tsx | 2 +- src/components/Sidebar.tsx | 5 + src/components/UserStoreSidebar.tsx | 5 + src/index.css | 11 + src/services/auth.ts | 2 +- 16 files changed, 11203 insertions(+), 11193 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 8395b33..11f809f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -115,7 +115,18 @@ export default function App() { const [isCoimbatoreView, setIsCoimbatoreView] = useState(false); const [searchQuery, setSearchQuery] = useState(''); - const [sidebarOpen, setSidebarOpen] = useState(true); + const [sidebarOpen, setSidebarOpen] = useState(() => typeof window !== 'undefined' ? window.innerWidth >= 768 : true); + + // Auto adapt sidebar state on window resize + useEffect(() => { + const handleResize = () => { + if (window.innerWidth < 768) { + setSidebarOpen(false); + } + }; + window.addEventListener('resize', handleResize); + return () => window.removeEventListener('resize', handleResize); + }, []); // Scope every Fiesta query to the signed-in merchant. The login record carries // the user's tenantid; fall back to the shared constant only when it's absent @@ -627,8 +638,8 @@ export default function App() { /> {/* Main core pages payload area */} -
-
+
+
} /> -

+

Month-to-date order operations for {tenantName}, pulled live from the API.

@@ -202,7 +202,7 @@ export default function DashboardView({ searchQuery, tenantId = FIESTA_TENANT_ID )} {/* KPI cards — all live from getordersummary / getinvoiceinsight */} -
+
{kpis.map((kpi) => { const Icon = kpi.icon; return ( diff --git a/src/components/DeliveriesView.tsx b/src/components/DeliveriesView.tsx index b8c6068..fd6f198 100644 --- a/src/components/DeliveriesView.tsx +++ b/src/components/DeliveriesView.tsx @@ -146,7 +146,7 @@ export default function DeliveriesView({ searchQuery = '', locationid, tenantId {/* Status tabs + search */}
-
+
{STATUS_TABS.map((t) => ( setStatus(t.key)} count={statusCounts[t.key] ?? 0}>{t.label} diff --git a/src/components/DispatchHubView.tsx b/src/components/DispatchHubView.tsx index 9b888a6..b7f55c8 100644 --- a/src/components/DispatchHubView.tsx +++ b/src/components/DispatchHubView.tsx @@ -45,24 +45,24 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I }; return ( -
+
{/* ── Unified Hub Header ── */} -
-
-
-
C
-
Console
+
+
+
+
C
+
Console
- + - Coimbatore + Coimbatore
-
+
{deliveriesQ.isLoading ? ( Syncing @@ -72,26 +72,26 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I Offline ) : totalOrders === 0 ? ( - + No deliveries today ) : ( - + Live · {totalOrders} orders )} -
- -
- +
+
- - Date {isToday && TODAY} + + Date {isToday && TODAY} - {prettyDate} + {prettyDate}
-
@@ -110,11 +110,11 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
{/* ── Unified Tab Row ── */} -
-
+
+
{/* Sub-tabs for Map View */} -
+
@@ -100,13 +100,13 @@ export default function Header({ {/* Dynamic Store Name Context */} {storeContext && ( -
- - {storeContext.icon && } - {storeContext.storeName} +
+ + {storeContext.icon && } + {storeContext.storeName} {storeContext.branchName && ( - + {storeContext.branchName} )} diff --git a/src/components/InventoryView.tsx b/src/components/InventoryView.tsx index 93ba709..152956b 100644 --- a/src/components/InventoryView.tsx +++ b/src/components/InventoryView.tsx @@ -483,7 +483,7 @@ export default function InventoryView({

Pick products & set quantities — selected items appear in every store's catalogue.

-
+
-
+
{/* ── Left brand / hero panel (desktop only) ── */} -
+
{/* Layered ambient glows */} -
-
-
+
+
{/* Subtle dot-grid texture */}
-
+
{/* Logo */} -
- nearledaily +
+ nearledaily
- {/* Hero */} -
- {/* Eyebrow */} - - - Secure Merchant Console - + {/* Eyebrow badge */} +
+ + Secure Merchant Console +
-

- All Operations -
+

+ All Operations
+ In One Console -

-

- Monitor regional hubs, track live order operations, and manage your entire store network from a single command center. -

- - {/* Glassmorphic live-snapshot preview card */} -
-
- Live Operations - - - LIVE - -
- -
-
-

2,480

-

Orders today

-
-
-

98.6%

-

Fulfillment

-
-
- - {/* Mini bar chart */} -
- {[45, 62, 38, 70, 52, 80, 60, 90, 55, 74].map((h, i) => ( -
- ))} -
-
-
- - {/* Trust stats + copyright */} -
-
- {[ - { v: '120+', l: 'Regional hubs' }, - { v: '99.9%', l: 'Platform uptime' }, - { v: '24/7', l: 'Live monitoring' }, - ].map((s) => ( -
-

{s.v}

-

{s.l}

-
- ))} -
-

- © 2026 nearledaily · All rights reserved -

-
+ + + +

+ Monitor regional hubs, track live order operations, and manage your entire store network from a single command center. +

diff --git a/src/components/OrderDetailsModal.css b/src/components/OrderDetailsModal.css index f099e49..0679bf9 100644 --- a/src/components/OrderDetailsModal.css +++ b/src/components/OrderDetailsModal.css @@ -339,3 +339,15 @@ from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } } + +@media (max-width: 640px) { + .odm-overlay { + padding: 12px !important; + } + .odm-overlay .odm-card { + max-width: 100% !important; + max-height: 92vh !important; + border-radius: 14px !important; + } +} + diff --git a/src/components/OrdersView.tsx b/src/components/OrdersView.tsx index 09ea646..b45d621 100644 --- a/src/components/OrdersView.tsx +++ b/src/components/OrdersView.tsx @@ -322,7 +322,7 @@ export default function OrdersView({ searchQuery = '', locationid, tenantId = FI {/* Status tabs + search */}
-
+
{STATUS_TABS.map((t) => { // Single brand accent for the tab row (calmer than per-status colours); // the per-status hue still appears on the row Status chip where it aids scanning. diff --git a/src/components/PosView.tsx b/src/components/PosView.tsx index 1f362e6..dcc435b 100644 --- a/src/components/PosView.tsx +++ b/src/components/PosView.tsx @@ -471,7 +471,8 @@ export default function PosView({ locationid, tenantId = FIESTA_TENANT_ID }: Pos
) : ( - +
+
@@ -604,6 +605,7 @@ export default function PosView({ locationid, tenantId = FIESTA_TENANT_ID }: Pos ))}
Product
+
)}
diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsx index e6d4f54..72e12a6 100644 --- a/src/components/SettingsView.tsx +++ b/src/components/SettingsView.tsx @@ -287,7 +287,7 @@ export default function SettingsView({ tenantId = FIESTA_TENANT_ID, user }: Sett
{/* Navigation tab rail */} -