@burdenoff/microfe-labsofscience 2026.626.2 → 2026.629.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 (172) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/labsofscience/LabsOfScienceRoot.js +68 -124
  3. package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
  4. package/dist/labsofscience/LabsOfScienceRoutes.js +61 -185
  5. package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
  6. package/dist/labsofscience/components/QueryStates.js +40 -0
  7. package/dist/labsofscience/components/QueryStates.js.map +1 -0
  8. package/dist/labsofscience/components/StatusBadge.js +40 -23
  9. package/dist/labsofscience/components/StatusBadge.js.map +1 -1
  10. package/dist/labsofscience/context/LabsOfScienceContext.js +22 -30
  11. package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
  12. package/dist/labsofscience/hooks/useLabsOfScienceApi.js +500 -172
  13. package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
  14. package/dist/labsofscience/pages/OverviewPage.js +195 -0
  15. package/dist/labsofscience/pages/OverviewPage.js.map +1 -0
  16. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +162 -0
  17. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -0
  18. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +137 -0
  19. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -0
  20. package/dist/labsofscience/pages/datasets/DatasetsListPage.js +155 -0
  21. package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -0
  22. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +220 -0
  23. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -0
  24. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +170 -0
  25. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -0
  26. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +134 -0
  27. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -0
  28. package/dist/labsofscience/pages/experiments/RunDialogs.js +180 -0
  29. package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -0
  30. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +130 -0
  31. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -0
  32. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +132 -0
  33. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -0
  34. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +126 -0
  35. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -0
  36. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +89 -0
  37. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -0
  38. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +138 -0
  39. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -0
  40. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +211 -0
  41. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -0
  42. package/dist/labsofscience/pages/inventory/InventoryListPage.js +178 -0
  43. package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -0
  44. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +118 -0
  45. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -0
  46. package/dist/labsofscience/pages/notebook/NotebookListPage.js +144 -0
  47. package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -0
  48. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +146 -0
  49. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -0
  50. package/dist/labsofscience/pages/pipelines/PipelinesPage.js +212 -0
  51. package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -0
  52. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +109 -0
  53. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -0
  54. package/dist/labsofscience/pages/projects/ProjectDetailPage.js +174 -0
  55. package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -0
  56. package/dist/labsofscience/pages/projects/ProjectFormDialog.js +169 -0
  57. package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -0
  58. package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -0
  59. package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -0
  60. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +133 -0
  61. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -0
  62. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +151 -0
  63. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -0
  64. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +140 -0
  65. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -0
  66. package/dist/labsofscience/pages/shared/DetailComponents.js +64 -0
  67. package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -0
  68. package/dist/labsofscience/pages/shared/tags.js +16 -0
  69. package/dist/labsofscience/pages/shared/tags.js.map +1 -0
  70. package/dist/labsofscience/store/labsofscienceStore.js +6 -11
  71. package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
  72. package/dist/labsofscience/utils/formatters.js +28 -13
  73. package/dist/labsofscience/utils/formatters.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/labsofscience/components/InvestmentCard.js +0 -98
  76. package/dist/labsofscience/components/InvestmentCard.js.map +0 -1
  77. package/dist/labsofscience/components/RatingDisplay.js +0 -35
  78. package/dist/labsofscience/components/RatingDisplay.js.map +0 -1
  79. package/dist/labsofscience/mocks/data.js +0 -1517
  80. package/dist/labsofscience/mocks/data.js.map +0 -1
  81. package/dist/labsofscience/mocks/users.js +0 -34
  82. package/dist/labsofscience/mocks/users.js.map +0 -1
  83. package/dist/labsofscience/pages/HomePage.js +0 -940
  84. package/dist/labsofscience/pages/HomePage.js.map +0 -1
  85. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +0 -651
  86. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +0 -1
  87. package/dist/labsofscience/pages/admin/AdminDashboard.js +0 -672
  88. package/dist/labsofscience/pages/admin/AdminDashboard.js.map +0 -1
  89. package/dist/labsofscience/pages/admin/AdminFinancialPage.js +0 -427
  90. package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +0 -1
  91. package/dist/labsofscience/pages/admin/AdminOrdersPage.js +0 -665
  92. package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +0 -1
  93. package/dist/labsofscience/pages/admin/AdminProfilePage.js +0 -261
  94. package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +0 -1
  95. package/dist/labsofscience/pages/admin/AdminSettingsPage.js +0 -651
  96. package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +0 -1
  97. package/dist/labsofscience/pages/admin/CartManagementPage.js +0 -874
  98. package/dist/labsofscience/pages/admin/CartManagementPage.js.map +0 -1
  99. package/dist/labsofscience/pages/admin/UserManagementPage.js +0 -898
  100. package/dist/labsofscience/pages/admin/UserManagementPage.js.map +0 -1
  101. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +0 -839
  102. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  103. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +0 -705
  104. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  105. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +0 -791
  106. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  107. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  108. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  109. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +0 -636
  110. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  111. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +0 -911
  112. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  113. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +0 -879
  114. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +0 -1
  115. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +0 -839
  116. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +0 -1
  117. package/dist/labsofscience/pages/common/HelpSupportPage.js +0 -1324
  118. package/dist/labsofscience/pages/common/HelpSupportPage.js.map +0 -1
  119. package/dist/labsofscience/pages/common/NotificationCenterPage.js +0 -672
  120. package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +0 -1
  121. package/dist/labsofscience/pages/common/SettingsPage.js +0 -973
  122. package/dist/labsofscience/pages/common/SettingsPage.js.map +0 -1
  123. package/dist/labsofscience/pages/customer/BookingDetailsPage.js +0 -637
  124. package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +0 -1
  125. package/dist/labsofscience/pages/customer/CartDetailPage.js +0 -653
  126. package/dist/labsofscience/pages/customer/CartDetailPage.js.map +0 -1
  127. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +0 -559
  128. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +0 -1
  129. package/dist/labsofscience/pages/customer/CheckoutPage.js +0 -530
  130. package/dist/labsofscience/pages/customer/CheckoutPage.js.map +0 -1
  131. package/dist/labsofscience/pages/customer/CustomerDashboard.js +0 -531
  132. package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +0 -1
  133. package/dist/labsofscience/pages/customer/CustomerProfilePage.js +0 -658
  134. package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +0 -1
  135. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +0 -633
  136. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +0 -1
  137. package/dist/labsofscience/pages/customer/FavoritesPage.js +0 -484
  138. package/dist/labsofscience/pages/customer/FavoritesPage.js.map +0 -1
  139. package/dist/labsofscience/pages/customer/OrderHistoryPage.js +0 -445
  140. package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +0 -1
  141. package/dist/labsofscience/pages/customer/OrderTrackingPage.js +0 -425
  142. package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +0 -1
  143. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +0 -495
  144. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +0 -1
  145. package/dist/labsofscience/pages/customer/ReviewsPage.js +0 -613
  146. package/dist/labsofscience/pages/customer/ReviewsPage.js.map +0 -1
  147. package/dist/labsofscience/pages/customer/SavedAddressesPage.js +0 -450
  148. package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +0 -1
  149. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +0 -881
  150. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +0 -1
  151. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +0 -946
  152. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  153. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +0 -687
  154. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  155. package/dist/labsofscience/pages/investor/InvestorDashboard.js +0 -455
  156. package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +0 -1
  157. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +0 -406
  158. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  159. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +0 -575
  160. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +0 -1
  161. package/dist/labsofscience/pages/investor/InvestorProfilePage.js +0 -1070
  162. package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +0 -1
  163. package/dist/labsofscience/pages/worker/TaskDetailsPage.js +0 -537
  164. package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +0 -1
  165. package/dist/labsofscience/pages/worker/WorkerDashboard.js +0 -665
  166. package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +0 -1
  167. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +0 -681
  168. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +0 -1
  169. package/dist/labsofscience/pages/worker/WorkerProfilePage.js +0 -692
  170. package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +0 -1
  171. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +0 -588
  172. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,839 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.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, PagePurpose as w } from "@burdenoff/fe-libs/ui";
10
- //#region src/labsofscience/pages/cart-owner/AnalyticsDashboard.tsx
11
- var T = {
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
- }, E = () => {
254
- let { navigateTo: E } = e(), [D, O] = a("week"), k = Math.max(...T.orders.popularTimes.map((e) => e.orders)), A = Math.max(...T.offerings.categories.map((e) => e.revenue)), j = Math.max(...T.performance.peakHours.map((e) => e.orders)), M = Math.max(...T.performance.peakDays.map((e) => e.orders)), N = (e) => `${e > 0 ? "+" : ""}${e}%`;
255
- return /* @__PURE__ */ x(n, {
256
- title: "Analytics Dashboard",
257
- description: "Business performance insights and data",
258
- actions: /* @__PURE__ */ S("div", {
259
- className: "flex items-center gap-2",
260
- children: [/* @__PURE__ */ S("select", {
261
- value: D,
262
- onChange: (e) => O(e.target.value),
263
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
264
- children: [
265
- /* @__PURE__ */ x("option", {
266
- value: "today",
267
- children: "Today"
268
- }),
269
- /* @__PURE__ */ x("option", {
270
- value: "week",
271
- children: "This Week"
272
- }),
273
- /* @__PURE__ */ x("option", {
274
- value: "month",
275
- children: "This Month"
276
- }),
277
- /* @__PURE__ */ x("option", {
278
- value: "year",
279
- children: "This Year"
280
- })
281
- ]
282
- }), /* @__PURE__ */ S("button", {
283
- type: "button",
284
- onClick: () => alert("Export feature coming soon!"),
285
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
286
- children: [/* @__PURE__ */ x(d, { className: "h-4 w-4" }), "Export"]
287
- })]
288
- }),
289
- children: /* @__PURE__ */ S("div", {
290
- className: "space-y-6",
291
- children: [
292
- /* @__PURE__ */ x(w, {
293
- icon: /* @__PURE__ */ x(c, { className: "h-4 w-4" }),
294
- children: "Understand how your cart is really doing. Track revenue across today, the week, month and year, spot your busiest hours and best-selling items, and see who your top customers are — use these insights to decide what to stock, when to open, and where to push offers."
295
- }),
296
- /* @__PURE__ */ S(C, { 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: T.revenue.today,
305
- growth: T.revenue.growth.daily
306
- },
307
- {
308
- label: "This Week",
309
- value: T.revenue.week,
310
- growth: T.revenue.growth.weekly
311
- },
312
- {
313
- label: "This Month",
314
- value: T.revenue.month,
315
- growth: T.revenue.growth.monthly
316
- },
317
- {
318
- label: "This Year",
319
- value: T.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 shadow-sm",
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" }), N(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
- /* @__PURE__ */ S("div", {
347
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
348
- children: [/* @__PURE__ */ S("div", {
349
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
350
- children: [/* @__PURE__ */ x("div", {
351
- className: "border-b border-border-seam px-5 py-4",
352
- children: /* @__PURE__ */ S("h2", {
353
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
354
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
355
- })
356
- }), /* @__PURE__ */ S("div", {
357
- className: "p-5",
358
- children: [/* @__PURE__ */ S("div", {
359
- className: "grid grid-cols-2 gap-4 mb-5",
360
- children: [
361
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
362
- className: "text-xs text-text-secondary",
363
- children: "Total Orders"
364
- }), /* @__PURE__ */ x("p", {
365
- className: "text-2xl font-bold text-text-primary",
366
- children: T.orders.total
367
- })] }),
368
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
369
- className: "text-xs text-text-secondary",
370
- children: "Avg. Order Value"
371
- }), /* @__PURE__ */ x("p", {
372
- className: "text-2xl font-bold text-text-primary",
373
- children: r(T.orders.averageValue, { minimumFractionDigits: 0 })
374
- })] }),
375
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
376
- className: "text-xs text-text-secondary",
377
- children: "Completed"
378
- }), /* @__PURE__ */ x("p", {
379
- className: "text-xl font-bold text-status-success-text",
380
- children: T.orders.completed
381
- })] }),
382
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
383
- className: "text-xs text-text-secondary",
384
- children: "Cancelled"
385
- }), /* @__PURE__ */ x("p", {
386
- className: "text-xl font-bold text-status-error-text",
387
- children: T.orders.cancelled
388
- })] })
389
- ]
390
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
391
- className: "text-xs text-text-secondary mb-1",
392
- children: "Avg. Preparation Time"
393
- }), /* @__PURE__ */ S("p", {
394
- className: "text-sm font-medium text-text-primary",
395
- children: [T.orders.averagePreparationTime, " minutes"]
396
- })] })]
397
- })]
398
- }), /* @__PURE__ */ S("div", {
399
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
400
- children: [/* @__PURE__ */ x("div", {
401
- className: "border-b border-border-seam px-5 py-4",
402
- children: /* @__PURE__ */ S("h2", {
403
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
404
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4 text-text-secondary" }), "Popular Times"]
405
- })
406
- }), /* @__PURE__ */ x("div", {
407
- className: "p-5 space-y-2",
408
- children: T.orders.popularTimes.map((e) => {
409
- let n = e.orders / k * 100;
410
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
411
- className: "flex items-center justify-between text-xs mb-0.5",
412
- children: [/* @__PURE__ */ x("span", {
413
- className: "text-text-primary w-14",
414
- children: `${e.hour}:00`
415
- }), /* @__PURE__ */ S("span", {
416
- className: "text-text-secondary",
417
- children: [e.orders, " orders"]
418
- })]
419
- }), /* @__PURE__ */ x("div", {
420
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
421
- children: /* @__PURE__ */ x("div", {
422
- className: t("h-full rounded-full transition-all", e.orders > 25 ? "bg-status-error-bg-subtle" : e.orders > 18 ? "bg-status-warning-bg-subtle" : "bg-status-success-bg-subtle"),
423
- style: { width: `${n}%` }
424
- })
425
- })] }, e.hour);
426
- })
427
- })]
428
- })]
429
- }),
430
- /* @__PURE__ */ S("section", { children: [/* @__PURE__ */ x("h2", {
431
- className: "text-base font-semibold text-text-primary mb-3",
432
- children: "Performance Metrics"
433
- }), /* @__PURE__ */ x("div", {
434
- className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
435
- children: [
436
- {
437
- label: "Acceptance Rate",
438
- value: `${T.performance.acceptanceRate}%`,
439
- icon: g,
440
- color: "text-status-success-text"
441
- },
442
- {
443
- label: "Cancellation Rate",
444
- value: `${T.performance.cancellationRate}%`,
445
- icon: p,
446
- color: "text-status-error-text"
447
- },
448
- {
449
- label: "On-Time Delivery",
450
- value: `${T.performance.onTimeDeliveryRate}%`,
451
- icon: u,
452
- color: "text-status-info-text"
453
- },
454
- {
455
- label: "Average Rating",
456
- value: `${T.performance.averageRating}`,
457
- icon: h,
458
- color: "text-status-warning-text"
459
- }
460
- ].map((e) => {
461
- let n = e.icon;
462
- return /* @__PURE__ */ S("div", {
463
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 shadow-sm",
464
- children: [/* @__PURE__ */ S("div", {
465
- className: "flex items-center gap-2 mb-2",
466
- children: [/* @__PURE__ */ x(n, { className: t("h-5 w-5", e.color) }), /* @__PURE__ */ x("span", {
467
- className: "text-xs text-text-secondary",
468
- children: e.label
469
- })]
470
- }), /* @__PURE__ */ x("p", {
471
- className: t("text-2xl font-bold", e.color),
472
- children: e.value
473
- })]
474
- }, e.label);
475
- })
476
- })] }),
477
- /* @__PURE__ */ S("div", {
478
- className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
479
- children: [/* @__PURE__ */ S("div", {
480
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
481
- children: [
482
- /* @__PURE__ */ x("div", {
483
- className: "border-b border-border-seam px-5 py-4",
484
- children: /* @__PURE__ */ S("h2", {
485
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
486
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), "Top Selling Offerings"]
487
- })
488
- }),
489
- /* @__PURE__ */ x("div", {
490
- className: "divide-y divide-border",
491
- children: T.offerings.topSelling.map((e, t) => /* @__PURE__ */ S("div", {
492
- className: "flex items-center justify-between px-5 py-3",
493
- children: [/* @__PURE__ */ S("div", {
494
- className: "flex items-center gap-3",
495
- children: [/* @__PURE__ */ x("span", {
496
- className: "flex h-6 w-6 items-center justify-center rounded-full bg-bg-sunken text-xs font-medium text-text-secondary",
497
- children: t + 1
498
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
499
- className: "text-sm font-medium text-text-primary",
500
- children: e.name
501
- }), /* @__PURE__ */ S("p", {
502
- className: "text-xs text-text-secondary",
503
- children: [
504
- e.category,
505
- " | ",
506
- e.quantity,
507
- " sold"
508
- ]
509
- })] })]
510
- }), /* @__PURE__ */ x("span", {
511
- className: "text-sm font-medium text-text-primary",
512
- children: r(e.revenue, { minimumFractionDigits: 0 })
513
- })]
514
- }, e.id))
515
- }),
516
- /* @__PURE__ */ S("div", {
517
- className: "border-t border-border-seam px-5 py-3",
518
- children: [/* @__PURE__ */ x("p", {
519
- className: "text-xs font-medium text-text-secondary mb-2",
520
- children: "Least Selling"
521
- }), T.offerings.leastSelling.map((e) => /* @__PURE__ */ S("div", {
522
- className: "flex items-center justify-between py-1.5",
523
- children: [/* @__PURE__ */ x("span", {
524
- className: "text-xs text-text-secondary",
525
- children: e.name
526
- }), /* @__PURE__ */ S("span", {
527
- className: "text-xs text-text-secondary",
528
- children: [
529
- e.quantity,
530
- " sold |",
531
- " ",
532
- r(e.revenue, { minimumFractionDigits: 0 })
533
- ]
534
- })]
535
- }, e.id))]
536
- })
537
- ]
538
- }), /* @__PURE__ */ S("div", {
539
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
540
- children: [/* @__PURE__ */ x("div", {
541
- className: "border-b border-border-seam px-5 py-4",
542
- children: /* @__PURE__ */ S("h2", {
543
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
544
- children: [/* @__PURE__ */ x(c, { className: "h-4 w-4 text-text-secondary" }), "Category Performance"]
545
- })
546
- }), /* @__PURE__ */ x("div", {
547
- className: "p-5 space-y-4",
548
- children: T.offerings.categories.map((e) => {
549
- let t = e.revenue / A * 100;
550
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
551
- className: "flex items-center justify-between text-sm mb-1",
552
- children: [/* @__PURE__ */ x("span", {
553
- className: "text-text-primary",
554
- children: e.category
555
- }), /* @__PURE__ */ S("span", {
556
- className: "text-text-secondary",
557
- children: [
558
- r(e.revenue, { minimumFractionDigits: 0 }),
559
- " (",
560
- e.orders,
561
- " ",
562
- "orders)"
563
- ]
564
- })]
565
- }), /* @__PURE__ */ x("div", {
566
- className: "h-2.5 rounded-full bg-bg-sunken overflow-hidden",
567
- children: /* @__PURE__ */ x("div", {
568
- className: "h-full rounded-full bg-status-info-bg-subtle",
569
- style: { width: `${t}%` }
570
- })
571
- })] }, e.category);
572
- })
573
- })]
574
- })]
575
- }),
576
- /* @__PURE__ */ S("div", {
577
- className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
578
- children: [/* @__PURE__ */ S("div", {
579
- className: "lg:col-span-2 rounded-lg border border-border-seam bg-bg-surface shadow-sm",
580
- children: [/* @__PURE__ */ x("div", {
581
- className: "border-b border-border-seam px-5 py-4",
582
- children: /* @__PURE__ */ S("h2", {
583
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
584
- children: [/* @__PURE__ */ x(y, { className: "h-4 w-4 text-text-secondary" }), "Customer Overview"]
585
- })
586
- }), /* @__PURE__ */ S("div", {
587
- className: "p-5",
588
- children: [
589
- /* @__PURE__ */ S("div", {
590
- className: "grid grid-cols-2 sm:grid-cols-4 gap-4 mb-5",
591
- children: [
592
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
593
- className: "text-xs text-text-secondary",
594
- children: "Total Customers"
595
- }), /* @__PURE__ */ x("p", {
596
- className: "text-xl font-bold text-text-primary",
597
- children: T.customers.total
598
- })] }),
599
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
600
- className: "text-xs text-text-secondary",
601
- children: "New This Month"
602
- }), /* @__PURE__ */ x("p", {
603
- className: "text-xl font-bold text-status-info-text",
604
- children: T.customers.new
605
- })] }),
606
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
607
- className: "text-xs text-text-secondary",
608
- children: "Returning"
609
- }), /* @__PURE__ */ x("p", {
610
- className: "text-xl font-bold text-status-success-text",
611
- children: T.customers.returning
612
- })] }),
613
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
614
- className: "text-xs text-text-secondary",
615
- children: "Satisfaction"
616
- }), /* @__PURE__ */ S("p", {
617
- className: "text-xl font-bold text-status-warning-text flex items-center gap-1",
618
- children: [/* @__PURE__ */ x(h, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), T.customers.satisfaction.rating]
619
- })] })
620
- ]
621
- }),
622
- /* @__PURE__ */ x("p", {
623
- className: "text-sm font-medium text-text-primary mb-2",
624
- children: "Top Customers"
625
- }),
626
- /* @__PURE__ */ x("div", {
627
- className: "overflow-x-auto",
628
- children: /* @__PURE__ */ S("table", {
629
- className: "w-full text-sm",
630
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
631
- className: "border-b border-border-seam",
632
- children: [
633
- /* @__PURE__ */ x("th", {
634
- className: "py-2 text-left font-medium text-text-secondary",
635
- children: "#"
636
- }),
637
- /* @__PURE__ */ x("th", {
638
- className: "py-2 text-left font-medium text-text-secondary",
639
- children: "Customer"
640
- }),
641
- /* @__PURE__ */ x("th", {
642
- className: "py-2 text-right font-medium text-text-secondary",
643
- children: "Orders"
644
- }),
645
- /* @__PURE__ */ x("th", {
646
- className: "py-2 text-right font-medium text-text-secondary",
647
- children: "Total Spent"
648
- })
649
- ]
650
- }) }), /* @__PURE__ */ x("tbody", { children: T.customers.topCustomers.map((e, t) => /* @__PURE__ */ S("tr", {
651
- className: "border-b border-border-seam last:border-0",
652
- children: [
653
- /* @__PURE__ */ x("td", {
654
- className: "py-2.5 text-text-secondary",
655
- children: t + 1
656
- }),
657
- /* @__PURE__ */ x("td", {
658
- className: "py-2.5 font-medium text-text-primary",
659
- children: e.name
660
- }),
661
- /* @__PURE__ */ x("td", {
662
- className: "py-2.5 text-right text-text-primary",
663
- children: e.orders
664
- }),
665
- /* @__PURE__ */ x("td", {
666
- className: "py-2.5 text-right font-medium text-text-primary",
667
- children: r(e.totalSpent, { minimumFractionDigits: 0 })
668
- })
669
- ]
670
- }, e.id)) })]
671
- })
672
- }),
673
- /* @__PURE__ */ x("div", {
674
- className: "mt-4 flex items-center gap-4 text-sm",
675
- children: /* @__PURE__ */ S("div", {
676
- className: "flex items-center gap-1.5",
677
- children: [/* @__PURE__ */ x(_, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ S("span", {
678
- className: "text-text-secondary",
679
- children: [
680
- T.customers.satisfaction.positiveReviews,
681
- "/",
682
- T.customers.satisfaction.reviews,
683
- " positive reviews"
684
- ]
685
- })]
686
- })
687
- })
688
- ]
689
- })]
690
- }), /* @__PURE__ */ S("div", {
691
- className: "space-y-6",
692
- children: [/* @__PURE__ */ S("div", {
693
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
694
- children: [/* @__PURE__ */ x("div", {
695
- className: "border-b border-border-seam px-5 py-4",
696
- children: /* @__PURE__ */ S("h2", {
697
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
698
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4 text-text-secondary" }), "Peak Hours"]
699
- })
700
- }), /* @__PURE__ */ x("div", {
701
- className: "p-5 space-y-3",
702
- children: T.performance.peakHours.map((e) => {
703
- let n = e.orders / j * 100;
704
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
705
- className: "flex items-center justify-between text-xs mb-1",
706
- children: [/* @__PURE__ */ x("span", {
707
- className: "text-text-primary",
708
- children: e.hour
709
- }), /* @__PURE__ */ S("span", {
710
- className: "text-text-secondary",
711
- children: [e.orders, " orders"]
712
- })]
713
- }), /* @__PURE__ */ x("div", {
714
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
715
- children: /* @__PURE__ */ x("div", {
716
- className: t("h-full rounded-full", e.orders > 28 ? "bg-status-error-bg-subtle" : e.orders > 22 ? "bg-status-warning-bg-subtle" : "bg-status-success-bg-subtle"),
717
- style: { width: `${n}%` }
718
- })
719
- })] }, e.hour);
720
- })
721
- })]
722
- }), /* @__PURE__ */ S("div", {
723
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
724
- children: [/* @__PURE__ */ x("div", {
725
- className: "border-b border-border-seam px-5 py-4",
726
- children: /* @__PURE__ */ S("h2", {
727
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
728
- children: [/* @__PURE__ */ x(l, { className: "h-4 w-4 text-text-secondary" }), "Peak Days"]
729
- })
730
- }), /* @__PURE__ */ x("div", {
731
- className: "p-5 space-y-3",
732
- children: T.performance.peakDays.map((e) => {
733
- let t = e.orders / M * 100;
734
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
735
- className: "flex items-center justify-between text-xs mb-1",
736
- children: [/* @__PURE__ */ x("span", {
737
- className: "text-text-primary",
738
- children: e.day
739
- }), /* @__PURE__ */ S("span", {
740
- className: "text-text-secondary",
741
- children: [e.orders, " orders"]
742
- })]
743
- }), /* @__PURE__ */ x("div", {
744
- className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
745
- children: /* @__PURE__ */ x("div", {
746
- className: "h-full rounded-full bg-status-info-bg-subtle",
747
- style: { width: `${t}%` }
748
- })
749
- })] }, e.day);
750
- })
751
- })]
752
- })]
753
- })]
754
- }),
755
- /* @__PURE__ */ S("div", {
756
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
757
- children: [/* @__PURE__ */ x("div", {
758
- className: "border-b border-border-seam px-5 py-4",
759
- children: /* @__PURE__ */ S("h2", {
760
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
761
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), "Daily Order Trends"]
762
- })
763
- }), /* @__PURE__ */ x("div", {
764
- className: "overflow-x-auto",
765
- children: /* @__PURE__ */ S("table", {
766
- className: "w-full text-sm",
767
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
768
- className: "border-b border-border-seam",
769
- children: [
770
- /* @__PURE__ */ x("th", {
771
- className: "px-5 py-2.5 text-left font-medium text-text-secondary",
772
- children: "Date"
773
- }),
774
- /* @__PURE__ */ x("th", {
775
- className: "px-5 py-2.5 text-right font-medium text-text-secondary",
776
- children: "Orders"
777
- }),
778
- /* @__PURE__ */ x("th", {
779
- className: "px-5 py-2.5 text-right font-medium text-text-secondary",
780
- children: "Revenue"
781
- })
782
- ]
783
- }) }), /* @__PURE__ */ x("tbody", { children: i.orderTrends.map((e) => /* @__PURE__ */ S("tr", {
784
- className: "border-b border-border-seam last:border-0",
785
- children: [
786
- /* @__PURE__ */ x("td", {
787
- className: "px-5 py-2.5 text-text-primary",
788
- children: new Date(e.date).toLocaleDateString("en-IN", {
789
- day: "2-digit",
790
- month: "short"
791
- })
792
- }),
793
- /* @__PURE__ */ x("td", {
794
- className: "px-5 py-2.5 text-right text-text-primary",
795
- children: e.orders
796
- }),
797
- /* @__PURE__ */ x("td", {
798
- className: "px-5 py-2.5 text-right font-medium text-text-primary",
799
- children: r(e.revenue, { minimumFractionDigits: 0 })
800
- })
801
- ]
802
- }, e.date)) })]
803
- })
804
- })]
805
- }),
806
- /* @__PURE__ */ S("div", {
807
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm",
808
- children: [/* @__PURE__ */ x("div", {
809
- className: "border-b border-border-seam px-5 py-4",
810
- children: /* @__PURE__ */ S("h2", {
811
- className: "text-base font-semibold text-text-primary flex items-center gap-2",
812
- children: [/* @__PURE__ */ x(y, { className: "h-4 w-4 text-text-secondary" }), "Monthly Customer Growth"]
813
- })
814
- }), /* @__PURE__ */ S("div", {
815
- className: "p-5",
816
- children: [/* @__PURE__ */ x("div", {
817
- className: "flex items-end gap-1.5 h-20",
818
- children: i.customerGrowth.map((e) => {
819
- let t = Math.max(...i.customerGrowth.map((e) => e.newCustomers));
820
- return /* @__PURE__ */ x("div", {
821
- className: "flex-1 rounded-t bg-status-info-bg-subtle hover:bg-status-info-bg-subtle transition-colors cursor-default",
822
- style: { height: `${e.newCustomers / t * 100}%` },
823
- title: `${e.month}: ${e.newCustomers} new customers`
824
- }, e.month);
825
- })
826
- }), /* @__PURE__ */ x("div", {
827
- className: "flex justify-between mt-2 text-xs text-text-secondary",
828
- 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 })] })
829
- })]
830
- })]
831
- })
832
- ]
833
- })
834
- });
835
- };
836
- //#endregion
837
- export { E as AnalyticsDashboard };
838
-
839
- //# sourceMappingURL=AnalyticsDashboard.js.map