@burdenoff/microfe-adaptercloud 2026.625.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 (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,665 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.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 } from "@burdenoff/fe-libs/ui";
9
- //#region src/adaptercloud/pages/admin/AdminDashboard.tsx
10
- function k() {
11
- let { navigateTo: k, currentUser: A } = e(), j = A?.firstName ?? A?.name ?? "Admin", [M, N] = a(null), [P, F] = a([]), [I, L] = a(null), [R, z] = a(!0);
12
- i(() => {
13
- let e = setTimeout(() => {
14
- N({
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
- }), L({
24
- customers: 8934,
25
- cartOwners: 2456,
26
- workers: 1245,
27
- investors: 212,
28
- growth: 15.7
29
- }), F([
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
- ]), z(!1);
81
- }, 1e3);
82
- return () => clearTimeout(e);
83
- }, []);
84
- let B = (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" }), V = (e) => ({
91
- user_registration: "text-accent-blue",
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", H = (e) => ({
97
- completed: "bg-status-success-bg-subtle/20 text-status-success-text",
98
- pending: "bg-status-warning-bg-subtle/20 text-status-warning-text",
99
- failed: "bg-status-error-bg-subtle/20 text-status-error-text"
100
- })[e] ?? "bg-secondary text-secondary-foreground";
101
- return R ? /* @__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, ${j}! Monitor and manage the platform.`,
114
- purpose: "Your command center for the whole marketplace — review platform health at a glance, clear pending cart approvals, and jump into user, order, and financial management. Start here whenever you need to keep the platform running smoothly.",
115
- actions: M?.pendingApprovals && M.pendingApprovals > 0 ? /* @__PURE__ */ E("div", {
116
- className: "flex items-center gap-2 rounded-lg border border-status-error-border/30 bg-status-error-bg-subtle/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: [M.pendingApprovals, " pending approvals"]
120
- })]
121
- }) : void 0,
122
- children: [
123
- /* @__PURE__ */ E("div", {
124
- className: "mb-8",
125
- children: [/* @__PURE__ */ T("h2", {
126
- className: "text-lg font-semibold text-text-primary mb-4",
127
- children: "Quick Actions"
128
- }), /* @__PURE__ */ E("div", {
129
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
130
- children: [
131
- /* @__PURE__ */ E("button", {
132
- type: "button",
133
- onClick: () => k("/admin/carts"),
134
- className: "flex items-center gap-3 rounded-lg bg-status-error-bg-subtle hover:bg-status-error-bg-subtle text-white p-3 text-sm font-medium transition-colors",
135
- children: [
136
- /* @__PURE__ */ T(s, { className: "h-5 w-5" }),
137
- "Approve Carts (",
138
- M?.pendingApprovals,
139
- ")"
140
- ]
141
- }),
142
- /* @__PURE__ */ E("button", {
143
- type: "button",
144
- onClick: () => k("/admin/carts"),
145
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
146
- children: [/* @__PURE__ */ T(x, { className: "h-5 w-5 text-text-secondary" }), "Manage Carts"]
147
- }),
148
- /* @__PURE__ */ E("button", {
149
- type: "button",
150
- onClick: () => k("/admin/users"),
151
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
152
- children: [/* @__PURE__ */ T(C, { className: "h-5 w-5 text-text-secondary" }), "User Management"]
153
- }),
154
- /* @__PURE__ */ E("button", {
155
- type: "button",
156
- onClick: () => k("/admin/orders"),
157
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
158
- children: [/* @__PURE__ */ T(b, { className: "h-5 w-5 text-text-secondary" }), "Order Management"]
159
- }),
160
- /* @__PURE__ */ E("button", {
161
- type: "button",
162
- onClick: () => k("/admin/financial"),
163
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
164
- children: [/* @__PURE__ */ T(h, { className: "h-5 w-5 text-text-secondary" }), "Financial Analytics"]
165
- }),
166
- /* @__PURE__ */ E("button", {
167
- type: "button",
168
- onClick: () => k("/admin/analytics"),
169
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
170
- children: [/* @__PURE__ */ T(l, { className: "h-5 w-5 text-text-secondary" }), "Analytics"]
171
- }),
172
- /* @__PURE__ */ E("button", {
173
- type: "button",
174
- onClick: () => k("/admin/settings"),
175
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
176
- children: [/* @__PURE__ */ T(v, { className: "h-5 w-5 text-text-secondary" }), "Settings"]
177
- }),
178
- /* @__PURE__ */ E("button", {
179
- type: "button",
180
- onClick: () => k("/admin/analytics"),
181
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface hover:bg-accent p-3 text-sm font-medium text-text-primary transition-colors",
182
- children: [/* @__PURE__ */ T(m, { className: "h-5 w-5 text-text-secondary" }), "Reports"]
183
- })
184
- ]
185
- })]
186
- }),
187
- /* @__PURE__ */ T(O, {
188
- storageKey: "adaptercloud-admin-dashboard",
189
- className: "mb-8",
190
- steps: [
191
- {
192
- id: "approve-carts",
193
- label: "Review pending cart approvals",
194
- description: "Keep the marketplace clean by approving or rejecting new carts.",
195
- onClick: () => k("/admin/carts")
196
- },
197
- {
198
- id: "manage-users",
199
- label: "Manage users and roles",
200
- description: "Verify, suspend, or activate accounts across the platform.",
201
- onClick: () => k("/admin/users")
202
- },
203
- {
204
- id: "check-finances",
205
- label: "Check financial analytics",
206
- description: "Track revenue, commission, and payouts.",
207
- onClick: () => k("/admin/financial")
208
- }
209
- ]
210
- }),
211
- M && /* @__PURE__ */ E(D, {
212
- className: "mb-8",
213
- children: [
214
- /* @__PURE__ */ T("h2", {
215
- className: "text-lg font-semibold text-text-primary mb-4",
216
- children: "Platform Overview"
217
- }),
218
- /* @__PURE__ */ E("div", {
219
- className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
220
- children: [
221
- /* @__PURE__ */ T(r, {
222
- icon: /* @__PURE__ */ T(C, { className: "h-5 w-5" }),
223
- value: M.totalUsers.toLocaleString("en-IN"),
224
- label: "Total Users",
225
- trend: "up",
226
- trendValue: "+15.7%"
227
- }),
228
- /* @__PURE__ */ T(r, {
229
- icon: /* @__PURE__ */ T(x, { className: "h-5 w-5" }),
230
- value: M.totalCarts.toLocaleString("en-IN"),
231
- label: "Active Carts",
232
- trend: "up",
233
- trendValue: "+8 this week"
234
- }),
235
- /* @__PURE__ */ T(r, {
236
- icon: /* @__PURE__ */ T(b, { className: "h-5 w-5" }),
237
- value: M.totalOrders.toLocaleString("en-IN"),
238
- label: "Total Orders",
239
- trend: "up",
240
- trendValue: "+12.3%"
241
- }),
242
- /* @__PURE__ */ T(r, {
243
- icon: /* @__PURE__ */ T(h, { className: "h-5 w-5" }),
244
- value: `₹${(M.totalRevenue / 1e5).toFixed(1)}L`,
245
- label: "Total Revenue",
246
- trend: "up",
247
- trendValue: "+8.5%"
248
- })
249
- ]
250
- }),
251
- /* @__PURE__ */ E("div", {
252
- className: "grid grid-cols-2 lg:grid-cols-4 gap-4 mt-4",
253
- children: [
254
- /* @__PURE__ */ E("div", {
255
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
256
- children: [/* @__PURE__ */ T("p", {
257
- className: "text-xs text-text-secondary",
258
- children: "Active Users (24h)"
259
- }), /* @__PURE__ */ T("p", {
260
- className: "text-xl font-bold text-status-success-text",
261
- children: M.activeUsers.toLocaleString("en-IN")
262
- })]
263
- }),
264
- /* @__PURE__ */ E("div", {
265
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
266
- children: [/* @__PURE__ */ T("p", {
267
- className: "text-xs text-text-secondary",
268
- children: "Pending Approvals"
269
- }), /* @__PURE__ */ T("p", {
270
- className: "text-xl font-bold text-status-error-text",
271
- children: M.pendingApprovals
272
- })]
273
- }),
274
- /* @__PURE__ */ E("div", {
275
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
276
- children: [/* @__PURE__ */ T("p", {
277
- className: "text-xs text-text-secondary",
278
- children: "Total Investments"
279
- }), /* @__PURE__ */ T("p", {
280
- className: "text-xl font-bold text-accent-blue",
281
- children: M.totalInvestments.toLocaleString("en-IN")
282
- })]
283
- }),
284
- /* @__PURE__ */ E("div", {
285
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
286
- children: [/* @__PURE__ */ T("p", {
287
- className: "text-xs text-text-secondary",
288
- children: "Platform Commission"
289
- }), /* @__PURE__ */ E("p", {
290
- className: "text-xl font-bold text-accent-purple",
291
- children: [
292
- "₹",
293
- (M.platformCommission / 1e3).toFixed(0),
294
- "K"
295
- ]
296
- })]
297
- })
298
- ]
299
- })
300
- ]
301
- }),
302
- I && /* @__PURE__ */ E("div", {
303
- className: "mb-8",
304
- children: [/* @__PURE__ */ T("h2", {
305
- className: "text-lg font-semibold text-text-primary mb-4",
306
- children: "User Distribution"
307
- }), /* @__PURE__ */ E("div", {
308
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
309
- children: [/* @__PURE__ */ E("div", {
310
- className: "grid grid-cols-2 lg:grid-cols-4 gap-6",
311
- children: [
312
- /* @__PURE__ */ E("div", {
313
- className: "text-center",
314
- children: [
315
- /* @__PURE__ */ T("div", {
316
- className: "text-2xl sm:text-3xl font-bold text-accent-blue",
317
- children: I.customers.toLocaleString("en-IN")
318
- }),
319
- /* @__PURE__ */ T("div", {
320
- className: "text-sm text-text-secondary",
321
- children: "Customers"
322
- }),
323
- /* @__PURE__ */ T("div", {
324
- className: "text-xs text-text-secondary",
325
- children: "69.5%"
326
- })
327
- ]
328
- }),
329
- /* @__PURE__ */ E("div", {
330
- className: "text-center",
331
- children: [
332
- /* @__PURE__ */ T("div", {
333
- className: "text-2xl sm:text-3xl font-bold text-status-success-text",
334
- children: I.cartOwners.toLocaleString("en-IN")
335
- }),
336
- /* @__PURE__ */ T("div", {
337
- className: "text-sm text-text-secondary",
338
- children: "Cart Owners"
339
- }),
340
- /* @__PURE__ */ T("div", {
341
- className: "text-xs text-text-secondary",
342
- children: "19.1%"
343
- })
344
- ]
345
- }),
346
- /* @__PURE__ */ E("div", {
347
- className: "text-center",
348
- children: [
349
- /* @__PURE__ */ T("div", {
350
- className: "text-2xl sm:text-3xl font-bold text-status-warning-text",
351
- children: I.workers.toLocaleString("en-IN")
352
- }),
353
- /* @__PURE__ */ T("div", {
354
- className: "text-sm text-text-secondary",
355
- children: "Workers"
356
- }),
357
- /* @__PURE__ */ T("div", {
358
- className: "text-xs text-text-secondary",
359
- children: "9.7%"
360
- })
361
- ]
362
- }),
363
- /* @__PURE__ */ E("div", {
364
- className: "text-center",
365
- children: [
366
- /* @__PURE__ */ T("div", {
367
- className: "text-2xl sm:text-3xl font-bold text-accent-purple",
368
- children: I.investors.toLocaleString("en-IN")
369
- }),
370
- /* @__PURE__ */ T("div", {
371
- className: "text-sm text-text-secondary",
372
- children: "Investors"
373
- }),
374
- /* @__PURE__ */ T("div", {
375
- className: "text-xs text-text-secondary",
376
- children: "1.7%"
377
- })
378
- ]
379
- })
380
- ]
381
- }), /* @__PURE__ */ T("div", {
382
- className: "mt-4 pt-4 border-t border-border-subtle",
383
- children: /* @__PURE__ */ E("div", {
384
- className: "flex justify-between items-center",
385
- children: [/* @__PURE__ */ T("span", {
386
- className: "text-sm text-text-secondary",
387
- children: "User Growth (This Month)"
388
- }), /* @__PURE__ */ E("span", {
389
- className: "text-sm font-medium text-status-success-text",
390
- children: [
391
- "+",
392
- I.growth,
393
- "%"
394
- ]
395
- })]
396
- })
397
- })]
398
- })]
399
- }),
400
- /* @__PURE__ */ E("div", {
401
- className: "mb-8",
402
- children: [/* @__PURE__ */ E("div", {
403
- className: "flex items-center justify-between mb-4",
404
- children: [/* @__PURE__ */ T("h2", {
405
- className: "text-lg font-semibold text-text-primary",
406
- children: "Recent Platform Activity"
407
- }), /* @__PURE__ */ E("button", {
408
- type: "button",
409
- onClick: () => k("/admin/analytics"),
410
- className: "flex items-center gap-1 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
411
- children: ["View all activities", /* @__PURE__ */ T(c, { className: "h-4 w-4" })]
412
- })]
413
- }), /* @__PURE__ */ T("div", {
414
- className: "rounded-lg border border-border-subtle bg-bg-surface divide-y divide-border",
415
- children: P.map((e) => /* @__PURE__ */ E("div", {
416
- className: "flex items-start gap-3 px-4 py-3",
417
- children: [/* @__PURE__ */ T("div", {
418
- className: t("flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken mt-0.5", V(e.type)),
419
- children: B(e.type)
420
- }), /* @__PURE__ */ E("div", {
421
- className: "flex-1 min-w-0",
422
- children: [/* @__PURE__ */ E("div", {
423
- className: "flex flex-col sm:flex-row sm:items-center justify-between gap-2",
424
- children: [/* @__PURE__ */ T("p", {
425
- className: "text-sm font-medium text-text-primary",
426
- children: e.description
427
- }), /* @__PURE__ */ T("span", {
428
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium capitalize w-fit", H(e.status)),
429
- children: e.status
430
- })]
431
- }), /* @__PURE__ */ E("div", {
432
- className: "flex flex-wrap items-center mt-1 text-xs text-text-secondary gap-3",
433
- children: [
434
- /* @__PURE__ */ T("span", { children: e.timestamp }),
435
- e.user && /* @__PURE__ */ E("span", {
436
- className: "flex items-center gap-1",
437
- children: [/* @__PURE__ */ T(C, { className: "h-3 w-3" }), e.user]
438
- }),
439
- e.amount && /* @__PURE__ */ E("span", {
440
- className: "flex items-center gap-1",
441
- children: [
442
- /* @__PURE__ */ T(h, { className: "h-3 w-3" }),
443
- "₹",
444
- e.amount.toLocaleString("en-IN")
445
- ]
446
- })
447
- ]
448
- })]
449
- })]
450
- }, e.id))
451
- })]
452
- }),
453
- /* @__PURE__ */ E("div", {
454
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",
455
- children: [/* @__PURE__ */ E("div", {
456
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
457
- children: [/* @__PURE__ */ E("div", {
458
- className: "flex items-center gap-2 mb-4",
459
- children: [/* @__PURE__ */ T(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T("h3", {
460
- className: "text-lg font-semibold text-text-primary",
461
- children: "System Health"
462
- })]
463
- }), /* @__PURE__ */ E("div", {
464
- className: "space-y-4",
465
- children: [
466
- /* @__PURE__ */ E("div", {
467
- className: "flex items-center justify-between",
468
- children: [/* @__PURE__ */ E("div", {
469
- className: "flex items-center gap-3",
470
- children: [/* @__PURE__ */ T(_, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
471
- className: "text-sm text-text-secondary",
472
- children: "Server Status"
473
- })]
474
- }), /* @__PURE__ */ E("span", {
475
- className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle/20 px-3 py-1 text-xs font-medium text-status-success-text",
476
- children: [/* @__PURE__ */ T(u, { className: "h-3 w-3" }), "Healthy"]
477
- })]
478
- }),
479
- /* @__PURE__ */ E("div", {
480
- className: "flex items-center justify-between",
481
- children: [/* @__PURE__ */ E("div", {
482
- className: "flex items-center gap-3",
483
- children: [/* @__PURE__ */ T(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
484
- className: "text-sm text-text-secondary",
485
- children: "Database Performance"
486
- })]
487
- }), /* @__PURE__ */ E("span", {
488
- className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle/20 px-3 py-1 text-xs font-medium text-status-success-text",
489
- children: [/* @__PURE__ */ T(u, { className: "h-3 w-3" }), "Optimal"]
490
- })]
491
- }),
492
- /* @__PURE__ */ E("div", {
493
- className: "flex items-center justify-between",
494
- children: [/* @__PURE__ */ E("div", {
495
- className: "flex items-center gap-3",
496
- children: [/* @__PURE__ */ T(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
497
- className: "text-sm text-text-secondary",
498
- children: "Payment Gateway"
499
- })]
500
- }), /* @__PURE__ */ E("span", {
501
- className: "inline-flex items-center gap-1.5 rounded-full bg-status-success-bg-subtle/20 px-3 py-1 text-xs font-medium text-status-success-text",
502
- children: [/* @__PURE__ */ T(u, { className: "h-3 w-3" }), "Online"]
503
- })]
504
- }),
505
- /* @__PURE__ */ E("div", {
506
- className: "flex items-center justify-between",
507
- children: [/* @__PURE__ */ E("div", {
508
- className: "flex items-center gap-3",
509
- children: [/* @__PURE__ */ T(w, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
510
- className: "text-sm text-text-secondary",
511
- children: "API Response Time"
512
- })]
513
- }), /* @__PURE__ */ T("span", {
514
- className: "text-sm font-medium text-text-primary",
515
- children: "145ms"
516
- })]
517
- }),
518
- /* @__PURE__ */ E("div", {
519
- className: "flex items-center justify-between",
520
- children: [/* @__PURE__ */ E("div", {
521
- className: "flex items-center gap-3",
522
- children: [/* @__PURE__ */ T(d, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ T("span", {
523
- className: "text-sm text-text-secondary",
524
- children: "Uptime (30 days)"
525
- })]
526
- }), /* @__PURE__ */ T("span", {
527
- className: "text-sm font-medium text-text-primary",
528
- children: "99.8%"
529
- })]
530
- })
531
- ]
532
- })]
533
- }), /* @__PURE__ */ E("div", {
534
- className: "rounded-lg border border-border-seam bg-bg-surface p-6 bg-gloss-card shadow-pop",
535
- children: [/* @__PURE__ */ E("div", {
536
- className: "flex items-center gap-2 mb-4",
537
- children: [/* @__PURE__ */ T(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ T("h3", {
538
- className: "text-lg font-semibold text-text-primary",
539
- children: "Financial Overview"
540
- })]
541
- }), /* @__PURE__ */ E("div", {
542
- className: "space-y-3",
543
- children: [
544
- /* @__PURE__ */ E("div", {
545
- className: "flex justify-between",
546
- children: [/* @__PURE__ */ T("span", {
547
- className: "text-sm text-text-secondary",
548
- children: "Today's Revenue"
549
- }), /* @__PURE__ */ T("span", {
550
- className: "font-medium text-text-primary",
551
- children: "₹1,45,230"
552
- })]
553
- }),
554
- /* @__PURE__ */ E("div", {
555
- className: "flex justify-between",
556
- children: [/* @__PURE__ */ T("span", {
557
- className: "text-sm text-text-secondary",
558
- children: "This Month"
559
- }), /* @__PURE__ */ T("span", {
560
- className: "font-medium text-text-primary",
561
- children: "₹24,50,000"
562
- })]
563
- }),
564
- /* @__PURE__ */ E("div", {
565
- className: "flex justify-between",
566
- children: [/* @__PURE__ */ T("span", {
567
- className: "text-sm text-text-secondary",
568
- children: "Platform Commission"
569
- }), /* @__PURE__ */ T("span", {
570
- className: "font-medium text-text-primary",
571
- children: "₹1,22,500"
572
- })]
573
- }),
574
- /* @__PURE__ */ E("div", {
575
- className: "flex justify-between",
576
- children: [/* @__PURE__ */ T("span", {
577
- className: "text-sm text-text-secondary",
578
- children: "Active Investments"
579
- }), /* @__PURE__ */ T("span", {
580
- className: "font-medium text-text-primary",
581
- children: "₹1.52Cr"
582
- })]
583
- }),
584
- /* @__PURE__ */ E("div", {
585
- className: "flex justify-between",
586
- children: [/* @__PURE__ */ T("span", {
587
- className: "text-sm text-text-secondary",
588
- children: "Pending Payouts"
589
- }), /* @__PURE__ */ T("span", {
590
- className: "font-medium text-text-primary",
591
- children: "₹45,600"
592
- })]
593
- })
594
- ]
595
- })]
596
- })]
597
- }),
598
- /* @__PURE__ */ T("div", {
599
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
600
- children: [
601
- {
602
- icon: x,
603
- label: "Cart Management",
604
- desc: "Approve, manage, and monitor carts",
605
- path: "/admin/carts"
606
- },
607
- {
608
- icon: C,
609
- label: "User Management",
610
- desc: "Manage users and permissions",
611
- path: "/admin/users"
612
- },
613
- {
614
- icon: l,
615
- label: "Analytics & Reports",
616
- desc: "View detailed platform analytics",
617
- path: "/admin/analytics"
618
- },
619
- {
620
- icon: h,
621
- label: "Financial Analytics",
622
- desc: "View revenue, investments, and financial metrics",
623
- path: "/admin/financial"
624
- },
625
- {
626
- icon: s,
627
- label: "Order & Dispute Management",
628
- desc: "Handle orders, disputes, and customer issues",
629
- path: "/admin/orders"
630
- },
631
- {
632
- icon: v,
633
- label: "Platform Settings",
634
- desc: "Configure platform-wide settings",
635
- path: "/admin/settings"
636
- }
637
- ].map((e) => {
638
- let n = e.icon;
639
- return /* @__PURE__ */ E("button", {
640
- type: "button",
641
- onClick: () => k(e.path),
642
- className: t("flex items-center gap-4 rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6 text-left transition-all bg-gloss-card shadow-pop", "hover:bg-accent hover:shadow-md"),
643
- children: [/* @__PURE__ */ T("div", {
644
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
645
- children: /* @__PURE__ */ T(n, { className: "h-5 w-5" })
646
- }), /* @__PURE__ */ E("div", {
647
- className: "min-w-0",
648
- children: [/* @__PURE__ */ T("h3", {
649
- className: "font-semibold text-text-primary text-sm sm:text-base",
650
- children: e.label
651
- }), /* @__PURE__ */ T("p", {
652
- className: "text-xs sm:text-sm text-text-secondary",
653
- children: e.desc
654
- })]
655
- })]
656
- }, e.label);
657
- })
658
- })
659
- ]
660
- });
661
- }
662
- //#endregion
663
- export { k as AdminDashboard };
664
-
665
- //# sourceMappingURL=AdminDashboard.js.map