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