@burdenoff/microfe-subscriberbot 2026.626.2 → 2026.628.1

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 (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,651 +0,0 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
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, PagePurpose as y } from "@burdenoff/fe-libs/ui";
10
- //#region src/subscriberbot/pages/admin/AdminAnalyticsPage.tsx
11
- function b() {
12
- let { currentUser: b } = e(), [x, S] = o(null), [C, w] = o(!0), [T, E] = o("month"), [D, O] = o("overview");
13
- a(() => {
14
- w(!0);
15
- let e = setTimeout(() => {
16
- S({
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
- }), w(!1);
119
- }, 800);
120
- return () => clearTimeout(e);
121
- }, [T]);
122
- let k = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : i(e, { minimumFractionDigits: 0 }), A = (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 (C || !x) return /* @__PURE__ */ g(n, {
124
- title: "Platform Analytics",
125
- description: "Loading analytics...",
126
- children: /* @__PURE__ */ _("div", {
127
- 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", {
129
- className: "text-text-secondary",
130
- children: "Loading analytics..."
131
- })]
132
- })
133
- });
134
- let j = [
135
- {
136
- key: "overview",
137
- label: "Overview",
138
- icon: c
139
- },
140
- {
141
- key: "revenue",
142
- label: "Revenue",
143
- icon: l
144
- },
145
- {
146
- key: "users",
147
- label: "Users",
148
- icon: m
149
- },
150
- {
151
- key: "performance",
152
- label: "Performance",
153
- icon: h
154
- }
155
- ];
156
- return /* @__PURE__ */ _(n, {
157
- title: "Platform Analytics",
158
- description: "Comprehensive platform metrics and trends",
159
- children: [
160
- /* @__PURE__ */ g(y, {
161
- icon: /* @__PURE__ */ g(c, { className: "h-4 w-4" }),
162
- className: "mb-6",
163
- children: "The deep-dive view of how the whole marketplace is trending. Compare revenue, order volume, user growth and cart activity across any time period, then switch tabs to break the numbers down by revenue, users, orders or providers. Use it to spot what's working, catch problems early and decide where to invest next."
164
- }),
165
- /* @__PURE__ */ _("div", {
166
- className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",
167
- children: [/* @__PURE__ */ _("select", {
168
- value: T,
169
- onChange: (e) => E(e.target.value),
170
- className: "rounded-lg border border-border-seam 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",
171
- children: [
172
- /* @__PURE__ */ g("option", {
173
- value: "today",
174
- children: "Today"
175
- }),
176
- /* @__PURE__ */ g("option", {
177
- value: "week",
178
- children: "This Week"
179
- }),
180
- /* @__PURE__ */ g("option", {
181
- value: "month",
182
- children: "This Month"
183
- }),
184
- /* @__PURE__ */ g("option", {
185
- value: "quarter",
186
- children: "This Quarter"
187
- }),
188
- /* @__PURE__ */ g("option", {
189
- value: "year",
190
- children: "This Year"
191
- })
192
- ]
193
- }), /* @__PURE__ */ _("span", {
194
- className: "text-sm text-text-secondary",
195
- children: ["Last updated: ", (/* @__PURE__ */ new Date()).toLocaleString("en-IN")]
196
- })]
197
- }),
198
- /* @__PURE__ */ _(v, {
199
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",
200
- children: [
201
- /* @__PURE__ */ g(r, {
202
- icon: /* @__PURE__ */ g(l, { className: "h-5 w-5" }),
203
- value: k(x.revenue.total),
204
- label: "Total Revenue",
205
- trend: "up",
206
- trendValue: `+${x.revenue.growth}%`
207
- }),
208
- /* @__PURE__ */ g(r, {
209
- icon: /* @__PURE__ */ g(d, { className: "h-5 w-5" }),
210
- value: x.orders.total.toLocaleString("en-IN"),
211
- label: "Total Orders",
212
- trend: "up",
213
- trendValue: `+${x.orders.growth}%`
214
- }),
215
- /* @__PURE__ */ g(r, {
216
- icon: /* @__PURE__ */ g(m, { className: "h-5 w-5" }),
217
- value: x.users.active.toLocaleString("en-IN"),
218
- label: "Active Users",
219
- trend: "up",
220
- trendValue: `+${x.users.growth}%`
221
- }),
222
- /* @__PURE__ */ g(r, {
223
- icon: /* @__PURE__ */ g(c, { className: "h-5 w-5" }),
224
- value: x.carts.active.toLocaleString("en-IN"),
225
- label: "Active Carts",
226
- trendValue: `${x.carts.pending} pending`
227
- })
228
- ]
229
- }),
230
- /* @__PURE__ */ _("div", {
231
- className: "rounded-lg border border-border-seam bg-bg-surface mb-8",
232
- children: [/* @__PURE__ */ g("div", {
233
- className: "border-b border-border-seam",
234
- children: /* @__PURE__ */ g("nav", {
235
- className: "flex -mb-px overflow-x-auto",
236
- children: j.map((e) => {
237
- let n = e.icon;
238
- return /* @__PURE__ */ _("button", {
239
- type: "button",
240
- onClick: () => O(e.key),
241
- 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", D === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
242
- children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), /* @__PURE__ */ g("span", {
243
- className: "hidden sm:inline",
244
- children: e.label
245
- })]
246
- }, e.key);
247
- })
248
- })
249
- }), /* @__PURE__ */ _("div", {
250
- className: "p-4 sm:p-6",
251
- children: [
252
- D === "overview" && /* @__PURE__ */ _("div", {
253
- className: "space-y-8",
254
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
255
- className: "text-lg font-semibold text-text-primary mb-4",
256
- children: "Order Status Distribution"
257
- }), /* @__PURE__ */ _("div", {
258
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
259
- children: [
260
- /* @__PURE__ */ _("div", {
261
- className: "rounded-lg border border-status-success-border/30 bg-status-success-bg/10 p-4",
262
- children: [
263
- /* @__PURE__ */ g("p", {
264
- className: "text-sm text-status-success-text",
265
- children: "Completed Orders"
266
- }),
267
- /* @__PURE__ */ g("p", {
268
- className: "text-2xl font-bold text-status-success-text",
269
- children: x.orders.completed.toLocaleString("en-IN")
270
- }),
271
- /* @__PURE__ */ _("p", {
272
- className: "text-sm text-status-success-text/80",
273
- children: [(x.orders.completed / x.orders.total * 100).toFixed(1), "% of total"]
274
- })
275
- ]
276
- }),
277
- /* @__PURE__ */ _("div", {
278
- className: "rounded-lg border border-status-warning-border/30 bg-status-warning-bg/10 p-4",
279
- children: [
280
- /* @__PURE__ */ g("p", {
281
- className: "text-sm text-status-warning-text",
282
- children: "Pending Orders"
283
- }),
284
- /* @__PURE__ */ g("p", {
285
- className: "text-2xl font-bold text-status-warning-text",
286
- children: x.orders.pending.toLocaleString("en-IN")
287
- }),
288
- /* @__PURE__ */ _("p", {
289
- className: "text-sm text-status-warning-text/80",
290
- children: [(x.orders.pending / x.orders.total * 100).toFixed(1), "% of total"]
291
- })
292
- ]
293
- }),
294
- /* @__PURE__ */ _("div", {
295
- className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 p-4",
296
- children: [
297
- /* @__PURE__ */ g("p", {
298
- className: "text-sm text-status-error-text",
299
- children: "Cancelled Orders"
300
- }),
301
- /* @__PURE__ */ g("p", {
302
- className: "text-2xl font-bold text-status-error-text",
303
- children: x.orders.cancelled.toLocaleString("en-IN")
304
- }),
305
- /* @__PURE__ */ _("p", {
306
- className: "text-sm text-status-error-text/80",
307
- children: [(x.orders.cancelled / x.orders.total * 100).toFixed(1), "% of total"]
308
- })
309
- ]
310
- })
311
- ]
312
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
313
- className: "text-lg font-semibold text-text-primary mb-4",
314
- children: "Top Performing Carts"
315
- }), /* @__PURE__ */ g("div", {
316
- className: "rounded-lg border border-border-seam overflow-hidden",
317
- children: /* @__PURE__ */ _("table", {
318
- className: "w-full",
319
- children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
320
- className: "border-b border-border-seam bg-bg-sunken/50",
321
- children: [
322
- /* @__PURE__ */ g("th", {
323
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
324
- children: "Cart Name"
325
- }),
326
- /* @__PURE__ */ g("th", {
327
- className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
328
- children: "Revenue"
329
- }),
330
- /* @__PURE__ */ g("th", {
331
- className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
332
- children: "Orders"
333
- }),
334
- /* @__PURE__ */ g("th", {
335
- className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
336
- children: "Rating"
337
- })
338
- ]
339
- }) }), /* @__PURE__ */ g("tbody", {
340
- className: "divide-y divide-border",
341
- children: x.carts.topPerforming.map((e, t) => /* @__PURE__ */ _("tr", {
342
- className: "hover:bg-accent/50 transition-colors",
343
- children: [
344
- /* @__PURE__ */ g("td", {
345
- className: "px-4 py-3",
346
- children: /* @__PURE__ */ _("div", {
347
- className: "flex items-center gap-2",
348
- children: [A(t), /* @__PURE__ */ g("span", {
349
- className: "text-sm font-medium text-text-primary",
350
- children: e.name
351
- })]
352
- })
353
- }),
354
- /* @__PURE__ */ g("td", {
355
- className: "px-4 py-3 text-sm text-right font-medium text-text-primary",
356
- children: k(e.revenue)
357
- }),
358
- /* @__PURE__ */ g("td", {
359
- className: "px-4 py-3 text-sm text-right text-text-primary",
360
- children: e.orders.toLocaleString("en-IN")
361
- }),
362
- /* @__PURE__ */ g("td", {
363
- className: "px-4 py-3 text-sm text-right text-text-primary",
364
- children: /* @__PURE__ */ _("span", {
365
- className: "flex items-center justify-end gap-1",
366
- children: [/* @__PURE__ */ g(f, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), e.rating]
367
- })
368
- })
369
- ]
370
- }, e.id))
371
- })]
372
- })
373
- })] })]
374
- }),
375
- D === "revenue" && /* @__PURE__ */ _("div", {
376
- className: "space-y-8",
377
- children: [/* @__PURE__ */ _("div", {
378
- className: "grid grid-cols-1 md:grid-cols-3 gap-4",
379
- children: [
380
- /* @__PURE__ */ _("div", {
381
- className: "rounded-lg border border-status-info-border/30 bg-status-info-bg/10 p-6",
382
- children: [/* @__PURE__ */ g("h4", {
383
- className: "text-sm font-medium text-status-info-text mb-2",
384
- children: "This Month"
385
- }), /* @__PURE__ */ g("p", {
386
- className: "text-2xl font-bold text-status-info-text",
387
- children: k(x.revenue.thisMonth)
388
- })]
389
- }),
390
- /* @__PURE__ */ _("div", {
391
- className: "rounded-lg border border-border-seam bg-bg-sunken/30 p-6",
392
- children: [/* @__PURE__ */ g("h4", {
393
- className: "text-sm font-medium text-text-secondary mb-2",
394
- children: "Last Month"
395
- }), /* @__PURE__ */ g("p", {
396
- className: "text-2xl font-bold text-text-primary",
397
- children: k(x.revenue.lastMonth)
398
- })]
399
- }),
400
- /* @__PURE__ */ _("div", {
401
- className: "rounded-lg border border-status-success-border/30 bg-status-success-bg/10 p-6",
402
- children: [/* @__PURE__ */ g("h4", {
403
- className: "text-sm font-medium text-status-success-text mb-2",
404
- children: "Average Order Value"
405
- }), /* @__PURE__ */ _("p", {
406
- className: "text-2xl font-bold text-status-success-text",
407
- children: ["₹", x.orders.averageOrderValue]
408
- })]
409
- })
410
- ]
411
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h3", {
412
- className: "text-lg font-semibold text-text-primary mb-4",
413
- children: "Revenue by City"
414
- }), /* @__PURE__ */ g("div", {
415
- className: "space-y-3",
416
- children: x.geography.topCities.map((e, t) => /* @__PURE__ */ _("div", {
417
- className: "flex items-center justify-between p-4 rounded-lg border border-border-seam bg-bg-sunken/30",
418
- children: [/* @__PURE__ */ _("div", {
419
- className: "flex items-center gap-3",
420
- children: [A(t), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
421
- className: "font-medium text-text-primary",
422
- children: e.city
423
- }), /* @__PURE__ */ _("p", {
424
- className: "text-sm text-text-secondary",
425
- children: [e.orders.toLocaleString("en-IN"), " orders"]
426
- })] })]
427
- }), /* @__PURE__ */ _("div", {
428
- className: "text-right",
429
- children: [/* @__PURE__ */ g("p", {
430
- className: "font-bold text-text-primary",
431
- children: k(e.revenue)
432
- }), /* @__PURE__ */ _("p", {
433
- className: "text-sm text-text-secondary",
434
- children: [(e.revenue / x.revenue.total * 100).toFixed(1), "%"]
435
- })]
436
- })]
437
- }, e.city))
438
- })] })]
439
- }),
440
- D === "users" && /* @__PURE__ */ _("div", {
441
- className: "space-y-8",
442
- children: [/* @__PURE__ */ g("div", {
443
- className: "grid grid-cols-1 md:grid-cols-4 gap-4",
444
- children: [
445
- {
446
- label: "Customers",
447
- value: x.users.customers,
448
- color: "blue"
449
- },
450
- {
451
- label: "Cart Owners",
452
- value: x.users.cartOwners,
453
- color: "green"
454
- },
455
- {
456
- label: "Workers",
457
- value: x.users.workers,
458
- color: "yellow"
459
- },
460
- {
461
- label: "Investors",
462
- value: x.users.investors,
463
- color: "purple"
464
- }
465
- ].map((e) => /* @__PURE__ */ _("div", {
466
- className: t("rounded-lg border p-4", `border-${e.color}-500/30 bg-${e.color}-500/10`),
467
- children: [
468
- /* @__PURE__ */ g("h4", {
469
- className: t("text-sm font-medium", `text-${e.color}-600 dark:text-${e.color}-400`),
470
- children: e.label
471
- }),
472
- /* @__PURE__ */ g("p", {
473
- className: t("text-2xl font-bold", `text-${e.color}-700 dark:text-${e.color}-300`),
474
- children: e.value.toLocaleString("en-IN")
475
- }),
476
- /* @__PURE__ */ _("p", {
477
- className: t("text-sm", `text-${e.color}-600/80 dark:text-${e.color}-400/80`),
478
- children: [(e.value / x.users.total * 100).toFixed(1), "%"]
479
- })
480
- ]
481
- }, e.label))
482
- }), /* @__PURE__ */ _("div", {
483
- className: "rounded-lg border border-border-seam bg-bg-sunken/20 p-6",
484
- children: [/* @__PURE__ */ g("h3", {
485
- className: "text-lg font-semibold text-text-primary mb-4",
486
- children: "User Growth Insights"
487
- }), /* @__PURE__ */ _("div", {
488
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
489
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
490
- className: "text-sm text-text-secondary mb-2",
491
- children: "New Users This Month"
492
- }), /* @__PURE__ */ g("p", {
493
- className: "text-3xl font-bold text-status-info-text",
494
- children: x.users.newThisMonth
495
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
496
- className: "text-sm text-text-secondary mb-2",
497
- children: "Active Users Rate"
498
- }), /* @__PURE__ */ _("p", {
499
- className: "text-3xl font-bold text-status-success-text",
500
- children: [(x.users.active / x.users.total * 100).toFixed(1), "%"]
501
- })] })]
502
- })]
503
- })]
504
- }),
505
- D === "performance" && /* @__PURE__ */ _("div", {
506
- className: "space-y-8",
507
- children: [
508
- /* @__PURE__ */ _("div", {
509
- className: "grid grid-cols-1 md:grid-cols-3 gap-6",
510
- children: [
511
- /* @__PURE__ */ _("div", {
512
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
513
- children: [
514
- /* @__PURE__ */ _("div", {
515
- className: "flex items-center gap-2 mb-2",
516
- children: [/* @__PURE__ */ g(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
517
- className: "text-sm font-medium text-text-secondary",
518
- children: "Avg Delivery Time"
519
- })]
520
- }),
521
- /* @__PURE__ */ _("p", {
522
- className: "text-3xl font-bold text-text-primary",
523
- children: [x.performance.averageDeliveryTime, " min"]
524
- }),
525
- /* @__PURE__ */ g("p", {
526
- className: "text-sm text-text-secondary mt-1",
527
- children: "Target: < 30 min"
528
- })
529
- ]
530
- }),
531
- /* @__PURE__ */ _("div", {
532
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
533
- children: [
534
- /* @__PURE__ */ _("div", {
535
- className: "flex items-center gap-2 mb-2",
536
- children: [/* @__PURE__ */ g(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
537
- className: "text-sm font-medium text-text-secondary",
538
- children: "Customer Satisfaction"
539
- })]
540
- }),
541
- /* @__PURE__ */ _("p", {
542
- className: "text-3xl font-bold text-text-primary flex items-center gap-1",
543
- children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), x.performance.customerSatisfaction]
544
- }),
545
- /* @__PURE__ */ g("p", {
546
- className: "text-sm text-text-secondary mt-1",
547
- children: "Based on ratings"
548
- })
549
- ]
550
- }),
551
- /* @__PURE__ */ _("div", {
552
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
553
- children: [
554
- /* @__PURE__ */ _("div", {
555
- className: "flex items-center gap-2 mb-2",
556
- children: [/* @__PURE__ */ g(l, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("h4", {
557
- className: "text-sm font-medium text-text-secondary",
558
- children: "Platform Fee"
559
- })]
560
- }),
561
- /* @__PURE__ */ _("p", {
562
- className: "text-3xl font-bold text-text-primary",
563
- children: [x.performance.platformFee, "%"]
564
- }),
565
- /* @__PURE__ */ g("p", {
566
- className: "text-sm text-text-secondary mt-1",
567
- children: "Per transaction"
568
- })
569
- ]
570
- })
571
- ]
572
- }),
573
- /* @__PURE__ */ _("div", {
574
- className: "rounded-lg border border-border-seam bg-bg-sunken/20 p-6",
575
- children: [
576
- /* @__PURE__ */ g("h3", {
577
- className: "text-lg font-semibold text-text-primary mb-4",
578
- children: "Financial Performance"
579
- }),
580
- /* @__PURE__ */ _("div", {
581
- className: "grid grid-cols-1 md:grid-cols-3 gap-6",
582
- children: [
583
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
584
- className: "text-sm text-text-secondary mb-2",
585
- children: "Operating Costs"
586
- }), /* @__PURE__ */ g("p", {
587
- className: "text-2xl font-bold text-status-error-text",
588
- children: k(x.performance.operatingCosts)
589
- })] }),
590
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
591
- className: "text-sm text-text-secondary mb-2",
592
- children: "Total Revenue"
593
- }), /* @__PURE__ */ g("p", {
594
- className: "text-2xl font-bold text-status-info-text",
595
- children: k(x.revenue.total)
596
- })] }),
597
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
598
- className: "text-sm text-text-secondary mb-2",
599
- children: "Net Profit"
600
- }), /* @__PURE__ */ g("p", {
601
- className: "text-2xl font-bold text-status-success-text",
602
- children: k(x.performance.netProfit)
603
- })] })
604
- ]
605
- }),
606
- /* @__PURE__ */ _("div", {
607
- className: "mt-4 rounded-lg border border-border-seam bg-bg-surface p-4",
608
- children: [/* @__PURE__ */ g("p", {
609
- className: "text-sm text-text-secondary",
610
- children: "Profit Margin"
611
- }), /* @__PURE__ */ _("p", {
612
- className: "text-xl font-bold text-text-primary",
613
- children: [(x.performance.netProfit / x.revenue.total * 100).toFixed(1), "%"]
614
- })]
615
- })
616
- ]
617
- }),
618
- /* @__PURE__ */ _("div", {
619
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
620
- children: [/* @__PURE__ */ g("h3", {
621
- className: "text-lg font-semibold text-text-primary mb-4",
622
- children: "Today's Performance"
623
- }), /* @__PURE__ */ _("div", {
624
- className: "grid grid-cols-1 md:grid-cols-2 gap-6",
625
- children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
626
- className: "text-sm text-text-secondary mb-2",
627
- children: "Orders Today"
628
- }), /* @__PURE__ */ g("p", {
629
- className: "text-3xl font-bold text-status-info-text",
630
- children: x.orders.ordersToday
631
- })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
632
- className: "text-sm text-text-secondary mb-2",
633
- children: "Estimated Revenue"
634
- }), /* @__PURE__ */ g("p", {
635
- className: "text-3xl font-bold text-status-success-text",
636
- children: k(x.orders.ordersToday * x.orders.averageOrderValue)
637
- })] })]
638
- })]
639
- })
640
- ]
641
- })
642
- ]
643
- })]
644
- })
645
- ]
646
- });
647
- }
648
- //#endregion
649
- export { b as AdminAnalyticsPage };
650
-
651
- //# sourceMappingURL=AdminAnalyticsPage.js.map