@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,911 +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 { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { mockProducts as ee } from "../../mocks/data.js";
7
- import { useMemo as a, useState as o } from "react";
8
- import { AlertCircle as te, CheckCircle2 as s, Edit2 as ne, Package as c, Plus as l, Search as u, Trash2 as d, Upload as re, X as ie } from "lucide-react";
9
- import { Fragment as ae, jsx as f, jsxs as p } from "react/jsx-runtime";
10
- import { EmphasisPanel as oe, PagePurpose as m } from "@burdenoff/fe-libs/ui";
11
- //#region src/labsofscience/pages/cart-owner/InventoryManagementPage.tsx
12
- var h = [
13
- "Service",
14
- "Repair",
15
- "Beauty",
16
- "Care",
17
- "Cleaning",
18
- "Health",
19
- "Wellness",
20
- "Education"
21
- ], g = (e) => h.some((t) => e.includes(t)), _ = (e) => e === "Food & Beverage", v = [
22
- 10,
23
- 25,
24
- 0,
25
- 50,
26
- 8,
27
- 15,
28
- 3,
29
- 100,
30
- 42,
31
- 0,
32
- 20,
33
- 6,
34
- 35,
35
- 18,
36
- 12,
37
- 30,
38
- 5,
39
- 22,
40
- 0,
41
- 45
42
- ], se = () => ee.slice(0, 20).map((e, t) => ({
43
- id: e.id,
44
- name: e.name,
45
- description: e.description ?? `${e.name} - quality offering from ${e.cartName}`,
46
- price: e.price,
47
- originalPrice: t % 4 == 0 ? Math.round(e.price * 1.2) : void 0,
48
- category: e.category,
49
- stock: v[t] ?? 10,
50
- isAvailable: t !== 2 && t !== 9 && t !== 18,
51
- cartName: e.cartName,
52
- preparationTime: 15,
53
- calories: _(e.category) ? Math.floor(Math.random() * 400) + 100 : 0,
54
- isVegetarian: t % 3 == 0,
55
- isVegan: t % 5 == 0,
56
- isGlutenFree: t % 7 == 0,
57
- spiceLevel: [
58
- "mild",
59
- "medium",
60
- "spicy",
61
- "none"
62
- ][t % 4],
63
- tags: [
64
- "popular",
65
- "trending",
66
- "new"
67
- ].slice(0, t % 3 + 1),
68
- allergens: _(e.category) ? ["nuts", "dairy"].slice(0, t % 2 + 1) : [],
69
- duration: g(e.category) ? 30 + t * 5 : 0,
70
- serviceType: g(e.category) ? [
71
- "instant",
72
- "appointment",
73
- "recurring",
74
- "consultation"
75
- ][t % 4] : "",
76
- requirements: g(e.category) ? ["advance booking"] : []
77
- })), y = {
78
- name: "",
79
- description: "",
80
- category: "",
81
- price: 0,
82
- originalPrice: void 0,
83
- isAvailable: !0,
84
- stock: 0,
85
- preparationTime: 15,
86
- calories: 0,
87
- isVegetarian: !1,
88
- isVegan: !1,
89
- isGlutenFree: !1,
90
- spiceLevel: "mild",
91
- tags: [],
92
- allergens: [],
93
- duration: 30,
94
- serviceType: "instant",
95
- requirements: []
96
- }, b = () => {
97
- let { navigateTo: ee } = e(), [h, v] = o(se), [b, x] = o(""), [S, C] = o(""), [w, T] = o(""), [E, D] = o("name"), [ce, le] = o(!1), [O, k] = o(!1), [A, j] = o(null), [M, N] = o(y), [P, F] = o(""), [I, L] = o(""), [R, z] = o(""), [B, V] = o(null), H = a(() => [...new Set(h.map((e) => e.category))].sort(), [h]), U = a(() => {
98
- let e = [...h];
99
- if (b) {
100
- let t = b.toLowerCase();
101
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.category.toLowerCase().includes(t) || e.tags.some((e) => e.toLowerCase().includes(t)));
102
- }
103
- switch (S && (e = e.filter((e) => e.category === S)), w === "available" ? e = e.filter((e) => e.isAvailable) : w === "unavailable" && (e = e.filter((e) => !e.isAvailable)), E) {
104
- case "name":
105
- e.sort((e, t) => e.name.localeCompare(t.name));
106
- break;
107
- case "price_low":
108
- e.sort((e, t) => e.price - t.price);
109
- break;
110
- case "price_high":
111
- e.sort((e, t) => t.price - e.price);
112
- break;
113
- case "stock":
114
- e.sort((e, t) => e.stock - t.stock);
115
- break;
116
- }
117
- return e;
118
- }, [
119
- h,
120
- b,
121
- S,
122
- w,
123
- E
124
- ]), ue = h.length, de = h.filter((e) => e.isAvailable).length, fe = h.filter((e) => !g(e.category) && e.stock === 0).length, pe = h.filter((e) => !g(e.category) && e.stock > 0 && e.stock < 10).length, W = (e, t) => {
125
- V({
126
- text: e,
127
- type: t
128
- }), setTimeout(() => V(null), 3e3);
129
- }, G = () => {
130
- j(null), N({
131
- ...y,
132
- category: H[0] || ""
133
- }), F(""), L(""), z(""), k(!0);
134
- }, K = (e) => {
135
- j(e), N({
136
- name: e.name,
137
- description: e.description,
138
- category: e.category,
139
- price: e.price,
140
- originalPrice: e.originalPrice,
141
- isAvailable: e.isAvailable,
142
- stock: e.stock,
143
- preparationTime: e.preparationTime,
144
- calories: e.calories,
145
- isVegetarian: e.isVegetarian,
146
- isVegan: e.isVegan,
147
- isGlutenFree: e.isGlutenFree,
148
- spiceLevel: e.spiceLevel,
149
- tags: e.tags,
150
- allergens: e.allergens,
151
- duration: e.duration,
152
- serviceType: e.serviceType,
153
- requirements: e.requirements
154
- }), F(e.tags.join(", ")), L(e.allergens.join(", ")), z(e.requirements.join(", ")), k(!0);
155
- }, me = () => {
156
- if (!M.name || !M.description || !M.category || M.price <= 0) {
157
- W("Please fill all required fields (name, description, category, price > 0)", "error");
158
- return;
159
- }
160
- let e = P.split(",").map((e) => e.trim()).filter(Boolean), t = I.split(",").map((e) => e.trim()).filter(Boolean), n = R.split(",").map((e) => e.trim()).filter(Boolean), r = g(M.category) ? "Service" : "Product";
161
- if (A) v((r) => r.map((r) => r.id === A.id ? {
162
- ...r,
163
- ...M,
164
- tags: e,
165
- allergens: t,
166
- requirements: n
167
- } : r)), W(`${r} updated successfully`, "success");
168
- else {
169
- let i = {
170
- id: `item-${Date.now()}`,
171
- ...M,
172
- tags: e,
173
- allergens: t,
174
- requirements: n,
175
- cartName: "Dosa Express"
176
- };
177
- v((e) => [i, ...e]), W(`${r} added successfully`, "success");
178
- }
179
- k(!1);
180
- }, q = (e) => {
181
- confirm("Are you sure you want to delete this offering?") && (v((t) => t.filter((t) => t.id !== e)), W("Offering deleted successfully", "success"));
182
- }, J = (e, t) => {
183
- v((n) => n.map((n) => n.id === e ? {
184
- ...n,
185
- isAvailable: t
186
- } : n)), W(`Offering ${t ? "enabled" : "disabled"} successfully`, "success");
187
- }, Y = (e) => {
188
- let t = e === "enable", n = h.filter((e) => e.isAvailable !== t).length;
189
- if (n === 0) {
190
- W(`No offerings to ${e}`, "error");
191
- return;
192
- }
193
- v((e) => e.map((e) => ({
194
- ...e,
195
- isAvailable: t
196
- }))), W(`${n} offerings ${e}d successfully`, "success");
197
- }, X = (e) => g(e.category) ? {
198
- color: "text-status-success-text",
199
- label: "Available"
200
- } : e.stock === 0 ? {
201
- color: "text-status-error-text",
202
- label: "Out of Stock"
203
- } : e.stock < 10 ? {
204
- color: "text-status-warning-text",
205
- label: `Low Stock (${e.stock})`
206
- } : {
207
- color: "text-status-success-text",
208
- label: `In Stock (${e.stock})`
209
- }, Z = M.category ? g(M.category) : !1, he = M.category ? _(M.category) : !1, Q = !Z && he, $ = M.name && M.description && M.category && M.price > 0 && (!Z || M.duration && M.duration > 0) && (Z || M.stock >= 0);
210
- return /* @__PURE__ */ p(n, {
211
- title: "Offerings Management",
212
- description: "Manage your products and services",
213
- actions: /* @__PURE__ */ p("button", {
214
- type: "button",
215
- onClick: G,
216
- className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
217
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Item"]
218
- }),
219
- children: [/* @__PURE__ */ p("div", {
220
- className: "space-y-4",
221
- children: [
222
- B && /* @__PURE__ */ p("div", {
223
- className: t("flex items-center gap-2 rounded-lg border p-3", B.type === "success" ? "border-status-success-border bg-status-success-bg-subtle" : "border-status-error-border bg-status-error-bg-subtle"),
224
- children: [B.type === "success" ? /* @__PURE__ */ f(s, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ f(te, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ f("span", {
225
- className: t("text-sm font-medium", B.type === "success" ? "text-status-success-text" : "text-status-error-text"),
226
- children: B.text
227
- })]
228
- }),
229
- /* @__PURE__ */ f(m, {
230
- icon: /* @__PURE__ */ f(c, { className: "h-4 w-4" }),
231
- children: "Your catalogue lives here. Add the products and services your cart sells, set prices and stock, mark items available or out of stock, and flag dietary info — keeping this list accurate is what lets customers find and order the right things from you."
232
- }),
233
- /* @__PURE__ */ p(oe, {
234
- className: "grid grid-cols-2 lg:grid-cols-4 gap-3",
235
- children: [
236
- /* @__PURE__ */ p("div", {
237
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
238
- children: [/* @__PURE__ */ f("p", {
239
- className: "text-xs text-text-secondary",
240
- children: "Total Items"
241
- }), /* @__PURE__ */ f("p", {
242
- className: "text-2xl font-bold text-text-primary",
243
- children: ue
244
- })]
245
- }),
246
- /* @__PURE__ */ p("div", {
247
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
248
- children: [/* @__PURE__ */ f("p", {
249
- className: "text-xs text-text-secondary",
250
- children: "Available"
251
- }), /* @__PURE__ */ f("p", {
252
- className: "text-2xl font-bold text-status-success-text",
253
- children: de
254
- })]
255
- }),
256
- /* @__PURE__ */ p("div", {
257
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
258
- children: [/* @__PURE__ */ f("p", {
259
- className: "text-xs text-text-secondary",
260
- children: "Out of Stock"
261
- }), /* @__PURE__ */ f("p", {
262
- className: "text-2xl font-bold text-status-error-text",
263
- children: fe
264
- })]
265
- }),
266
- /* @__PURE__ */ p("div", {
267
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
268
- children: [/* @__PURE__ */ f("p", {
269
- className: "text-xs text-text-secondary",
270
- children: "Low Stock"
271
- }), /* @__PURE__ */ f("p", {
272
- className: "text-2xl font-bold text-status-warning-text",
273
- children: pe
274
- })]
275
- })
276
- ]
277
- }),
278
- /* @__PURE__ */ p("div", {
279
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm space-y-4",
280
- children: [/* @__PURE__ */ p("div", {
281
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3",
282
- children: [/* @__PURE__ */ p("div", {
283
- className: "flex flex-wrap gap-2",
284
- children: [
285
- /* @__PURE__ */ p("button", {
286
- type: "button",
287
- onClick: G,
288
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
289
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Item"]
290
- }),
291
- /* @__PURE__ */ f("button", {
292
- type: "button",
293
- onClick: () => Y("enable"),
294
- className: "rounded-md border border-border-seam px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
295
- children: "Enable All"
296
- }),
297
- /* @__PURE__ */ f("button", {
298
- type: "button",
299
- onClick: () => Y("disable"),
300
- className: "rounded-md border border-border-seam px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
301
- children: "Disable All"
302
- })
303
- ]
304
- }), /* @__PURE__ */ p("button", {
305
- type: "button",
306
- onClick: () => alert("Import/Export feature coming soon!"),
307
- 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",
308
- children: [/* @__PURE__ */ f(re, { className: "h-4 w-4" }), "Import/Export"]
309
- })]
310
- }), /* @__PURE__ */ p("div", {
311
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",
312
- children: [
313
- /* @__PURE__ */ p("div", {
314
- className: "relative sm:col-span-2 lg:col-span-1",
315
- children: [/* @__PURE__ */ f(u, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ f("input", {
316
- type: "text",
317
- placeholder: "Search offerings...",
318
- value: b,
319
- onChange: (e) => x(e.target.value),
320
- className: "w-full rounded-md border border-border-seam bg-bg-surface pl-10 pr-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
321
- })]
322
- }),
323
- /* @__PURE__ */ p("select", {
324
- value: S,
325
- onChange: (e) => C(e.target.value),
326
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
327
- children: [/* @__PURE__ */ f("option", {
328
- value: "",
329
- children: "All Categories"
330
- }), H.map((e) => /* @__PURE__ */ f("option", {
331
- value: e,
332
- children: e
333
- }, e))]
334
- }),
335
- /* @__PURE__ */ p("select", {
336
- value: w,
337
- onChange: (e) => T(e.target.value),
338
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
339
- children: [
340
- /* @__PURE__ */ f("option", {
341
- value: "",
342
- children: "All Status"
343
- }),
344
- /* @__PURE__ */ f("option", {
345
- value: "available",
346
- children: "Available"
347
- }),
348
- /* @__PURE__ */ f("option", {
349
- value: "unavailable",
350
- children: "Unavailable"
351
- })
352
- ]
353
- }),
354
- /* @__PURE__ */ p("select", {
355
- value: E,
356
- onChange: (e) => D(e.target.value),
357
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
358
- children: [
359
- /* @__PURE__ */ f("option", {
360
- value: "name",
361
- children: "Name A-Z"
362
- }),
363
- /* @__PURE__ */ f("option", {
364
- value: "price_low",
365
- children: "Price: Low to High"
366
- }),
367
- /* @__PURE__ */ f("option", {
368
- value: "price_high",
369
- children: "Price: High to Low"
370
- }),
371
- /* @__PURE__ */ f("option", {
372
- value: "stock",
373
- children: "Stock: Low to High"
374
- })
375
- ]
376
- })
377
- ]
378
- })]
379
- }),
380
- U.length === 0 ? /* @__PURE__ */ f(r, {
381
- illustration: b || S || w ? "empty-search" : "empty-data",
382
- icon: /* @__PURE__ */ f(c, { className: "h-12 w-12" }),
383
- title: "No Items Found",
384
- description: b || S || w ? "No items match your current filters. Try adjusting your search criteria." : "You haven't added any items yet. Start building your offerings!",
385
- action: /* @__PURE__ */ p("div", {
386
- className: "flex flex-wrap justify-center gap-3",
387
- children: [/* @__PURE__ */ p("button", {
388
- type: "button",
389
- onClick: G,
390
- className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
391
- children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "Add Your First Item"]
392
- }), (b || S || w) && /* @__PURE__ */ f("button", {
393
- type: "button",
394
- onClick: () => {
395
- x(""), C(""), T(""), D("name");
396
- },
397
- className: "rounded-md border border-border-seam px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken",
398
- children: "Clear Filters"
399
- })]
400
- })
401
- }) : /* @__PURE__ */ p(ae, { children: [/* @__PURE__ */ f("div", {
402
- className: "hidden lg:block rounded-lg border border-border-seam bg-bg-surface shadow-sm overflow-hidden",
403
- children: /* @__PURE__ */ f("div", {
404
- className: "overflow-x-auto",
405
- children: /* @__PURE__ */ p("table", {
406
- className: "w-full text-sm",
407
- children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", {
408
- className: "border-b border-border-seam bg-bg-sunken/50",
409
- children: [
410
- /* @__PURE__ */ f("th", {
411
- className: "px-5 py-3 text-left font-medium text-text-secondary",
412
- children: "Item"
413
- }),
414
- /* @__PURE__ */ f("th", {
415
- className: "px-5 py-3 text-left font-medium text-text-secondary",
416
- children: "Category"
417
- }),
418
- /* @__PURE__ */ f("th", {
419
- className: "px-5 py-3 text-right font-medium text-text-secondary",
420
- children: "Price"
421
- }),
422
- /* @__PURE__ */ f("th", {
423
- className: "px-5 py-3 text-left font-medium text-text-secondary",
424
- children: "Stock/Status"
425
- }),
426
- /* @__PURE__ */ f("th", {
427
- className: "px-5 py-3 text-center font-medium text-text-secondary",
428
- children: "Available"
429
- }),
430
- /* @__PURE__ */ f("th", {
431
- className: "px-5 py-3 text-right font-medium text-text-secondary",
432
- children: "Actions"
433
- })
434
- ]
435
- }) }), /* @__PURE__ */ f("tbody", { children: U.map((e) => {
436
- let n = X(e);
437
- return /* @__PURE__ */ p("tr", {
438
- className: "border-b border-border-seam last:border-0 hover:bg-bg-sunken/30 transition-colors",
439
- children: [
440
- /* @__PURE__ */ f("td", {
441
- className: "px-5 py-3",
442
- children: /* @__PURE__ */ p("div", {
443
- className: "flex items-center gap-3",
444
- children: [/* @__PURE__ */ f("div", {
445
- className: "flex h-10 w-10 items-center justify-center rounded-md bg-bg-sunken",
446
- children: /* @__PURE__ */ f(c, { className: "h-4 w-4 text-text-secondary" })
447
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
448
- className: "font-medium text-text-primary",
449
- children: e.name
450
- }), /* @__PURE__ */ p("p", {
451
- className: "text-xs text-text-secondary line-clamp-1",
452
- children: [e.description.slice(0, 50), "..."]
453
- })] })]
454
- })
455
- }),
456
- /* @__PURE__ */ f("td", {
457
- className: "px-5 py-3",
458
- children: /* @__PURE__ */ f("span", {
459
- className: "inline-flex rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
460
- children: e.category
461
- })
462
- }),
463
- /* @__PURE__ */ p("td", {
464
- className: "px-5 py-3 text-right",
465
- children: [/* @__PURE__ */ f("p", {
466
- className: "font-medium text-text-primary",
467
- children: i(e.price, { minimumFractionDigits: 0 })
468
- }), e.originalPrice && /* @__PURE__ */ f("p", {
469
- className: "text-xs text-text-secondary line-through",
470
- children: i(e.originalPrice, { minimumFractionDigits: 0 })
471
- })]
472
- }),
473
- /* @__PURE__ */ f("td", {
474
- className: "px-5 py-3",
475
- children: /* @__PURE__ */ f("span", {
476
- className: t("text-sm font-medium", n.color),
477
- children: n.label
478
- })
479
- }),
480
- /* @__PURE__ */ f("td", {
481
- className: "px-5 py-3 text-center",
482
- children: /* @__PURE__ */ f("button", {
483
- type: "button",
484
- onClick: () => J(e.id, !e.isAvailable),
485
- className: t("h-6 w-11 rounded-full transition-colors relative inline-block", e.isAvailable ? "bg-status-info-bg" : "bg-muted-foreground/30"),
486
- children: /* @__PURE__ */ f("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", e.isAvailable ? "translate-x-5" : "translate-x-0.5") })
487
- })
488
- }),
489
- /* @__PURE__ */ f("td", {
490
- className: "px-5 py-3",
491
- children: /* @__PURE__ */ p("div", {
492
- className: "flex items-center justify-end gap-1",
493
- children: [/* @__PURE__ */ f("button", {
494
- type: "button",
495
- onClick: () => K(e),
496
- className: "rounded p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
497
- title: "Edit",
498
- children: /* @__PURE__ */ f(ne, { className: "h-4 w-4" })
499
- }), /* @__PURE__ */ f("button", {
500
- type: "button",
501
- onClick: () => q(e.id),
502
- className: "rounded p-1.5 text-text-secondary hover:bg-status-error-bg-subtle hover:text-status-error-text transition-colors",
503
- title: "Delete",
504
- children: /* @__PURE__ */ f(d, { className: "h-4 w-4" })
505
- })]
506
- })
507
- })
508
- ]
509
- }, e.id);
510
- }) })]
511
- })
512
- })
513
- }), /* @__PURE__ */ f("div", {
514
- className: "lg:hidden space-y-3",
515
- children: U.map((e) => {
516
- let n = X(e);
517
- return /* @__PURE__ */ f("div", {
518
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
519
- children: /* @__PURE__ */ p("div", {
520
- className: "flex items-start gap-3",
521
- children: [/* @__PURE__ */ f("div", {
522
- className: "flex h-14 w-14 items-center justify-center rounded-md bg-bg-sunken shrink-0",
523
- children: /* @__PURE__ */ f(c, { className: "h-6 w-6 text-text-secondary" })
524
- }), /* @__PURE__ */ p("div", {
525
- className: "flex-1 min-w-0",
526
- children: [
527
- /* @__PURE__ */ p("div", {
528
- className: "flex items-start justify-between mb-1",
529
- children: [/* @__PURE__ */ p("div", {
530
- className: "flex-1",
531
- children: [/* @__PURE__ */ f("h3", {
532
- className: "text-sm font-medium text-text-primary line-clamp-1",
533
- children: e.name
534
- }), /* @__PURE__ */ f("p", {
535
- className: "text-xs text-text-secondary mt-0.5 line-clamp-2",
536
- children: e.description
537
- })]
538
- }), /* @__PURE__ */ f("button", {
539
- type: "button",
540
- onClick: () => J(e.id, !e.isAvailable),
541
- className: t("h-5 w-9 rounded-full transition-colors relative ml-2 shrink-0", e.isAvailable ? "bg-status-info-bg" : "bg-muted-foreground/30"),
542
- children: /* @__PURE__ */ f("div", { className: t("absolute top-0.5 h-4 w-4 rounded-full bg-white transition-transform", e.isAvailable ? "translate-x-4" : "translate-x-0.5") })
543
- })]
544
- }),
545
- /* @__PURE__ */ p("div", {
546
- className: "flex flex-wrap items-center gap-2 mt-2 text-xs",
547
- children: [/* @__PURE__ */ f("span", {
548
- className: "px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
549
- children: e.category
550
- }), /* @__PURE__ */ f("span", {
551
- className: t("font-medium", n.color),
552
- children: n.label
553
- })]
554
- }),
555
- /* @__PURE__ */ p("div", {
556
- className: "flex items-center justify-between mt-3",
557
- children: [/* @__PURE__ */ p("div", {
558
- className: "flex items-center gap-2",
559
- children: [/* @__PURE__ */ f("span", {
560
- className: "font-semibold text-text-primary",
561
- children: i(e.price, { minimumFractionDigits: 0 })
562
- }), e.originalPrice && /* @__PURE__ */ f("span", {
563
- className: "text-xs text-text-secondary line-through",
564
- children: i(e.originalPrice, { minimumFractionDigits: 0 })
565
- })]
566
- }), /* @__PURE__ */ p("div", {
567
- className: "flex gap-1",
568
- children: [/* @__PURE__ */ f("button", {
569
- type: "button",
570
- onClick: () => K(e),
571
- className: "rounded px-2 py-1 text-xs border border-border-seam text-text-primary hover:bg-bg-sunken",
572
- children: "Edit"
573
- }), /* @__PURE__ */ f("button", {
574
- type: "button",
575
- onClick: () => q(e.id),
576
- className: "rounded px-2 py-1 text-xs border border-border-seam text-status-error-text hover:bg-status-error-bg-subtle",
577
- children: "Delete"
578
- })]
579
- })]
580
- })
581
- ]
582
- })]
583
- })
584
- }, e.id);
585
- })
586
- })] })
587
- ]
588
- }), O && /* @__PURE__ */ f("div", {
589
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
590
- children: /* @__PURE__ */ f("div", {
591
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface shadow-xl",
592
- children: /* @__PURE__ */ p("div", {
593
- className: "p-6",
594
- children: [
595
- /* @__PURE__ */ p("div", {
596
- className: "flex items-center justify-between mb-4",
597
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
598
- className: "text-lg font-semibold text-text-primary",
599
- children: A ? "Edit Item" : "Add New Item"
600
- }), M.category && /* @__PURE__ */ p("p", {
601
- className: "text-sm text-text-secondary mt-0.5",
602
- children: [
603
- "Type: ",
604
- Z ? "Service" : "Product",
605
- " | Category: ",
606
- M.category
607
- ]
608
- })] }), /* @__PURE__ */ f("button", {
609
- type: "button",
610
- onClick: () => k(!1),
611
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
612
- children: /* @__PURE__ */ f(ie, { className: "h-5 w-5" })
613
- })]
614
- }),
615
- /* @__PURE__ */ p("div", {
616
- className: "space-y-4",
617
- children: [
618
- /* @__PURE__ */ p("div", {
619
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
620
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
621
- className: "block text-sm font-medium text-text-primary mb-1",
622
- children: "Item Name *"
623
- }), /* @__PURE__ */ f("input", {
624
- type: "text",
625
- value: M.name,
626
- onChange: (e) => N((t) => ({
627
- ...t,
628
- name: e.target.value
629
- })),
630
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary",
631
- placeholder: "Enter item name"
632
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
633
- className: "block text-sm font-medium text-text-primary mb-1",
634
- children: "Category *"
635
- }), /* @__PURE__ */ p("select", {
636
- value: M.category,
637
- onChange: (e) => N((t) => ({
638
- ...t,
639
- category: e.target.value
640
- })),
641
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
642
- children: [/* @__PURE__ */ f("option", {
643
- value: "",
644
- children: "Select category"
645
- }), H.map((e) => /* @__PURE__ */ f("option", {
646
- value: e,
647
- children: e
648
- }, e))]
649
- })] })]
650
- }),
651
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
652
- className: "block text-sm font-medium text-text-primary mb-1",
653
- children: "Description *"
654
- }), /* @__PURE__ */ f("textarea", {
655
- value: M.description,
656
- onChange: (e) => N((t) => ({
657
- ...t,
658
- description: e.target.value
659
- })),
660
- rows: 3,
661
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary resize-none",
662
- placeholder: "Describe the offering..."
663
- })] }),
664
- /* @__PURE__ */ p("div", {
665
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
666
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
667
- className: "block text-sm font-medium text-text-primary mb-1",
668
- children: "Price *"
669
- }), /* @__PURE__ */ f("input", {
670
- type: "number",
671
- value: M.price,
672
- onChange: (e) => N((t) => ({
673
- ...t,
674
- price: parseInt(e.target.value) || 0
675
- })),
676
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
677
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
678
- className: "block text-sm font-medium text-text-primary mb-1",
679
- children: "Original Price"
680
- }), /* @__PURE__ */ f("input", {
681
- type: "number",
682
- value: M.originalPrice ?? "",
683
- onChange: (e) => N((t) => ({
684
- ...t,
685
- originalPrice: e.target.value ? parseInt(e.target.value) : void 0
686
- })),
687
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
688
- placeholder: "Optional"
689
- })] })]
690
- }),
691
- !Z && /* @__PURE__ */ p("div", {
692
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
693
- children: [
694
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
695
- className: "block text-sm font-medium text-text-primary mb-1",
696
- children: "Stock Quantity *"
697
- }), /* @__PURE__ */ f("input", {
698
- type: "number",
699
- value: M.stock,
700
- onChange: (e) => N((t) => ({
701
- ...t,
702
- stock: parseInt(e.target.value) || 0
703
- })),
704
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
705
- })] }),
706
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
707
- className: "block text-sm font-medium text-text-primary mb-1",
708
- children: "Preparation Time (min)"
709
- }), /* @__PURE__ */ f("input", {
710
- type: "number",
711
- value: M.preparationTime,
712
- onChange: (e) => N((t) => ({
713
- ...t,
714
- preparationTime: parseInt(e.target.value) || 0
715
- })),
716
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
717
- })] }),
718
- Q && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
719
- className: "block text-sm font-medium text-text-primary mb-1",
720
- children: "Calories"
721
- }), /* @__PURE__ */ f("input", {
722
- type: "number",
723
- value: M.calories,
724
- onChange: (e) => N((t) => ({
725
- ...t,
726
- calories: parseInt(e.target.value) || 0
727
- })),
728
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
729
- })] })
730
- ]
731
- }),
732
- Z && /* @__PURE__ */ p("div", {
733
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
734
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
735
- className: "block text-sm font-medium text-text-primary mb-1",
736
- children: "Service Duration (min) *"
737
- }), /* @__PURE__ */ f("input", {
738
- type: "number",
739
- value: M.duration,
740
- onChange: (e) => N((t) => ({
741
- ...t,
742
- duration: parseInt(e.target.value) || 30
743
- })),
744
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
745
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
746
- className: "block text-sm font-medium text-text-primary mb-1",
747
- children: "Setup Time (min)"
748
- }), /* @__PURE__ */ f("input", {
749
- type: "number",
750
- value: M.preparationTime,
751
- onChange: (e) => N((t) => ({
752
- ...t,
753
- preparationTime: parseInt(e.target.value) || 0
754
- })),
755
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
756
- })] })]
757
- }),
758
- Q && /* @__PURE__ */ p("div", {
759
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
760
- children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
761
- className: "block text-sm font-medium text-text-primary mb-1",
762
- children: "Spice Level"
763
- }), /* @__PURE__ */ p("select", {
764
- value: M.spiceLevel,
765
- onChange: (e) => N((t) => ({
766
- ...t,
767
- spiceLevel: e.target.value
768
- })),
769
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
770
- children: [
771
- /* @__PURE__ */ f("option", {
772
- value: "none",
773
- children: "None"
774
- }),
775
- /* @__PURE__ */ f("option", {
776
- value: "mild",
777
- children: "Mild"
778
- }),
779
- /* @__PURE__ */ f("option", {
780
- value: "medium",
781
- children: "Medium"
782
- }),
783
- /* @__PURE__ */ f("option", {
784
- value: "spicy",
785
- children: "Spicy"
786
- }),
787
- /* @__PURE__ */ f("option", {
788
- value: "very-spicy",
789
- children: "Very Spicy"
790
- })
791
- ]
792
- })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
793
- className: "block text-sm font-medium text-text-primary mb-2",
794
- children: "Dietary Options"
795
- }), /* @__PURE__ */ f("div", {
796
- className: "space-y-2",
797
- children: [
798
- "isVegetarian",
799
- "isVegan",
800
- "isGlutenFree"
801
- ].map((e) => /* @__PURE__ */ p("label", {
802
- className: "flex items-center gap-2 text-sm text-text-primary",
803
- children: [/* @__PURE__ */ f("input", {
804
- type: "checkbox",
805
- checked: M[e],
806
- onChange: (t) => N((n) => ({
807
- ...n,
808
- [e]: t.target.checked
809
- })),
810
- className: "rounded border-border-seam"
811
- }), e === "isVegetarian" ? "Vegetarian" : e === "isVegan" ? "Vegan" : "Gluten Free"]
812
- }, e))
813
- })] })]
814
- }),
815
- Z && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
816
- className: "block text-sm font-medium text-text-primary mb-1",
817
- children: "Service Type *"
818
- }), /* @__PURE__ */ p("select", {
819
- value: M.serviceType,
820
- onChange: (e) => N((t) => ({
821
- ...t,
822
- serviceType: e.target.value
823
- })),
824
- className: "w-full sm:w-64 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
825
- children: [
826
- /* @__PURE__ */ f("option", {
827
- value: "instant",
828
- children: "Instant Service"
829
- }),
830
- /* @__PURE__ */ f("option", {
831
- value: "appointment",
832
- children: "Appointment Based"
833
- }),
834
- /* @__PURE__ */ f("option", {
835
- value: "recurring",
836
- children: "Recurring Service"
837
- }),
838
- /* @__PURE__ */ f("option", {
839
- value: "consultation",
840
- children: "Consultation"
841
- })
842
- ]
843
- })] }),
844
- /* @__PURE__ */ p("div", { children: [
845
- /* @__PURE__ */ f("label", {
846
- className: "block text-sm font-medium text-text-primary mb-1",
847
- children: "Tags (comma separated)"
848
- }),
849
- /* @__PURE__ */ f("input", {
850
- type: "text",
851
- value: P,
852
- onChange: (e) => F(e.target.value),
853
- placeholder: Z ? "professional, certified, quick" : "popular, spicy, traditional",
854
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
855
- }),
856
- /* @__PURE__ */ p("p", {
857
- className: "text-xs text-text-secondary mt-1",
858
- children: [
859
- P.split(",").map((e) => e.trim()).filter(Boolean).length,
860
- " ",
861
- "tags"
862
- ]
863
- })
864
- ] }),
865
- Q && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
866
- className: "block text-sm font-medium text-text-primary mb-1",
867
- children: "Allergens (comma separated)"
868
- }), /* @__PURE__ */ f("input", {
869
- type: "text",
870
- value: I,
871
- onChange: (e) => L(e.target.value),
872
- placeholder: "nuts, dairy, gluten, soy",
873
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
874
- })] }),
875
- Z && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
876
- className: "block text-sm font-medium text-text-primary mb-1",
877
- children: "Service Requirements (comma separated)"
878
- }), /* @__PURE__ */ f("input", {
879
- type: "text",
880
- value: R,
881
- onChange: (e) => z(e.target.value),
882
- placeholder: "advance booking, payment required, tools provided",
883
- className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
884
- })] })
885
- ]
886
- }),
887
- /* @__PURE__ */ p("div", {
888
- className: "flex gap-3 mt-6",
889
- children: [/* @__PURE__ */ f("button", {
890
- type: "button",
891
- onClick: () => k(!1),
892
- className: "flex-1 rounded-md border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
893
- children: "Cancel"
894
- }), /* @__PURE__ */ f("button", {
895
- type: "button",
896
- onClick: me,
897
- disabled: !$,
898
- className: t("flex-1 rounded-md px-4 py-2 text-sm font-medium transition-colors", $ ? "bg-accent text-text-primary hover:bg-accent/80" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
899
- children: A ? "Update Item" : "Add Item"
900
- })]
901
- })
902
- ]
903
- })
904
- })
905
- })]
906
- });
907
- };
908
- //#endregion
909
- export { b as InventoryManagementPage };
910
-
911
- //# sourceMappingURL=InventoryManagementPage.js.map