@burdenoff/microfe-labsofscience 2026.626.1 → 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 (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,940 +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 { MetricsCard as r } from "../components/MetricsCard.js";
5
- import { StatusBadge as i } from "../components/StatusBadge.js";
6
- import { EmptyState as a } from "../components/EmptyState.js";
7
- import { useLabsOfScienceApi as o } from "../hooks/useLabsOfScienceApi.js";
8
- import { formatCurrency as s, formatDistance as ee, formatRelativeTime as c } from "../utils/formatters.js";
9
- import { useCallback as l, useMemo as u, useState as d } from "react";
10
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { Activity as p, AlertCircle as m, ArrowRight as h, BadgeCheck as g, BarChart3 as _, CheckCircle2 as v, ChefHat as y, ClipboardList as b, Clock as x, FileText as S, GraduationCap as C, HandCoins as w, Heart as T, Home as E, IndianRupee as D, LayoutDashboard as O, Loader2 as k, MapPin as A, Package as j, Scissors as M, Search as N, Settings as P, Shirt as F, ShoppingBag as I, ShoppingCart as L, Sparkles as R, Star as z, Store as B, TrendingUp as V, Truck as H, Users as U, Wallet as W, Wrench as G } from "lucide-react";
12
- import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
13
- import { EmphasisPanel as Y, GlassCard as X, GradientText as Z, PagePurpose as Q, ShowMore as te } from "@burdenoff/fe-libs/ui";
14
- //#region src/labsofscience/pages/HomePage.tsx
15
- var $ = {
16
- customer: [
17
- {
18
- label: "Discover Services",
19
- description: "Browse carts near you",
20
- icon: /* @__PURE__ */ q(N, { className: "h-5 w-5" }),
21
- path: "/customer/carts",
22
- color: "bg-status-info-bg-subtle text-status-info-text"
23
- },
24
- {
25
- label: "My Orders",
26
- description: "Track your orders",
27
- icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
28
- path: "/customer/orders",
29
- color: "bg-status-success-bg-subtle text-status-success-text"
30
- },
31
- {
32
- label: "Favorites",
33
- description: "Your saved carts",
34
- icon: /* @__PURE__ */ q(T, { className: "h-5 w-5" }),
35
- path: "/customer/favorites",
36
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
37
- },
38
- {
39
- label: "Settings",
40
- description: "Manage preferences",
41
- icon: /* @__PURE__ */ q(P, { className: "h-5 w-5" }),
42
- path: "/settings",
43
- color: "bg-bg-sunken text-text-secondary"
44
- }
45
- ],
46
- cart_owner: [
47
- {
48
- label: "My Cart",
49
- description: "Manage your cart",
50
- icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
51
- path: "/owner/dashboard",
52
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
53
- },
54
- {
55
- label: "Orders",
56
- description: "Incoming orders",
57
- icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
58
- path: "/owner/orders",
59
- color: "bg-status-info-bg-subtle text-status-info-text"
60
- },
61
- {
62
- label: "Analytics",
63
- description: "Revenue & insights",
64
- icon: /* @__PURE__ */ q(_, { className: "h-5 w-5" }),
65
- path: "/owner/analytics",
66
- color: "bg-status-success-bg-subtle text-status-success-text"
67
- },
68
- {
69
- label: "Staff",
70
- description: "Manage workers",
71
- icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
72
- path: "/owner/staff",
73
- color: "bg-status-warning-bg-subtle text-status-warning-text"
74
- }
75
- ],
76
- worker: [
77
- {
78
- label: "My Tasks",
79
- description: "View assigned tasks",
80
- icon: /* @__PURE__ */ q(b, { className: "h-5 w-5" }),
81
- path: "/worker/dashboard",
82
- color: "bg-status-warning-bg-subtle text-status-warning-text"
83
- },
84
- {
85
- label: "Schedule",
86
- description: "View shifts",
87
- icon: /* @__PURE__ */ q(x, { className: "h-5 w-5" }),
88
- path: "/worker/schedule",
89
- color: "bg-status-info-bg-subtle text-status-info-text"
90
- },
91
- {
92
- label: "Earnings",
93
- description: "Track pay",
94
- icon: /* @__PURE__ */ q(W, { className: "h-5 w-5" }),
95
- path: "/worker/earnings",
96
- color: "bg-status-success-bg-subtle text-status-success-text"
97
- },
98
- {
99
- label: "Performance",
100
- description: "Ratings & stats",
101
- icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
102
- path: "/worker/performance",
103
- color: "bg-status-warning-bg-subtle text-status-warning-text"
104
- }
105
- ],
106
- investor: [
107
- {
108
- label: "Portfolio",
109
- description: "Your investments",
110
- icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
111
- path: "/investor/dashboard",
112
- color: "bg-status-success-bg-subtle text-status-success-text"
113
- },
114
- {
115
- label: "Opportunities",
116
- description: "New investments",
117
- icon: /* @__PURE__ */ q(w, { className: "h-5 w-5" }),
118
- path: "/investor/opportunities",
119
- color: "bg-status-info-bg-subtle text-status-info-text"
120
- },
121
- {
122
- label: "Returns",
123
- description: "Earnings history",
124
- icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
125
- path: "/investor/returns",
126
- color: "bg-status-success-bg-subtle text-status-success-text"
127
- },
128
- {
129
- label: "Reports",
130
- description: "Performance reports",
131
- icon: /* @__PURE__ */ q(S, { className: "h-5 w-5" }),
132
- path: "/investor/reports",
133
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
134
- }
135
- ],
136
- admin: [
137
- {
138
- label: "Dashboard",
139
- description: "Platform overview",
140
- icon: /* @__PURE__ */ q(O, { className: "h-5 w-5" }),
141
- path: "/admin/dashboard",
142
- color: "bg-status-error-bg-subtle text-status-error-text"
143
- },
144
- {
145
- label: "Users",
146
- description: "Manage accounts",
147
- icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
148
- path: "/admin/users",
149
- color: "bg-status-info-bg-subtle text-status-info-text"
150
- },
151
- {
152
- label: "Carts",
153
- description: "Approve & manage",
154
- icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
155
- path: "/admin/carts",
156
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
157
- },
158
- {
159
- label: "Analytics",
160
- description: "Revenue reports",
161
- icon: /* @__PURE__ */ q(_, { className: "h-5 w-5" }),
162
- path: "/admin/analytics",
163
- color: "bg-status-success-bg-subtle text-status-success-text"
164
- }
165
- ]
166
- };
167
- function ne(e, t, n) {
168
- switch (e) {
169
- case "customer": return [
170
- {
171
- icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
172
- value: t.length.toString(),
173
- label: "Total Orders",
174
- trend: "up",
175
- trendValue: "+2 this week"
176
- },
177
- {
178
- icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
179
- value: (n?.activeProviders ?? 0).toString(),
180
- label: "Nearby Providers",
181
- trend: "up",
182
- trendValue: "+3"
183
- },
184
- {
185
- icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
186
- value: (n?.avgRating ?? 0).toFixed(1),
187
- label: "Avg. Rating",
188
- trend: "up",
189
- trendValue: "+0.1"
190
- },
191
- {
192
- icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
193
- value: s(t.reduce((e, t) => e + t.total, 0), { minimumFractionDigits: 0 }),
194
- label: "Total Spent",
195
- trend: "neutral",
196
- trendValue: ""
197
- }
198
- ];
199
- case "cart_owner": return [
200
- {
201
- icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
202
- value: "48",
203
- label: "Orders Today",
204
- trend: "up",
205
- trendValue: "+12%"
206
- },
207
- {
208
- icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
209
- value: s(12850, { minimumFractionDigits: 0 }),
210
- label: "Today's Revenue",
211
- trend: "up",
212
- trendValue: "+8%"
213
- },
214
- {
215
- icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
216
- value: "4.6",
217
- label: "Cart Rating",
218
- trend: "up",
219
- trendValue: "+0.2"
220
- },
221
- {
222
- icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
223
- value: "5",
224
- label: "Active Staff",
225
- trend: "neutral",
226
- trendValue: ""
227
- }
228
- ];
229
- case "worker": return [
230
- {
231
- icon: /* @__PURE__ */ q(b, { className: "h-5 w-5" }),
232
- value: "5",
233
- label: "Tasks Today",
234
- trend: "up",
235
- trendValue: "+2"
236
- },
237
- {
238
- icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
239
- value: s(425, { minimumFractionDigits: 0 }),
240
- label: "Today's Earnings",
241
- trend: "up",
242
- trendValue: "+15%"
243
- },
244
- {
245
- icon: /* @__PURE__ */ q(z, { className: "h-5 w-5" }),
246
- value: "4.7",
247
- label: "Rating",
248
- trend: "up",
249
- trendValue: "+0.1"
250
- },
251
- {
252
- icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" }),
253
- value: "96.8%",
254
- label: "Completion Rate",
255
- trend: "up",
256
- trendValue: "+0.5%"
257
- }
258
- ];
259
- case "investor": return [
260
- {
261
- icon: /* @__PURE__ */ q(V, { className: "h-5 w-5" }),
262
- value: "3",
263
- label: "Active Investments",
264
- trend: "up",
265
- trendValue: "+1"
266
- },
267
- {
268
- icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
269
- value: s(45e4, { minimumFractionDigits: 0 }),
270
- label: "Total Invested",
271
- trend: "up",
272
- trendValue: ""
273
- },
274
- {
275
- icon: /* @__PURE__ */ q(w, { className: "h-5 w-5" }),
276
- value: "16.5%",
277
- label: "Avg. Returns",
278
- trend: "up",
279
- trendValue: "+2.1%"
280
- },
281
- {
282
- icon: /* @__PURE__ */ q(_, { className: "h-5 w-5" }),
283
- value: s(74250, { minimumFractionDigits: 0 }),
284
- label: "Total Returns",
285
- trend: "up",
286
- trendValue: "+8.5%"
287
- }
288
- ];
289
- default: return [
290
- {
291
- icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" }),
292
- value: (n?.activeCustomers ?? 0).toLocaleString("en-IN"),
293
- label: "Active Customers",
294
- trend: "up",
295
- trendValue: "+50"
296
- },
297
- {
298
- icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" }),
299
- value: (n?.activeProviders ?? 0).toString(),
300
- label: "Service Providers",
301
- trend: "up",
302
- trendValue: "+3"
303
- },
304
- {
305
- icon: /* @__PURE__ */ q(I, { className: "h-5 w-5" }),
306
- value: (n?.totalOrders ?? 0).toLocaleString("en-IN"),
307
- label: "Total Orders",
308
- trend: "up",
309
- trendValue: "+12%"
310
- },
311
- {
312
- icon: /* @__PURE__ */ q(D, { className: "h-5 w-5" }),
313
- value: s(n?.totalRevenue ?? 0, { minimumFractionDigits: 0 }),
314
- label: "Total Revenue",
315
- trend: "up",
316
- trendValue: "+8.5%"
317
- }
318
- ];
319
- }
320
- }
321
- var re = [
322
- {
323
- label: "Food & Beverage",
324
- icon: /* @__PURE__ */ q(y, { className: "h-6 w-6" }),
325
- color: "bg-status-warning-bg-subtle text-status-warning-text"
326
- },
327
- {
328
- label: "Personal Care & Beauty",
329
- icon: /* @__PURE__ */ q(M, { className: "h-6 w-6" }),
330
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
331
- },
332
- {
333
- label: "Repair & Maintenance",
334
- icon: /* @__PURE__ */ q(G, { className: "h-6 w-6" }),
335
- color: "bg-status-info-bg-subtle text-status-info-text"
336
- },
337
- {
338
- label: "Home Services",
339
- icon: /* @__PURE__ */ q(E, { className: "h-6 w-6" }),
340
- color: "bg-status-success-bg-subtle text-status-success-text"
341
- },
342
- {
343
- label: "Clothing & Fashion",
344
- icon: /* @__PURE__ */ q(F, { className: "h-6 w-6" }),
345
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
346
- },
347
- {
348
- label: "Health & Wellness",
349
- icon: /* @__PURE__ */ q(T, { className: "h-6 w-6" }),
350
- color: "bg-status-error-bg-subtle text-status-error-text"
351
- },
352
- {
353
- label: "Education & Skills",
354
- icon: /* @__PURE__ */ q(C, { className: "h-6 w-6" }),
355
- color: "bg-status-warning-bg-subtle text-status-warning-text"
356
- },
357
- {
358
- label: "Retail & Merchandise",
359
- icon: /* @__PURE__ */ q(j, { className: "h-6 w-6" }),
360
- color: "bg-status-info-bg-subtle text-status-info-text"
361
- },
362
- {
363
- label: "Grocery & Essentials",
364
- icon: /* @__PURE__ */ q(L, { className: "h-6 w-6" }),
365
- color: "bg-status-success-bg-subtle text-status-success-text"
366
- }
367
- ], ie = [
368
- {
369
- step: 1,
370
- title: "Browse Services",
371
- description: "Discover local service providers and carts near you.",
372
- icon: /* @__PURE__ */ q(N, { className: "h-6 w-6" })
373
- },
374
- {
375
- step: 2,
376
- title: "Place an Order",
377
- description: "Select items or services and place your order seamlessly.",
378
- icon: /* @__PURE__ */ q(I, { className: "h-6 w-6" })
379
- },
380
- {
381
- step: 3,
382
- title: "Track in Real-time",
383
- description: "Get live updates on your order from confirmation to delivery.",
384
- icon: /* @__PURE__ */ q(H, { className: "h-6 w-6" })
385
- },
386
- {
387
- step: 4,
388
- title: "Rate & Review",
389
- description: "Share your experience and help others find great services.",
390
- icon: /* @__PURE__ */ q(z, { className: "h-6 w-6" })
391
- }
392
- ], ae = [
393
- {
394
- id: "ha-1",
395
- description: "New order placed at Dosa Express",
396
- time: "2 mins ago",
397
- type: "order"
398
- },
399
- {
400
- id: "ha-2",
401
- description: "Quick Cuts Salon received a new review",
402
- time: "15 mins ago",
403
- type: "review"
404
- },
405
- {
406
- id: "ha-3",
407
- description: "Investment opportunity funded: Spotless Cleaning",
408
- time: "1 hour ago",
409
- type: "investment"
410
- },
411
- {
412
- id: "ha-4",
413
- description: "New cart registered: Gadget Zone Brigade",
414
- time: "3 hours ago",
415
- type: "cart"
416
- },
417
- {
418
- id: "ha-5",
419
- description: "Order delivered: Fix-It Mobile Repair",
420
- time: "5 hours ago",
421
- type: "order"
422
- }
423
- ], oe = [
424
- {
425
- label: "Service Providers",
426
- value: "21+",
427
- icon: /* @__PURE__ */ q(B, { className: "h-5 w-5" })
428
- },
429
- {
430
- label: "Categories",
431
- value: "9",
432
- icon: /* @__PURE__ */ q(j, { className: "h-5 w-5" })
433
- },
434
- {
435
- label: "Happy Customers",
436
- value: "534+",
437
- icon: /* @__PURE__ */ q(U, { className: "h-5 w-5" })
438
- },
439
- {
440
- label: "Orders Completed",
441
- value: "1,247+",
442
- icon: /* @__PURE__ */ q(v, { className: "h-5 w-5" })
443
- }
444
- ];
445
- function se() {
446
- let { navigateTo: _, currentUser: v } = e(), { t: y } = f(), [b, S] = d(""), { providers: C, orders: w, dashboardStats: T } = o(), E = l((e, t) => {
447
- let n = y(e);
448
- return n === e ? t : n;
449
- }, [y]), O = v?.firstName ?? v?.name ?? "there", j = v?.role ?? "customer", M = {
450
- customer: E("labsofscience.home.role.customer", "Customer"),
451
- cart_owner: E("labsofscience.home.role.cartOwner", "Cart Owner"),
452
- worker: E("labsofscience.home.role.worker", "Worker"),
453
- investor: E("labsofscience.home.role.investor", "Investor"),
454
- admin: E("labsofscience.home.role.admin", "Administrator")
455
- }, P = {
456
- customer: E("labsofscience.home.greeting.customer", "Discover amazing services near you"),
457
- cart_owner: E("labsofscience.home.greeting.cartOwner", "Manage your business and grow"),
458
- worker: E("labsofscience.home.greeting.worker", "Check your tasks and earnings"),
459
- investor: E("labsofscience.home.greeting.investor", "Track your investments and returns"),
460
- admin: E("labsofscience.home.greeting.admin", "Monitor and manage the platform")
461
- }, F = $[j] ?? $.customer, I = ne(j, w.data ?? [], T.data), L = u(() => {
462
- let e = (C.data ?? []).filter((e) => e.isOpen);
463
- if (b) {
464
- let t = b.toLowerCase();
465
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
466
- }
467
- return e.sort((e, t) => t.rating - e.rating).slice(0, 6);
468
- }, [C.data, b]), B = u(() => [...w.data ?? []].sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime()).slice(0, 3), [w.data]), V = {
469
- order: "text-status-info-text",
470
- review: "text-status-warning-text",
471
- investment: "text-status-success-text",
472
- cart: "text-accent-purple"
473
- }, H = (w.data ?? []).length === 0 && !w.isLoading, U = C.isLoading || w.isLoading || T.isLoading, W = C.isError || w.isError || T.isError;
474
- return U ? /* @__PURE__ */ q(n, {
475
- title: E("labsofscience.common.loading", "Loading..."),
476
- children: /* @__PURE__ */ q("div", {
477
- className: "flex h-[60vh] items-center justify-center",
478
- children: /* @__PURE__ */ q(k, { className: "h-8 w-8 animate-spin text-primary" })
479
- })
480
- }) : W ? /* @__PURE__ */ q(n, {
481
- title: E("labsofscience.common.error", "Error"),
482
- children: /* @__PURE__ */ J("div", {
483
- className: "flex h-[60vh] flex-col items-center justify-center gap-4",
484
- children: [
485
- /* @__PURE__ */ q(m, { className: "h-12 w-12 text-status-error-text" }),
486
- /* @__PURE__ */ q("h2", {
487
- className: "text-xl font-semibold",
488
- children: E("labsofscience.common.errorLoading", "Error loading data")
489
- }),
490
- /* @__PURE__ */ q("p", {
491
- className: "text-text-secondary",
492
- children: E("labsofscience.common.tryAgain", "Please try again later.")
493
- })
494
- ]
495
- })
496
- }) : /* @__PURE__ */ J(n, {
497
- hero: !0,
498
- title: /* @__PURE__ */ J(K, { children: [
499
- E("labsofscience.home.hello", "Hello"),
500
- ",",
501
- " ",
502
- /* @__PURE__ */ q(Z, { children: O }),
503
- "!"
504
- ] }),
505
- description: P[j],
506
- children: [
507
- /* @__PURE__ */ q(Q, {
508
- icon: /* @__PURE__ */ q(R, { className: "h-4 w-4" }),
509
- className: "mb-6",
510
- children: E("labsofscience.home.purpose", "Your starting point on the LabsOfScience marketplace. Search and discover local carts and services, jump to the actions that matter for your role, and keep an eye on your key numbers and recent activity — everything you need is one tap from here.")
511
- }),
512
- H && /* @__PURE__ */ q("section", {
513
- className: "mb-6 rounded-xl border border-border-seam bg-gradient-to-r from-primary/5 via-primary/10 to-primary/5 p-6",
514
- children: /* @__PURE__ */ J("div", {
515
- className: "flex items-start gap-4",
516
- children: [/* @__PURE__ */ q("div", {
517
- className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10",
518
- children: /* @__PURE__ */ q(R, { className: "h-6 w-6 text-primary" })
519
- }), /* @__PURE__ */ J("div", {
520
- className: "flex-1",
521
- children: [
522
- /* @__PURE__ */ q("h2", {
523
- className: "text-lg font-semibold text-text-primary",
524
- children: E("labsofscience.home.welcomeTitle", "Welcome to LabsOfScience!")
525
- }),
526
- /* @__PURE__ */ q("p", {
527
- className: "mt-1 text-sm text-text-secondary",
528
- children: E("labsofscience.home.welcomeDescription", "Your local services marketplace. Start by exploring service providers near you or browse categories to find what you need.")
529
- }),
530
- /* @__PURE__ */ J("button", {
531
- type: "button",
532
- onClick: () => _("/customer/carts"),
533
- className: "mt-3 inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
534
- children: [/* @__PURE__ */ q(N, { className: "h-4 w-4" }), E("labsofscience.home.exploreServices", "Explore Services")]
535
- })
536
- ]
537
- })]
538
- })
539
- }),
540
- /* @__PURE__ */ q(Y, {
541
- className: "mb-6",
542
- children: /* @__PURE__ */ J("div", {
543
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
544
- children: [/* @__PURE__ */ J("div", { children: [
545
- /* @__PURE__ */ q("div", {
546
- className: "flex items-center gap-2 mb-1",
547
- children: /* @__PURE__ */ J("span", {
548
- className: "inline-flex items-center rounded-full bg-action-primary-bg/10 px-2.5 py-0.5 text-xs font-medium text-primary",
549
- children: [/* @__PURE__ */ q(g, { className: "mr-1 h-3 w-3" }), M[j]]
550
- })
551
- }),
552
- /* @__PURE__ */ J("h2", {
553
- className: "text-xl font-bold text-text-primary",
554
- children: [
555
- E("labsofscience.home.good", "Good"),
556
- " ",
557
- (/* @__PURE__ */ new Date()).getHours() < 12 ? E("labsofscience.home.time.morning", "morning") : (/* @__PURE__ */ new Date()).getHours() < 17 ? E("labsofscience.home.time.afternoon", "afternoon") : E("labsofscience.home.time.evening", "evening"),
558
- ", ",
559
- O
560
- ]
561
- }),
562
- /* @__PURE__ */ q("p", {
563
- className: "mt-1 text-sm text-text-secondary",
564
- children: P[j]
565
- })
566
- ] }), /* @__PURE__ */ J("div", {
567
- className: "relative w-full sm:w-72",
568
- children: [/* @__PURE__ */ q(N, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ q("input", {
569
- type: "text",
570
- placeholder: E("labsofscience.home.searchPlaceholder", "Search services, carts..."),
571
- value: b,
572
- onChange: (e) => S(e.target.value),
573
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2.5 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
574
- })]
575
- })]
576
- })
577
- }),
578
- /* @__PURE__ */ J("section", {
579
- className: "mb-8",
580
- children: [/* @__PURE__ */ q("h2", {
581
- className: "text-lg font-semibold text-text-primary mb-4",
582
- children: E("labsofscience.home.quickStats", "Quick Stats")
583
- }), /* @__PURE__ */ q("div", {
584
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
585
- children: I.map((e, t) => /* @__PURE__ */ q(r, {
586
- icon: e.icon,
587
- value: e.value,
588
- label: e.label,
589
- trend: e.trend,
590
- trendValue: e.trendValue,
591
- featured: t === 0
592
- }, e.label))
593
- })]
594
- }),
595
- /* @__PURE__ */ J("section", {
596
- className: "mb-8",
597
- children: [/* @__PURE__ */ q("h2", {
598
- className: "text-lg font-semibold text-text-primary mb-4",
599
- children: E("labsofscience.home.quickActions", "Quick Actions")
600
- }), /* @__PURE__ */ q("div", {
601
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
602
- children: F.map((e) => /* @__PURE__ */ J("button", {
603
- type: "button",
604
- onClick: () => _(e.path),
605
- className: t("flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4 text-left shadow-sm transition-all", "hover:border-accent-foreground/20 hover:shadow-md"),
606
- children: [
607
- /* @__PURE__ */ q("div", {
608
- className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg", e.color),
609
- children: e.icon
610
- }),
611
- /* @__PURE__ */ J("div", {
612
- className: "min-w-0 flex-1",
613
- children: [/* @__PURE__ */ q("p", {
614
- className: "text-sm font-semibold text-text-primary",
615
- children: e.label
616
- }), /* @__PURE__ */ q("p", {
617
- className: "mt-0.5 text-xs text-text-secondary",
618
- children: e.description
619
- })]
620
- }),
621
- /* @__PURE__ */ q(h, { className: "h-4 w-4 text-text-secondary shrink-0 mt-1" })
622
- ]
623
- }, e.label))
624
- })]
625
- }),
626
- /* @__PURE__ */ J("section", {
627
- className: "mb-8",
628
- children: [/* @__PURE__ */ J("div", {
629
- className: "flex items-center justify-between mb-4",
630
- children: [/* @__PURE__ */ q("h2", {
631
- className: "text-lg font-semibold text-text-primary",
632
- children: b ? E("labsofscience.home.searchResults", "Search Results") : E("labsofscience.home.featuredCarts", "Featured Carts")
633
- }), /* @__PURE__ */ J("button", {
634
- type: "button",
635
- onClick: () => _("/customer/carts"),
636
- className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
637
- children: [
638
- E("labsofscience.common.viewAll", "View All"),
639
- " ",
640
- /* @__PURE__ */ q(h, { className: "h-3.5 w-3.5" })
641
- ]
642
- })]
643
- }), L.length === 0 ? /* @__PURE__ */ q(a, {
644
- illustration: b ? "empty-search" : "empty-data",
645
- title: E("labsofscience.home.noCartsFound", "No carts found"),
646
- description: E("labsofscience.home.noCartsDescription", "Try adjusting your search or browse all categories"),
647
- action: /* @__PURE__ */ q("button", {
648
- type: "button",
649
- onClick: () => S(""),
650
- className: "rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
651
- children: E("labsofscience.home.clearSearch", "Clear Search")
652
- })
653
- }) : /* @__PURE__ */ q("div", {
654
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
655
- children: L.map((e) => /* @__PURE__ */ J("div", {
656
- role: "button",
657
- tabIndex: 0,
658
- onClick: () => _(`/customer/cart/${e.id}`),
659
- onKeyDown: (t) => {
660
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), _(`/customer/cart/${e.id}`));
661
- },
662
- className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-accent-foreground/20 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
663
- children: [/* @__PURE__ */ J("div", {
664
- className: "relative h-40 bg-bg-sunken",
665
- children: [
666
- /* @__PURE__ */ q("img", {
667
- src: e.image,
668
- alt: e.name,
669
- className: "h-full w-full object-cover",
670
- loading: "lazy"
671
- }),
672
- /* @__PURE__ */ q("div", {
673
- className: "absolute top-2 right-2",
674
- children: /* @__PURE__ */ q(i, { status: e.isOpen ? "open" : "closed" })
675
- }),
676
- e.isVerified && /* @__PURE__ */ q("div", {
677
- className: "absolute top-2 left-2",
678
- children: /* @__PURE__ */ J("span", {
679
- className: "inline-flex items-center gap-1 rounded-full bg-status-info-bg px-2 py-0.5 text-xs font-medium text-status-info-text backdrop-blur-sm",
680
- children: [
681
- /* @__PURE__ */ q(g, { className: "h-3 w-3" }),
682
- " ",
683
- E("labsofscience.home.verified", "Verified")
684
- ]
685
- })
686
- }),
687
- /* @__PURE__ */ q("div", {
688
- className: "absolute bottom-2 right-2",
689
- children: /* @__PURE__ */ J("span", {
690
- className: "inline-flex items-center gap-1 rounded-full bg-black/60 px-2 py-0.5 text-xs text-white backdrop-blur-sm",
691
- children: [
692
- /* @__PURE__ */ q(x, { className: "h-3 w-3" }),
693
- " ",
694
- e.estimatedTime,
695
- " min"
696
- ]
697
- })
698
- })
699
- ]
700
- }), /* @__PURE__ */ J("div", {
701
- className: "p-4",
702
- children: [
703
- /* @__PURE__ */ J("div", {
704
- className: "flex items-start justify-between",
705
- children: [/* @__PURE__ */ J("div", {
706
- className: "min-w-0 flex-1",
707
- children: [/* @__PURE__ */ q("h3", {
708
- className: "text-base font-semibold text-text-primary truncate",
709
- children: e.name
710
- }), /* @__PURE__ */ q("p", {
711
- className: "mt-0.5 text-sm text-text-secondary",
712
- children: e.category
713
- })]
714
- }), /* @__PURE__ */ J("div", {
715
- className: "flex items-center gap-1 rounded bg-status-success-bg px-1.5 py-0.5 ml-2 shrink-0",
716
- children: [/* @__PURE__ */ q(z, { className: "h-3 w-3 fill-white text-white" }), /* @__PURE__ */ q("span", {
717
- className: "text-xs font-bold text-white",
718
- children: e.rating
719
- })]
720
- })]
721
- }),
722
- /* @__PURE__ */ J("div", {
723
- className: "mt-3 flex items-center gap-4 text-xs text-text-secondary",
724
- children: [
725
- /* @__PURE__ */ J("span", {
726
- className: "flex items-center gap-1",
727
- children: [
728
- /* @__PURE__ */ q(A, { className: "h-3 w-3" }),
729
- " ",
730
- ee(e.distance)
731
- ]
732
- }),
733
- /* @__PURE__ */ J("span", {
734
- className: "flex items-center gap-1",
735
- children: [
736
- /* @__PURE__ */ q(z, { className: "h-3 w-3" }),
737
- " ",
738
- e.totalRatings,
739
- " ",
740
- E("labsofscience.home.reviews", "reviews")
741
- ]
742
- }),
743
- e.averageOrderValue && /* @__PURE__ */ J("span", {
744
- className: "flex items-center gap-1",
745
- children: [
746
- /* @__PURE__ */ q(D, { className: "h-3 w-3" }),
747
- " ",
748
- E("labsofscience.home.average", "Avg."),
749
- " ",
750
- s(e.averageOrderValue, { minimumFractionDigits: 0 })
751
- ]
752
- })
753
- ]
754
- }),
755
- e.serviceTypes && e.serviceTypes.length > 0 && /* @__PURE__ */ q("div", {
756
- className: "mt-3 flex flex-wrap gap-1.5",
757
- children: e.serviceTypes.slice(0, 3).map((e) => /* @__PURE__ */ q("span", {
758
- className: "inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
759
- children: e.replace(/_/g, " ")
760
- }, e))
761
- })
762
- ]
763
- })]
764
- }, e.id))
765
- })]
766
- }),
767
- B.length > 0 && /* @__PURE__ */ J("section", {
768
- className: "mb-8",
769
- children: [/* @__PURE__ */ J("div", {
770
- className: "flex items-center justify-between mb-4",
771
- children: [/* @__PURE__ */ q("h2", {
772
- className: "text-lg font-semibold text-text-primary",
773
- children: E("labsofscience.home.recentOrders", "Recent Orders")
774
- }), /* @__PURE__ */ J("button", {
775
- type: "button",
776
- onClick: () => _("/customer/orders"),
777
- className: "flex items-center gap-1 text-sm font-medium text-primary hover:underline",
778
- children: [
779
- E("labsofscience.common.viewAll", "View All"),
780
- " ",
781
- /* @__PURE__ */ q(h, { className: "h-3.5 w-3.5" })
782
- ]
783
- })]
784
- }), /* @__PURE__ */ q("div", {
785
- className: "rounded-lg border border-border-seam bg-bg-surface divide-y divide-border",
786
- children: B.map((e) => /* @__PURE__ */ J("div", {
787
- role: "button",
788
- tabIndex: 0,
789
- onClick: () => _(`/customer/order/${e.id}`),
790
- onKeyDown: (t) => {
791
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), _(`/customer/order/${e.id}`));
792
- },
793
- className: "flex items-center gap-4 px-4 py-3 hover:bg-accent/50 transition-colors cursor-pointer",
794
- children: [
795
- /* @__PURE__ */ q("img", {
796
- src: e.cartImage,
797
- alt: e.cartName,
798
- className: "h-12 w-12 rounded-lg object-cover shrink-0"
799
- }),
800
- /* @__PURE__ */ J("div", {
801
- className: "flex-1 min-w-0",
802
- children: [/* @__PURE__ */ J("div", {
803
- className: "flex items-center gap-2",
804
- children: [/* @__PURE__ */ q("p", {
805
- className: "text-sm font-medium text-text-primary truncate",
806
- children: e.cartName
807
- }), /* @__PURE__ */ q(i, { status: e.status })]
808
- }), /* @__PURE__ */ q("p", {
809
- className: "text-xs text-text-secondary mt-0.5",
810
- children: e.items.map((e) => e.name).join(", ")
811
- })]
812
- }),
813
- /* @__PURE__ */ J("div", {
814
- className: "text-right shrink-0",
815
- children: [/* @__PURE__ */ q("p", {
816
- className: "text-sm font-semibold text-text-primary",
817
- children: s(e.total, { minimumFractionDigits: 0 })
818
- }), /* @__PURE__ */ q("p", {
819
- className: "text-xs text-text-secondary",
820
- children: c(e.orderDate)
821
- })]
822
- })
823
- ]
824
- }, e.id))
825
- })]
826
- }),
827
- /* @__PURE__ */ J("section", {
828
- className: "mb-8",
829
- children: [/* @__PURE__ */ q("h2", {
830
- className: "text-lg font-semibold text-text-primary mb-4",
831
- children: E("labsofscience.home.howItWorks", "How It Works")
832
- }), /* @__PURE__ */ q("div", {
833
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
834
- children: ie.map((e) => /* @__PURE__ */ J("div", {
835
- className: "relative rounded-lg border border-border-seam bg-bg-surface p-5 text-center",
836
- children: [
837
- /* @__PURE__ */ q("div", {
838
- className: "absolute -top-3 left-1/2 -translate-x-1/2",
839
- children: /* @__PURE__ */ q("span", {
840
- className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
841
- children: e.step
842
- })
843
- }),
844
- /* @__PURE__ */ q("div", {
845
- className: "mt-2 flex justify-center text-text-secondary mb-3",
846
- children: e.icon
847
- }),
848
- /* @__PURE__ */ q("h3", {
849
- className: "text-sm font-semibold text-text-primary",
850
- children: e.title
851
- }),
852
- /* @__PURE__ */ q("p", {
853
- className: "mt-1 text-xs text-text-secondary",
854
- children: e.description
855
- })
856
- ]
857
- }, e.step))
858
- })]
859
- }),
860
- /* @__PURE__ */ J("section", {
861
- className: "mb-8",
862
- children: [/* @__PURE__ */ q("h2", {
863
- className: "text-lg font-semibold text-text-primary mb-4",
864
- children: E("labsofscience.home.browseByCategory", "Browse by Category")
865
- }), /* @__PURE__ */ q(te, {
866
- collapsedHeight: 180,
867
- label: "Show all categories",
868
- children: /* @__PURE__ */ q("div", {
869
- className: "grid grid-cols-3 gap-3 sm:grid-cols-4 lg:grid-cols-5",
870
- children: re.map((e) => /* @__PURE__ */ J("button", {
871
- type: "button",
872
- onClick: () => _(`/customer/carts?category=${encodeURIComponent(e.label)}`),
873
- className: "flex flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
874
- children: [/* @__PURE__ */ q("div", {
875
- className: t("flex h-12 w-12 items-center justify-center rounded-full", e.color),
876
- children: e.icon
877
- }), /* @__PURE__ */ q("span", {
878
- className: "text-xs font-medium leading-tight text-text-primary",
879
- children: e.label
880
- })]
881
- }, e.label))
882
- })
883
- })]
884
- }),
885
- /* @__PURE__ */ J("section", {
886
- className: "mb-8",
887
- children: [/* @__PURE__ */ q("h2", {
888
- className: "text-lg font-semibold text-text-primary mb-4",
889
- children: E("labsofscience.home.platformStats", "Platform Stats")
890
- }), /* @__PURE__ */ q("div", {
891
- className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
892
- children: oe.map((e) => /* @__PURE__ */ J(X, {
893
- treatment: "metric",
894
- className: "flex items-center gap-3 border-border-seam p-4",
895
- children: [/* @__PURE__ */ q("div", {
896
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-text-primary",
897
- children: e.icon
898
- }), /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q("p", {
899
- className: "text-lg font-bold tabular-nums text-text-primary",
900
- children: e.value
901
- }), /* @__PURE__ */ q("p", {
902
- className: "text-xs text-text-secondary",
903
- children: e.label
904
- })] })]
905
- }, e.label))
906
- })]
907
- }),
908
- /* @__PURE__ */ J("section", { children: [/* @__PURE__ */ q("h2", {
909
- className: "text-lg font-semibold text-text-primary mb-4",
910
- children: E("labsofscience.home.recentActivity", "Recent Activity")
911
- }), /* @__PURE__ */ q("div", {
912
- className: "rounded-lg border border-border-seam bg-bg-surface divide-y divide-border",
913
- children: ae.map((e) => /* @__PURE__ */ J("div", {
914
- className: "flex items-center gap-3 px-4 py-3",
915
- children: [
916
- /* @__PURE__ */ q("div", {
917
- className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-sunken",
918
- children: /* @__PURE__ */ q(p, { className: t("h-4 w-4", V[e.type] ?? "text-text-secondary") })
919
- }),
920
- /* @__PURE__ */ q("div", {
921
- className: "flex-1 min-w-0",
922
- children: /* @__PURE__ */ q("p", {
923
- className: "text-sm text-text-primary truncate",
924
- children: e.description
925
- })
926
- }),
927
- /* @__PURE__ */ q("span", {
928
- className: "text-xs text-text-secondary whitespace-nowrap",
929
- children: e.time
930
- })
931
- ]
932
- }, e.id))
933
- })] })
934
- ]
935
- });
936
- }
937
- //#endregion
938
- export { se as HomePage };
939
-
940
- //# sourceMappingURL=HomePage.js.map