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