@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.3

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 (77) 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 +297 -479
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +114 -400
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +166 -292
  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 +5 -5
  17. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  19. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  21. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  27. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  33. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  35. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  37. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  40. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  42. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  44. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  49. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  52. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  54. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  56. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  58. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  60. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  62. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  64. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  66. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  68. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  70. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -1
@@ -2,166 +2,74 @@ 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
4
  import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useEffect as a, useState as o } from "react";
7
- import { Award as s, BarChart3 as c, IndianRupee as l, Loader2 as u, ShoppingBag as d, Star as f, Timer as p, Users as m, Zap as h } from "lucide-react";
8
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
9
- import { EmphasisPanel as v, NextSteps as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
5
+ import { useAdminAnalytics as i, useDashboardStats as a, useOrders as o, useProviders as s } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as c } from "../../utils/formatters.js";
7
+ import { useMemo as l, useState as u } from "react";
8
+ import { Award as d, BarChart3 as f, IndianRupee as p, Loader2 as m, ShoppingBag as h, Star as g, Store as _, TrendingUp as v, Users as y, Zap as b } from "lucide-react";
9
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
10
+ import { EmphasisPanel as C, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
10
11
  //#region src/kadaikodi/pages/admin/AdminAnalyticsPage.tsx
11
- function x() {
12
- let { currentUser: x, navigateTo: S } = e(), [C, w] = o(null), [T, E] = o(!0), [D, O] = o("month"), [k, A] = o("overview");
13
- a(() => {
14
- E(!0);
15
- let e = setTimeout(() => {
16
- w({
17
- revenue: {
18
- total: 125e5,
19
- growth: 15.2,
20
- thisMonth: 21e5,
21
- lastMonth: 185e4
22
- },
23
- orders: {
24
- total: 45230,
25
- growth: 8.7,
26
- pending: 156,
27
- completed: 44890,
28
- cancelled: 184,
29
- averageOrderValue: 276,
30
- ordersToday: 89
31
- },
32
- users: {
33
- total: 12450,
34
- growth: 12.3,
35
- active: 9870,
36
- newThisMonth: 456,
37
- customers: 9850,
38
- cartOwners: 1240,
39
- workers: 890,
40
- investors: 470
41
- },
42
- carts: {
43
- total: 1240,
44
- active: 1156,
45
- pending: 84,
46
- topPerforming: [
47
- {
48
- id: "c1",
49
- name: "South Indian Express",
50
- revenue: 285e3,
51
- orders: 1250,
52
- rating: 4.8
53
- },
54
- {
55
- id: "c2",
56
- name: "Mumbai Street Chaat",
57
- revenue: 245e3,
58
- orders: 980,
59
- rating: 4.7
60
- },
61
- {
62
- id: "c3",
63
- name: "Delhi Paratha Corner",
64
- revenue: 198e3,
65
- orders: 876,
66
- rating: 4.6
67
- },
68
- {
69
- id: "c4",
70
- name: "Bangalore Dosa House",
71
- revenue: 176e3,
72
- orders: 743,
73
- rating: 4.9
74
- },
75
- {
76
- id: "c5",
77
- name: "Kolkata Fish Fry",
78
- revenue: 154e3,
79
- orders: 632,
80
- rating: 4.5
81
- }
82
- ]
83
- },
84
- performance: {
85
- averageDeliveryTime: 28,
86
- customerSatisfaction: 4.6,
87
- platformFee: 8.5,
88
- operatingCosts: 21e5,
89
- netProfit: 85e4
90
- },
91
- geography: { topCities: [
92
- {
93
- city: "Bangalore",
94
- orders: 15670,
95
- revenue: 425e4
96
- },
97
- {
98
- city: "Mumbai",
99
- orders: 12340,
100
- revenue: 389e4
101
- },
102
- {
103
- city: "Delhi",
104
- orders: 9870,
105
- revenue: 298e4
106
- },
107
- {
108
- city: "Hyderabad",
109
- orders: 7650,
110
- revenue: 214e4
111
- },
112
- {
113
- city: "Chennai",
114
- orders: 6540,
115
- revenue: 189e4
116
- }
117
- ] }
118
- }), E(!1);
119
- }, 800);
120
- return () => clearTimeout(e);
121
- }, [D]);
122
- let j = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : i(e, { minimumFractionDigits: 0 }), M = (e) => e === 0 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : e === 1 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-text-secondary" }) : e === 2 ? /* @__PURE__ */ g(s, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ g(c, { className: "h-5 w-5 text-text-secondary" });
123
- if (T || !C) return /* @__PURE__ */ g(n, {
12
+ function E() {
13
+ let { navigateTo: E } = e(), { data: D, isLoading: O } = a(), { data: k, isLoading: A } = i(), { data: j = [], isLoading: M } = s(), { data: N = [], isLoading: P } = o({}), [F, I] = u("overview"), L = O || A || M || P, R = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : c(e, { minimumFractionDigits: 0 }), z = l(() => {
14
+ let e = N.length, t = N.filter((e) => e.status === "delivered").length, n = N.filter((e) => e.status === "cancelled").length, r = N.filter((e) => e.status === "pending" || e.status === "confirmed").length, i = /* @__PURE__ */ new Date();
15
+ return i.setHours(0, 0, 0, 0), {
16
+ total: e,
17
+ completed: t,
18
+ cancelled: n,
19
+ pending: r,
20
+ ordersToday: N.filter((e) => new Date(e.orderDate).getTime() >= i.getTime()).length,
21
+ avgOrderValue: D && D.totalOrders > 0 ? D.totalRevenue / D.totalOrders : 0
22
+ };
23
+ }, [N, D]), B = l(() => j.filter((e) => !e.isOpen).length, [j]), V = k?.topProviders ?? [], H = k?.customerGrowth?.customers ?? 0, U = l(() => {
24
+ let e = Object.entries(k?.categoryDistribution ?? {}), t = e.reduce((e, [, t]) => e + t, 0);
25
+ return e.map(([e, n]) => ({
26
+ category: e,
27
+ count: n,
28
+ percentage: t > 0 ? n / t * 100 : 0
29
+ })).sort((e, t) => t.count - e.count);
30
+ }, [k]), W = (e) => e.replace(/_/g, " ").toLowerCase(), G = (e, t) => t > 0 ? e / t * 100 : 0, K = (e) => e < 3 ? /* @__PURE__ */ x(d, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ x(f, { className: "h-5 w-5 text-text-secondary" });
31
+ if (L || !D) return /* @__PURE__ */ x(n, {
124
32
  title: "Platform Analytics",
125
33
  description: "Loading analytics...",
126
- children: /* @__PURE__ */ _("div", {
34
+ children: /* @__PURE__ */ S("div", {
127
35
  className: "flex flex-col items-center justify-center py-20",
128
- children: [/* @__PURE__ */ g(u, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ g("p", {
36
+ children: [/* @__PURE__ */ x(m, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ x("p", {
129
37
  className: "text-text-secondary",
130
38
  children: "Loading analytics..."
131
39
  })]
132
40
  })
133
41
  });
134
- let N = [
42
+ let q = [
135
43
  {
136
44
  key: "overview",
137
45
  label: "Overview",
138
- icon: c
46
+ icon: f
139
47
  },
140
48
  {
141
49
  key: "revenue",
142
50
  label: "Revenue",
143
- icon: l
51
+ icon: p
144
52
  },
145
53
  {
146
54
  key: "users",
147
55
  label: "Users",
148
- icon: m
56
+ icon: y
149
57
  },
150
58
  {
151
59
  key: "performance",
152
60
  label: "Performance",
153
- icon: h
61
+ icon: b
154
62
  }
155
63
  ];
156
- return /* @__PURE__ */ _(n, {
64
+ return /* @__PURE__ */ S(n, {
157
65
  title: "Platform Analytics",
158
66
  description: "Comprehensive platform metrics and trends",
159
67
  children: [
160
- /* @__PURE__ */ g(b, {
68
+ /* @__PURE__ */ x(T, {
161
69
  className: "mb-6",
162
- children: "Your bird's-eye view of how Kadaikodi is performing. Use this page to spot revenue and order trends, see which carts and cities drive the most business, and understand where users are growing — so you can decide where to invest, which carts to promote, and where service quality needs attention. Switch the period filter and tabs to drill into revenue, users, and operational performance."
70
+ children: "Your bird's-eye view of how Kadaikodi is performing. Spot revenue and order trends, see which carts and categories drive the most business, and understand where customers are growing — so you can decide where to invest and which carts to promote. Switch tabs to drill into revenue, users, and operational performance."
163
71
  }),
164
- /* @__PURE__ */ g(y, {
72
+ /* @__PURE__ */ x(w, {
165
73
  storageKey: "kadaikodi-admin-analytics",
166
74
  className: "mb-6",
167
75
  steps: [
@@ -169,505 +77,415 @@ function x() {
169
77
  id: "review-carts",
170
78
  label: "Review top-performing carts",
171
79
  description: "See which carts drive the most revenue and orders.",
172
- onClick: () => A("overview")
80
+ onClick: () => I("overview")
173
81
  },
174
82
  {
175
83
  id: "check-revenue",
176
- label: "Break down revenue by city",
177
- description: "Find your strongest markets in the Revenue tab.",
178
- onClick: () => A("revenue")
84
+ label: "Break down revenue by category",
85
+ description: "Find your strongest categories in the Revenue tab.",
86
+ onClick: () => I("revenue")
179
87
  },
180
88
  {
181
89
  id: "manage-carts",
182
90
  label: "Approve pending carts",
183
91
  description: "Onboard the carts waiting for review.",
184
- onClick: () => S("/admin/carts")
92
+ onClick: () => E("/admin/carts"),
93
+ done: B === 0
185
94
  }
186
95
  ]
187
96
  }),
188
- /* @__PURE__ */ _("div", {
189
- className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",
190
- children: [/* @__PURE__ */ _("select", {
191
- value: D,
192
- onChange: (e) => O(e.target.value),
193
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] w-fit",
194
- children: [
195
- /* @__PURE__ */ g("option", {
196
- value: "today",
197
- children: "Today"
198
- }),
199
- /* @__PURE__ */ g("option", {
200
- value: "week",
201
- children: "This Week"
202
- }),
203
- /* @__PURE__ */ g("option", {
204
- value: "month",
205
- children: "This Month"
206
- }),
207
- /* @__PURE__ */ g("option", {
208
- value: "quarter",
209
- children: "This Quarter"
210
- }),
211
- /* @__PURE__ */ g("option", {
212
- value: "year",
213
- children: "This Year"
214
- })
215
- ]
216
- }), /* @__PURE__ */ _("span", {
97
+ /* @__PURE__ */ x("div", {
98
+ className: "flex justify-end mb-6",
99
+ children: /* @__PURE__ */ S("span", {
217
100
  className: "text-sm text-text-secondary",
218
101
  children: ["Last updated: ", (/* @__PURE__ */ new Date()).toLocaleString("en-IN")]
219
- })]
102
+ })
220
103
  }),
221
- /* @__PURE__ */ _(v, {
104
+ /* @__PURE__ */ S(C, {
222
105
  className: "mb-8",
223
- children: [/* @__PURE__ */ g("h2", {
106
+ children: [/* @__PURE__ */ x("h2", {
224
107
  className: "mb-4 text-lg font-semibold text-text-primary",
225
108
  children: "Key Metrics"
226
- }), /* @__PURE__ */ _("div", {
109
+ }), /* @__PURE__ */ S("div", {
227
110
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
228
111
  children: [
229
- /* @__PURE__ */ g(r, {
112
+ /* @__PURE__ */ x(r, {
230
113
  featured: !0,
231
- icon: /* @__PURE__ */ g(l, { className: "h-5 w-5" }),
232
- value: j(C.revenue.total),
233
- label: "Total Revenue",
234
- trend: "up",
235
- trendValue: `+${C.revenue.growth}%`
114
+ icon: /* @__PURE__ */ x(p, { className: "h-5 w-5" }),
115
+ value: R(D.totalRevenue),
116
+ label: "Total Revenue"
236
117
  }),
237
- /* @__PURE__ */ g(r, {
238
- icon: /* @__PURE__ */ g(d, { className: "h-5 w-5" }),
239
- value: C.orders.total.toLocaleString("en-IN"),
240
- label: "Total Orders",
241
- trend: "up",
242
- trendValue: `+${C.orders.growth}%`
118
+ /* @__PURE__ */ x(r, {
119
+ icon: /* @__PURE__ */ x(h, { className: "h-5 w-5" }),
120
+ value: (D.totalOrders ?? 0).toLocaleString("en-IN"),
121
+ label: "Total Orders"
243
122
  }),
244
- /* @__PURE__ */ g(r, {
245
- icon: /* @__PURE__ */ g(m, { className: "h-5 w-5" }),
246
- value: C.users.active.toLocaleString("en-IN"),
247
- label: "Active Users",
248
- trend: "up",
249
- trendValue: `+${C.users.growth}%`
123
+ /* @__PURE__ */ x(r, {
124
+ icon: /* @__PURE__ */ x(y, { className: "h-5 w-5" }),
125
+ value: (D.activeCustomers ?? 0).toLocaleString("en-IN"),
126
+ label: "Active Customers"
250
127
  }),
251
- /* @__PURE__ */ g(r, {
252
- icon: /* @__PURE__ */ g(c, { className: "h-5 w-5" }),
253
- value: C.carts.active.toLocaleString("en-IN"),
128
+ /* @__PURE__ */ x(r, {
129
+ icon: /* @__PURE__ */ x(_, { className: "h-5 w-5" }),
130
+ value: (D.activeProviders ?? 0).toLocaleString("en-IN"),
254
131
  label: "Active Carts",
255
- trendValue: `${C.carts.pending} pending`
132
+ trendValue: `${B} pending`
256
133
  })
257
134
  ]
258
135
  })]
259
136
  }),
260
- /* @__PURE__ */ _("div", {
137
+ /* @__PURE__ */ S("div", {
261
138
  className: "rounded-lg border border-border-subtle bg-bg-surface mb-8",
262
- children: [/* @__PURE__ */ g("div", {
139
+ children: [/* @__PURE__ */ x("div", {
263
140
  className: "border-b border-border-subtle",
264
- children: /* @__PURE__ */ g("nav", {
141
+ children: /* @__PURE__ */ x("nav", {
265
142
  className: "flex -mb-px overflow-x-auto",
266
- children: N.map((e) => {
143
+ children: q.map((e) => {
267
144
  let n = e.icon;
268
- return /* @__PURE__ */ _("button", {
145
+ return /* @__PURE__ */ S("button", {
269
146
  type: "button",
270
- onClick: () => A(e.key),
271
- className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", k === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
272
- children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), /* @__PURE__ */ g("span", {
147
+ onClick: () => I(e.key),
148
+ className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", F === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
149
+ children: [/* @__PURE__ */ x(n, { className: "h-4 w-4" }), /* @__PURE__ */ x("span", {
273
150
  className: "hidden sm:inline",
274
151
  children: e.label
275
152
  })]
276
153
  }, e.key);
277
154
  })
278
155
  })
279
- }), /* @__PURE__ */ _("div", {
156
+ }), /* @__PURE__ */ S("div", {
280
157
  className: "p-4 sm:p-6",
281
158
  children: [
282
- k === "overview" && /* @__PURE__ */ _("div", {
159
+ F === "overview" && /* @__PURE__ */ S("div", {
283
160
  className: "space-y-8",
284
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
161
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
285
162
  className: "text-lg font-semibold text-text-primary mb-4",
286
163
  children: "Order Status Distribution"
287
- }), /* @__PURE__ */ _("div", {
164
+ }), z.total > 0 ? /* @__PURE__ */ S("div", {
288
165
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
289
166
  children: [
290
- /* @__PURE__ */ _("div", {
167
+ /* @__PURE__ */ S("div", {
291
168
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
292
169
  children: [
293
- /* @__PURE__ */ g("p", {
170
+ /* @__PURE__ */ x("p", {
294
171
  className: "text-sm text-status-success-text",
295
172
  children: "Completed Orders"
296
173
  }),
297
- /* @__PURE__ */ g("p", {
174
+ /* @__PURE__ */ x("p", {
298
175
  className: "text-2xl font-bold text-status-success-text",
299
- children: C.orders.completed.toLocaleString("en-IN")
176
+ children: z.completed.toLocaleString("en-IN")
300
177
  }),
301
- /* @__PURE__ */ _("p", {
178
+ /* @__PURE__ */ S("p", {
302
179
  className: "text-sm text-status-success-text/80",
303
- children: [(C.orders.completed / C.orders.total * 100).toFixed(1), "% of total"]
180
+ children: [G(z.completed, z.total).toFixed(1), "% of total"]
304
181
  })
305
182
  ]
306
183
  }),
307
- /* @__PURE__ */ _("div", {
184
+ /* @__PURE__ */ S("div", {
308
185
  className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4",
309
186
  children: [
310
- /* @__PURE__ */ g("p", {
187
+ /* @__PURE__ */ x("p", {
311
188
  className: "text-sm text-status-warning-text",
312
189
  children: "Pending Orders"
313
190
  }),
314
- /* @__PURE__ */ g("p", {
191
+ /* @__PURE__ */ x("p", {
315
192
  className: "text-2xl font-bold text-status-warning-text",
316
- children: C.orders.pending.toLocaleString("en-IN")
193
+ children: z.pending.toLocaleString("en-IN")
317
194
  }),
318
- /* @__PURE__ */ _("p", {
195
+ /* @__PURE__ */ S("p", {
319
196
  className: "text-sm text-status-warning-text/80",
320
- children: [(C.orders.pending / C.orders.total * 100).toFixed(1), "% of total"]
197
+ children: [G(z.pending, z.total).toFixed(1), "% of total"]
321
198
  })
322
199
  ]
323
200
  }),
324
- /* @__PURE__ */ _("div", {
201
+ /* @__PURE__ */ S("div", {
325
202
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-4",
326
203
  children: [
327
- /* @__PURE__ */ g("p", {
204
+ /* @__PURE__ */ x("p", {
328
205
  className: "text-sm text-status-error-text",
329
206
  children: "Cancelled Orders"
330
207
  }),
331
- /* @__PURE__ */ g("p", {
208
+ /* @__PURE__ */ x("p", {
332
209
  className: "text-2xl font-bold text-status-error-text",
333
- children: C.orders.cancelled.toLocaleString("en-IN")
210
+ children: z.cancelled.toLocaleString("en-IN")
334
211
  }),
335
- /* @__PURE__ */ _("p", {
212
+ /* @__PURE__ */ S("p", {
336
213
  className: "text-sm text-status-error-text/80",
337
- children: [(C.orders.cancelled / C.orders.total * 100).toFixed(1), "% of total"]
214
+ children: [G(z.cancelled, z.total).toFixed(1), "% of total"]
338
215
  })
339
216
  ]
340
217
  })
341
218
  ]
342
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
219
+ }) : /* @__PURE__ */ x("p", {
220
+ className: "text-sm text-text-secondary",
221
+ children: "Order breakdowns will appear here once orders are placed."
222
+ })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
343
223
  className: "text-lg font-semibold text-text-primary mb-4",
344
224
  children: "Top Performing Carts"
345
- }), /* @__PURE__ */ g("div", {
225
+ }), V.length > 0 ? /* @__PURE__ */ x("div", {
346
226
  className: "rounded-lg border border-border-subtle overflow-hidden",
347
- children: /* @__PURE__ */ _("table", {
227
+ children: /* @__PURE__ */ S("table", {
348
228
  className: "w-full",
349
- children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
229
+ children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
350
230
  className: "border-b border-border-subtle bg-bg-sunken/50",
351
231
  children: [
352
- /* @__PURE__ */ g("th", {
232
+ /* @__PURE__ */ x("th", {
353
233
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
354
234
  children: "Cart Name"
355
235
  }),
356
- /* @__PURE__ */ g("th", {
357
- className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
358
- children: "Revenue"
359
- }),
360
- /* @__PURE__ */ g("th", {
361
- className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
362
- children: "Orders"
236
+ /* @__PURE__ */ x("th", {
237
+ className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
238
+ children: "Category"
363
239
  }),
364
- /* @__PURE__ */ g("th", {
240
+ /* @__PURE__ */ x("th", {
365
241
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
366
242
  children: "Rating"
367
243
  })
368
244
  ]
369
- }) }), /* @__PURE__ */ g("tbody", {
245
+ }) }), /* @__PURE__ */ x("tbody", {
370
246
  className: "divide-y divide-border",
371
- children: C.carts.topPerforming.map((e, t) => /* @__PURE__ */ _("tr", {
247
+ children: V.map((e, t) => /* @__PURE__ */ S("tr", {
372
248
  className: "hover:bg-accent/50 transition-colors",
373
249
  children: [
374
- /* @__PURE__ */ g("td", {
250
+ /* @__PURE__ */ x("td", {
375
251
  className: "px-4 py-3",
376
- children: /* @__PURE__ */ _("div", {
252
+ children: /* @__PURE__ */ S("div", {
377
253
  className: "flex items-center gap-2",
378
- children: [M(t), /* @__PURE__ */ g("span", {
254
+ children: [K(t), /* @__PURE__ */ x("span", {
379
255
  className: "text-sm font-medium text-text-primary",
380
256
  children: e.name
381
257
  })]
382
258
  })
383
259
  }),
384
- /* @__PURE__ */ g("td", {
385
- className: "px-4 py-3 text-sm text-right font-medium text-text-primary",
386
- children: j(e.revenue)
387
- }),
388
- /* @__PURE__ */ g("td", {
389
- className: "px-4 py-3 text-sm text-right text-text-primary",
390
- children: e.orders.toLocaleString("en-IN")
260
+ /* @__PURE__ */ x("td", {
261
+ className: "px-4 py-3 text-sm text-left text-text-secondary capitalize",
262
+ children: W(e.category)
391
263
  }),
392
- /* @__PURE__ */ g("td", {
264
+ /* @__PURE__ */ x("td", {
393
265
  className: "px-4 py-3 text-sm text-right text-text-primary",
394
- children: /* @__PURE__ */ _("span", {
266
+ children: /* @__PURE__ */ S("span", {
395
267
  className: "flex items-center justify-end gap-1",
396
- children: [/* @__PURE__ */ g(f, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), e.rating]
268
+ children: [/* @__PURE__ */ x(g, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
397
269
  })
398
270
  })
399
271
  ]
400
272
  }, e.id))
401
273
  })]
402
274
  })
275
+ }) : /* @__PURE__ */ x("p", {
276
+ className: "text-sm text-text-secondary",
277
+ children: "Top-performing carts will be ranked here once orders start flowing."
403
278
  })] })]
404
279
  }),
405
- k === "revenue" && /* @__PURE__ */ _("div", {
280
+ F === "revenue" && /* @__PURE__ */ S("div", {
406
281
  className: "space-y-8",
407
- children: [/* @__PURE__ */ _("div", {
282
+ children: [/* @__PURE__ */ S("div", {
408
283
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
409
284
  children: [
410
- /* @__PURE__ */ _("div", {
285
+ /* @__PURE__ */ S("div", {
411
286
  className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-6",
412
- children: [/* @__PURE__ */ g("h4", {
287
+ children: [/* @__PURE__ */ x("h4", {
413
288
  className: "text-sm font-medium text-text-primary mb-2",
414
- children: "This Month"
415
- }), /* @__PURE__ */ g("p", {
289
+ children: "Total Revenue"
290
+ }), /* @__PURE__ */ x("p", {
416
291
  className: "text-2xl font-bold text-text-primary",
417
- children: j(C.revenue.thisMonth)
292
+ children: R(D.totalRevenue)
418
293
  })]
419
294
  }),
420
- /* @__PURE__ */ _("div", {
295
+ /* @__PURE__ */ S("div", {
421
296
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
422
- children: [/* @__PURE__ */ g("h4", {
297
+ children: [/* @__PURE__ */ x("h4", {
423
298
  className: "text-sm font-medium text-text-secondary mb-2",
424
- children: "Last Month"
425
- }), /* @__PURE__ */ g("p", {
299
+ children: "Total Orders"
300
+ }), /* @__PURE__ */ x("p", {
426
301
  className: "text-2xl font-bold text-text-primary",
427
- children: j(C.revenue.lastMonth)
302
+ children: (D.totalOrders ?? 0).toLocaleString("en-IN")
428
303
  })]
429
304
  }),
430
- /* @__PURE__ */ _("div", {
305
+ /* @__PURE__ */ S("div", {
431
306
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-6",
432
- children: [/* @__PURE__ */ g("h4", {
307
+ children: [/* @__PURE__ */ x("h4", {
433
308
  className: "text-sm font-medium text-status-success-text mb-2",
434
309
  children: "Average Order Value"
435
- }), /* @__PURE__ */ _("p", {
310
+ }), /* @__PURE__ */ x("p", {
436
311
  className: "text-2xl font-bold text-status-success-text",
437
- children: ["₹", C.orders.averageOrderValue]
312
+ children: R(z.avgOrderValue)
438
313
  })]
439
314
  })
440
315
  ]
441
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
442
- className: "text-lg font-semibold text-text-primary mb-4",
443
- children: "Revenue by City"
444
- }), /* @__PURE__ */ g("div", {
445
- className: "space-y-3",
446
- children: C.geography.topCities.map((e, t) => /* @__PURE__ */ _("div", {
447
- className: "flex items-center justify-between p-4 rounded-lg border border-border-subtle bg-bg-sunken/30",
448
- children: [/* @__PURE__ */ _("div", {
449
- className: "flex items-center gap-3",
450
- children: [M(t), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
451
- className: "font-medium text-text-primary",
452
- children: e.city
453
- }), /* @__PURE__ */ _("p", {
454
- className: "text-sm text-text-secondary",
455
- children: [e.orders.toLocaleString("en-IN"), " orders"]
456
- })] })]
457
- }), /* @__PURE__ */ _("div", {
458
- className: "text-right",
459
- children: [/* @__PURE__ */ g("p", {
460
- className: "font-bold text-text-primary",
461
- children: j(e.revenue)
462
- }), /* @__PURE__ */ _("p", {
463
- className: "text-sm text-text-secondary",
464
- children: [(e.revenue / C.revenue.total * 100).toFixed(1), "%"]
465
- })]
466
- })]
467
- }, e.city))
468
- })] })]
316
+ }), /* @__PURE__ */ x("p", {
317
+ className: "text-sm text-text-secondary",
318
+ children: "Revenue is not broken down by category by the platform backend. See the Users tab for how carts are distributed across categories."
319
+ })]
469
320
  }),
470
- k === "users" && /* @__PURE__ */ _("div", {
321
+ F === "users" && /* @__PURE__ */ S("div", {
471
322
  className: "space-y-8",
472
- children: [/* @__PURE__ */ g("div", {
473
- className: "grid grid-cols-1 md:grid-cols-4 gap-4",
474
- children: [
475
- {
476
- label: "Customers",
477
- value: C.users.customers,
478
- color: "blue"
479
- },
480
- {
481
- label: "Cart Owners",
482
- value: C.users.cartOwners,
483
- color: "green"
484
- },
485
- {
486
- label: "Workers",
487
- value: C.users.workers,
488
- color: "yellow"
489
- },
490
- {
491
- label: "Investors",
492
- value: C.users.investors,
493
- color: "purple"
494
- }
495
- ].map((e) => /* @__PURE__ */ _("div", {
496
- className: t("rounded-lg border p-4", `border-${e.color}-500/30 bg-${e.color}-500/10`),
323
+ children: [
324
+ /* @__PURE__ */ S("div", {
325
+ className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
326
+ children: [/* @__PURE__ */ S("div", {
327
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
328
+ children: [/* @__PURE__ */ S("div", {
329
+ className: "flex items-center gap-2 mb-2",
330
+ children: [/* @__PURE__ */ x(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h4", {
331
+ className: "text-sm font-medium text-text-secondary",
332
+ children: "Active Customers"
333
+ })]
334
+ }), /* @__PURE__ */ x("p", {
335
+ className: "text-3xl font-bold text-text-primary",
336
+ children: (D.activeCustomers ?? 0).toLocaleString("en-IN")
337
+ })]
338
+ }), /* @__PURE__ */ S("div", {
339
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
340
+ children: [/* @__PURE__ */ S("div", {
341
+ className: "flex items-center gap-2 mb-2",
342
+ children: [/* @__PURE__ */ x(_, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h4", {
343
+ className: "text-sm font-medium text-text-secondary",
344
+ children: "Active Cart Owners"
345
+ })]
346
+ }), /* @__PURE__ */ x("p", {
347
+ className: "text-3xl font-bold text-text-primary",
348
+ children: (D.activeProviders ?? 0).toLocaleString("en-IN")
349
+ })]
350
+ })]
351
+ }),
352
+ /* @__PURE__ */ S("div", {
353
+ className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
497
354
  children: [
498
- /* @__PURE__ */ g("h4", {
499
- className: t("text-sm font-medium", `text-${e.color}-600 dark:text-${e.color}-400`),
500
- children: e.label
355
+ /* @__PURE__ */ S("div", {
356
+ className: "flex items-center gap-2 mb-2",
357
+ children: [/* @__PURE__ */ x(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ x("h3", {
358
+ className: "text-sm font-medium text-text-secondary",
359
+ children: "Total Customers"
360
+ })]
501
361
  }),
502
- /* @__PURE__ */ g("p", {
503
- className: t("text-2xl font-bold", `text-${e.color}-700 dark:text-${e.color}-300`),
504
- children: e.value.toLocaleString("en-IN")
362
+ /* @__PURE__ */ x("p", {
363
+ className: "text-3xl font-bold text-text-primary",
364
+ children: H.toLocaleString("en-IN")
505
365
  }),
506
- /* @__PURE__ */ _("p", {
507
- className: t("text-sm", `text-${e.color}-600/80 dark:text-${e.color}-400/80`),
508
- children: [(e.value / C.users.total * 100).toFixed(1), "%"]
366
+ /* @__PURE__ */ x("p", {
367
+ className: "mt-1 text-sm text-text-secondary",
368
+ children: "Customers on the platform to date."
509
369
  })
510
370
  ]
511
- }, e.label))
512
- }), /* @__PURE__ */ _("div", {
513
- className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
514
- children: [/* @__PURE__ */ g("h3", {
371
+ }),
372
+ U.length > 0 && /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h3", {
515
373
  className: "text-lg font-semibold text-text-primary mb-4",
516
- children: "User Growth Insights"
517
- }), /* @__PURE__ */ _("div", {
374
+ children: "Cart Category Distribution"
375
+ }), /* @__PURE__ */ x("div", {
376
+ className: "space-y-3",
377
+ children: U.map((e) => /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
378
+ className: "flex items-center justify-between mb-1",
379
+ children: [/* @__PURE__ */ x("span", {
380
+ className: "text-sm font-medium text-text-primary capitalize",
381
+ children: W(e.category)
382
+ }), /* @__PURE__ */ S("span", {
383
+ className: "text-sm text-text-secondary",
384
+ children: [
385
+ (e.count ?? 0).toLocaleString("en-IN"),
386
+ " (",
387
+ (e.percentage ?? 0).toFixed(1),
388
+ "%)"
389
+ ]
390
+ })]
391
+ }), /* @__PURE__ */ x("div", {
392
+ className: "w-full bg-bg-sunken rounded-full h-2",
393
+ children: /* @__PURE__ */ x("div", {
394
+ className: "bg-action-primary-bg h-2 rounded-full transition-all duration-300",
395
+ style: { width: `${e.percentage}%` }
396
+ })
397
+ })] }, e.category))
398
+ })] })
399
+ ]
400
+ }),
401
+ F === "performance" && /* @__PURE__ */ S("div", {
402
+ className: "space-y-8",
403
+ children: [/* @__PURE__ */ S("div", {
404
+ className: "grid grid-cols-1 md:grid-cols-3 gap-6",
405
+ children: [
406
+ /* @__PURE__ */ S("div", {
407
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
408
+ children: [
409
+ /* @__PURE__ */ S("div", {
410
+ className: "flex items-center gap-2 mb-2",
411
+ children: [/* @__PURE__ */ x(g, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
412
+ className: "text-sm font-medium text-text-secondary",
413
+ children: "Customer Satisfaction"
414
+ })]
415
+ }),
416
+ /* @__PURE__ */ S("p", {
417
+ className: "text-3xl font-bold text-text-primary flex items-center gap-1",
418
+ children: [/* @__PURE__ */ x(g, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), D.avgRating > 0 ? D.avgRating.toFixed(1) : "—"]
419
+ }),
420
+ /* @__PURE__ */ x("p", {
421
+ className: "text-sm text-text-secondary mt-1",
422
+ children: "Average rating across carts"
423
+ })
424
+ ]
425
+ }),
426
+ /* @__PURE__ */ S("div", {
427
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
428
+ children: [
429
+ /* @__PURE__ */ S("div", {
430
+ className: "flex items-center gap-2 mb-2",
431
+ children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
432
+ className: "text-sm font-medium text-text-secondary",
433
+ children: "Completion Rate"
434
+ })]
435
+ }),
436
+ /* @__PURE__ */ x("p", {
437
+ className: "text-3xl font-bold text-text-primary",
438
+ children: z.total > 0 ? `${G(z.completed, z.total).toFixed(1)}%` : "—"
439
+ }),
440
+ /* @__PURE__ */ x("p", {
441
+ className: "text-sm text-text-secondary mt-1",
442
+ children: "Orders delivered"
443
+ })
444
+ ]
445
+ }),
446
+ /* @__PURE__ */ S("div", {
447
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
448
+ children: [
449
+ /* @__PURE__ */ S("div", {
450
+ className: "flex items-center gap-2 mb-2",
451
+ children: [/* @__PURE__ */ x(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("h4", {
452
+ className: "text-sm font-medium text-text-secondary",
453
+ children: "Cancellation Rate"
454
+ })]
455
+ }),
456
+ /* @__PURE__ */ x("p", {
457
+ className: "text-3xl font-bold text-text-primary",
458
+ children: z.total > 0 ? `${G(z.cancelled, z.total).toFixed(1)}%` : "—"
459
+ }),
460
+ /* @__PURE__ */ x("p", {
461
+ className: "text-sm text-text-secondary mt-1",
462
+ children: "Orders cancelled"
463
+ })
464
+ ]
465
+ })
466
+ ]
467
+ }), /* @__PURE__ */ S("div", {
468
+ className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
469
+ children: [/* @__PURE__ */ x("h3", {
470
+ className: "text-lg font-semibold text-text-primary mb-4",
471
+ children: "Today's Activity"
472
+ }), /* @__PURE__ */ S("div", {
518
473
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
519
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
474
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
520
475
  className: "text-sm text-text-secondary mb-2",
521
- children: "New Users This Month"
522
- }), /* @__PURE__ */ g("p", {
476
+ children: "Orders Today"
477
+ }), /* @__PURE__ */ x("p", {
523
478
  className: "text-3xl font-bold text-text-primary",
524
- children: C.users.newThisMonth
525
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
479
+ children: z.ordersToday.toLocaleString("en-IN")
480
+ })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
526
481
  className: "text-sm text-text-secondary mb-2",
527
- children: "Active Users Rate"
528
- }), /* @__PURE__ */ _("p", {
529
- className: "text-3xl font-bold text-status-success-text",
530
- children: [(C.users.active / C.users.total * 100).toFixed(1), "%"]
482
+ children: "Pending Orders"
483
+ }), /* @__PURE__ */ x("p", {
484
+ className: "text-3xl font-bold text-status-warning-text",
485
+ children: (D.pendingOrders ?? 0).toLocaleString("en-IN")
531
486
  })] })]
532
487
  })]
533
488
  })]
534
- }),
535
- k === "performance" && /* @__PURE__ */ _("div", {
536
- className: "space-y-8",
537
- children: [
538
- /* @__PURE__ */ _("div", {
539
- className: "grid grid-cols-1 md:grid-cols-3 gap-6",
540
- children: [
541
- /* @__PURE__ */ _("div", {
542
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
543
- children: [
544
- /* @__PURE__ */ _("div", {
545
- className: "flex items-center gap-2 mb-2",
546
- children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
547
- className: "text-sm font-medium text-text-secondary",
548
- children: "Avg Delivery Time"
549
- })]
550
- }),
551
- /* @__PURE__ */ _("p", {
552
- className: "text-3xl font-bold text-text-primary",
553
- children: [C.performance.averageDeliveryTime, " min"]
554
- }),
555
- /* @__PURE__ */ g("p", {
556
- className: "text-sm text-text-secondary mt-1",
557
- children: "Target: < 30 min"
558
- })
559
- ]
560
- }),
561
- /* @__PURE__ */ _("div", {
562
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
563
- children: [
564
- /* @__PURE__ */ _("div", {
565
- className: "flex items-center gap-2 mb-2",
566
- children: [/* @__PURE__ */ g(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
567
- className: "text-sm font-medium text-text-secondary",
568
- children: "Customer Satisfaction"
569
- })]
570
- }),
571
- /* @__PURE__ */ _("p", {
572
- className: "text-3xl font-bold text-text-primary flex items-center gap-1",
573
- children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), C.performance.customerSatisfaction]
574
- }),
575
- /* @__PURE__ */ g("p", {
576
- className: "text-sm text-text-secondary mt-1",
577
- children: "Based on ratings"
578
- })
579
- ]
580
- }),
581
- /* @__PURE__ */ _("div", {
582
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
583
- children: [
584
- /* @__PURE__ */ _("div", {
585
- className: "flex items-center gap-2 mb-2",
586
- children: [/* @__PURE__ */ g(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
587
- className: "text-sm font-medium text-text-secondary",
588
- children: "Platform Fee"
589
- })]
590
- }),
591
- /* @__PURE__ */ _("p", {
592
- className: "text-3xl font-bold text-text-primary",
593
- children: [C.performance.platformFee, "%"]
594
- }),
595
- /* @__PURE__ */ g("p", {
596
- className: "text-sm text-text-secondary mt-1",
597
- children: "Per transaction"
598
- })
599
- ]
600
- })
601
- ]
602
- }),
603
- /* @__PURE__ */ _("div", {
604
- className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
605
- children: [
606
- /* @__PURE__ */ g("h3", {
607
- className: "text-lg font-semibold text-text-primary mb-4",
608
- children: "Financial Performance"
609
- }),
610
- /* @__PURE__ */ _("div", {
611
- className: "grid grid-cols-1 md:grid-cols-3 gap-6",
612
- children: [
613
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
614
- className: "text-sm text-text-secondary mb-2",
615
- children: "Operating Costs"
616
- }), /* @__PURE__ */ g("p", {
617
- className: "text-2xl font-bold text-status-error-text",
618
- children: j(C.performance.operatingCosts)
619
- })] }),
620
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
621
- className: "text-sm text-text-secondary mb-2",
622
- children: "Total Revenue"
623
- }), /* @__PURE__ */ g("p", {
624
- className: "text-2xl font-bold text-text-primary",
625
- children: j(C.revenue.total)
626
- })] }),
627
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
628
- className: "text-sm text-text-secondary mb-2",
629
- children: "Net Profit"
630
- }), /* @__PURE__ */ g("p", {
631
- className: "text-2xl font-bold text-status-success-text",
632
- children: j(C.performance.netProfit)
633
- })] })
634
- ]
635
- }),
636
- /* @__PURE__ */ _("div", {
637
- className: "mt-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
638
- children: [/* @__PURE__ */ g("p", {
639
- className: "text-sm text-text-secondary",
640
- children: "Profit Margin"
641
- }), /* @__PURE__ */ _("p", {
642
- className: "text-xl font-bold text-text-primary",
643
- children: [(C.performance.netProfit / C.revenue.total * 100).toFixed(1), "%"]
644
- })]
645
- })
646
- ]
647
- }),
648
- /* @__PURE__ */ _("div", {
649
- className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
650
- children: [/* @__PURE__ */ g("h3", {
651
- className: "text-lg font-semibold text-text-primary mb-4",
652
- children: "Today's Performance"
653
- }), /* @__PURE__ */ _("div", {
654
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
655
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
656
- className: "text-sm text-text-secondary mb-2",
657
- children: "Orders Today"
658
- }), /* @__PURE__ */ g("p", {
659
- className: "text-3xl font-bold text-text-primary",
660
- children: C.orders.ordersToday
661
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
662
- className: "text-sm text-text-secondary mb-2",
663
- children: "Estimated Revenue"
664
- }), /* @__PURE__ */ g("p", {
665
- className: "text-3xl font-bold text-status-success-text",
666
- children: j(C.orders.ordersToday * C.orders.averageOrderValue)
667
- })] })]
668
- })]
669
- })
670
- ]
671
489
  })
672
490
  ]
673
491
  })]
@@ -676,6 +494,6 @@ function x() {
676
494
  });
677
495
  }
678
496
  //#endregion
679
- export { x as AdminAnalyticsPage };
497
+ export { E as AdminAnalyticsPage };
680
498
 
681
499
  //# sourceMappingURL=AdminAnalyticsPage.js.map