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