@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +260 -105
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/HomePage.js +4 -4
  4. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  14. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  16. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
  18. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
  20. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  22. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  24. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +329 -432
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -384
  28. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  30. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +276 -279
  32. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +229 -447
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  40. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
  42. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
  44. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
  46. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  48. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  50. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  52. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  54. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
  56. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
  58. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  63. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
  65. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  67. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  69. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  70. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +258 -523
  71. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  73. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  74. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +128 -295
  75. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  76. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +205 -291
  77. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  78. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  79. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  80. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +426 -514
  81. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  82. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +231 -225
  83. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  84. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +197 -301
  85. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  86. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +247 -399
  87. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  88. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +294 -327
  89. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  90. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +179 -397
  91. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/kadaikodi/mocks/data.js +0 -1517
  94. package/dist/kadaikodi/mocks/data.js.map +0 -1
  95. package/dist/kadaikodi/mocks/users.js +0 -34
  96. package/dist/kadaikodi/mocks/users.js.map +0 -1
@@ -2,436 +2,293 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { MetricsCard as n } from "../../components/MetricsCard.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useEffect as a, useState as o } from "react";
7
- import { ArrowLeft as s, Award as c, BarChart3 as l, Calendar as u, Download as d, IndianRupee as f, Loader2 as p, PieChart as m, ShoppingBag as h, ShoppingCart as g, TrendingDown as _, TrendingUp as v } from "lucide-react";
8
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
5
+ import { useAdminAnalytics as i, useDashboardStats as a } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as o } from "../../utils/formatters.js";
7
+ import { useMemo as s } from "react";
8
+ import { ArrowLeft as c, Award as l, BarChart3 as u, Calendar as d, Clock as f, Download as p, IndianRupee as m, Loader2 as h, ShoppingBag as g, ShoppingCart as _, Store as v, TrendingUp as y } from "lucide-react";
9
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
10
+ import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
10
11
  //#region src/kadaikodi/pages/admin/AdminFinancialPage.tsx
11
- function C() {
12
- let { navigateTo: C } = e(), [w, T] = o(!0), [E, D] = o("30d"), [O, k] = o(null);
13
- a(() => {
14
- T(!0);
15
- let e = setTimeout(() => {
16
- k({
17
- totalRevenue: 285e4,
18
- monthlyRevenue: 425e3,
19
- revenueGrowth: 12.5,
20
- totalOrders: 15420,
21
- averageOrderValue: 185,
22
- commission: 142500,
23
- payouts: 28e4,
24
- pendingPayouts: 45e3,
25
- topPerformingCarts: [
26
- {
27
- id: "1",
28
- name: "South Indian Express",
29
- revenue: 125e3,
30
- orders: 850
31
- },
32
- {
33
- id: "2",
34
- name: "Pizza Corner",
35
- revenue: 98e3,
36
- orders: 620
37
- },
38
- {
39
- id: "3",
40
- name: "Biryani House",
41
- revenue: 87e3,
42
- orders: 580
43
- },
44
- {
45
- id: "4",
46
- name: "Healthy Bites",
47
- revenue: 76e3,
48
- orders: 490
49
- },
50
- {
51
- id: "5",
52
- name: "Street Food Junction",
53
- revenue: 65e3,
54
- orders: 420
55
- }
56
- ],
57
- revenueByCategory: [
58
- {
59
- category: "South Indian",
60
- amount: 75e4,
61
- percentage: 26.3
62
- },
63
- {
64
- category: "North Indian",
65
- amount: 62e4,
66
- percentage: 21.8
67
- },
68
- {
69
- category: "Chinese",
70
- amount: 485e3,
71
- percentage: 17
72
- },
73
- {
74
- category: "Fast Food",
75
- amount: 425e3,
76
- percentage: 14.9
77
- },
78
- {
79
- category: "Beverages",
80
- amount: 32e4,
81
- percentage: 11.2
82
- },
83
- {
84
- category: "Desserts",
85
- amount: 25e4,
86
- percentage: 8.8
87
- }
88
- ],
89
- monthlyTrends: [
90
- {
91
- month: "Jan",
92
- revenue: 38e4,
93
- orders: 1200,
94
- commission: 19e3
95
- },
96
- {
97
- month: "Feb",
98
- revenue: 42e4,
99
- orders: 1350,
100
- commission: 21e3
101
- },
102
- {
103
- month: "Mar",
104
- revenue: 395e3,
105
- orders: 1280,
106
- commission: 19750
107
- },
108
- {
109
- month: "Apr",
110
- revenue: 44e4,
111
- orders: 1420,
112
- commission: 22e3
113
- },
114
- {
115
- month: "May",
116
- revenue: 465e3,
117
- orders: 1580,
118
- commission: 23250
119
- },
120
- {
121
- month: "Jun",
122
- revenue: 425e3,
123
- orders: 1400,
124
- commission: 21250
125
- }
126
- ]
127
- }), T(!1);
128
- }, 1e3);
129
- return () => clearTimeout(e);
130
- }, [E]);
131
- let A = (e) => i(e, { minimumFractionDigits: 0 }), j = () => {
132
- alert("Financial report export initiated");
133
- }, M = (e) => e === 0 ? /* @__PURE__ */ y(c, { className: "h-5 w-5 text-status-warning-text" }) : e === 1 ? /* @__PURE__ */ y(c, { className: "h-5 w-5 text-text-secondary" }) : e === 2 ? /* @__PURE__ */ y(c, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ y("span", {
12
+ function w() {
13
+ let { navigateTo: w } = e(), { data: T, isLoading: E } = a(), { data: D, isLoading: O } = i(), k = E || O, A = (e) => o(e, { minimumFractionDigits: 0 }), j = s(() => T && T.totalOrders > 0 ? T.totalRevenue / T.totalOrders : 0, [T]), M = s(() => {
14
+ let e = D?.revenueByCategory ?? [], t = e.reduce((e, t) => e + t.revenue, 0);
15
+ return e.map((e) => ({
16
+ ...e,
17
+ percentage: t > 0 ? e.revenue / t * 100 : 0
18
+ }));
19
+ }, [D]), N = D?.topProviders ?? [], P = D?.orderTrends ?? [], F = () => {
20
+ let e = [];
21
+ e.push("Kadaikodi Financial Report"), e.push(""), e.push("Metric,Value"), e.push(`Total Revenue,${T?.totalRevenue ?? 0}`), e.push(`Total Orders,${T?.totalOrders ?? 0}`), e.push(`Average Order Value,${Math.round(j)}`), e.push(`Pending Orders,${T?.pendingOrders ?? 0}`), e.push(""), e.push("Revenue by Category"), e.push("Category,Revenue,Orders,Share %"), M.forEach((t) => {
22
+ e.push(`${t.category},${t.revenue},${t.orders},${t.percentage.toFixed(1)}`);
23
+ }), e.push(""), e.push("Top Performing Carts"), e.push("Cart,Revenue,Orders,Rating"), N.forEach((t) => {
24
+ e.push(`${t.name},${t.revenue},${t.orders},${t.rating}`);
25
+ });
26
+ let t = new Blob([e.join("\n")], { type: "text/csv;charset=utf-8;" }), n = URL.createObjectURL(t), r = document.createElement("a");
27
+ r.href = n, r.download = `kadaikodi-financial-report-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, r.click(), URL.revokeObjectURL(n);
28
+ }, I = (e) => e < 3 ? /* @__PURE__ */ b(l, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ b("span", {
134
29
  className: "flex h-5 w-5 items-center justify-center rounded-full bg-bg-sunken text-xs font-bold text-text-secondary",
135
30
  children: e + 1
136
31
  });
137
- return w ? /* @__PURE__ */ y(t, {
32
+ return k ? /* @__PURE__ */ b(t, {
138
33
  title: "Financial Reports",
139
34
  description: "Loading financial data...",
140
- children: /* @__PURE__ */ b("div", {
35
+ children: /* @__PURE__ */ x("div", {
141
36
  className: "flex flex-col items-center justify-center py-20",
142
- children: [/* @__PURE__ */ y(p, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ y("p", {
37
+ children: [/* @__PURE__ */ b(h, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ b("p", {
143
38
  className: "text-text-secondary",
144
39
  children: "Loading financial data..."
145
40
  })]
146
41
  })
147
- }) : O ? /* @__PURE__ */ b(t, {
42
+ }) : T ? /* @__PURE__ */ x(t, {
148
43
  title: "Financial Reports",
149
- description: "Revenue, commissions, payouts, and financial trends",
150
- actions: /* @__PURE__ */ b("div", {
44
+ description: "Revenue, top carts and financial trends",
45
+ actions: /* @__PURE__ */ x("div", {
151
46
  className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-3",
152
- children: [
153
- /* @__PURE__ */ b("button", {
154
- type: "button",
155
- onClick: () => C("/admin"),
156
- className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
157
- children: [/* @__PURE__ */ y(s, { className: "h-4 w-4" }), " Back"]
158
- }),
159
- /* @__PURE__ */ b("select", {
160
- value: E,
161
- onChange: (e) => D(e.target.value),
162
- 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)]",
163
- children: [
164
- /* @__PURE__ */ y("option", {
165
- value: "7d",
166
- children: "Last 7 days"
167
- }),
168
- /* @__PURE__ */ y("option", {
169
- value: "30d",
170
- children: "Last 30 days"
171
- }),
172
- /* @__PURE__ */ y("option", {
173
- value: "90d",
174
- children: "Last 3 months"
175
- }),
176
- /* @__PURE__ */ y("option", {
177
- value: "1y",
178
- children: "Last year"
179
- })
180
- ]
181
- }),
182
- /* @__PURE__ */ b("button", {
183
- type: "button",
184
- onClick: j,
185
- className: "flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
186
- children: [/* @__PURE__ */ y(d, { className: "h-4 w-4" }), " Export Report"]
187
- })
188
- ]
47
+ children: [/* @__PURE__ */ x("button", {
48
+ type: "button",
49
+ onClick: () => w("/admin"),
50
+ className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
51
+ children: [/* @__PURE__ */ b(c, { className: "h-4 w-4" }), " Back"]
52
+ }), /* @__PURE__ */ x("button", {
53
+ type: "button",
54
+ onClick: F,
55
+ className: "flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
56
+ children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), " Export Report"]
57
+ })]
189
58
  }),
190
59
  children: [
191
- /* @__PURE__ */ y(S, {
60
+ /* @__PURE__ */ b(C, {
192
61
  className: "mb-6",
193
- children: "The money view of Kadaikodi. Use this page to track total and monthly revenue, see the platform commission you've earned, and stay on top of payouts owed to cart owners and workers — then export a report for accounting or investor updates. Adjust the date range to compare periods and watch the trend."
62
+ children: "The money view of Kadaikodi. Track total revenue and order volume, see which carts and categories drive the most business, and watch how orders trend over time — then export a CSV for accounting or investor updates."
194
63
  }),
195
- /* @__PURE__ */ b(x, {
64
+ /* @__PURE__ */ x(S, {
196
65
  className: "mb-8",
197
- children: [/* @__PURE__ */ y("h2", {
66
+ children: [/* @__PURE__ */ b("h2", {
198
67
  className: "mb-4 text-lg font-semibold text-text-primary",
199
68
  children: "Financial Summary"
200
- }), /* @__PURE__ */ b("div", {
69
+ }), /* @__PURE__ */ x("div", {
201
70
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
202
71
  children: [
203
- /* @__PURE__ */ y(n, {
204
- icon: /* @__PURE__ */ y(f, { className: "h-5 w-5" }),
205
- value: A(O.totalRevenue),
206
- label: "Total Revenue",
207
- trend: "up",
208
- trendValue: `+${O.revenueGrowth}% vs last period`
72
+ /* @__PURE__ */ b(n, {
73
+ featured: !0,
74
+ icon: /* @__PURE__ */ b(m, { className: "h-5 w-5" }),
75
+ value: A(T.totalRevenue),
76
+ label: "Total Revenue"
209
77
  }),
210
- /* @__PURE__ */ y(n, {
211
- icon: /* @__PURE__ */ y(v, { className: "h-5 w-5" }),
212
- value: A(O.monthlyRevenue),
213
- label: "Monthly Revenue",
214
- trendValue: "Current month"
78
+ /* @__PURE__ */ b(n, {
79
+ icon: /* @__PURE__ */ b(g, { className: "h-5 w-5" }),
80
+ value: T.totalOrders.toLocaleString("en-IN"),
81
+ label: "Total Orders"
215
82
  }),
216
- /* @__PURE__ */ y(n, {
217
- icon: /* @__PURE__ */ y(m, { className: "h-5 w-5" }),
218
- value: A(O.commission),
219
- label: "Commission Earned",
220
- trendValue: "Platform commission"
83
+ /* @__PURE__ */ b(n, {
84
+ icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
85
+ value: A(j),
86
+ label: "Avg Order Value"
221
87
  }),
222
- /* @__PURE__ */ y(n, {
223
- icon: /* @__PURE__ */ y(_, { className: "h-5 w-5" }),
224
- value: A(O.pendingPayouts),
225
- label: "Pending Payouts",
226
- trendValue: "Amount pending"
88
+ /* @__PURE__ */ b(n, {
89
+ icon: /* @__PURE__ */ b(f, { className: "h-5 w-5" }),
90
+ value: T.pendingOrders.toLocaleString("en-IN"),
91
+ label: "Pending Orders"
227
92
  })
228
93
  ]
229
94
  })]
230
95
  }),
231
- /* @__PURE__ */ b("div", {
96
+ /* @__PURE__ */ x("div", {
232
97
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",
233
- children: [/* @__PURE__ */ b("div", {
98
+ children: [/* @__PURE__ */ x("div", {
234
99
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
235
- children: [/* @__PURE__ */ b("div", {
100
+ children: [/* @__PURE__ */ x("div", {
236
101
  className: "flex items-center gap-2 mb-4",
237
- children: [/* @__PURE__ */ y(g, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ y("h3", {
102
+ children: [/* @__PURE__ */ b(_, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h3", {
238
103
  className: "text-lg font-semibold text-text-primary",
239
104
  children: "Top Performing Carts"
240
105
  })]
241
- }), /* @__PURE__ */ y("div", {
106
+ }), N.length > 0 ? /* @__PURE__ */ b("div", {
242
107
  className: "space-y-3",
243
- children: O.topPerformingCarts.map((e, t) => /* @__PURE__ */ b("div", {
108
+ children: N.map((e, t) => /* @__PURE__ */ x("div", {
244
109
  className: "flex items-center justify-between rounded-lg bg-bg-sunken/50 p-3",
245
- children: [/* @__PURE__ */ b("div", {
110
+ children: [/* @__PURE__ */ x("div", {
246
111
  className: "flex items-center gap-3",
247
- children: [M(t), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
112
+ children: [I(t), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
248
113
  className: "text-sm font-medium text-text-primary",
249
114
  children: e.name
250
- }), /* @__PURE__ */ b("p", {
115
+ }), /* @__PURE__ */ x("p", {
251
116
  className: "text-xs text-text-secondary",
252
- children: [e.orders, " orders"]
117
+ children: [e.orders.toLocaleString("en-IN"), " orders"]
253
118
  })] })]
254
- }), /* @__PURE__ */ y("p", {
119
+ }), /* @__PURE__ */ b("p", {
255
120
  className: "text-sm font-semibold text-text-primary",
256
121
  children: A(e.revenue)
257
122
  })]
258
123
  }, e.id))
124
+ }) : /* @__PURE__ */ b("p", {
125
+ className: "text-sm text-text-secondary",
126
+ children: "Top-performing carts will be ranked here once orders start flowing."
259
127
  })]
260
- }), /* @__PURE__ */ b("div", {
128
+ }), /* @__PURE__ */ x("div", {
261
129
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
262
- children: [/* @__PURE__ */ b("div", {
130
+ children: [/* @__PURE__ */ x("div", {
263
131
  className: "flex items-center gap-2 mb-4",
264
- children: [/* @__PURE__ */ y(l, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ y("h3", {
132
+ children: [/* @__PURE__ */ b(u, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h3", {
265
133
  className: "text-lg font-semibold text-text-primary",
266
134
  children: "Revenue by Category"
267
135
  })]
268
- }), /* @__PURE__ */ y("div", {
136
+ }), M.length > 0 ? /* @__PURE__ */ b("div", {
269
137
  className: "space-y-3",
270
- children: O.revenueByCategory.map((e) => /* @__PURE__ */ b("div", { children: [
271
- /* @__PURE__ */ b("div", {
138
+ children: M.map((e) => /* @__PURE__ */ x("div", { children: [
139
+ /* @__PURE__ */ x("div", {
272
140
  className: "flex items-center justify-between mb-1",
273
- children: [/* @__PURE__ */ y("span", {
274
- className: "text-sm font-medium text-text-primary",
141
+ children: [/* @__PURE__ */ b("span", {
142
+ className: "text-sm font-medium text-text-primary capitalize",
275
143
  children: e.category
276
- }), /* @__PURE__ */ b("span", {
144
+ }), /* @__PURE__ */ x("span", {
277
145
  className: "text-sm text-text-secondary",
278
- children: [e.percentage, "%"]
146
+ children: [e.percentage.toFixed(1), "%"]
279
147
  })]
280
148
  }),
281
- /* @__PURE__ */ y("div", {
149
+ /* @__PURE__ */ b("div", {
282
150
  className: "w-full bg-bg-sunken rounded-full h-2",
283
- children: /* @__PURE__ */ y("div", {
151
+ children: /* @__PURE__ */ b("div", {
284
152
  className: "bg-action-primary-bg h-2 rounded-full transition-all duration-300",
285
153
  style: { width: `${e.percentage}%` }
286
154
  })
287
155
  }),
288
- /* @__PURE__ */ y("div", {
156
+ /* @__PURE__ */ b("div", {
289
157
  className: "text-right mt-1",
290
- children: /* @__PURE__ */ y("span", {
158
+ children: /* @__PURE__ */ b("span", {
291
159
  className: "text-sm font-semibold text-text-primary",
292
- children: A(e.amount)
160
+ children: A(e.revenue)
293
161
  })
294
162
  })
295
163
  ] }, e.category))
164
+ }) : /* @__PURE__ */ b("p", {
165
+ className: "text-sm text-text-secondary",
166
+ children: "Category revenue will appear here once orders are recorded."
296
167
  })]
297
168
  })]
298
169
  }),
299
- /* @__PURE__ */ b("div", {
170
+ P.length > 0 && /* @__PURE__ */ x("div", {
300
171
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6 mb-8",
301
- children: [/* @__PURE__ */ b("div", {
172
+ children: [/* @__PURE__ */ x("div", {
302
173
  className: "flex items-center gap-2 mb-4",
303
- children: [/* @__PURE__ */ y(u, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ y("h3", {
174
+ children: [/* @__PURE__ */ b(d, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h3", {
304
175
  className: "text-lg font-semibold text-text-primary",
305
- children: "Monthly Trends"
176
+ children: "Order Trends"
306
177
  })]
307
- }), /* @__PURE__ */ y("div", {
178
+ }), /* @__PURE__ */ b("div", {
308
179
  className: "overflow-x-auto",
309
- children: /* @__PURE__ */ b("table", {
180
+ children: /* @__PURE__ */ x("table", {
310
181
  className: "w-full",
311
- children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
182
+ children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
312
183
  className: "border-b border-border-subtle bg-bg-sunken/50",
313
184
  children: [
314
- /* @__PURE__ */ y("th", {
185
+ /* @__PURE__ */ b("th", {
315
186
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
316
- children: "Month"
187
+ children: "Date"
317
188
  }),
318
- /* @__PURE__ */ y("th", {
319
- className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",
320
- children: "Revenue"
321
- }),
322
- /* @__PURE__ */ y("th", {
189
+ /* @__PURE__ */ b("th", {
323
190
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",
324
191
  children: "Orders"
325
192
  }),
326
- /* @__PURE__ */ y("th", {
193
+ /* @__PURE__ */ b("th", {
327
194
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase tracking-wider",
328
- children: "Commission"
195
+ children: "Revenue"
329
196
  })
330
197
  ]
331
- }) }), /* @__PURE__ */ y("tbody", {
198
+ }) }), /* @__PURE__ */ b("tbody", {
332
199
  className: "divide-y divide-border",
333
- children: O.monthlyTrends.map((e) => /* @__PURE__ */ b("tr", {
200
+ children: P.map((e) => /* @__PURE__ */ x("tr", {
334
201
  className: "hover:bg-accent/50 transition-colors",
335
202
  children: [
336
- /* @__PURE__ */ y("td", {
203
+ /* @__PURE__ */ b("td", {
337
204
  className: "px-4 py-3 text-sm font-medium text-text-primary",
338
- children: e.month
205
+ children: e.date
339
206
  }),
340
- /* @__PURE__ */ y("td", {
341
- className: "px-4 py-3 text-sm text-right text-text-primary",
342
- children: A(e.revenue)
343
- }),
344
- /* @__PURE__ */ y("td", {
207
+ /* @__PURE__ */ b("td", {
345
208
  className: "px-4 py-3 text-sm text-right text-text-primary",
346
209
  children: e.orders.toLocaleString("en-IN")
347
210
  }),
348
- /* @__PURE__ */ y("td", {
211
+ /* @__PURE__ */ b("td", {
349
212
  className: "px-4 py-3 text-sm text-right text-text-primary",
350
- children: A(e.commission)
213
+ children: A(e.revenue)
351
214
  })
352
215
  ]
353
- }, e.month))
216
+ }, e.date))
354
217
  })]
355
218
  })
356
219
  })]
357
220
  }),
358
- /* @__PURE__ */ b("div", {
221
+ /* @__PURE__ */ x("div", {
359
222
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
360
223
  children: [
361
- /* @__PURE__ */ b("div", {
224
+ /* @__PURE__ */ x("div", {
362
225
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6 text-center",
363
226
  children: [
364
- /* @__PURE__ */ y(h, { className: "h-8 w-8 text-primary mx-auto mb-3" }),
365
- /* @__PURE__ */ y("h4", {
227
+ /* @__PURE__ */ b(g, { className: "h-8 w-8 text-primary mx-auto mb-3" }),
228
+ /* @__PURE__ */ b("h4", {
366
229
  className: "text-lg font-semibold text-text-primary mb-2",
367
230
  children: "Total Orders"
368
231
  }),
369
- /* @__PURE__ */ y("p", {
232
+ /* @__PURE__ */ b("p", {
370
233
  className: "text-2xl font-bold text-primary",
371
- children: O.totalOrders.toLocaleString("en-IN")
234
+ children: T.totalOrders.toLocaleString("en-IN")
372
235
  }),
373
- /* @__PURE__ */ y("p", {
236
+ /* @__PURE__ */ b("p", {
374
237
  className: "text-sm text-text-secondary mt-1",
375
- children: "All time orders"
238
+ children: "All-time orders"
376
239
  })
377
240
  ]
378
241
  }),
379
- /* @__PURE__ */ b("div", {
242
+ /* @__PURE__ */ x("div", {
380
243
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6 text-center",
381
244
  children: [
382
- /* @__PURE__ */ y(l, { className: "h-8 w-8 text-status-success-text mx-auto mb-3" }),
383
- /* @__PURE__ */ y("h4", {
245
+ /* @__PURE__ */ b(u, { className: "h-8 w-8 text-status-success-text mx-auto mb-3" }),
246
+ /* @__PURE__ */ b("h4", {
384
247
  className: "text-lg font-semibold text-text-primary mb-2",
385
248
  children: "Average Order Value"
386
249
  }),
387
- /* @__PURE__ */ y("p", {
250
+ /* @__PURE__ */ b("p", {
388
251
  className: "text-2xl font-bold text-status-success-text",
389
- children: A(O.averageOrderValue)
252
+ children: A(j)
390
253
  }),
391
- /* @__PURE__ */ y("p", {
254
+ /* @__PURE__ */ b("p", {
392
255
  className: "text-sm text-text-secondary mt-1",
393
256
  children: "Per order average"
394
257
  })
395
258
  ]
396
259
  }),
397
- /* @__PURE__ */ b("div", {
260
+ /* @__PURE__ */ x("div", {
398
261
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6 text-center",
399
262
  children: [
400
- /* @__PURE__ */ y(f, { className: "h-8 w-8 text-text-primary mx-auto mb-3" }),
401
- /* @__PURE__ */ y("h4", {
263
+ /* @__PURE__ */ b(v, { className: "h-8 w-8 text-text-primary mx-auto mb-3" }),
264
+ /* @__PURE__ */ b("h4", {
402
265
  className: "text-lg font-semibold text-text-primary mb-2",
403
- children: "Total Payouts"
266
+ children: "Active Carts"
404
267
  }),
405
- /* @__PURE__ */ y("p", {
268
+ /* @__PURE__ */ b("p", {
406
269
  className: "text-2xl font-bold text-text-primary",
407
- children: A(O.payouts)
270
+ children: T.activeProviders.toLocaleString("en-IN")
408
271
  }),
409
- /* @__PURE__ */ y("p", {
272
+ /* @__PURE__ */ b("p", {
410
273
  className: "text-sm text-text-secondary mt-1",
411
- children: "Paid to cart owners"
274
+ children: "Currently live on the platform"
412
275
  })
413
276
  ]
414
277
  })
415
278
  ]
416
279
  })
417
280
  ]
418
- }) : /* @__PURE__ */ y(t, {
281
+ }) : /* @__PURE__ */ b(t, {
419
282
  title: "Financial Reports",
420
283
  description: "Unable to load financial data",
421
- children: /* @__PURE__ */ y(r, {
284
+ children: /* @__PURE__ */ b(r, {
422
285
  illustration: "empty-data",
423
286
  title: "No financial data available",
424
- description: "We couldn't load the financial figures for this period. Try a different date range or check back shortly.",
425
- action: /* @__PURE__ */ y("button", {
426
- type: "button",
427
- onClick: () => D("30d"),
428
- className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
429
- children: "Reset to last 30 days"
430
- })
287
+ description: "We couldn't load the financial figures right now. Please check back shortly."
431
288
  })
432
289
  });
433
290
  }
434
291
  //#endregion
435
- export { C as AdminFinancialPage };
292
+ export { w as AdminFinancialPage };
436
293
 
437
294
  //# sourceMappingURL=AdminFinancialPage.js.map