@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,840 +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 { formatCurrency as r } from "../../utils/formatters.js";
5
- import { mockAdminAnalytics as i } from "../../mocks/data.js";
6
- import { useState as a } from "react";
7
- import { ArrowDownRight as o, ArrowUpRight as s, BarChart3 as c, CalendarDays as l, Clock as u, Download as d, IndianRupee as f, Percent as p, ShoppingCart as m, Star as h, Target as g, ThumbsUp as _, TrendingUp as v, Users as y } from "lucide-react";
8
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
9
- import { EmphasisPanel as C } from "@burdenoff/fe-libs/ui";
10
- //#region src/adaptercloud/pages/cart-owner/AnalyticsDashboard.tsx
11
- var w = {
12
- revenue: {
13
- today: 12450,
14
- week: 87150,
15
- month: 348600,
16
- year: 4183200,
17
- growth: {
18
- daily: 12.5,
19
- weekly: 8.3,
20
- monthly: 15.2
21
- }
22
- },
23
- orders: {
24
- total: 156,
25
- pending: 3,
26
- completed: 145,
27
- cancelled: 8,
28
- averageValue: 285,
29
- averagePreparationTime: 18,
30
- popularTimes: [
31
- {
32
- hour: 8,
33
- orders: 12
34
- },
35
- {
36
- hour: 9,
37
- orders: 15
38
- },
39
- {
40
- hour: 10,
41
- orders: 18
42
- },
43
- {
44
- hour: 11,
45
- orders: 22
46
- },
47
- {
48
- hour: 12,
49
- orders: 28
50
- },
51
- {
52
- hour: 13,
53
- orders: 32
54
- },
55
- {
56
- hour: 14,
57
- orders: 16
58
- },
59
- {
60
- hour: 15,
61
- orders: 12
62
- },
63
- {
64
- hour: 16,
65
- orders: 14
66
- },
67
- {
68
- hour: 17,
69
- orders: 18
70
- },
71
- {
72
- hour: 18,
73
- orders: 20
74
- },
75
- {
76
- hour: 19,
77
- orders: 25
78
- },
79
- {
80
- hour: 20,
81
- orders: 22
82
- },
83
- {
84
- hour: 21,
85
- orders: 15
86
- }
87
- ]
88
- },
89
- offerings: {
90
- topSelling: [
91
- {
92
- id: "1",
93
- name: "Masala Dosa",
94
- quantity: 245,
95
- revenue: 19600,
96
- category: "Food & Beverage"
97
- },
98
- {
99
- id: "2",
100
- name: "Haircut Service",
101
- quantity: 89,
102
- revenue: 11340,
103
- category: "Personal Care & Beauty"
104
- },
105
- {
106
- id: "3",
107
- name: "Filter Coffee",
108
- quantity: 312,
109
- revenue: 9360,
110
- category: "Food & Beverage"
111
- },
112
- {
113
- id: "4",
114
- name: "Mobile Repair",
115
- quantity: 67,
116
- revenue: 6680,
117
- category: "Repair & Maintenance"
118
- },
119
- {
120
- id: "5",
121
- name: "Pongal",
122
- quantity: 98,
123
- revenue: 5880,
124
- category: "Food & Beverage"
125
- }
126
- ],
127
- leastSelling: [
128
- {
129
- id: "6",
130
- name: "Bisi Bele Bath",
131
- quantity: 12,
132
- revenue: 1440,
133
- category: "Food & Beverage"
134
- },
135
- {
136
- id: "7",
137
- name: "Cleaning Service",
138
- quantity: 8,
139
- revenue: 640,
140
- category: "Home Services"
141
- },
142
- {
143
- id: "8",
144
- name: "Kosambari",
145
- quantity: 15,
146
- revenue: 450,
147
- category: "Food & Beverage"
148
- }
149
- ],
150
- categories: [
151
- {
152
- category: "Food & Beverage",
153
- revenue: 45e3,
154
- orders: 450
155
- },
156
- {
157
- category: "Personal Care & Beauty",
158
- revenue: 25e3,
159
- orders: 180
160
- },
161
- {
162
- category: "Repair & Maintenance",
163
- revenue: 15e3,
164
- orders: 120
165
- },
166
- {
167
- category: "Home Services",
168
- revenue: 8e3,
169
- orders: 80
170
- }
171
- ]
172
- },
173
- customers: {
174
- total: 342,
175
- new: 45,
176
- returning: 297,
177
- topCustomers: [
178
- {
179
- id: "1",
180
- name: "Rahul Sharma",
181
- orders: 23,
182
- totalSpent: 6555
183
- },
184
- {
185
- id: "2",
186
- name: "Priya Patel",
187
- orders: 19,
188
- totalSpent: 5415
189
- },
190
- {
191
- id: "3",
192
- name: "Amit Kumar",
193
- orders: 17,
194
- totalSpent: 4845
195
- },
196
- {
197
- id: "4",
198
- name: "Sneha Reddy",
199
- orders: 15,
200
- totalSpent: 4275
201
- },
202
- {
203
- id: "5",
204
- name: "Vijay Singh",
205
- orders: 14,
206
- totalSpent: 3990
207
- }
208
- ],
209
- satisfaction: {
210
- rating: 4.6,
211
- reviews: 89,
212
- positiveReviews: 78
213
- }
214
- },
215
- performance: {
216
- acceptanceRate: 94,
217
- cancellationRate: 6,
218
- onTimeDeliveryRate: 88,
219
- averageRating: 4.6,
220
- peakHours: [
221
- {
222
- hour: "12-1 PM",
223
- orders: 32
224
- },
225
- {
226
- hour: "1-2 PM",
227
- orders: 28
228
- },
229
- {
230
- hour: "7-8 PM",
231
- orders: 25
232
- },
233
- {
234
- hour: "8-9 PM",
235
- orders: 22
236
- }
237
- ],
238
- peakDays: [
239
- {
240
- day: "Sunday",
241
- orders: 45
242
- },
243
- {
244
- day: "Saturday",
245
- orders: 42
246
- },
247
- {
248
- day: "Friday",
249
- orders: 38
250
- }
251
- ]
252
- }
253
- }, T = () => {
254
- let { navigateTo: T } = e(), [E, D] = a("week"), O = Math.max(...w.orders.popularTimes.map((e) => e.orders)), k = Math.max(...w.offerings.categories.map((e) => e.revenue)), A = Math.max(...w.performance.peakHours.map((e) => e.orders)), j = Math.max(...w.performance.peakDays.map((e) => e.orders)), M = (e) => `${e > 0 ? "+" : ""}${e}%`;
255
- return /* @__PURE__ */ x(n, {
256
- title: "Analytics Dashboard",
257
- description: "Business performance insights and data",
258
- purpose: "Understand how your cart is really doing — sales trends, your best-selling offerings, repeat customers, and busy hours. Use these insights to decide what to stock, when to staff up, and which offerings to promote.",
259
- actions: /* @__PURE__ */ S("div", {
260
- className: "flex items-center gap-2",
261
- children: [/* @__PURE__ */ S("select", {
262
- value: E,
263
- onChange: (e) => D(e.target.value),
264
- className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
265
- children: [
266
- /* @__PURE__ */ x("option", {
267
- value: "today",
268
- children: "Today"
269
- }),
270
- /* @__PURE__ */ x("option", {
271
- value: "week",
272
- children: "This Week"
273
- }),
274
- /* @__PURE__ */ x("option", {
275
- value: "month",
276
- children: "This Month"
277
- }),
278
- /* @__PURE__ */ x("option", {
279
- value: "year",
280
- children: "This Year"
281
- })
282
- ]
283
- }), /* @__PURE__ */ S("button", {
284
- type: "button",
285
- onClick: () => alert("Export feature coming soon!"),
286
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
287
- children: [/* @__PURE__ */ x(d, { className: "h-4 w-4" }), "Export"]
288
- })]
289
- }),
290
- children: /* @__PURE__ */ S("div", {
291
- className: "space-y-6",
292
- children: [
293
- /* @__PURE__ */ S(C, {
294
- role: "region",
295
- "aria-label": "Revenue overview",
296
- children: [/* @__PURE__ */ x("h2", {
297
- className: "text-base font-semibold text-text-primary mb-3",
298
- children: "Revenue Overview"
299
- }), /* @__PURE__ */ x("div", {
300
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
301
- children: [
302
- {
303
- label: "Today's Revenue",
304
- value: w.revenue.today,
305
- growth: w.revenue.growth.daily
306
- },
307
- {
308
- label: "This Week",
309
- value: w.revenue.week,
310
- growth: w.revenue.growth.weekly
311
- },
312
- {
313
- label: "This Month",
314
- value: w.revenue.month,
315
- growth: w.revenue.growth.monthly
316
- },
317
- {
318
- label: "This Year",
319
- value: w.revenue.year,
320
- growth: null
321
- }
322
- ].map((e) => /* @__PURE__ */ S("div", {
323
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
324
- children: [
325
- /* @__PURE__ */ S("div", {
326
- className: "flex items-center justify-between",
327
- children: [/* @__PURE__ */ x("div", {
328
- className: "rounded-md bg-accent p-2",
329
- children: /* @__PURE__ */ x(f, { className: "h-5 w-5 text-text-secondary" })
330
- }), e.growth !== null && /* @__PURE__ */ S("div", {
331
- className: t("flex items-center gap-1 text-xs font-medium", e.growth >= 0 ? "text-status-success-text" : "text-status-error-text"),
332
- children: [e.growth >= 0 ? /* @__PURE__ */ x(s, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ x(o, { className: "h-3.5 w-3.5" }), M(e.growth)]
333
- })]
334
- }),
335
- /* @__PURE__ */ x("p", {
336
- className: "mt-3 text-2xl font-bold text-text-primary",
337
- children: r(e.value, { minimumFractionDigits: 0 })
338
- }),
339
- /* @__PURE__ */ x("p", {
340
- className: "mt-1 text-sm text-text-secondary",
341
- children: e.label
342
- })
343
- ]
344
- }, e.label))
345
- })]
346
- }),
347
- /* @__PURE__ */ S("div", {
348
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
349
- children: [/* @__PURE__ */ S("div", {
350
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
351
- children: [/* @__PURE__ */ x("div", {
352
- className: "border-b border-border-subtle px-5 py-4",
353
- children: /* @__PURE__ */ S("h2", {
354
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
355
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
356
- })
357
- }), /* @__PURE__ */ S("div", {
358
- className: "p-5",
359
- children: [/* @__PURE__ */ S("div", {
360
- className: "grid grid-cols-2 gap-4 mb-5",
361
- children: [
362
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
363
- className: "text-xs text-text-secondary",
364
- children: "Total Orders"
365
- }), /* @__PURE__ */ x("p", {
366
- className: "text-2xl font-bold text-text-primary",
367
- children: w.orders.total
368
- })] }),
369
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
370
- className: "text-xs text-text-secondary",
371
- children: "Avg. Order Value"
372
- }), /* @__PURE__ */ x("p", {
373
- className: "text-2xl font-bold text-text-primary",
374
- children: r(w.orders.averageValue, { minimumFractionDigits: 0 })
375
- })] }),
376
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
377
- className: "text-xs text-text-secondary",
378
- children: "Completed"
379
- }), /* @__PURE__ */ x("p", {
380
- className: "text-xl font-bold text-status-success-text",
381
- children: w.orders.completed
382
- })] }),
383
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
384
- className: "text-xs text-text-secondary",
385
- children: "Cancelled"
386
- }), /* @__PURE__ */ x("p", {
387
- className: "text-xl font-bold text-status-error-text",
388
- children: w.orders.cancelled
389
- })] })
390
- ]
391
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
392
- className: "text-xs text-text-secondary mb-1",
393
- children: "Avg. Preparation Time"
394
- }), /* @__PURE__ */ S("p", {
395
- className: "text-sm font-medium text-text-primary",
396
- children: [w.orders.averagePreparationTime, " minutes"]
397
- })] })]
398
- })]
399
- }), /* @__PURE__ */ S("div", {
400
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
401
- children: [/* @__PURE__ */ x("div", {
402
- className: "border-b border-border-subtle px-5 py-4",
403
- children: /* @__PURE__ */ S("h2", {
404
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
405
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4 text-text-secondary" }), "Popular Times"]
406
- })
407
- }), /* @__PURE__ */ x("div", {
408
- className: "p-5 space-y-2",
409
- children: w.orders.popularTimes.map((e) => {
410
- let n = e.orders / O * 100;
411
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
412
- className: "flex items-center justify-between text-xs mb-0.5",
413
- children: [/* @__PURE__ */ x("span", {
414
- className: "text-text-primary w-14",
415
- children: `${e.hour}:00`
416
- }), /* @__PURE__ */ S("span", {
417
- className: "text-text-secondary",
418
- children: [e.orders, " orders"]
419
- })]
420
- }), /* @__PURE__ */ x("div", {
421
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
422
- children: /* @__PURE__ */ x("div", {
423
- className: t("h-full rounded-full transition-all", e.orders > 25 ? "bg-status-error-bg-subtle/60" : e.orders > 18 ? "bg-status-warning-bg-subtle/60" : "bg-status-success-bg-subtle/60"),
424
- style: { width: `${n}%` }
425
- })
426
- })] }, e.hour);
427
- })
428
- })]
429
- })]
430
- }),
431
- /* @__PURE__ */ S("section", { children: [/* @__PURE__ */ x("h2", {
432
- className: "text-base font-semibold text-text-primary mb-3",
433
- children: "Performance Metrics"
434
- }), /* @__PURE__ */ x("div", {
435
- className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
436
- children: [
437
- {
438
- label: "Acceptance Rate",
439
- value: `${w.performance.acceptanceRate}%`,
440
- icon: g,
441
- color: "text-status-success-text"
442
- },
443
- {
444
- label: "Cancellation Rate",
445
- value: `${w.performance.cancellationRate}%`,
446
- icon: p,
447
- color: "text-status-error-text"
448
- },
449
- {
450
- label: "On-Time Delivery",
451
- value: `${w.performance.onTimeDeliveryRate}%`,
452
- icon: u,
453
- color: "text-accent-blue"
454
- },
455
- {
456
- label: "Average Rating",
457
- value: `${w.performance.averageRating}`,
458
- icon: h,
459
- color: "text-status-warning-text"
460
- }
461
- ].map((e) => {
462
- let n = e.icon;
463
- return /* @__PURE__ */ S("div", {
464
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 bg-gloss-card shadow-pop",
465
- children: [/* @__PURE__ */ S("div", {
466
- className: "flex items-center gap-2 mb-2",
467
- children: [/* @__PURE__ */ x(n, { className: t("h-5 w-5", e.color) }), /* @__PURE__ */ x("span", {
468
- className: "text-xs text-text-secondary",
469
- children: e.label
470
- })]
471
- }), /* @__PURE__ */ x("p", {
472
- className: t("text-2xl font-bold", e.color),
473
- children: e.value
474
- })]
475
- }, e.label);
476
- })
477
- })] }),
478
- /* @__PURE__ */ S("div", {
479
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
480
- children: [/* @__PURE__ */ S("div", {
481
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
482
- children: [
483
- /* @__PURE__ */ x("div", {
484
- className: "border-b border-border-subtle px-5 py-4",
485
- children: /* @__PURE__ */ S("h2", {
486
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
487
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), "Top Selling Offerings"]
488
- })
489
- }),
490
- /* @__PURE__ */ x("div", {
491
- className: "divide-y divide-border",
492
- children: w.offerings.topSelling.map((e, t) => /* @__PURE__ */ S("div", {
493
- className: "flex items-center justify-between px-5 py-3",
494
- children: [/* @__PURE__ */ S("div", {
495
- className: "flex items-center gap-3",
496
- children: [/* @__PURE__ */ x("span", {
497
- className: "flex h-6 w-6 items-center justify-center rounded-full bg-bg-sunken text-xs font-medium text-text-secondary",
498
- children: t + 1
499
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
500
- className: "text-sm font-medium text-text-primary",
501
- children: e.name
502
- }), /* @__PURE__ */ S("p", {
503
- className: "text-xs text-text-secondary",
504
- children: [
505
- e.category,
506
- " | ",
507
- e.quantity,
508
- " sold"
509
- ]
510
- })] })]
511
- }), /* @__PURE__ */ x("span", {
512
- className: "text-sm font-medium text-text-primary",
513
- children: r(e.revenue, { minimumFractionDigits: 0 })
514
- })]
515
- }, e.id))
516
- }),
517
- /* @__PURE__ */ S("div", {
518
- className: "border-t border-border-subtle px-5 py-3",
519
- children: [/* @__PURE__ */ x("p", {
520
- className: "text-xs font-medium text-text-secondary mb-2",
521
- children: "Least Selling"
522
- }), w.offerings.leastSelling.map((e) => /* @__PURE__ */ S("div", {
523
- className: "flex items-center justify-between py-1.5",
524
- children: [/* @__PURE__ */ x("span", {
525
- className: "text-xs text-text-secondary",
526
- children: e.name
527
- }), /* @__PURE__ */ S("span", {
528
- className: "text-xs text-text-secondary",
529
- children: [
530
- e.quantity,
531
- " sold |",
532
- " ",
533
- r(e.revenue, { minimumFractionDigits: 0 })
534
- ]
535
- })]
536
- }, e.id))]
537
- })
538
- ]
539
- }), /* @__PURE__ */ S("div", {
540
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
541
- children: [/* @__PURE__ */ x("div", {
542
- className: "border-b border-border-subtle px-5 py-4",
543
- children: /* @__PURE__ */ S("h2", {
544
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
545
- children: [/* @__PURE__ */ x(c, { className: "h-4 w-4 text-text-secondary" }), "Category Performance"]
546
- })
547
- }), /* @__PURE__ */ x("div", {
548
- className: "p-5 space-y-4",
549
- children: w.offerings.categories.map((e) => {
550
- let t = e.revenue / k * 100;
551
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
552
- className: "flex items-center justify-between text-sm mb-1",
553
- children: [/* @__PURE__ */ x("span", {
554
- className: "text-text-primary",
555
- children: e.category
556
- }), /* @__PURE__ */ S("span", {
557
- className: "text-text-secondary",
558
- children: [
559
- r(e.revenue, { minimumFractionDigits: 0 }),
560
- " (",
561
- e.orders,
562
- " ",
563
- "orders)"
564
- ]
565
- })]
566
- }), /* @__PURE__ */ x("div", {
567
- className: "h-2.5 rounded-full bg-bg-sunken overflow-hidden",
568
- children: /* @__PURE__ */ x("div", {
569
- className: "h-full rounded-full bg-accent-blue-subtle/60",
570
- style: { width: `${t}%` }
571
- })
572
- })] }, e.category);
573
- })
574
- })]
575
- })]
576
- }),
577
- /* @__PURE__ */ S("div", {
578
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
579
- children: [/* @__PURE__ */ S("div", {
580
- className: "lg:col-span-2 rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
581
- children: [/* @__PURE__ */ x("div", {
582
- className: "border-b border-border-subtle px-5 py-4",
583
- children: /* @__PURE__ */ S("h2", {
584
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
585
- children: [/* @__PURE__ */ x(y, { className: "h-4 w-4 text-text-secondary" }), "Customer Overview"]
586
- })
587
- }), /* @__PURE__ */ S("div", {
588
- className: "p-5",
589
- children: [
590
- /* @__PURE__ */ S("div", {
591
- className: "grid grid-cols-2 sm:grid-cols-4 gap-4 mb-5",
592
- children: [
593
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
594
- className: "text-xs text-text-secondary",
595
- children: "Total Customers"
596
- }), /* @__PURE__ */ x("p", {
597
- className: "text-xl font-bold text-text-primary",
598
- children: w.customers.total
599
- })] }),
600
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
601
- className: "text-xs text-text-secondary",
602
- children: "New This Month"
603
- }), /* @__PURE__ */ x("p", {
604
- className: "text-xl font-bold text-accent-blue",
605
- children: w.customers.new
606
- })] }),
607
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
608
- className: "text-xs text-text-secondary",
609
- children: "Returning"
610
- }), /* @__PURE__ */ x("p", {
611
- className: "text-xl font-bold text-status-success-text",
612
- children: w.customers.returning
613
- })] }),
614
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
615
- className: "text-xs text-text-secondary",
616
- children: "Satisfaction"
617
- }), /* @__PURE__ */ S("p", {
618
- className: "text-xl font-bold text-status-warning-text flex items-center gap-1",
619
- children: [/* @__PURE__ */ x(h, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), w.customers.satisfaction.rating]
620
- })] })
621
- ]
622
- }),
623
- /* @__PURE__ */ x("p", {
624
- className: "text-sm font-medium text-text-primary mb-2",
625
- children: "Top Customers"
626
- }),
627
- /* @__PURE__ */ x("div", {
628
- className: "overflow-x-auto",
629
- children: /* @__PURE__ */ S("table", {
630
- className: "w-full text-sm",
631
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
632
- className: "border-b border-border-subtle",
633
- children: [
634
- /* @__PURE__ */ x("th", {
635
- className: "py-2 text-left font-medium text-text-secondary",
636
- children: "#"
637
- }),
638
- /* @__PURE__ */ x("th", {
639
- className: "py-2 text-left font-medium text-text-secondary",
640
- children: "Customer"
641
- }),
642
- /* @__PURE__ */ x("th", {
643
- className: "py-2 text-right font-medium text-text-secondary",
644
- children: "Orders"
645
- }),
646
- /* @__PURE__ */ x("th", {
647
- className: "py-2 text-right font-medium text-text-secondary",
648
- children: "Total Spent"
649
- })
650
- ]
651
- }) }), /* @__PURE__ */ x("tbody", { children: w.customers.topCustomers.map((e, t) => /* @__PURE__ */ S("tr", {
652
- className: "border-b border-border-subtle last:border-0",
653
- children: [
654
- /* @__PURE__ */ x("td", {
655
- className: "py-2.5 text-text-secondary",
656
- children: t + 1
657
- }),
658
- /* @__PURE__ */ x("td", {
659
- className: "py-2.5 font-medium text-text-primary",
660
- children: e.name
661
- }),
662
- /* @__PURE__ */ x("td", {
663
- className: "py-2.5 text-right text-text-primary",
664
- children: e.orders
665
- }),
666
- /* @__PURE__ */ x("td", {
667
- className: "py-2.5 text-right font-medium text-text-primary",
668
- children: r(e.totalSpent, { minimumFractionDigits: 0 })
669
- })
670
- ]
671
- }, e.id)) })]
672
- })
673
- }),
674
- /* @__PURE__ */ x("div", {
675
- className: "mt-4 flex items-center gap-4 text-sm",
676
- children: /* @__PURE__ */ S("div", {
677
- className: "flex items-center gap-1.5",
678
- children: [/* @__PURE__ */ x(_, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ S("span", {
679
- className: "text-text-secondary",
680
- children: [
681
- w.customers.satisfaction.positiveReviews,
682
- "/",
683
- w.customers.satisfaction.reviews,
684
- " positive reviews"
685
- ]
686
- })]
687
- })
688
- })
689
- ]
690
- })]
691
- }), /* @__PURE__ */ S("div", {
692
- className: "space-y-6",
693
- children: [/* @__PURE__ */ S("div", {
694
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
695
- children: [/* @__PURE__ */ x("div", {
696
- className: "border-b border-border-subtle px-5 py-4",
697
- children: /* @__PURE__ */ S("h2", {
698
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
699
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4 text-text-secondary" }), "Peak Hours"]
700
- })
701
- }), /* @__PURE__ */ x("div", {
702
- className: "p-5 space-y-3",
703
- children: w.performance.peakHours.map((e) => {
704
- let n = e.orders / A * 100;
705
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
706
- className: "flex items-center justify-between text-xs mb-1",
707
- children: [/* @__PURE__ */ x("span", {
708
- className: "text-text-primary",
709
- children: e.hour
710
- }), /* @__PURE__ */ S("span", {
711
- className: "text-text-secondary",
712
- children: [e.orders, " orders"]
713
- })]
714
- }), /* @__PURE__ */ x("div", {
715
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
716
- children: /* @__PURE__ */ x("div", {
717
- className: t("h-full rounded-full", e.orders > 28 ? "bg-status-error-bg-subtle/60" : e.orders > 22 ? "bg-status-warning-bg-subtle/60" : "bg-status-success-bg-subtle/60"),
718
- style: { width: `${n}%` }
719
- })
720
- })] }, e.hour);
721
- })
722
- })]
723
- }), /* @__PURE__ */ S("div", {
724
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
725
- children: [/* @__PURE__ */ x("div", {
726
- className: "border-b border-border-subtle px-5 py-4",
727
- children: /* @__PURE__ */ S("h2", {
728
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
729
- children: [/* @__PURE__ */ x(l, { className: "h-4 w-4 text-text-secondary" }), "Peak Days"]
730
- })
731
- }), /* @__PURE__ */ x("div", {
732
- className: "p-5 space-y-3",
733
- children: w.performance.peakDays.map((e) => {
734
- let t = e.orders / j * 100;
735
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
736
- className: "flex items-center justify-between text-xs mb-1",
737
- children: [/* @__PURE__ */ x("span", {
738
- className: "text-text-primary",
739
- children: e.day
740
- }), /* @__PURE__ */ S("span", {
741
- className: "text-text-secondary",
742
- children: [e.orders, " orders"]
743
- })]
744
- }), /* @__PURE__ */ x("div", {
745
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
746
- children: /* @__PURE__ */ x("div", {
747
- className: "h-full rounded-full bg-accent-blue-subtle/60",
748
- style: { width: `${t}%` }
749
- })
750
- })] }, e.day);
751
- })
752
- })]
753
- })]
754
- })]
755
- }),
756
- /* @__PURE__ */ S("div", {
757
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
758
- children: [/* @__PURE__ */ x("div", {
759
- className: "border-b border-border-subtle px-5 py-4",
760
- children: /* @__PURE__ */ S("h2", {
761
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
762
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), "Daily Order Trends"]
763
- })
764
- }), /* @__PURE__ */ x("div", {
765
- className: "overflow-x-auto",
766
- children: /* @__PURE__ */ S("table", {
767
- className: "w-full text-sm",
768
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
769
- className: "border-b border-border-subtle",
770
- children: [
771
- /* @__PURE__ */ x("th", {
772
- className: "px-5 py-2.5 text-left font-medium text-text-secondary",
773
- children: "Date"
774
- }),
775
- /* @__PURE__ */ x("th", {
776
- className: "px-5 py-2.5 text-right font-medium text-text-secondary",
777
- children: "Orders"
778
- }),
779
- /* @__PURE__ */ x("th", {
780
- className: "px-5 py-2.5 text-right font-medium text-text-secondary",
781
- children: "Revenue"
782
- })
783
- ]
784
- }) }), /* @__PURE__ */ x("tbody", { children: i.orderTrends.map((e) => /* @__PURE__ */ S("tr", {
785
- className: "border-b border-border-subtle last:border-0",
786
- children: [
787
- /* @__PURE__ */ x("td", {
788
- className: "px-5 py-2.5 text-text-primary",
789
- children: new Date(e.date).toLocaleDateString("en-IN", {
790
- day: "2-digit",
791
- month: "short"
792
- })
793
- }),
794
- /* @__PURE__ */ x("td", {
795
- className: "px-5 py-2.5 text-right text-text-primary",
796
- children: e.orders
797
- }),
798
- /* @__PURE__ */ x("td", {
799
- className: "px-5 py-2.5 text-right font-medium text-text-primary",
800
- children: r(e.revenue, { minimumFractionDigits: 0 })
801
- })
802
- ]
803
- }, e.date)) })]
804
- })
805
- })]
806
- }),
807
- /* @__PURE__ */ S("div", {
808
- className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
809
- children: [/* @__PURE__ */ x("div", {
810
- className: "border-b border-border-subtle px-5 py-4",
811
- children: /* @__PURE__ */ S("h2", {
812
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
813
- children: [/* @__PURE__ */ x(y, { className: "h-4 w-4 text-text-secondary" }), "Monthly Customer Growth"]
814
- })
815
- }), /* @__PURE__ */ S("div", {
816
- className: "p-5",
817
- children: [/* @__PURE__ */ x("div", {
818
- className: "flex items-end gap-1.5 h-20",
819
- children: i.customerGrowth.map((e) => {
820
- let t = Math.max(...i.customerGrowth.map((e) => e.newCustomers));
821
- return /* @__PURE__ */ x("div", {
822
- className: "flex-1 rounded-t bg-accent-blue-subtle/40 hover:bg-accent-blue-subtle/60 transition-colors cursor-default",
823
- style: { height: `${e.newCustomers / t * 100}%` },
824
- title: `${e.month}: ${e.newCustomers} new customers`
825
- }, e.month);
826
- })
827
- }), /* @__PURE__ */ x("div", {
828
- className: "flex justify-between mt-2 text-xs text-text-secondary",
829
- children: i.customerGrowth.length > 0 && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("span", { children: i.customerGrowth[0].month }), /* @__PURE__ */ x("span", { children: i.customerGrowth[i.customerGrowth.length - 1].month })] })
830
- })]
831
- })]
832
- })
833
- ]
834
- })
835
- });
836
- };
837
- //#endregion
838
- export { T as AnalyticsDashboard };
839
-
840
- //# sourceMappingURL=AnalyticsDashboard.js.map