@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +77 -26
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  42. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  52. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  54. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  56. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  60. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  66. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  70. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  74. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  76. package/package.json +1 -1
@@ -1,312 +1,221 @@
1
1
  import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { useAdminAnalytics as r, useDashboardStats as i } from "../../hooks/useKadaikodiApi.js";
5
- import { formatCurrency as a } from "../../utils/formatters.js";
6
- import { useState as o } from "react";
7
- import { Activity as s, AlertCircle as c, ArrowRight as l, BarChart3 as u, Bell as d, CheckCircle as f, ChevronRight as p, Clock as m, Edit as h, Eye as g, Flame as _, IndianRupee as v, MapPin as y, Package as b, Plus as x, Settings as S, ShoppingCart as C, Star as w, TrendingDown as T, TrendingUp as E, UserCheck as D, Users as O } from "lucide-react";
8
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
9
- import { EmphasisPanel as M, NextSteps as N, PagePurpose as P } from "@burdenoff/fe-libs/ui";
4
+ import { EmptyState as r } from "../../components/EmptyState.js";
5
+ import { useOfferings as i, useOrders as a, useProviderWorkers as o, useProviders as ee, useReviews as s, useUpdateOrderStatus as c } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as l } from "../../utils/formatters.js";
7
+ import { useEffect as te, useMemo as u, useState as ne } from "react";
8
+ import { Activity as re, ArrowRight as d, BarChart3 as f, Bell as p, CheckCircle as m, ChevronRight as h, Clock as g, Edit as _, Eye as v, Flame as ie, IndianRupee as y, MapPin as b, Package as x, Plus as S, Settings as C, ShoppingCart as w, Star as T, TrendingUp as E, UserCheck as ae, Users as oe } from "lucide-react";
9
+ import { Fragment as se, jsx as D, jsxs as O } from "react/jsx-runtime";
10
+ import { EmphasisPanel as ce, NextSteps as k, PagePurpose as le } from "@burdenoff/fe-libs/ui";
10
11
  //#region src/kadaikodi/pages/cart-owner/CartOwnerDashboard.tsx
11
- var F = [
12
- {
13
- id: "ORD-001",
14
- customerName: "Rahul Sharma",
15
- items: [
16
- "Masala Dosa",
17
- "Filter Coffee",
18
- "Vada"
19
- ],
20
- total: 180,
21
- status: "preparing",
22
- timestamp: "10 mins ago",
23
- priority: "urgent"
24
- },
25
- {
26
- id: "ORD-002",
27
- customerName: "Priya Patel",
28
- items: ["Idli Sambar (2)", "Coconut Chutney"],
29
- total: 80,
30
- status: "ready",
31
- timestamp: "15 mins ago",
32
- priority: "normal"
33
- },
34
- {
35
- id: "ORD-003",
36
- customerName: "Amit Kumar",
37
- items: [
38
- "Rava Dosa",
39
- "Sambar",
40
- "Coffee"
41
- ],
42
- total: 160,
43
- status: "delivered",
44
- timestamp: "25 mins ago",
45
- priority: "normal"
46
- },
47
- {
48
- id: "ORD-004",
49
- customerName: "Sneha Singh",
50
- items: ["Upma", "Coffee"],
51
- total: 60,
52
- status: "pending",
53
- timestamp: "2 mins ago",
54
- priority: "urgent"
55
- }
56
- ], I = [
57
- {
58
- name: "Masala Dosa",
59
- quantity: 245,
60
- revenue: 19600
61
- },
62
- {
63
- name: "Filter Coffee",
64
- quantity: 312,
65
- revenue: 9360
66
- },
67
- {
68
- name: "Idli Sambar",
69
- quantity: 189,
70
- revenue: 7560
71
- },
72
- {
73
- name: "Vada",
74
- quantity: 156,
75
- revenue: 4680
76
- },
77
- {
78
- name: "Rava Dosa",
79
- quantity: 98,
80
- revenue: 8820
81
- }
82
- ], L = [
83
- {
84
- name: "Ramesh Kumar",
85
- role: "Chef",
86
- status: "active"
87
- },
88
- {
89
- name: "Priya Sharma",
90
- role: "Server",
91
- status: "active"
92
- },
93
- {
94
- name: "Amit Patel",
95
- role: "Delivery",
96
- status: "on-break"
97
- },
98
- {
99
- name: "Sneha Reddy",
100
- role: "Manager",
101
- status: "active"
102
- }
103
- ], R = [
104
- {
105
- id: "1",
106
- message: "New order #ORD-004 received",
107
- type: "info",
108
- time: "2 min ago"
109
- },
110
- {
111
- id: "2",
112
- message: "Low stock alert: Vada batter running low",
113
- type: "warning",
114
- time: "15 min ago"
115
- },
116
- {
117
- id: "3",
118
- message: "Order #ORD-003 delivered successfully",
119
- type: "success",
120
- time: "25 min ago"
121
- },
122
- {
123
- id: "4",
124
- message: "New 5-star review from Priya Patel",
125
- type: "success",
126
- time: "1 hr ago"
127
- },
128
- {
129
- id: "5",
130
- message: "Peak hours approaching (12-2 PM)",
131
- type: "warning",
132
- time: "1 hr ago"
133
- }
134
- ], z = () => {
12
+ var A = () => {
135
13
  let e = (/* @__PURE__ */ new Date()).getHours();
136
14
  return e < 12 ? "Good Morning" : e < 17 ? "Good Afternoon" : "Good Evening";
137
- }, B = {
15
+ }, j = {
138
16
  pending: "bg-status-error-bg-subtle text-status-error-text",
17
+ confirmed: "bg-[var(--color-accent-soft)] text-text-primary",
139
18
  preparing: "bg-status-warning-bg-subtle text-status-warning-text",
140
19
  ready: "bg-[var(--color-accent-soft)] text-text-primary",
141
20
  delivered: "bg-status-success-bg-subtle text-status-success-text",
142
21
  cancelled: "bg-bg-sunken text-text-secondary"
143
- }, V = {
144
- active: "bg-status-success-text",
145
- "on-break": "bg-status-warning-text",
146
- "off-duty": "bg-muted-foreground"
147
- }, H = {
148
- info: "text-text-primary",
149
- warning: "text-status-warning-text",
150
- success: "text-status-success-text"
151
- }, U = () => {
152
- let { navigateTo: U, currentUser: W } = e(), { data: G } = r(), { data: K } = i(), q = {
153
- totalRevenue: K?.totalRevenue ?? 0,
154
- dailyRevenue: 0,
155
- ordersToday: 0,
156
- totalOrders: K?.totalOrders ?? 0,
157
- activeOfferings: 0,
158
- averageOrderValue: 0,
159
- customerCount: K?.activeCustomers ?? 0,
160
- rating: K?.avgRating ?? 0
161
- }, J = (G?.orderTrends ?? []).slice(0, 7), Y = W?.firstName ?? W?.name?.split(" ")[0] ?? "", [X, Z] = o(F), [Q, $] = o({
162
- isOpen: !0,
163
- currentLocation: "Koramangala 5th Block, Near BDA Complex",
164
- lastUpdate: (/* @__PURE__ */ new Date()).toLocaleTimeString(),
165
- operatingHours: "9:00 AM - 9:00 PM"
166
- }), ee = (e) => {
167
- Z((t) => t.map((t) => t.id === e ? {
168
- ...t,
169
- status: "preparing"
170
- } : t));
171
- }, te = (e) => {
172
- Z((t) => t.map((t) => t.id === e ? {
173
- ...t,
174
- status: "ready"
175
- } : t));
22
+ }, M = () => {
23
+ let e = /* @__PURE__ */ new Date();
24
+ return e.setHours(0, 0, 0, 0), e;
25
+ }, N = (e) => {
26
+ let t = Math.floor((Date.now() - new Date(e).getTime()) / 6e4);
27
+ return t < 1 ? "Just now" : t < 60 ? `${t} min ago` : t < 1440 ? `${Math.floor(t / 60)} hr ago` : new Date(e).toLocaleDateString("en-IN", {
28
+ day: "2-digit",
29
+ month: "short"
30
+ });
31
+ }, P = () => {
32
+ let { navigateTo: P, currentUser: F } = e(), { data: I = [], isLoading: L } = ee(), R = u(() => I.find((e) => e.ownerId === F?.id) ?? I[0], [I, F?.id]), z = R?.id, { data: B = [] } = a({ providerId: z }), { data: V = [] } = i(z), { data: H = [] } = s(z ?? ""), { data: U = [] } = o(z), ue = c(), W = F?.firstName ?? F?.name?.split(" ")[0] ?? "", [G, K] = ne(!0);
33
+ te(() => {
34
+ R && K(R.isOpen);
35
+ }, [R]);
36
+ let q = u(() => {
37
+ let e = M(), t = B.filter((e) => e.status === "delivered"), n = B.filter((t) => new Date(t.orderDate) >= e), r = t.filter((t) => new Date(t.orderDate) >= e), i = t.reduce((e, t) => e + t.total, 0), a = r.reduce((e, t) => e + t.total, 0), o = t.length > 0 ? Math.round(i / t.length) : Math.round(R?.averageOrderValue ?? 0);
38
+ return {
39
+ totalRevenue: i,
40
+ dailyRevenue: a,
41
+ ordersToday: n.length,
42
+ totalOrders: B.length,
43
+ activeOfferings: V.filter((e) => e.isAvailable).length,
44
+ averageOrderValue: o,
45
+ rating: R?.rating ?? 0,
46
+ totalRatings: R?.totalRatings ?? 0
47
+ };
48
+ }, [
49
+ B,
50
+ V,
51
+ R
52
+ ]), J = u(() => [...B].sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime()).slice(0, 4), [B]), Y = u(() => {
53
+ let e = [];
54
+ for (let t = 6; t >= 0; t--) {
55
+ let n = M();
56
+ n.setDate(n.getDate() - t);
57
+ let r = new Date(n);
58
+ r.setDate(n.getDate() + 1);
59
+ let i = B.filter((e) => {
60
+ let t = new Date(e.orderDate);
61
+ return t >= n && t < r;
62
+ });
63
+ e.push({
64
+ date: n.toISOString(),
65
+ orders: i.length,
66
+ revenue: i.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0)
67
+ });
68
+ }
69
+ return e;
70
+ }, [B]), X = u(() => {
71
+ let e = /* @__PURE__ */ new Map();
72
+ return B.forEach((t) => t.items.forEach((t) => {
73
+ let n = e.get(t.name) ?? {
74
+ quantity: 0,
75
+ revenue: 0
76
+ };
77
+ n.quantity += t.quantity, n.revenue += t.price * t.quantity, e.set(t.name, n);
78
+ })), [...e.entries()].map(([e, t]) => ({
79
+ name: e,
80
+ ...t
81
+ })).sort((e, t) => t.revenue - e.revenue).slice(0, 5);
82
+ }, [B]), de = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", { weekday: "long" }).toLowerCase(), Z = R?.businessHours?.[de], Q = Z && Z.isOpen ? `${Z.open} - ${Z.close}` : null, fe = R?.location?.address?.trim() || null, $ = (e, t) => {
83
+ ue.mutate({
84
+ id: e,
85
+ status: t
86
+ });
176
87
  };
177
- return /* @__PURE__ */ A(n, {
178
- title: /* @__PURE__ */ j("span", { children: [z(), Y && /* @__PURE__ */ j(k, { children: [", ", /* @__PURE__ */ A("span", {
88
+ return L ? /* @__PURE__ */ D(n, {
89
+ title: A(),
90
+ description: "Manage your service provider operations",
91
+ children: /* @__PURE__ */ D("div", {
92
+ className: "flex items-center justify-center py-24",
93
+ children: /* @__PURE__ */ D("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
94
+ })
95
+ }) : R ? /* @__PURE__ */ D(n, {
96
+ title: /* @__PURE__ */ O("span", { children: [A(), W && /* @__PURE__ */ O(se, { children: [", ", /* @__PURE__ */ D("span", {
179
97
  className: "text-text-secondary font-normal",
180
- children: Y
98
+ children: W
181
99
  })] })] }),
182
- description: "Manage your service provider operations",
183
- actions: /* @__PURE__ */ j("button", {
100
+ description: R.name,
101
+ actions: /* @__PURE__ */ O("button", {
184
102
  type: "button",
185
- onClick: () => U("/cart-owner/orders"),
103
+ onClick: () => P("/cart-owner/orders"),
186
104
  className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
187
- children: ["View All Orders", /* @__PURE__ */ A(l, { className: "h-4 w-4" })]
105
+ children: ["View All Orders", /* @__PURE__ */ D(d, { className: "h-4 w-4" })]
188
106
  }),
189
- children: /* @__PURE__ */ j("div", {
107
+ children: /* @__PURE__ */ O("div", {
190
108
  className: "space-y-6",
191
109
  children: [
192
- /* @__PURE__ */ A(P, { children: "Run your mobile cart business from one screen — flip your service open or closed, watch today's revenue and orders roll in, and jump to your menu, staff, or order queue. Open your service and set up your offerings to start taking orders." }),
193
- /* @__PURE__ */ A(N, {
110
+ /* @__PURE__ */ D(le, { children: "Run your mobile cart business from one screen — flip your service open or closed, watch today's revenue and orders roll in, and jump to your menu, staff, or order queue. Open your service and set up your offerings to start taking orders." }),
111
+ /* @__PURE__ */ D(k, {
194
112
  storageKey: "kadaikodi-cartowner-dashboard",
195
113
  steps: [
196
114
  {
197
115
  id: "offerings",
198
116
  label: "Set up your offerings",
199
117
  description: "Add the dishes and items customers can order from your cart.",
200
- onClick: () => U("/cart-owner/inventory")
118
+ onClick: () => P("/cart-owner/inventory")
201
119
  },
202
120
  {
203
121
  id: "service-config",
204
122
  label: "Configure service & hours",
205
123
  description: "Define your operating hours, location and service area.",
206
- onClick: () => U("/cart-owner/service-config")
124
+ onClick: () => P("/cart-owner/service-config")
207
125
  },
208
126
  {
209
127
  id: "orders",
210
128
  label: "Manage incoming orders",
211
129
  description: "Accept, prepare and fulfil customer orders in real time.",
212
- onClick: () => U("/cart-owner/orders")
130
+ onClick: () => P("/cart-owner/orders")
213
131
  }
214
132
  ]
215
133
  }),
216
- /* @__PURE__ */ A("div", {
217
- className: t("p-4 rounded-lg border-l-4", Q.isOpen ? "border-status-success-text bg-status-success-bg-subtle" : "border-status-error-text bg-status-error-bg-subtle"),
218
- children: /* @__PURE__ */ j("div", {
134
+ /* @__PURE__ */ D("div", {
135
+ className: t("p-4 rounded-lg border-l-4", G ? "border-status-success-text bg-status-success-bg-subtle" : "border-status-error-text bg-status-error-bg-subtle"),
136
+ children: /* @__PURE__ */ O("div", {
219
137
  className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",
220
- children: [/* @__PURE__ */ j("div", {
138
+ children: [/* @__PURE__ */ O("div", {
221
139
  className: "flex items-start gap-3",
222
- children: [/* @__PURE__ */ A("div", { className: t("w-3 h-3 rounded-full mt-1 shrink-0", Q.isOpen ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("h3", {
140
+ children: [/* @__PURE__ */ D("div", { className: t("w-3 h-3 rounded-full mt-1 shrink-0", G ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("h3", {
223
141
  className: "font-semibold text-text-primary text-sm",
224
- children: ["Service Status: ", Q.isOpen ? "Open" : "Closed"]
225
- }), /* @__PURE__ */ j("div", {
142
+ children: ["Service Status: ", G ? "Open" : "Closed"]
143
+ }), /* @__PURE__ */ O("div", {
226
144
  className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-4 mt-1 text-xs text-text-secondary",
227
- children: [/* @__PURE__ */ j("span", {
145
+ children: [/* @__PURE__ */ O("span", {
228
146
  className: "flex items-center gap-1",
229
- children: [/* @__PURE__ */ A(y, { className: "h-3 w-3 shrink-0" }), Q.currentLocation]
230
- }), /* @__PURE__ */ j("span", {
147
+ children: [/* @__PURE__ */ D(b, { className: "h-3 w-3 shrink-0" }), fe ?? "Location not set"]
148
+ }), Q && /* @__PURE__ */ O("span", {
231
149
  className: "flex items-center gap-1",
232
- children: [/* @__PURE__ */ A(m, { className: "h-3 w-3 shrink-0" }), Q.operatingHours]
150
+ children: [/* @__PURE__ */ D(g, { className: "h-3 w-3 shrink-0" }), Q]
233
151
  })]
234
152
  })] })]
235
- }), /* @__PURE__ */ j("div", {
153
+ }), /* @__PURE__ */ O("div", {
236
154
  className: "flex gap-2",
237
- children: [/* @__PURE__ */ j("button", {
155
+ children: [/* @__PURE__ */ O("button", {
238
156
  type: "button",
239
- onClick: () => U("/cart-owner/settings"),
157
+ onClick: () => P("/cart-owner/settings"),
240
158
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
241
- children: [/* @__PURE__ */ A(y, { className: "h-3 w-3" }), "Update Location"]
242
- }), /* @__PURE__ */ A("button", {
159
+ children: [/* @__PURE__ */ D(b, { className: "h-3 w-3" }), "Update Location"]
160
+ }), /* @__PURE__ */ D("button", {
243
161
  type: "button",
244
- onClick: () => {
245
- $((e) => e && {
246
- ...e,
247
- isOpen: !e.isOpen
248
- });
249
- },
250
- className: t("inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", Q.isOpen ? "bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle" : "bg-status-success-bg-subtle text-status-success-text hover:bg-status-success-bg-subtle"),
251
- children: Q.isOpen ? "Close Service" : "Open Service"
162
+ onClick: () => K((e) => !e),
163
+ className: t("inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", G ? "bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle" : "bg-status-success-bg-subtle text-status-success-text hover:bg-status-success-bg-subtle"),
164
+ children: G ? "Close Service" : "Open Service"
252
165
  })]
253
166
  })]
254
167
  })
255
168
  }),
256
- /* @__PURE__ */ j(M, { children: [/* @__PURE__ */ A("h2", {
169
+ /* @__PURE__ */ O(ce, { children: [/* @__PURE__ */ D("h2", {
257
170
  className: "text-base font-semibold text-text-primary mb-3",
258
171
  children: "Today's Performance"
259
- }), /* @__PURE__ */ A("div", {
172
+ }), /* @__PURE__ */ D("div", {
260
173
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
261
174
  children: [
262
175
  {
263
176
  label: "Daily Revenue",
264
- value: a(q.dailyRevenue, { minimumFractionDigits: 0 }),
265
- icon: v,
266
- trend: "+15.2% vs yesterday",
267
- trendUp: !0
177
+ value: l(q.dailyRevenue, { minimumFractionDigits: 0 }),
178
+ icon: y,
179
+ sublabel: null
268
180
  },
269
181
  {
270
182
  label: "Orders Today",
271
183
  value: String(q.ordersToday),
272
- icon: C,
273
- trend: "+8.5% vs yesterday",
274
- trendUp: !0
184
+ icon: w,
185
+ sublabel: null
275
186
  },
276
187
  {
277
188
  label: "Avg Order Value",
278
- value: a(q.averageOrderValue, { minimumFractionDigits: 0 }),
189
+ value: l(q.averageOrderValue, { minimumFractionDigits: 0 }),
279
190
  icon: E,
280
- trend: "+3.2% vs last week",
281
- trendUp: !0
191
+ sublabel: null
282
192
  },
283
193
  {
284
194
  label: "Service Rating",
285
195
  value: q.rating.toFixed(1),
286
- icon: w,
287
- trend: "Based on 342 reviews",
288
- trendUp: !0
196
+ icon: T,
197
+ sublabel: q.totalRatings > 0 ? `Based on ${q.totalRatings} ${q.totalRatings === 1 ? "rating" : "ratings"}` : "No ratings yet"
289
198
  }
290
199
  ].map((e) => {
291
200
  let t = e.icon;
292
- return /* @__PURE__ */ j("div", {
201
+ return /* @__PURE__ */ O("div", {
293
202
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
294
203
  children: [
295
- /* @__PURE__ */ j("div", {
204
+ /* @__PURE__ */ O("div", {
296
205
  className: "flex items-center justify-between",
297
- children: [/* @__PURE__ */ A("div", {
206
+ children: [/* @__PURE__ */ D("div", {
298
207
  className: "rounded-md bg-accent p-2",
299
- children: /* @__PURE__ */ A(t, { className: "h-5 w-5 text-text-secondary" })
300
- }), /* @__PURE__ */ j("div", {
301
- className: "flex items-center gap-1 text-xs text-text-secondary",
302
- children: [e.trendUp ? /* @__PURE__ */ A(E, { className: "h-3 w-3 text-status-success-text" }) : /* @__PURE__ */ A(T, { className: "h-3 w-3 text-status-error-text" }), /* @__PURE__ */ A("span", { children: e.trend })]
208
+ children: /* @__PURE__ */ D(t, { className: "h-5 w-5 text-text-secondary" })
209
+ }), e.sublabel && /* @__PURE__ */ D("span", {
210
+ className: "text-xs text-text-secondary",
211
+ children: e.sublabel
303
212
  })]
304
213
  }),
305
- /* @__PURE__ */ A("p", {
214
+ /* @__PURE__ */ D("p", {
306
215
  className: "mt-3 text-2xl font-bold text-text-primary",
307
216
  children: e.value
308
217
  }),
309
- /* @__PURE__ */ A("p", {
218
+ /* @__PURE__ */ D("p", {
310
219
  className: "mt-1 text-sm text-text-secondary",
311
220
  children: e.label
312
221
  })
@@ -314,182 +223,177 @@ var F = [
314
223
  }, e.label);
315
224
  })
316
225
  })] }),
317
- /* @__PURE__ */ j("div", {
226
+ /* @__PURE__ */ O("div", {
318
227
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
319
- children: [/* @__PURE__ */ j("div", {
228
+ children: [/* @__PURE__ */ O("div", {
320
229
  className: "lg:col-span-2 space-y-6",
321
230
  children: [
322
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", {
231
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h3", {
323
232
  className: "text-base font-semibold mb-3 text-text-primary",
324
233
  children: "Quick Actions"
325
- }), /* @__PURE__ */ A("div", {
234
+ }), /* @__PURE__ */ D("div", {
326
235
  className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",
327
236
  children: [
328
237
  {
329
238
  label: "Service Config",
330
- icon: S,
239
+ icon: C,
331
240
  color: "bg-status-warning-bg-subtle text-status-warning-text",
332
241
  path: "/cart-owner/service-config"
333
242
  },
334
243
  {
335
244
  label: "Manage Offerings",
336
- icon: b,
245
+ icon: x,
337
246
  color: "bg-[var(--color-accent-soft)] text-text-primary",
338
247
  path: "/cart-owner/inventory"
339
248
  },
340
249
  {
341
250
  label: "View Orders",
342
- icon: C,
251
+ icon: w,
343
252
  color: "bg-status-success-bg-subtle text-status-success-text",
344
253
  path: "/cart-owner/orders"
345
254
  },
346
255
  {
347
256
  label: "Analytics",
348
- icon: u,
257
+ icon: f,
349
258
  color: "bg-accent-purple-subtle text-text-primary",
350
259
  path: "/cart-owner/analytics"
351
260
  },
352
261
  {
353
262
  label: "Staff",
354
- icon: D,
263
+ icon: ae,
355
264
  color: "bg-accent-purple-subtle text-text-primary",
356
265
  path: "/cart-owner/staff"
357
266
  }
358
267
  ].map((e) => {
359
268
  let n = e.icon;
360
- return /* @__PURE__ */ j("button", {
269
+ return /* @__PURE__ */ O("button", {
361
270
  type: "button",
362
- onClick: () => U(e.path),
271
+ onClick: () => P(e.path),
363
272
  className: t("flex flex-col items-center gap-2 rounded-lg p-4 transition-colors hover:opacity-80", e.color),
364
- children: [/* @__PURE__ */ A(n, { className: "h-5 w-5" }), /* @__PURE__ */ A("span", {
273
+ children: [/* @__PURE__ */ D(n, { className: "h-5 w-5" }), /* @__PURE__ */ D("span", {
365
274
  className: "text-xs font-medium text-center",
366
275
  children: e.label
367
276
  })]
368
277
  }, e.label);
369
278
  })
370
279
  })] }),
371
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("div", {
280
+ /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
372
281
  className: "flex items-center justify-between mb-3",
373
- children: [/* @__PURE__ */ A("h3", {
282
+ children: [/* @__PURE__ */ D("h3", {
374
283
  className: "text-base font-semibold text-text-primary",
375
284
  children: "Recent Orders"
376
- }), /* @__PURE__ */ A("button", {
285
+ }), /* @__PURE__ */ D("button", {
377
286
  type: "button",
378
- onClick: () => U("/cart-owner/orders"),
287
+ onClick: () => P("/cart-owner/orders"),
379
288
  className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
380
289
  children: "View All Orders"
381
290
  })]
382
- }), /* @__PURE__ */ A("div", {
291
+ }), J.length === 0 ? /* @__PURE__ */ D("div", {
292
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-8 text-center text-sm text-text-secondary shadow-sm",
293
+ children: "No orders yet. New orders from customers will appear here."
294
+ }) : /* @__PURE__ */ D("div", {
383
295
  className: "space-y-3",
384
- children: X.map((e) => /* @__PURE__ */ A("div", {
296
+ children: J.map((e) => /* @__PURE__ */ D("div", {
385
297
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
386
- children: /* @__PURE__ */ j("div", {
298
+ children: /* @__PURE__ */ O("div", {
387
299
  className: "flex flex-col lg:flex-row lg:items-start lg:justify-between gap-3",
388
- children: [/* @__PURE__ */ j("div", {
300
+ children: [/* @__PURE__ */ O("div", {
389
301
  className: "flex-1 min-w-0",
390
302
  children: [
391
- /* @__PURE__ */ j("div", {
303
+ /* @__PURE__ */ O("div", {
392
304
  className: "flex flex-wrap items-center gap-2 mb-1",
393
- children: [
394
- /* @__PURE__ */ j("h4", {
395
- className: "font-semibold text-text-primary text-sm",
396
- children: ["#", e.id]
397
- }),
398
- /* @__PURE__ */ A("span", {
399
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize", B[e.status] || "bg-bg-sunken text-text-secondary"),
400
- children: e.status
401
- }),
402
- e.priority === "urgent" && /* @__PURE__ */ A(c, { className: "h-4 w-4 text-status-error-text" })
403
- ]
404
- }),
405
- /* @__PURE__ */ j("p", {
406
- className: "text-xs text-text-secondary mb-1",
407
- children: ["Customer: ", e.customerName]
305
+ children: [/* @__PURE__ */ O("h4", {
306
+ className: "font-semibold text-text-primary text-sm",
307
+ children: ["#", e.id.slice(0, 8)]
308
+ }), /* @__PURE__ */ D("span", {
309
+ className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize", j[e.status] || "bg-bg-sunken text-text-secondary"),
310
+ children: e.status
311
+ })]
408
312
  }),
409
- /* @__PURE__ */ j("p", {
313
+ e.items.length > 0 && /* @__PURE__ */ O("p", {
410
314
  className: "text-xs text-text-secondary mb-1 truncate",
411
- children: ["Items: ", e.items.join(", ")]
315
+ children: ["Items: ", e.items.map((e) => e.name).join(", ")]
412
316
  }),
413
- /* @__PURE__ */ j("div", {
317
+ /* @__PURE__ */ O("div", {
414
318
  className: "flex flex-wrap items-center gap-3 text-xs text-text-secondary",
415
- children: [/* @__PURE__ */ A("span", {
319
+ children: [/* @__PURE__ */ D("span", {
416
320
  className: "font-semibold text-text-primary",
417
- children: a(e.total, { minimumFractionDigits: 0 })
418
- }), /* @__PURE__ */ j("span", {
321
+ children: l(e.total, { minimumFractionDigits: 0 })
322
+ }), /* @__PURE__ */ O("span", {
419
323
  className: "flex items-center gap-1",
420
- children: [/* @__PURE__ */ A(m, { className: "h-3 w-3" }), e.timestamp]
324
+ children: [/* @__PURE__ */ D(g, { className: "h-3 w-3" }), N(e.orderDate)]
421
325
  })]
422
326
  })
423
327
  ]
424
- }), /* @__PURE__ */ j("div", {
328
+ }), /* @__PURE__ */ O("div", {
425
329
  className: "flex gap-2",
426
330
  children: [
427
- /* @__PURE__ */ j("button", {
331
+ /* @__PURE__ */ O("button", {
428
332
  type: "button",
429
- onClick: () => U("/cart-owner/orders"),
333
+ onClick: () => P("/cart-owner/orders"),
430
334
  className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
431
- children: [/* @__PURE__ */ A(g, { className: "h-3 w-3" }), "View"]
335
+ children: [/* @__PURE__ */ D(v, { className: "h-3 w-3" }), "View"]
432
336
  }),
433
- e.status === "pending" && /* @__PURE__ */ j("button", {
337
+ e.status === "pending" && /* @__PURE__ */ O("button", {
434
338
  type: "button",
435
- onClick: () => ee(e.id),
339
+ onClick: () => $(e.id, "CONFIRMED"),
436
340
  className: "inline-flex items-center gap-1 rounded-md bg-status-success-bg-subtle px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
437
- children: [/* @__PURE__ */ A(f, { className: "h-3 w-3" }), "Accept"]
341
+ children: [/* @__PURE__ */ D(m, { className: "h-3 w-3" }), "Accept"]
438
342
  }),
439
- e.status === "preparing" && /* @__PURE__ */ j("button", {
343
+ (e.status === "confirmed" || e.status === "preparing") && /* @__PURE__ */ O("button", {
440
344
  type: "button",
441
- onClick: () => te(e.id),
345
+ onClick: () => $(e.id, "READY"),
442
346
  className: "inline-flex items-center gap-1 rounded-md bg-[var(--color-accent-soft)] px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-[var(--color-accent-soft)] transition-colors",
443
- children: [/* @__PURE__ */ A(f, { className: "h-3 w-3" }), "Mark Ready"]
347
+ children: [/* @__PURE__ */ D(m, { className: "h-3 w-3" }), "Mark Ready"]
444
348
  })
445
349
  ]
446
350
  })]
447
351
  })
448
352
  }, e.id))
449
353
  })] }),
450
- /* @__PURE__ */ j("div", {
354
+ /* @__PURE__ */ O("div", {
451
355
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
452
- children: [/* @__PURE__ */ j("div", {
356
+ children: [/* @__PURE__ */ O("div", {
453
357
  className: "flex items-center justify-between border-b border-border-subtle px-5 py-4",
454
- children: [/* @__PURE__ */ A("h3", {
358
+ children: [/* @__PURE__ */ D("h3", {
455
359
  className: "text-base font-semibold text-text-primary",
456
360
  children: "Revenue (Last 7 Days)"
457
- }), /* @__PURE__ */ A("button", {
361
+ }), /* @__PURE__ */ D("button", {
458
362
  type: "button",
459
- onClick: () => U("/cart-owner/analytics"),
363
+ onClick: () => P("/cart-owner/analytics"),
460
364
  className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
461
365
  children: "View Analytics"
462
366
  })]
463
- }), /* @__PURE__ */ A("div", {
367
+ }), /* @__PURE__ */ D("div", {
464
368
  className: "overflow-x-auto",
465
- children: /* @__PURE__ */ j("table", {
369
+ children: /* @__PURE__ */ O("table", {
466
370
  className: "w-full text-sm",
467
- children: [/* @__PURE__ */ A("thead", { children: /* @__PURE__ */ j("tr", {
371
+ children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", {
468
372
  className: "border-b border-border-subtle",
469
373
  children: [
470
- /* @__PURE__ */ A("th", {
374
+ /* @__PURE__ */ D("th", {
471
375
  className: "px-5 py-3 text-left font-medium text-text-secondary",
472
376
  children: "Date"
473
377
  }),
474
- /* @__PURE__ */ A("th", {
378
+ /* @__PURE__ */ D("th", {
475
379
  className: "px-5 py-3 text-right font-medium text-text-secondary",
476
380
  children: "Orders"
477
381
  }),
478
- /* @__PURE__ */ A("th", {
382
+ /* @__PURE__ */ D("th", {
479
383
  className: "px-5 py-3 text-right font-medium text-text-secondary",
480
384
  children: "Revenue"
481
385
  }),
482
- /* @__PURE__ */ A("th", {
386
+ /* @__PURE__ */ D("th", {
483
387
  className: "px-5 py-3 text-left font-medium text-text-secondary",
484
388
  children: "Trend"
485
389
  })
486
390
  ]
487
- }) }), /* @__PURE__ */ A("tbody", { children: J.map((e, t) => {
488
- let n = Math.max(...J.map((e) => e.revenue)), r = e.revenue / n * 100;
489
- return /* @__PURE__ */ j("tr", {
391
+ }) }), /* @__PURE__ */ D("tbody", { children: Y.map((e) => {
392
+ let t = Math.max(...Y.map((e) => e.revenue), 1), n = e.revenue / t * 100;
393
+ return /* @__PURE__ */ O("tr", {
490
394
  className: "border-b border-border-subtle last:border-0",
491
395
  children: [
492
- /* @__PURE__ */ A("td", {
396
+ /* @__PURE__ */ D("td", {
493
397
  className: "px-5 py-3 text-text-primary text-xs",
494
398
  children: new Date(e.date).toLocaleDateString("en-IN", {
495
399
  day: "2-digit",
@@ -497,21 +401,21 @@ var F = [
497
401
  weekday: "short"
498
402
  })
499
403
  }),
500
- /* @__PURE__ */ A("td", {
404
+ /* @__PURE__ */ D("td", {
501
405
  className: "px-5 py-3 text-right text-text-primary",
502
406
  children: e.orders
503
407
  }),
504
- /* @__PURE__ */ A("td", {
408
+ /* @__PURE__ */ D("td", {
505
409
  className: "px-5 py-3 text-right font-medium text-text-primary",
506
- children: a(e.revenue, { minimumFractionDigits: 0 })
410
+ children: l(e.revenue, { minimumFractionDigits: 0 })
507
411
  }),
508
- /* @__PURE__ */ A("td", {
412
+ /* @__PURE__ */ D("td", {
509
413
  className: "px-5 py-3 w-40",
510
- children: /* @__PURE__ */ A("div", {
414
+ children: /* @__PURE__ */ D("div", {
511
415
  className: "h-4 rounded bg-bg-sunken overflow-hidden",
512
- children: /* @__PURE__ */ A("div", {
416
+ children: /* @__PURE__ */ D("div", {
513
417
  className: "h-full rounded bg-[var(--color-accent-soft)]",
514
- style: { width: `${r}%` }
418
+ style: { width: `${n}%` }
515
419
  })
516
420
  })
517
421
  })
@@ -521,251 +425,234 @@ var F = [
521
425
  })
522
426
  })]
523
427
  }),
524
- /* @__PURE__ */ j("div", {
428
+ /* @__PURE__ */ O("div", {
525
429
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
526
- children: [/* @__PURE__ */ A("h3", {
430
+ children: [/* @__PURE__ */ D("h3", {
527
431
  className: "text-base font-semibold text-text-primary mb-4",
528
- children: "This Month Summary"
529
- }), /* @__PURE__ */ j("div", {
432
+ children: "Business Summary"
433
+ }), /* @__PURE__ */ O("div", {
530
434
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
531
435
  children: [
532
- /* @__PURE__ */ j("div", {
436
+ /* @__PURE__ */ O("div", {
533
437
  className: "text-center p-3 rounded-lg bg-bg-sunken/50",
534
- children: [/* @__PURE__ */ A("div", {
438
+ children: [/* @__PURE__ */ D("div", {
535
439
  className: "text-xl font-bold text-text-primary",
536
- children: a(q.totalRevenue, { minimumFractionDigits: 0 })
537
- }), /* @__PURE__ */ A("div", {
440
+ children: l(q.totalRevenue, { minimumFractionDigits: 0 })
441
+ }), /* @__PURE__ */ D("div", {
538
442
  className: "text-xs text-text-secondary mt-1",
539
443
  children: "Total Revenue"
540
444
  })]
541
445
  }),
542
- /* @__PURE__ */ j("div", {
446
+ /* @__PURE__ */ O("div", {
543
447
  className: "text-center p-3 rounded-lg bg-bg-sunken/50",
544
- children: [/* @__PURE__ */ A("div", {
448
+ children: [/* @__PURE__ */ D("div", {
545
449
  className: "text-xl font-bold text-text-primary",
546
450
  children: q.totalOrders
547
- }), /* @__PURE__ */ A("div", {
451
+ }), /* @__PURE__ */ D("div", {
548
452
  className: "text-xs text-text-secondary mt-1",
549
453
  children: "Total Orders"
550
454
  })]
551
455
  }),
552
- /* @__PURE__ */ j("div", {
456
+ /* @__PURE__ */ O("div", {
553
457
  className: "text-center p-3 rounded-lg bg-bg-sunken/50",
554
- children: [/* @__PURE__ */ A("div", {
458
+ children: [/* @__PURE__ */ D("div", {
555
459
  className: "text-xl font-bold text-text-primary",
556
- children: q.customerCount
557
- }), /* @__PURE__ */ A("div", {
460
+ children: l(q.averageOrderValue, { minimumFractionDigits: 0 })
461
+ }), /* @__PURE__ */ D("div", {
558
462
  className: "text-xs text-text-secondary mt-1",
559
- children: "Unique Customers"
463
+ children: "Avg Order Value"
560
464
  })]
561
465
  })
562
466
  ]
563
467
  })]
564
468
  })
565
469
  ]
566
- }), /* @__PURE__ */ j("div", {
470
+ }), /* @__PURE__ */ O("div", {
567
471
  className: "space-y-6",
568
472
  children: [
569
- /* @__PURE__ */ j("div", {
473
+ /* @__PURE__ */ O("div", {
570
474
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
571
- children: [/* @__PURE__ */ j("div", {
475
+ children: [/* @__PURE__ */ D("div", {
572
476
  className: "flex items-center justify-between mb-4",
573
- children: [/* @__PURE__ */ j("h3", {
477
+ children: /* @__PURE__ */ O("h3", {
574
478
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
575
- children: [/* @__PURE__ */ A(d, { className: "h-4 w-4" }), "Notifications"]
576
- }), /* @__PURE__ */ A("span", {
577
- className: "inline-flex items-center justify-center rounded-full bg-status-error-text text-white text-[10px] font-bold h-5 w-5",
578
- children: R.length
579
- })]
580
- }), /* @__PURE__ */ A("div", {
581
- className: "space-y-3",
582
- children: R.map((e) => /* @__PURE__ */ j("div", {
583
- className: "flex items-start gap-2",
584
- children: [/* @__PURE__ */ A(s, { className: t("h-4 w-4 mt-0.5 shrink-0", H[e.type]) }), /* @__PURE__ */ j("div", {
585
- className: "min-w-0",
586
- children: [/* @__PURE__ */ A("p", {
587
- className: "text-xs text-text-primary leading-tight",
588
- children: e.message
589
- }), /* @__PURE__ */ A("p", {
590
- className: "text-[10px] text-text-secondary mt-0.5",
591
- children: e.time
592
- })]
593
- })]
594
- }, e.id))
479
+ children: [/* @__PURE__ */ D(p, { className: "h-4 w-4" }), "Notifications"]
480
+ })
481
+ }), /* @__PURE__ */ D("p", {
482
+ className: "text-xs text-text-secondary",
483
+ children: "You have no notifications yet. Order and review alerts will appear here."
595
484
  })]
596
485
  }),
597
- /* @__PURE__ */ j("div", {
486
+ /* @__PURE__ */ O("div", {
598
487
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
599
- children: [/* @__PURE__ */ j("h3", {
488
+ children: [/* @__PURE__ */ O("h3", {
600
489
  className: "text-base font-semibold text-text-primary mb-4 flex items-center gap-2",
601
- children: [/* @__PURE__ */ A(_, { className: "h-4 w-4 text-status-warning-text" }), "Top Selling Items"]
602
- }), /* @__PURE__ */ A("div", {
490
+ children: [/* @__PURE__ */ D(ie, { className: "h-4 w-4 text-status-warning-text" }), "Top Selling Items"]
491
+ }), X.length === 0 ? /* @__PURE__ */ D("p", {
492
+ className: "text-xs text-text-secondary",
493
+ children: "No sales yet. Your best sellers will appear here once orders come in."
494
+ }) : /* @__PURE__ */ D("div", {
603
495
  className: "space-y-3",
604
- children: I.map((e, t) => /* @__PURE__ */ j("div", {
496
+ children: X.map((e, t) => /* @__PURE__ */ O("div", {
605
497
  className: "flex items-center justify-between",
606
- children: [/* @__PURE__ */ j("div", {
498
+ children: [/* @__PURE__ */ O("div", {
607
499
  className: "flex items-center gap-2 min-w-0",
608
- children: [/* @__PURE__ */ A("span", {
500
+ children: [/* @__PURE__ */ D("span", {
609
501
  className: "text-sm font-bold text-text-secondary w-5",
610
502
  children: t + 1
611
- }), /* @__PURE__ */ j("div", {
503
+ }), /* @__PURE__ */ O("div", {
612
504
  className: "min-w-0",
613
- children: [/* @__PURE__ */ A("p", {
505
+ children: [/* @__PURE__ */ D("p", {
614
506
  className: "text-xs font-medium text-text-primary truncate",
615
507
  children: e.name
616
- }), /* @__PURE__ */ j("p", {
508
+ }), /* @__PURE__ */ O("p", {
617
509
  className: "text-[10px] text-text-secondary",
618
510
  children: [e.quantity, " sold"]
619
511
  })]
620
512
  })]
621
- }), /* @__PURE__ */ A("span", {
513
+ }), /* @__PURE__ */ D("span", {
622
514
  className: "text-xs font-semibold text-text-primary",
623
- children: a(e.revenue, { minimumFractionDigits: 0 })
515
+ children: l(e.revenue, { minimumFractionDigits: 0 })
624
516
  })]
625
517
  }, e.name))
626
518
  })]
627
519
  }),
628
- /* @__PURE__ */ j("div", {
520
+ /* @__PURE__ */ O("div", {
629
521
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
630
- children: [/* @__PURE__ */ j("div", {
522
+ children: [/* @__PURE__ */ O("div", {
631
523
  className: "flex items-center justify-between mb-4",
632
- children: [/* @__PURE__ */ j("h3", {
524
+ children: [/* @__PURE__ */ O("h3", {
633
525
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
634
- children: [/* @__PURE__ */ A(O, { className: "h-4 w-4" }), "Staff Overview"]
635
- }), /* @__PURE__ */ A("button", {
526
+ children: [/* @__PURE__ */ D(oe, { className: "h-4 w-4" }), "Staff Overview"]
527
+ }), /* @__PURE__ */ D("button", {
636
528
  type: "button",
637
- onClick: () => U("/cart-owner/staff"),
529
+ onClick: () => P("/cart-owner/staff"),
638
530
  className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
639
531
  children: "Manage"
640
532
  })]
641
- }), /* @__PURE__ */ A("div", {
533
+ }), U.length === 0 ? /* @__PURE__ */ D("p", {
534
+ className: "text-xs text-text-secondary",
535
+ children: "No staff added yet. Invite workers and delivery partners from Staff."
536
+ }) : /* @__PURE__ */ D("div", {
642
537
  className: "space-y-3",
643
- children: L.map((e) => /* @__PURE__ */ j("div", {
538
+ children: U.map((e) => /* @__PURE__ */ O("div", {
644
539
  className: "flex items-center justify-between",
645
- children: [/* @__PURE__ */ j("div", {
540
+ children: [/* @__PURE__ */ O("div", {
646
541
  className: "flex items-center gap-2",
647
- children: [/* @__PURE__ */ A("div", { className: t("w-2 h-2 rounded-full", V[e.status]) }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
542
+ children: [/* @__PURE__ */ D("div", { className: t("w-2 h-2 rounded-full", e.status === "ACTIVE" ? "bg-status-success-text" : "bg-muted-foreground") }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
648
543
  className: "text-xs font-medium text-text-primary",
649
544
  children: e.name
650
- }), /* @__PURE__ */ A("p", {
651
- className: "text-[10px] text-text-secondary",
652
- children: e.role
545
+ }), /* @__PURE__ */ D("p", {
546
+ className: "text-[10px] text-text-secondary capitalize",
547
+ children: e.role.toLowerCase()
653
548
  })] })]
654
- }), /* @__PURE__ */ A("span", {
549
+ }), /* @__PURE__ */ D("span", {
655
550
  className: "text-[10px] capitalize text-text-secondary",
656
- children: e.status.replace("-", " ")
551
+ children: e.status.toLowerCase()
657
552
  })]
658
- }, e.name))
553
+ }, e.id))
659
554
  })]
660
555
  }),
661
- /* @__PURE__ */ j("div", {
556
+ /* @__PURE__ */ O("div", {
662
557
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
663
- children: [/* @__PURE__ */ A("h3", {
558
+ children: [/* @__PURE__ */ D("h3", {
664
559
  className: "text-base font-semibold text-text-primary mb-4",
665
560
  children: "Quick Stats"
666
- }), /* @__PURE__ */ j("div", {
561
+ }), /* @__PURE__ */ O("div", {
667
562
  className: "space-y-3",
668
563
  children: [
669
- /* @__PURE__ */ j("div", {
564
+ /* @__PURE__ */ O("div", {
670
565
  className: "flex items-center justify-between",
671
- children: [/* @__PURE__ */ A("span", {
566
+ children: [/* @__PURE__ */ D("span", {
672
567
  className: "text-xs text-text-secondary",
673
568
  children: "Active Offerings"
674
- }), /* @__PURE__ */ A("span", {
569
+ }), /* @__PURE__ */ D("span", {
675
570
  className: "text-sm font-semibold text-text-primary",
676
571
  children: q.activeOfferings
677
572
  })]
678
573
  }),
679
- /* @__PURE__ */ j("div", {
574
+ /* @__PURE__ */ O("div", {
680
575
  className: "flex items-center justify-between",
681
- children: [/* @__PURE__ */ A("span", {
576
+ children: [/* @__PURE__ */ D("span", {
682
577
  className: "text-xs text-text-secondary",
683
578
  children: "Customer Rating"
684
- }), /* @__PURE__ */ j("span", {
579
+ }), /* @__PURE__ */ O("span", {
685
580
  className: "text-sm font-semibold text-text-primary flex items-center gap-1",
686
- children: [/* @__PURE__ */ A(w, { className: "h-3 w-3 text-status-warning-text fill-status-warning-text" }), q.rating]
581
+ children: [/* @__PURE__ */ D(T, { className: "h-3 w-3 text-status-warning-text fill-status-warning-text" }), q.rating.toFixed(1)]
687
582
  })]
688
583
  }),
689
- /* @__PURE__ */ j("div", {
584
+ /* @__PURE__ */ O("div", {
690
585
  className: "flex items-center justify-between",
691
- children: [/* @__PURE__ */ A("span", {
586
+ children: [/* @__PURE__ */ D("span", {
692
587
  className: "text-xs text-text-secondary",
693
- children: "Total Customers"
694
- }), /* @__PURE__ */ A("span", {
588
+ children: "Reviews"
589
+ }), /* @__PURE__ */ D("span", {
695
590
  className: "text-sm font-semibold text-text-primary",
696
- children: q.customerCount
591
+ children: H.length
697
592
  })]
698
593
  })
699
594
  ]
700
595
  })]
701
596
  }),
702
- /* @__PURE__ */ j("div", {
597
+ /* @__PURE__ */ O("div", {
703
598
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
704
- children: [/* @__PURE__ */ A("h3", {
599
+ children: [/* @__PURE__ */ D("h3", {
705
600
  className: "text-base font-semibold text-text-primary mb-3",
706
601
  children: "Business Settings"
707
- }), /* @__PURE__ */ A("div", {
602
+ }), /* @__PURE__ */ D("div", {
708
603
  className: "space-y-2",
709
604
  children: [
710
605
  {
711
606
  label: "Service Settings",
712
- icon: S,
607
+ icon: C,
713
608
  path: "/cart-owner/settings"
714
609
  },
715
610
  {
716
611
  label: "Business Profile",
717
- icon: h,
612
+ icon: _,
718
613
  path: "/cart-owner/profile"
719
614
  },
720
615
  {
721
616
  label: "Add Offerings",
722
- icon: x,
617
+ icon: S,
723
618
  path: "/cart-owner/inventory"
724
619
  }
725
620
  ].map((e) => {
726
621
  let t = e.icon;
727
- return /* @__PURE__ */ j("button", {
622
+ return /* @__PURE__ */ O("button", {
728
623
  type: "button",
729
- onClick: () => U(e.path),
624
+ onClick: () => P(e.path),
730
625
  className: "w-full flex items-center justify-between rounded-md border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
731
- children: [/* @__PURE__ */ j("span", {
626
+ children: [/* @__PURE__ */ O("span", {
732
627
  className: "flex items-center gap-2",
733
- children: [/* @__PURE__ */ A(t, { className: "h-3.5 w-3.5" }), e.label]
734
- }), /* @__PURE__ */ A(p, { className: "h-3 w-3 text-text-secondary" })]
628
+ children: [/* @__PURE__ */ D(t, { className: "h-3.5 w-3.5" }), e.label]
629
+ }), /* @__PURE__ */ D(h, { className: "h-3 w-3 text-text-secondary" })]
735
630
  }, e.label);
736
631
  })
737
632
  })]
738
633
  }),
739
- /* @__PURE__ */ j("div", {
634
+ /* @__PURE__ */ O("div", {
740
635
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
741
- children: [/* @__PURE__ */ A("h3", {
636
+ children: [/* @__PURE__ */ D("h3", {
742
637
  className: "text-base font-semibold text-text-primary mb-3",
743
638
  children: "Recent Activity"
744
- }), /* @__PURE__ */ j("div", {
639
+ }), J.length === 0 ? /* @__PURE__ */ D("p", {
640
+ className: "text-xs text-text-secondary",
641
+ children: "No recent activity yet."
642
+ }) : /* @__PURE__ */ D("div", {
745
643
  className: "space-y-2 text-xs",
746
- children: [
747
- /* @__PURE__ */ j("div", {
748
- className: "flex items-center gap-2",
749
- children: [/* @__PURE__ */ A(s, { className: "h-3.5 w-3.5 text-status-success-text" }), /* @__PURE__ */ A("span", {
750
- className: "text-text-secondary",
751
- children: "Order #ORD-003 delivered"
752
- })]
753
- }),
754
- /* @__PURE__ */ j("div", {
755
- className: "flex items-center gap-2",
756
- children: [/* @__PURE__ */ A(s, { className: "h-3.5 w-3.5 text-text-primary" }), /* @__PURE__ */ A("span", {
757
- className: "text-text-secondary",
758
- children: "Inventory updated"
759
- })]
760
- }),
761
- /* @__PURE__ */ j("div", {
762
- className: "flex items-center gap-2",
763
- children: [/* @__PURE__ */ A(s, { className: "h-3.5 w-3.5 text-status-warning-text" }), /* @__PURE__ */ A("span", {
764
- className: "text-text-secondary",
765
- children: "New customer review"
766
- })]
767
- })
768
- ]
644
+ children: J.map((e) => /* @__PURE__ */ O("div", {
645
+ className: "flex items-center gap-2",
646
+ children: [/* @__PURE__ */ D(re, { className: "h-3.5 w-3.5 text-text-secondary shrink-0" }), /* @__PURE__ */ O("span", {
647
+ className: "text-text-secondary truncate",
648
+ children: [
649
+ "Order #",
650
+ e.id.slice(0, 8),
651
+ " ",
652
+ e.status
653
+ ]
654
+ })]
655
+ }, e.id))
769
656
  })]
770
657
  })
771
658
  ]
@@ -773,9 +660,23 @@ var F = [
773
660
  })
774
661
  ]
775
662
  })
663
+ }) : /* @__PURE__ */ D(n, {
664
+ title: A(),
665
+ description: "Manage your service provider operations",
666
+ children: /* @__PURE__ */ D(r, {
667
+ illustration: "empty-generic",
668
+ title: "Create your cart to get started",
669
+ description: "You don't have a service provider yet. Set up your cart, add your offerings and configure your service to start taking orders.",
670
+ action: /* @__PURE__ */ O("button", {
671
+ type: "button",
672
+ onClick: () => P("/cart-owner/service-config"),
673
+ className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
674
+ children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), "Set up your cart"]
675
+ })
676
+ })
776
677
  });
777
678
  };
778
679
  //#endregion
779
- export { U as CartOwnerDashboard };
680
+ export { P as CartOwnerDashboard };
780
681
 
781
682
  //# sourceMappingURL=CartOwnerDashboard.js.map