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