@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,679 +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 { useEffect as i, useState as a } from "react";
6
- import { Activity as o, AlertTriangle as s, ArrowRight as c, BarChart3 as l, CheckCircle2 as u, Clock as d, CreditCard as f, Database as p, FileText as m, IndianRupee as h, Loader2 as g, Server as _, Settings as v, ShieldCheck as y, ShoppingBag as b, Store as x, UserPlus as S, Users as C, Wifi as w } from "lucide-react";
7
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
8
- import { EmphasisPanel as D, NextSteps as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
9
- //#region src/subscriberbot/pages/admin/AdminDashboard.tsx
10
- function A() {
11
- let { navigateTo: A, currentUser: j } = e(), M = j?.firstName ?? j?.name ?? "Admin", [N, P] = a(null), [F, I] = a([]), [L, R] = a(null), [z, B] = a(!0);
12
- i(() => {
13
- let e = setTimeout(() => {
14
- P({
15
- totalUsers: 12847,
16
- totalCarts: 2934,
17
- totalOrders: 45621,
18
- totalInvestments: 1256,
19
- activeUsers: 8934,
20
- pendingApprovals: 47,
21
- totalRevenue: 245e4,
22
- platformCommission: 122500
23
- }), R({
24
- customers: 8934,
25
- cartOwners: 2456,
26
- workers: 1245,
27
- investors: 212,
28
- growth: 15.7
29
- }), I([
30
- {
31
- id: "ACT-001",
32
- type: "user_registration",
33
- description: "New cart owner registered: Rajesh Kumar",
34
- timestamp: "2 minutes ago",
35
- status: "completed",
36
- user: "Rajesh Kumar"
37
- },
38
- {
39
- id: "ACT-002",
40
- type: "cart_approval",
41
- description: "Cart approval request from Mumbai Chaat Corner",
42
- timestamp: "5 minutes ago",
43
- status: "pending",
44
- user: "Priya Sharma"
45
- },
46
- {
47
- id: "ACT-003",
48
- type: "investment",
49
- description: "New investment in Dosa Express",
50
- timestamp: "12 minutes ago",
51
- status: "completed",
52
- user: "Amit Patel",
53
- amount: 75e3
54
- },
55
- {
56
- id: "ACT-004",
57
- type: "order",
58
- description: "Large order placed: ₹2,500",
59
- timestamp: "18 minutes ago",
60
- status: "completed",
61
- amount: 2500
62
- },
63
- {
64
- id: "ACT-005",
65
- type: "dispute",
66
- description: "Payment dispute raised by customer",
67
- timestamp: "25 minutes ago",
68
- status: "pending",
69
- user: "Suresh Nair",
70
- amount: 450
71
- },
72
- {
73
- id: "ACT-006",
74
- type: "user_registration",
75
- description: "New investor registered: Fatima Ali",
76
- timestamp: "32 minutes ago",
77
- status: "completed",
78
- user: "Fatima Ali"
79
- }
80
- ]), B(!1);
81
- }, 1e3);
82
- return () => clearTimeout(e);
83
- }, []);
84
- let V = (e) => /* @__PURE__ */ T({
85
- user_registration: S,
86
- cart_approval: x,
87
- investment: h,
88
- order: b,
89
- dispute: s
90
- }[e] ?? o, { className: "h-4 w-4" }), H = (e) => ({
91
- user_registration: "text-status-info-text",
92
- cart_approval: "text-accent-purple",
93
- investment: "text-status-success-text",
94
- order: "text-status-success-text",
95
- dispute: "text-status-warning-text"
96
- })[e] ?? "text-text-secondary", U = (e) => ({
97
- completed: "bg-status-success-bg/20 text-status-success-text",
98
- pending: "bg-status-warning-bg/20 text-status-warning-text",
99
- failed: "bg-status-error-bg/20 text-status-error-text"
100
- })[e] ?? "bg-secondary text-secondary-foreground";
101
- return z ? /* @__PURE__ */ T(n, {
102
- title: "Admin Dashboard",
103
- description: "Loading...",
104
- children: /* @__PURE__ */ E("div", {
105
- className: "flex flex-col items-center justify-center py-20",
106
- children: [/* @__PURE__ */ T(g, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ T("p", {
107
- className: "text-text-secondary",
108
- children: "Loading admin dashboard..."
109
- })]
110
- })
111
- }) : /* @__PURE__ */ E(n, {
112
- title: "Admin Dashboard",
113
- description: `Welcome, ${M}! Monitor and manage the platform.`,
114
- titleGradient: !0,
115
- actions: N?.pendingApprovals && N.pendingApprovals > 0 ? /* @__PURE__ */ E("div", {
116
- className: "flex items-center gap-2 rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2",
117
- children: [/* @__PURE__ */ T(s, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ E("span", {
118
- className: "text-sm font-medium text-status-error-text",
119
- children: [N.pendingApprovals, " pending approvals"]
120
- })]
121
- }) : void 0,
122
- children: [
123
- /* @__PURE__ */ T(k, {
124
- icon: /* @__PURE__ */ T(y, { className: "h-4 w-4" }),
125
- className: "mb-6",
126
- children: "Your control room for the whole SubscriberBot marketplace. Use this dashboard to keep the platform healthy at a glance — approve new carts before they go live, watch user growth and revenue trends, and jump straight to the area that needs attention. Start with anything flagged as pending; everything else can wait."
127
- }),
128
- /* @__PURE__ */ T(O, {
129
- storageKey: "subscriberbot-admin-dashboard",
130
- steps: [
131
- {
132
- id: "approve-carts",
133
- label: "Review pending cart approvals",
134
- description: "Vet new service providers before customers can find them.",
135
- icon: /* @__PURE__ */ T(s, { className: "h-4 w-4" }),
136
- onClick: () => A("/admin/carts")
137
- },
138
- {
139
- id: "check-users",
140
- label: "Check on user accounts",
141
- description: "Spot suspicious sign-ups or accounts needing action.",
142
- icon: /* @__PURE__ */ T(C, { className: "h-4 w-4" }),
143
- onClick: () => A("/admin/users")
144
- },
145
- {
146
- id: "review-finance",
147
- label: "Review platform finances",
148
- description: "Track revenue, commission and payouts at a glance.",
149
- icon: /* @__PURE__ */ T(h, { className: "h-4 w-4" }),
150
- onClick: () => A("/admin/financial")
151
- },
152
- {
153
- id: "dive-analytics",
154
- label: "Dive into analytics",
155
- description: "Understand growth, retention and order trends in depth.",
156
- icon: /* @__PURE__ */ T(l, { className: "h-4 w-4" }),
157
- onClick: () => A("/admin/analytics")
158
- }
159
- ]
160
- }),
161
- /* @__PURE__ */ E("div", {
162
- className: "mb-8",
163
- children: [/* @__PURE__ */ T("h2", {
164
- className: "text-lg font-semibold text-text-primary mb-4",
165
- children: "Quick Actions"
166
- }), /* @__PURE__ */ E("div", {
167
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
168
- children: [
169
- /* @__PURE__ */ E("button", {
170
- type: "button",
171
- onClick: () => A("/admin/carts"),
172
- className: "flex items-center gap-3 rounded-lg bg-status-error-text hover:bg-status-error-text text-text-inverse p-3 text-sm font-medium transition-colors",
173
- children: [
174
- /* @__PURE__ */ T(s, { className: "h-5 w-5" }),
175
- "Approve Carts (",
176
- N?.pendingApprovals,
177
- ")"
178
- ]
179
- }),
180
- /* @__PURE__ */ E("button", {
181
- type: "button",
182
- onClick: () => A("/admin/carts"),
183
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
184
- children: [/* @__PURE__ */ T(x, { className: "h-5 w-5 text-text-secondary" }), "Manage Carts"]
185
- }),
186
- /* @__PURE__ */ E("button", {
187
- type: "button",
188
- onClick: () => A("/admin/users"),
189
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
190
- children: [/* @__PURE__ */ T(C, { className: "h-5 w-5 text-text-secondary" }), "User Management"]
191
- }),
192
- /* @__PURE__ */ E("button", {
193
- type: "button",
194
- onClick: () => A("/admin/orders"),
195
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
196
- children: [/* @__PURE__ */ T(b, { className: "h-5 w-5 text-text-secondary" }), "Order Management"]
197
- }),
198
- /* @__PURE__ */ E("button", {
199
- type: "button",
200
- onClick: () => A("/admin/financial"),
201
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
202
- children: [/* @__PURE__ */ T(h, { className: "h-5 w-5 text-text-secondary" }), "Financial Analytics"]
203
- }),
204
- /* @__PURE__ */ E("button", {
205
- type: "button",
206
- onClick: () => A("/admin/analytics"),
207
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
208
- children: [/* @__PURE__ */ T(l, { className: "h-5 w-5 text-text-secondary" }), "Analytics"]
209
- }),
210
- /* @__PURE__ */ E("button", {
211
- type: "button",
212
- onClick: () => A("/admin/settings"),
213
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
214
- children: [/* @__PURE__ */ T(v, { className: "h-5 w-5 text-text-secondary" }), "Settings"]
215
- }),
216
- /* @__PURE__ */ E("button", {
217
- type: "button",
218
- onClick: () => A("/admin/analytics"),
219
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
220
- children: [/* @__PURE__ */ T(m, { className: "h-5 w-5 text-text-secondary" }), "Reports"]
221
- })
222
- ]
223
- })]
224
- }),
225
- N && /* @__PURE__ */ E(D, {
226
- className: "mb-8",
227
- children: [
228
- /* @__PURE__ */ T("h2", {
229
- className: "text-lg font-semibold text-text-primary mb-4",
230
- children: "Platform Overview"
231
- }),
232
- /* @__PURE__ */ E("div", {
233
- className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
234
- children: [
235
- /* @__PURE__ */ T(r, {
236
- icon: /* @__PURE__ */ T(C, { className: "h-5 w-5" }),
237
- value: N.totalUsers.toLocaleString("en-IN"),
238
- label: "Total Users",
239
- trend: "up",
240
- trendValue: "+15.7%"
241
- }),
242
- /* @__PURE__ */ T(r, {
243
- icon: /* @__PURE__ */ T(x, { className: "h-5 w-5" }),
244
- value: N.totalCarts.toLocaleString("en-IN"),
245
- label: "Active Carts",
246
- trend: "up",
247
- trendValue: "+8 this week"
248
- }),
249
- /* @__PURE__ */ T(r, {
250
- icon: /* @__PURE__ */ T(b, { className: "h-5 w-5" }),
251
- value: N.totalOrders.toLocaleString("en-IN"),
252
- label: "Total Orders",
253
- trend: "up",
254
- trendValue: "+12.3%"
255
- }),
256
- /* @__PURE__ */ T(r, {
257
- icon: /* @__PURE__ */ T(h, { className: "h-5 w-5" }),
258
- value: `₹${(N.totalRevenue / 1e5).toFixed(1)}L`,
259
- label: "Total Revenue",
260
- trend: "up",
261
- trendValue: "+8.5%"
262
- })
263
- ]
264
- }),
265
- /* @__PURE__ */ E("div", {
266
- className: "grid grid-cols-2 lg:grid-cols-4 gap-4 mt-4",
267
- children: [
268
- /* @__PURE__ */ E("div", {
269
- className: "rounded-lg border border-border-seam bg-bg-surface p-4",
270
- children: [/* @__PURE__ */ T("p", {
271
- className: "text-xs text-text-secondary",
272
- children: "Active Users (24h)"
273
- }), /* @__PURE__ */ T("p", {
274
- className: "text-xl font-bold text-status-success-text",
275
- children: N.activeUsers.toLocaleString("en-IN")
276
- })]
277
- }),
278
- /* @__PURE__ */ E("div", {
279
- className: "rounded-lg border border-border-seam bg-bg-surface p-4",
280
- children: [/* @__PURE__ */ T("p", {
281
- className: "text-xs text-text-secondary",
282
- children: "Pending Approvals"
283
- }), /* @__PURE__ */ T("p", {
284
- className: "text-xl font-bold text-status-error-text",
285
- children: N.pendingApprovals
286
- })]
287
- }),
288
- /* @__PURE__ */ E("div", {
289
- className: "rounded-lg border border-border-seam bg-bg-surface p-4",
290
- children: [/* @__PURE__ */ T("p", {
291
- className: "text-xs text-text-secondary",
292
- children: "Total Investments"
293
- }), /* @__PURE__ */ T("p", {
294
- className: "text-xl font-bold text-status-info-text",
295
- children: N.totalInvestments.toLocaleString("en-IN")
296
- })]
297
- }),
298
- /* @__PURE__ */ E("div", {
299
- className: "rounded-lg border border-border-seam bg-bg-surface p-4",
300
- children: [/* @__PURE__ */ T("p", {
301
- className: "text-xs text-text-secondary",
302
- children: "Platform Commission"
303
- }), /* @__PURE__ */ E("p", {
304
- className: "text-xl font-bold text-accent-purple",
305
- children: [
306
- "₹",
307
- (N.platformCommission / 1e3).toFixed(0),
308
- "K"
309
- ]
310
- })]
311
- })
312
- ]
313
- })
314
- ]
315
- }),
316
- L && /* @__PURE__ */ E("div", {
317
- className: "mb-8",
318
- children: [/* @__PURE__ */ T("h2", {
319
- className: "text-lg font-semibold text-text-primary mb-4",
320
- children: "User Distribution"
321
- }), /* @__PURE__ */ E("div", {
322
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
323
- children: [/* @__PURE__ */ E("div", {
324
- className: "grid grid-cols-2 lg:grid-cols-4 gap-6",
325
- children: [
326
- /* @__PURE__ */ E("div", {
327
- className: "text-center",
328
- children: [
329
- /* @__PURE__ */ T("div", {
330
- className: "text-2xl sm:text-3xl font-bold text-status-info-text",
331
- children: L.customers.toLocaleString("en-IN")
332
- }),
333
- /* @__PURE__ */ T("div", {
334
- className: "text-sm text-text-secondary",
335
- children: "Customers"
336
- }),
337
- /* @__PURE__ */ T("div", {
338
- className: "text-xs text-text-secondary",
339
- children: "69.5%"
340
- })
341
- ]
342
- }),
343
- /* @__PURE__ */ E("div", {
344
- className: "text-center",
345
- children: [
346
- /* @__PURE__ */ T("div", {
347
- className: "text-2xl sm:text-3xl font-bold text-status-success-text",
348
- children: L.cartOwners.toLocaleString("en-IN")
349
- }),
350
- /* @__PURE__ */ T("div", {
351
- className: "text-sm text-text-secondary",
352
- children: "Cart Owners"
353
- }),
354
- /* @__PURE__ */ T("div", {
355
- className: "text-xs text-text-secondary",
356
- children: "19.1%"
357
- })
358
- ]
359
- }),
360
- /* @__PURE__ */ E("div", {
361
- className: "text-center",
362
- children: [
363
- /* @__PURE__ */ T("div", {
364
- className: "text-2xl sm:text-3xl font-bold text-status-warning-text",
365
- children: L.workers.toLocaleString("en-IN")
366
- }),
367
- /* @__PURE__ */ T("div", {
368
- className: "text-sm text-text-secondary",
369
- children: "Workers"
370
- }),
371
- /* @__PURE__ */ T("div", {
372
- className: "text-xs text-text-secondary",
373
- children: "9.7%"
374
- })
375
- ]
376
- }),
377
- /* @__PURE__ */ E("div", {
378
- className: "text-center",
379
- children: [
380
- /* @__PURE__ */ T("div", {
381
- className: "text-2xl sm:text-3xl font-bold text-accent-purple",
382
- children: L.investors.toLocaleString("en-IN")
383
- }),
384
- /* @__PURE__ */ T("div", {
385
- className: "text-sm text-text-secondary",
386
- children: "Investors"
387
- }),
388
- /* @__PURE__ */ T("div", {
389
- className: "text-xs text-text-secondary",
390
- children: "1.7%"
391
- })
392
- ]
393
- })
394
- ]
395
- }), /* @__PURE__ */ T("div", {
396
- className: "mt-4 pt-4 border-t border-border-seam",
397
- children: /* @__PURE__ */ E("div", {
398
- className: "flex justify-between items-center",
399
- children: [/* @__PURE__ */ T("span", {
400
- className: "text-sm text-text-secondary",
401
- children: "User Growth (This Month)"
402
- }), /* @__PURE__ */ E("span", {
403
- className: "text-sm font-medium text-status-success-text",
404
- children: [
405
- "+",
406
- L.growth,
407
- "%"
408
- ]
409
- })]
410
- })
411
- })]
412
- })]
413
- }),
414
- /* @__PURE__ */ E("div", {
415
- className: "mb-8",
416
- children: [/* @__PURE__ */ E("div", {
417
- className: "flex items-center justify-between mb-4",
418
- children: [/* @__PURE__ */ T("h2", {
419
- className: "text-lg font-semibold text-text-primary",
420
- children: "Recent Platform Activity"
421
- }), /* @__PURE__ */ E("button", {
422
- type: "button",
423
- onClick: () => A("/admin/analytics"),
424
- className: "flex items-center gap-1 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
425
- children: ["View all activities", /* @__PURE__ */ T(c, { className: "h-4 w-4" })]
426
- })]
427
- }), /* @__PURE__ */ T("div", {
428
- className: "rounded-lg border border-border-seam bg-bg-surface divide-y divide-border",
429
- children: F.map((e) => /* @__PURE__ */ E("div", {
430
- className: "flex items-start gap-3 px-4 py-3",
431
- children: [/* @__PURE__ */ T("div", {
432
- className: t("flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken mt-0.5", H(e.type)),
433
- children: V(e.type)
434
- }), /* @__PURE__ */ E("div", {
435
- className: "flex-1 min-w-0",
436
- children: [/* @__PURE__ */ E("div", {
437
- className: "flex flex-col sm:flex-row sm:items-center justify-between gap-2",
438
- children: [/* @__PURE__ */ T("p", {
439
- className: "text-sm font-medium text-text-primary",
440
- children: e.description
441
- }), /* @__PURE__ */ T("span", {
442
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize w-fit", U(e.status)),
443
- children: e.status
444
- })]
445
- }), /* @__PURE__ */ E("div", {
446
- className: "flex flex-wrap items-center mt-1 text-xs text-text-secondary gap-3",
447
- children: [
448
- /* @__PURE__ */ T("span", { children: e.timestamp }),
449
- e.user && /* @__PURE__ */ E("span", {
450
- className: "flex items-center gap-1",
451
- children: [/* @__PURE__ */ T(C, { className: "h-3 w-3" }), e.user]
452
- }),
453
- e.amount && /* @__PURE__ */ E("span", {
454
- className: "flex items-center gap-1",
455
- children: [
456
- /* @__PURE__ */ T(h, { className: "h-3 w-3" }),
457
- "₹",
458
- e.amount.toLocaleString("en-IN")
459
- ]
460
- })
461
- ]
462
- })]
463
- })]
464
- }, e.id))
465
- })]
466
- }),
467
- /* @__PURE__ */ E("div", {
468
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",
469
- children: [/* @__PURE__ */ E("div", {
470
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
471
- children: [/* @__PURE__ */ E("div", {
472
- className: "flex items-center gap-2 mb-4",
473
- children: [/* @__PURE__ */ T(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T("h3", {
474
- className: "text-lg font-semibold text-text-primary",
475
- children: "System Health"
476
- })]
477
- }), /* @__PURE__ */ E("div", {
478
- className: "space-y-4",
479
- children: [
480
- /* @__PURE__ */ E("div", {
481
- className: "flex items-center justify-between",
482
- children: [/* @__PURE__ */ E("div", {
483
- className: "flex items-center gap-3",
484
- children: [/* @__PURE__ */ T(_, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
485
- className: "text-sm text-text-secondary",
486
- children: "Server Status"
487
- })]
488
- }), /* @__PURE__ */ E("span", {
489
- className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg/20 px-3 py-1 text-xs font-medium text-status-success-text",
490
- children: [/* @__PURE__ */ T(u, { className: "h-3 w-3" }), "Healthy"]
491
- })]
492
- }),
493
- /* @__PURE__ */ E("div", {
494
- className: "flex items-center justify-between",
495
- children: [/* @__PURE__ */ E("div", {
496
- className: "flex items-center gap-3",
497
- children: [/* @__PURE__ */ T(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
498
- className: "text-sm text-text-secondary",
499
- children: "Database Performance"
500
- })]
501
- }), /* @__PURE__ */ E("span", {
502
- className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg/20 px-3 py-1 text-xs font-medium text-status-success-text",
503
- children: [/* @__PURE__ */ T(u, { className: "h-3 w-3" }), "Optimal"]
504
- })]
505
- }),
506
- /* @__PURE__ */ E("div", {
507
- className: "flex items-center justify-between",
508
- children: [/* @__PURE__ */ E("div", {
509
- className: "flex items-center gap-3",
510
- children: [/* @__PURE__ */ T(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
511
- className: "text-sm text-text-secondary",
512
- children: "Payment Gateway"
513
- })]
514
- }), /* @__PURE__ */ E("span", {
515
- className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg/20 px-3 py-1 text-xs font-medium text-status-success-text",
516
- children: [/* @__PURE__ */ T(u, { className: "h-3 w-3" }), "Online"]
517
- })]
518
- }),
519
- /* @__PURE__ */ E("div", {
520
- className: "flex items-center justify-between",
521
- children: [/* @__PURE__ */ E("div", {
522
- className: "flex items-center gap-3",
523
- children: [/* @__PURE__ */ T(w, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
524
- className: "text-sm text-text-secondary",
525
- children: "API Response Time"
526
- })]
527
- }), /* @__PURE__ */ T("span", {
528
- className: "text-sm font-medium text-text-primary",
529
- children: "145ms"
530
- })]
531
- }),
532
- /* @__PURE__ */ E("div", {
533
- className: "flex items-center justify-between",
534
- children: [/* @__PURE__ */ E("div", {
535
- className: "flex items-center gap-3",
536
- children: [/* @__PURE__ */ T(d, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
537
- className: "text-sm text-text-secondary",
538
- children: "Uptime (30 days)"
539
- })]
540
- }), /* @__PURE__ */ T("span", {
541
- className: "text-sm font-medium text-text-primary",
542
- children: "99.8%"
543
- })]
544
- })
545
- ]
546
- })]
547
- }), /* @__PURE__ */ E("div", {
548
- className: "rounded-lg border border-border-seam bg-bg-surface p-6",
549
- children: [/* @__PURE__ */ E("div", {
550
- className: "flex items-center gap-2 mb-4",
551
- children: [/* @__PURE__ */ T(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T("h3", {
552
- className: "text-lg font-semibold text-text-primary",
553
- children: "Financial Overview"
554
- })]
555
- }), /* @__PURE__ */ E("div", {
556
- className: "space-y-3",
557
- children: [
558
- /* @__PURE__ */ E("div", {
559
- className: "flex justify-between",
560
- children: [/* @__PURE__ */ T("span", {
561
- className: "text-sm text-text-secondary",
562
- children: "Today's Revenue"
563
- }), /* @__PURE__ */ T("span", {
564
- className: "font-medium text-text-primary",
565
- children: "₹1,45,230"
566
- })]
567
- }),
568
- /* @__PURE__ */ E("div", {
569
- className: "flex justify-between",
570
- children: [/* @__PURE__ */ T("span", {
571
- className: "text-sm text-text-secondary",
572
- children: "This Month"
573
- }), /* @__PURE__ */ T("span", {
574
- className: "font-medium text-text-primary",
575
- children: "₹24,50,000"
576
- })]
577
- }),
578
- /* @__PURE__ */ E("div", {
579
- className: "flex justify-between",
580
- children: [/* @__PURE__ */ T("span", {
581
- className: "text-sm text-text-secondary",
582
- children: "Platform Commission"
583
- }), /* @__PURE__ */ T("span", {
584
- className: "font-medium text-text-primary",
585
- children: "₹1,22,500"
586
- })]
587
- }),
588
- /* @__PURE__ */ E("div", {
589
- className: "flex justify-between",
590
- children: [/* @__PURE__ */ T("span", {
591
- className: "text-sm text-text-secondary",
592
- children: "Active Investments"
593
- }), /* @__PURE__ */ T("span", {
594
- className: "font-medium text-text-primary",
595
- children: "₹1.52Cr"
596
- })]
597
- }),
598
- /* @__PURE__ */ E("div", {
599
- className: "flex justify-between",
600
- children: [/* @__PURE__ */ T("span", {
601
- className: "text-sm text-text-secondary",
602
- children: "Pending Payouts"
603
- }), /* @__PURE__ */ T("span", {
604
- className: "font-medium text-text-primary",
605
- children: "₹45,600"
606
- })]
607
- })
608
- ]
609
- })]
610
- })]
611
- }),
612
- /* @__PURE__ */ T("div", {
613
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
614
- children: [
615
- {
616
- icon: x,
617
- label: "Cart Management",
618
- desc: "Approve, manage, and monitor carts",
619
- path: "/admin/carts"
620
- },
621
- {
622
- icon: C,
623
- label: "User Management",
624
- desc: "Manage users and permissions",
625
- path: "/admin/users"
626
- },
627
- {
628
- icon: l,
629
- label: "Analytics & Reports",
630
- desc: "View detailed platform analytics",
631
- path: "/admin/analytics"
632
- },
633
- {
634
- icon: h,
635
- label: "Financial Analytics",
636
- desc: "View revenue, investments, and financial metrics",
637
- path: "/admin/financial"
638
- },
639
- {
640
- icon: s,
641
- label: "Order & Dispute Management",
642
- desc: "Handle orders, disputes, and customer issues",
643
- path: "/admin/orders"
644
- },
645
- {
646
- icon: v,
647
- label: "Platform Settings",
648
- desc: "Configure platform-wide settings",
649
- path: "/admin/settings"
650
- }
651
- ].map((e) => {
652
- let n = e.icon;
653
- return /* @__PURE__ */ E("button", {
654
- type: "button",
655
- onClick: () => A(e.path),
656
- className: t("flex items-center gap-4 rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 text-left shadow-sm transition-all", "hover:bg-accent hover:shadow-md"),
657
- children: [/* @__PURE__ */ T("div", {
658
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
659
- children: /* @__PURE__ */ T(n, { className: "h-5 w-5" })
660
- }), /* @__PURE__ */ E("div", {
661
- className: "min-w-0",
662
- children: [/* @__PURE__ */ T("h3", {
663
- className: "font-semibold text-text-primary text-sm sm:text-base",
664
- children: e.label
665
- }), /* @__PURE__ */ T("p", {
666
- className: "text-xs sm:text-sm text-text-secondary",
667
- children: e.desc
668
- })]
669
- })]
670
- }, e.label);
671
- })
672
- })
673
- ]
674
- });
675
- }
676
- //#endregion
677
- export { A as AdminDashboard };
678
-
679
- //# sourceMappingURL=AdminDashboard.js.map