@burdenoff/microfe-kadaikodi 2026.704.3 → 2026.704.4

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 (70) hide show
  1. package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
  2. package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
  3. package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
  4. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  6. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
  8. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
  10. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
  12. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
  14. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  15. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
  16. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
  18. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
  20. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
  22. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
  24. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
  26. package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
  27. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
  28. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
  31. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
  34. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
  36. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
  38. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  40. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
  42. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +5 -5
  44. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
  46. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
  48. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
  50. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
  52. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  53. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
  54. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
  56. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  58. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  61. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
  62. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  63. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
  64. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
  67. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  68. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
  69. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  70. package/package.json +1 -1
@@ -4,8 +4,8 @@ import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
5
  import { useOfferings as i, useOrders as a, useProviders as o, useReviews as s } from "../../hooks/useKadaikodiApi.js";
6
6
  import { formatCurrency as c } from "../../utils/formatters.js";
7
- import { useMemo as l, useState as u } from "react";
8
- import { ArrowDownRight as d, ArrowUpRight as f, BarChart3 as p, CalendarDays as m, Clock as h, Download as g, IndianRupee as _, Percent as v, ShoppingCart as y, Star as b, Target as ee, ThumbsUp as x, TrendingUp as S } from "lucide-react";
7
+ import { useMemo as l } from "react";
8
+ import { ArrowDownRight as u, ArrowUpRight as d, BarChart3 as f, CalendarDays as p, Clock as m, Download as h, IndianRupee as g, Percent as _, ShoppingCart as v, Star as y, Target as b, ThumbsUp as x, TrendingUp as S } from "lucide-react";
9
9
  import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
10
10
  import { EmphasisPanel as E, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/kadaikodi/pages/cart-owner/AnalyticsDashboard.tsx
@@ -22,9 +22,15 @@ var k = 864e5, A = {
22
22
  }, j = () => {
23
23
  let e = /* @__PURE__ */ new Date();
24
24
  return e.setHours(0, 0, 0, 0), e;
25
- }, M = () => {
26
- let { navigateTo: M, currentUser: N } = e(), [P, F] = u("week"), { data: I = [], isLoading: L } = o(), R = l(() => I.find((e) => e.ownerId === N?.id) ?? I[0], [I, N?.id]), z = R?.id, { data: B = [] } = a({ providerId: z }), { data: V = [] } = i(z), { data: H = [] } = s(z ?? ""), U = l(() => new Map(V.map((e) => [e.name, A[e.category] ?? e.category])), [V]), W = l(() => {
27
- let e = B.filter((e) => e.status === "delivered"), t = j().getTime(), n = (t, n) => e.filter((e) => {
25
+ }, M = (e) => {
26
+ let t = String(e ?? "");
27
+ return /[",\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
28
+ }, N = (e, t) => {
29
+ let n = t.map((e) => e.map(M).join(",")).join("\n"), r = new Blob([n], { type: "text/csv;charset=utf-8;" }), i = URL.createObjectURL(r), a = document.createElement("a");
30
+ a.href = i, a.download = e, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i);
31
+ }, P = () => {
32
+ let { navigateTo: M, currentUser: P } = e(), { data: F = [], isLoading: I } = o(), L = l(() => F.find((e) => e.ownerId === P?.id) ?? F[0], [F, P?.id]), R = L?.id, { data: z = [] } = a({ providerId: R }), { data: B = [] } = i(R), { data: V = [] } = s(R ?? ""), H = l(() => new Map(B.map((e) => [e.name, A[e.category] ?? e.category])), [B]), U = l(() => {
33
+ let e = z.filter((e) => e.status === "delivered"), t = j().getTime(), n = (t, n) => e.filter((e) => {
28
34
  let r = new Date(e.orderDate).getTime();
29
35
  return r >= t && r < n;
30
36
  }).reduce((e, t) => e + t.total, 0), r = n(t, t + k), i = n(t - k, t), a = n(t - 6 * k, t + k), o = n(t - 13 * k, t - 6 * k), s = n(t - 29 * k, t + k), c = n(t - 59 * k, t - 29 * k), l = n(t - 364 * k, t + k), u = (e, t) => t > 0 ? Math.round((e - t) / t * 1e3) / 10 : null;
@@ -37,8 +43,8 @@ var k = 864e5, A = {
37
43
  weeklyGrowth: u(a, o),
38
44
  monthlyGrowth: u(s, c)
39
45
  };
40
- }, [B]), G = l(() => {
41
- let e = B.length, t = B.filter((e) => e.status === "delivered"), n = B.filter((e) => e.status === "cancelled"), r = t.length > 0 ? Math.round(t.reduce((e, t) => e + t.total, 0) / t.length) : 0;
46
+ }, [z]), W = l(() => {
47
+ let e = z.length, t = z.filter((e) => e.status === "delivered"), n = z.filter((e) => e.status === "cancelled"), r = t.length > 0 ? Math.round(t.reduce((e, t) => e + t.total, 0) / t.length) : 0;
42
48
  return {
43
49
  total: e,
44
50
  completed: t.length,
@@ -48,9 +54,9 @@ var k = 864e5, A = {
48
54
  cancellationRate: e > 0 ? Math.round(n.length / e * 100) : 0,
49
55
  completionRate: e > 0 ? Math.round(t.length / e * 100) : 0
50
56
  };
51
- }, [B]), { popularTimes: K, peakHours: q, peakDays: J } = l(() => {
57
+ }, [z]), { popularTimes: G, peakHours: K, peakDays: q } = l(() => {
52
58
  let e = Array(24).fill(0), t = /* @__PURE__ */ new Map();
53
- B.forEach((n) => {
59
+ z.forEach((n) => {
54
60
  let r = new Date(n.orderDate);
55
61
  e[r.getHours()] += 1;
56
62
  let i = r.toLocaleDateString("en-US", { weekday: "long" });
@@ -68,10 +74,10 @@ var k = 864e5, A = {
68
74
  orders: t
69
75
  })).sort((e, t) => t.orders - e.orders).slice(0, 3)
70
76
  };
71
- }, [B]), { topSelling: Y, leastSelling: X, categories: Z } = l(() => {
77
+ }, [z]), { topSelling: J, leastSelling: Y, categories: X } = l(() => {
72
78
  let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
73
- B.forEach((n) => n.items.forEach((n) => {
74
- let r = U.get(n.name) ?? "Other", i = e.get(n.name) ?? {
79
+ z.forEach((n) => n.items.forEach((n) => {
80
+ let r = H.get(n.name) ?? "Other", i = e.get(n.name) ?? {
75
81
  quantity: 0,
76
82
  revenue: 0,
77
83
  category: r
@@ -95,12 +101,12 @@ var k = 864e5, A = {
95
101
  ...t
96
102
  })).sort((e, t) => t.revenue - e.revenue)
97
103
  };
98
- }, [B, U]), Q = l(() => {
99
- let e = H.length;
104
+ }, [z, H]), Z = l(() => {
105
+ let e = V.length;
100
106
  return {
101
107
  count: e,
102
- average: e > 0 ? H.reduce((e, t) => e + t.rating, 0) / e : 0,
103
- positive: H.filter((e) => e.rating >= 4).length,
108
+ average: e > 0 ? V.reduce((e, t) => e + t.rating, 0) / e : 0,
109
+ positive: V.filter((e) => e.rating >= 4).length,
104
110
  distribution: [
105
111
  5,
106
112
  4,
@@ -109,14 +115,14 @@ var k = 864e5, A = {
109
115
  1
110
116
  ].map((e) => ({
111
117
  star: e,
112
- count: H.filter((t) => t.rating === e).length
118
+ count: V.filter((t) => t.rating === e).length
113
119
  })),
114
- recent: [...H].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()).slice(0, 4)
120
+ recent: [...V].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()).slice(0, 4)
115
121
  };
116
- }, [H]), te = l(() => {
122
+ }, [V]), Q = l(() => {
117
123
  let e = j().getTime(), t = [];
118
124
  for (let n = 13; n >= 0; n--) {
119
- let r = e - n * k, i = r + k, a = B.filter((e) => {
125
+ let r = e - n * k, i = r + k, a = z.filter((e) => {
120
126
  let t = new Date(e.orderDate).getTime();
121
127
  return t >= r && t < i;
122
128
  });
@@ -127,8 +133,8 @@ var k = 864e5, A = {
127
133
  });
128
134
  }
129
135
  return t;
130
- }, [B]), ne = Math.max(...K.map((e) => e.orders), 1), $ = Math.max(...Z.map((e) => e.revenue), 1), re = Math.max(...q.map((e) => e.orders), 1), ie = Math.max(...J.map((e) => e.orders), 1), ae = Math.max(...Q.distribution.map((e) => e.count), 1), oe = (e) => `${e > 0 ? "+" : ""}${e}%`;
131
- if (L) return /* @__PURE__ */ w(n, {
136
+ }, [z]), $ = Math.max(...G.map((e) => e.orders), 1), ee = Math.max(...X.map((e) => e.revenue), 1), te = Math.max(...K.map((e) => e.orders), 1), ne = Math.max(...q.map((e) => e.orders), 1), re = Math.max(...Z.distribution.map((e) => e.count), 1), ie = (e) => `${e > 0 ? "+" : ""}${e}%`;
137
+ if (I) return /* @__PURE__ */ w(n, {
132
138
  title: "Analytics Dashboard",
133
139
  description: "Business performance insights and data",
134
140
  children: /* @__PURE__ */ w("div", {
@@ -136,7 +142,7 @@ var k = 864e5, A = {
136
142
  children: /* @__PURE__ */ w("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
137
143
  })
138
144
  });
139
- if (!R) return /* @__PURE__ */ w(n, {
145
+ if (!L) return /* @__PURE__ */ w(n, {
140
146
  title: "Analytics Dashboard",
141
147
  description: "Business performance insights and data",
142
148
  children: /* @__PURE__ */ w(r, {
@@ -151,61 +157,49 @@ var k = 864e5, A = {
151
157
  })
152
158
  })
153
159
  });
154
- let se = [
160
+ let ae = [
155
161
  {
156
162
  label: "Today's Revenue",
157
- value: W.today,
158
- growth: W.dailyGrowth
163
+ value: U.today,
164
+ growth: U.dailyGrowth
159
165
  },
160
166
  {
161
167
  label: "This Week",
162
- value: W.week,
163
- growth: W.weeklyGrowth
168
+ value: U.week,
169
+ growth: U.weeklyGrowth
164
170
  },
165
171
  {
166
172
  label: "This Month",
167
- value: W.month,
168
- growth: W.monthlyGrowth
173
+ value: U.month,
174
+ growth: U.monthlyGrowth
169
175
  },
170
176
  {
171
177
  label: "This Year",
172
- value: W.year,
178
+ value: U.year,
173
179
  growth: null
174
180
  }
175
181
  ];
176
182
  return /* @__PURE__ */ T(n, {
177
183
  title: "Analytics Dashboard",
178
- description: `Performance insights for ${R.name}`,
179
- actions: /* @__PURE__ */ T("div", {
180
- className: "flex items-center gap-2",
181
- children: [/* @__PURE__ */ T("select", {
182
- value: P,
183
- onChange: (e) => F(e.target.value),
184
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
185
- children: [
186
- /* @__PURE__ */ w("option", {
187
- value: "today",
188
- children: "Today"
189
- }),
190
- /* @__PURE__ */ w("option", {
191
- value: "week",
192
- children: "This Week"
193
- }),
194
- /* @__PURE__ */ w("option", {
195
- value: "month",
196
- children: "This Month"
184
+ description: `Performance insights for ${L.name}`,
185
+ actions: /* @__PURE__ */ T("button", {
186
+ type: "button",
187
+ onClick: () => {
188
+ N(`${L.name}-analytics-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, [[
189
+ "Date",
190
+ "Orders",
191
+ "Revenue (INR)"
192
+ ], ...Q.map((e) => [
193
+ new Date(e.date).toLocaleDateString("en-IN", {
194
+ day: "2-digit",
195
+ month: "short"
197
196
  }),
198
- /* @__PURE__ */ w("option", {
199
- value: "year",
200
- children: "This Year"
201
- })
202
- ]
203
- }), /* @__PURE__ */ T("button", {
204
- type: "button",
205
- onClick: () => alert("Export feature coming soon!"),
206
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
207
- children: [/* @__PURE__ */ w(g, { className: "h-4 w-4" }), "Export"]
208
- })]
197
+ e.orders,
198
+ e.revenue
199
+ ])]);
200
+ },
201
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
202
+ children: [/* @__PURE__ */ w(h, { className: "h-4 w-4" }), "Export CSV"]
209
203
  }),
210
204
  children: [
211
205
  /* @__PURE__ */ w(O, {
@@ -244,17 +238,17 @@ var k = 864e5, A = {
244
238
  children: "Revenue Overview"
245
239
  }), /* @__PURE__ */ w("div", {
246
240
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
247
- children: se.map((e) => /* @__PURE__ */ T("div", {
241
+ children: ae.map((e) => /* @__PURE__ */ T("div", {
248
242
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
249
243
  children: [
250
244
  /* @__PURE__ */ T("div", {
251
245
  className: "flex items-center justify-between",
252
246
  children: [/* @__PURE__ */ w("div", {
253
247
  className: "rounded-md bg-accent p-2",
254
- children: /* @__PURE__ */ w(_, { className: "h-5 w-5 text-text-secondary" })
248
+ children: /* @__PURE__ */ w(g, { className: "h-5 w-5 text-text-secondary" })
255
249
  }), e.growth !== null && /* @__PURE__ */ T("div", {
256
250
  className: t("flex items-center gap-1 text-xs font-medium", e.growth >= 0 ? "text-status-success-text" : "text-status-error-text"),
257
- children: [e.growth >= 0 ? /* @__PURE__ */ w(f, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), oe(e.growth)]
251
+ children: [e.growth >= 0 ? /* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" }), ie(e.growth)]
258
252
  })]
259
253
  }),
260
254
  /* @__PURE__ */ w("p", {
@@ -276,7 +270,7 @@ var k = 864e5, A = {
276
270
  className: "border-b border-border-subtle px-5 py-4",
277
271
  children: /* @__PURE__ */ T("h2", {
278
272
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
279
- children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
273
+ children: [/* @__PURE__ */ w(v, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
280
274
  })
281
275
  }), /* @__PURE__ */ w("div", {
282
276
  className: "p-5",
@@ -288,28 +282,28 @@ var k = 864e5, A = {
288
282
  children: "Total Orders"
289
283
  }), /* @__PURE__ */ w("p", {
290
284
  className: "text-2xl font-bold text-text-primary",
291
- children: G.total
285
+ children: W.total
292
286
  })] }),
293
287
  /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
294
288
  className: "text-xs text-text-secondary",
295
289
  children: "Avg. Order Value"
296
290
  }), /* @__PURE__ */ w("p", {
297
291
  className: "text-2xl font-bold text-text-primary",
298
- children: c(G.avgOrderValue, { minimumFractionDigits: 0 })
292
+ children: c(W.avgOrderValue, { minimumFractionDigits: 0 })
299
293
  })] }),
300
294
  /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
301
295
  className: "text-xs text-text-secondary",
302
296
  children: "Completed"
303
297
  }), /* @__PURE__ */ w("p", {
304
298
  className: "text-xl font-bold text-status-success-text",
305
- children: G.completed
299
+ children: W.completed
306
300
  })] }),
307
301
  /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
308
302
  className: "text-xs text-text-secondary",
309
303
  children: "Cancelled"
310
304
  }), /* @__PURE__ */ w("p", {
311
305
  className: "text-xl font-bold text-status-error-text",
312
- children: G.cancelled
306
+ children: W.cancelled
313
307
  })] })
314
308
  ]
315
309
  })
@@ -320,15 +314,15 @@ var k = 864e5, A = {
320
314
  className: "border-b border-border-subtle px-5 py-4",
321
315
  children: /* @__PURE__ */ T("h2", {
322
316
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
323
- children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 text-text-secondary" }), "Popular Times"]
317
+ children: [/* @__PURE__ */ w(m, { className: "h-4 w-4 text-text-secondary" }), "Popular Times"]
324
318
  })
325
319
  }), /* @__PURE__ */ w("div", {
326
320
  className: "p-5 space-y-2",
327
- children: K.length === 0 ? /* @__PURE__ */ w("p", {
321
+ children: G.length === 0 ? /* @__PURE__ */ w("p", {
328
322
  className: "text-sm text-text-secondary py-4 text-center",
329
323
  children: "No order activity yet. Busy hours will appear here once orders come in."
330
- }) : K.map((e) => {
331
- let t = e.orders / ne * 100;
324
+ }) : G.map((e) => {
325
+ let t = e.orders / $ * 100;
332
326
  return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
333
327
  className: "flex items-center justify-between text-xs mb-0.5",
334
328
  children: [/* @__PURE__ */ w("span", {
@@ -357,26 +351,26 @@ var k = 864e5, A = {
357
351
  children: [
358
352
  {
359
353
  label: "Acceptance Rate",
360
- value: `${G.acceptanceRate}%`,
361
- icon: ee,
354
+ value: `${W.acceptanceRate}%`,
355
+ icon: b,
362
356
  color: "text-status-success-text"
363
357
  },
364
358
  {
365
359
  label: "Cancellation Rate",
366
- value: `${G.cancellationRate}%`,
367
- icon: v,
360
+ value: `${W.cancellationRate}%`,
361
+ icon: _,
368
362
  color: "text-status-error-text"
369
363
  },
370
364
  {
371
365
  label: "Completion Rate",
372
- value: `${G.completionRate}%`,
366
+ value: `${W.completionRate}%`,
373
367
  icon: S,
374
368
  color: "text-text-primary"
375
369
  },
376
370
  {
377
371
  label: "Average Rating",
378
- value: (R.rating ?? 0).toFixed(1),
379
- icon: b,
372
+ value: (L.rating ?? 0).toFixed(1),
373
+ icon: y,
380
374
  color: "text-status-warning-text"
381
375
  }
382
376
  ].map((e) => {
@@ -406,12 +400,12 @@ var k = 864e5, A = {
406
400
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
407
401
  children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 text-text-secondary" }), "Top Selling Offerings"]
408
402
  })
409
- }), Y.length === 0 ? /* @__PURE__ */ w("p", {
403
+ }), J.length === 0 ? /* @__PURE__ */ w("p", {
410
404
  className: "text-sm text-text-secondary p-5",
411
405
  children: "No sales yet. Your best-selling items will appear here."
412
406
  }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
413
407
  className: "divide-y divide-border",
414
- children: Y.map((e, t) => /* @__PURE__ */ T("div", {
408
+ children: J.map((e, t) => /* @__PURE__ */ T("div", {
415
409
  className: "flex items-center justify-between px-5 py-3",
416
410
  children: [/* @__PURE__ */ T("div", {
417
411
  className: "flex items-center gap-3",
@@ -435,12 +429,12 @@ var k = 864e5, A = {
435
429
  children: c(e.revenue, { minimumFractionDigits: 0 })
436
430
  })]
437
431
  }, e.name))
438
- }), X.length > 0 && /* @__PURE__ */ T("div", {
432
+ }), Y.length > 0 && /* @__PURE__ */ T("div", {
439
433
  className: "border-t border-border-subtle px-5 py-3",
440
434
  children: [/* @__PURE__ */ w("p", {
441
435
  className: "text-xs font-medium text-text-secondary mb-2",
442
436
  children: "Least Selling"
443
- }), X.map((e) => /* @__PURE__ */ T("div", {
437
+ }), Y.map((e) => /* @__PURE__ */ T("div", {
444
438
  className: "flex items-center justify-between py-1.5",
445
439
  children: [/* @__PURE__ */ w("span", {
446
440
  className: "text-xs text-text-secondary",
@@ -462,15 +456,15 @@ var k = 864e5, A = {
462
456
  className: "border-b border-border-subtle px-5 py-4",
463
457
  children: /* @__PURE__ */ T("h2", {
464
458
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
465
- children: [/* @__PURE__ */ w(p, { className: "h-4 w-4 text-text-secondary" }), "Category Performance"]
459
+ children: [/* @__PURE__ */ w(f, { className: "h-4 w-4 text-text-secondary" }), "Category Performance"]
466
460
  })
467
461
  }), /* @__PURE__ */ w("div", {
468
462
  className: "p-5 space-y-4",
469
- children: Z.length === 0 ? /* @__PURE__ */ w("p", {
463
+ children: X.length === 0 ? /* @__PURE__ */ w("p", {
470
464
  className: "text-sm text-text-secondary py-4 text-center",
471
465
  children: "No category data yet."
472
- }) : Z.map((e) => {
473
- let t = e.revenue / $ * 100;
466
+ }) : X.map((e) => {
467
+ let t = e.revenue / ee * 100;
474
468
  return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
475
469
  className: "flex items-center justify-between text-sm mb-1",
476
470
  children: [/* @__PURE__ */ w("span", {
@@ -505,7 +499,7 @@ var k = 864e5, A = {
505
499
  className: "border-b border-border-subtle px-5 py-4",
506
500
  children: /* @__PURE__ */ T("h2", {
507
501
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
508
- children: [/* @__PURE__ */ w(b, { className: "h-4 w-4 text-text-secondary" }), "Reviews & Ratings"]
502
+ children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 text-text-secondary" }), "Reviews & Ratings"]
509
503
  })
510
504
  }), /* @__PURE__ */ T("div", {
511
505
  className: "p-5",
@@ -517,41 +511,41 @@ var k = 864e5, A = {
517
511
  children: "Total Reviews"
518
512
  }), /* @__PURE__ */ w("p", {
519
513
  className: "text-xl font-bold text-text-primary",
520
- children: Q.count
514
+ children: Z.count
521
515
  })] }),
522
516
  /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
523
517
  className: "text-xs text-text-secondary",
524
518
  children: "Average Rating"
525
519
  }), /* @__PURE__ */ T("p", {
526
520
  className: "text-xl font-bold text-status-warning-text flex items-center gap-1",
527
- children: [/* @__PURE__ */ w(b, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), Q.count > 0 ? Q.average.toFixed(1) : "—"]
521
+ children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), Z.count > 0 ? Z.average.toFixed(1) : "—"]
528
522
  })] }),
529
523
  /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
530
524
  className: "text-xs text-text-secondary",
531
525
  children: "Positive (4★+)"
532
526
  }), /* @__PURE__ */ w("p", {
533
527
  className: "text-xl font-bold text-status-success-text",
534
- children: Q.positive
528
+ children: Z.positive
535
529
  })] })
536
530
  ]
537
- }), Q.count === 0 ? /* @__PURE__ */ w("p", {
531
+ }), Z.count === 0 ? /* @__PURE__ */ w("p", {
538
532
  className: "text-sm text-text-secondary py-4 text-center",
539
533
  children: "No reviews yet. Customer reviews will appear here once you start fulfilling orders."
540
534
  }) : /* @__PURE__ */ T(C, { children: [
541
535
  /* @__PURE__ */ w("div", {
542
536
  className: "space-y-1.5 mb-5",
543
- children: Q.distribution.map((e) => /* @__PURE__ */ T("div", {
537
+ children: Z.distribution.map((e) => /* @__PURE__ */ T("div", {
544
538
  className: "flex items-center gap-2 text-xs",
545
539
  children: [
546
540
  /* @__PURE__ */ T("span", {
547
541
  className: "w-8 text-text-secondary flex items-center gap-0.5",
548
- children: [e.star, /* @__PURE__ */ w(b, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" })]
542
+ children: [e.star, /* @__PURE__ */ w(y, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" })]
549
543
  }),
550
544
  /* @__PURE__ */ w("div", {
551
545
  className: "flex-1 h-2 rounded-full bg-bg-sunken overflow-hidden",
552
546
  children: /* @__PURE__ */ w("div", {
553
547
  className: "h-full rounded-full bg-[var(--color-accent-soft)]",
554
- style: { width: `${e.count / ae * 100}%` }
548
+ style: { width: `${e.count / re * 100}%` }
555
549
  })
556
550
  }),
557
551
  /* @__PURE__ */ w("span", {
@@ -567,13 +561,13 @@ var k = 864e5, A = {
567
561
  }),
568
562
  /* @__PURE__ */ w("div", {
569
563
  className: "space-y-3",
570
- children: Q.recent.map((e) => /* @__PURE__ */ T("div", {
564
+ children: Z.recent.map((e) => /* @__PURE__ */ T("div", {
571
565
  className: "rounded-md border border-border-subtle p-3 text-sm",
572
566
  children: [/* @__PURE__ */ T("div", {
573
567
  className: "flex items-center justify-between mb-1",
574
568
  children: [/* @__PURE__ */ T("span", {
575
569
  className: "flex items-center gap-0.5 text-status-warning-text text-xs font-medium",
576
- children: [/* @__PURE__ */ w(b, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
570
+ children: [/* @__PURE__ */ w(y, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
577
571
  }), /* @__PURE__ */ w("span", {
578
572
  className: "text-xs text-text-secondary",
579
573
  children: new Date(e.createdAt).toLocaleDateString("en-IN", {
@@ -599,15 +593,15 @@ var k = 864e5, A = {
599
593
  className: "border-b border-border-subtle px-5 py-4",
600
594
  children: /* @__PURE__ */ T("h2", {
601
595
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
602
- children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 text-text-secondary" }), "Peak Hours"]
596
+ children: [/* @__PURE__ */ w(m, { className: "h-4 w-4 text-text-secondary" }), "Peak Hours"]
603
597
  })
604
598
  }), /* @__PURE__ */ w("div", {
605
599
  className: "p-5 space-y-3",
606
- children: q.length === 0 ? /* @__PURE__ */ w("p", {
600
+ children: K.length === 0 ? /* @__PURE__ */ w("p", {
607
601
  className: "text-sm text-text-secondary py-2 text-center",
608
602
  children: "No data yet."
609
- }) : q.map((e) => {
610
- let t = e.orders / re * 100;
603
+ }) : K.map((e) => {
604
+ let t = e.orders / te * 100;
611
605
  return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
612
606
  className: "flex items-center justify-between text-xs mb-1",
613
607
  children: [/* @__PURE__ */ w("span", {
@@ -633,15 +627,15 @@ var k = 864e5, A = {
633
627
  className: "border-b border-border-subtle px-5 py-4",
634
628
  children: /* @__PURE__ */ T("h2", {
635
629
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
636
- children: [/* @__PURE__ */ w(m, { className: "h-4 w-4 text-text-secondary" }), "Peak Days"]
630
+ children: [/* @__PURE__ */ w(p, { className: "h-4 w-4 text-text-secondary" }), "Peak Days"]
637
631
  })
638
632
  }), /* @__PURE__ */ w("div", {
639
633
  className: "p-5 space-y-3",
640
- children: J.length === 0 ? /* @__PURE__ */ w("p", {
634
+ children: q.length === 0 ? /* @__PURE__ */ w("p", {
641
635
  className: "text-sm text-text-secondary py-2 text-center",
642
636
  children: "No data yet."
643
- }) : J.map((e) => {
644
- let t = e.orders / ie * 100;
637
+ }) : q.map((e) => {
638
+ let t = e.orders / ne * 100;
645
639
  return /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
646
640
  className: "flex items-center justify-between text-xs mb-1",
647
641
  children: [/* @__PURE__ */ w("span", {
@@ -661,16 +655,16 @@ var k = 864e5, A = {
661
655
  })
662
656
  })]
663
657
  }),
664
- Q.count > 0 && /* @__PURE__ */ w("div", {
658
+ Z.count > 0 && /* @__PURE__ */ w("div", {
665
659
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
666
660
  children: /* @__PURE__ */ T("div", {
667
661
  className: "flex items-center gap-1.5 text-sm",
668
662
  children: [/* @__PURE__ */ w(x, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ T("span", {
669
663
  className: "text-text-secondary",
670
664
  children: [
671
- Q.positive,
665
+ Z.positive,
672
666
  "/",
673
- Q.count,
667
+ Z.count,
674
668
  " positive reviews"
675
669
  ]
676
670
  })]
@@ -707,7 +701,7 @@ var k = 864e5, A = {
707
701
  children: "Revenue"
708
702
  })
709
703
  ]
710
- }) }), /* @__PURE__ */ w("tbody", { children: te.map((e) => /* @__PURE__ */ T("tr", {
704
+ }) }), /* @__PURE__ */ w("tbody", { children: Q.map((e) => /* @__PURE__ */ T("tr", {
711
705
  className: "border-b border-border-subtle last:border-0",
712
706
  children: [
713
707
  /* @__PURE__ */ w("td", {
@@ -736,6 +730,6 @@ var k = 864e5, A = {
736
730
  });
737
731
  };
738
732
  //#endregion
739
- export { M as AnalyticsDashboard };
733
+ export { P as AnalyticsDashboard };
740
734
 
741
735
  //# sourceMappingURL=AnalyticsDashboard.js.map