@burdenoff/microfe-labsofscience 2026.625.1 → 2026.626.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/labsofscience/pages/HomePage.js +33 -28
- package/dist/labsofscience/pages/HomePage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +67 -61
- package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminDashboard.js +76 -44
- package/dist/labsofscience/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminFinancialPage.js +38 -32
- package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminOrdersPage.js +226 -221
- package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminProfilePage.js +127 -125
- package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/admin/AdminSettingsPage.js +489 -487
- package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/CartManagementPage.js +124 -119
- package/dist/labsofscience/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/admin/UserManagementPage.js +267 -262
- package/dist/labsofscience/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +46 -41
- package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +172 -167
- package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +79 -48
- package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +98 -93
- package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +112 -107
- package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +298 -300
- package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +221 -223
- package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +251 -245
- package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/labsofscience/pages/common/HelpSupportPage.js +284 -285
- package/dist/labsofscience/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/labsofscience/pages/common/NotificationCenterPage.js +48 -42
- package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/labsofscience/pages/common/SettingsPage.js +745 -736
- package/dist/labsofscience/pages/common/SettingsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/BookingDetailsPage.js +399 -356
- package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CartDetailPage.js +262 -230
- package/dist/labsofscience/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +162 -151
- package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CheckoutPage.js +213 -215
- package/dist/labsofscience/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/CustomerDashboard.js +416 -381
- package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/labsofscience/pages/customer/CustomerProfilePage.js +528 -491
- package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +521 -512
- package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/FavoritesPage.js +57 -51
- package/dist/labsofscience/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/OrderHistoryPage.js +56 -50
- package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/OrderTrackingPage.js +310 -274
- package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +81 -75
- package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/ReviewsPage.js +68 -62
- package/dist/labsofscience/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/labsofscience/pages/customer/SavedAddressesPage.js +61 -55
- package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +92 -60
- package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +237 -231
- package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +60 -54
- package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorDashboard.js +342 -307
- package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +106 -100
- package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +51 -45
- package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/labsofscience/pages/investor/InvestorProfilePage.js +386 -381
- package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/worker/TaskDetailsPage.js +359 -319
- package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerDashboard.js +90 -59
- package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +76 -71
- package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerProfilePage.js +82 -77
- package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +348 -340
- package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,8 +4,9 @@ import { PageLayout as n } from "../../components/PageLayout.js";
|
|
|
4
4
|
import { useState as r } from "react";
|
|
5
5
|
import { AlertCircle as i, Calendar as a, CheckCircle2 as o, Clock as s, Home as c, Package as l, Plus as u, Save as d, Settings as f, ShoppingBag as p, Trash2 as m, Truck as h } from "lucide-react";
|
|
6
6
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
7
|
+
import { EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
|
|
7
8
|
//#region src/labsofscience/pages/cart-owner/CartServiceConfigPage.tsx
|
|
8
|
-
var
|
|
9
|
+
var x = [
|
|
9
10
|
{
|
|
10
11
|
value: "products_only",
|
|
11
12
|
label: "Products Only",
|
|
@@ -21,7 +22,7 @@ var y = [
|
|
|
21
22
|
label: "Products & Services",
|
|
22
23
|
description: "You'll manage both products and services with full flexibility."
|
|
23
24
|
}
|
|
24
|
-
],
|
|
25
|
+
], S = [
|
|
25
26
|
"monday",
|
|
26
27
|
"tuesday",
|
|
27
28
|
"wednesday",
|
|
@@ -29,7 +30,7 @@ var y = [
|
|
|
29
30
|
"friday",
|
|
30
31
|
"saturday",
|
|
31
32
|
"sunday"
|
|
32
|
-
],
|
|
33
|
+
], C = {
|
|
33
34
|
monday: "Mon",
|
|
34
35
|
tuesday: "Tue",
|
|
35
36
|
wednesday: "Wed",
|
|
@@ -37,7 +38,7 @@ var y = [
|
|
|
37
38
|
friday: "Fri",
|
|
38
39
|
saturday: "Sat",
|
|
39
40
|
sunday: "Sun"
|
|
40
|
-
},
|
|
41
|
+
}, w = {
|
|
41
42
|
monday: {
|
|
42
43
|
isOpen: !0,
|
|
43
44
|
open: "09:00",
|
|
@@ -73,7 +74,7 @@ var y = [
|
|
|
73
74
|
open: "10:00",
|
|
74
75
|
close: "18:00"
|
|
75
76
|
}
|
|
76
|
-
},
|
|
77
|
+
}, T = {
|
|
77
78
|
pickup: {
|
|
78
79
|
enabled: !0,
|
|
79
80
|
preparationTime: 15
|
|
@@ -98,25 +99,25 @@ var y = [
|
|
|
98
99
|
minimumOrderValue: 300
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
|
-
},
|
|
102
|
-
let { navigateTo:
|
|
103
|
-
|
|
102
|
+
}, E = () => {
|
|
103
|
+
let { navigateTo: E } = e(), [D, O] = r(!0), [k, A] = r("both"), [j, M] = r(w), [N, P] = r(T), [F, I] = r(!1), [L, R] = r(!1), [z, B] = r([]), V = (e, t, n) => {
|
|
104
|
+
M((r) => ({
|
|
104
105
|
...r,
|
|
105
106
|
[e]: {
|
|
106
107
|
...r[e],
|
|
107
108
|
[t]: n
|
|
108
109
|
}
|
|
109
110
|
}));
|
|
110
|
-
},
|
|
111
|
-
|
|
111
|
+
}, H = (e, t, n) => {
|
|
112
|
+
P((r) => ({
|
|
112
113
|
...r,
|
|
113
114
|
[e]: {
|
|
114
115
|
...r[e],
|
|
115
116
|
[t]: n
|
|
116
117
|
}
|
|
117
118
|
}));
|
|
118
|
-
},
|
|
119
|
-
|
|
119
|
+
}, U = (e, t) => {
|
|
120
|
+
P((n) => ({
|
|
120
121
|
...n,
|
|
121
122
|
directService: {
|
|
122
123
|
...n.directService,
|
|
@@ -126,7 +127,7 @@ var y = [
|
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
129
|
}));
|
|
129
|
-
},
|
|
130
|
+
}, W = () => {
|
|
130
131
|
let e = {
|
|
131
132
|
id: `stop-${Date.now()}`,
|
|
132
133
|
name: "",
|
|
@@ -142,23 +143,23 @@ var y = [
|
|
|
142
143
|
],
|
|
143
144
|
isActive: !0
|
|
144
145
|
};
|
|
145
|
-
|
|
146
|
+
P((t) => ({
|
|
146
147
|
...t,
|
|
147
148
|
scheduledStop: {
|
|
148
149
|
...t.scheduledStop,
|
|
149
150
|
stops: [...t.scheduledStop.stops, e]
|
|
150
151
|
}
|
|
151
152
|
}));
|
|
152
|
-
},
|
|
153
|
-
|
|
153
|
+
}, G = (e) => {
|
|
154
|
+
P((t) => ({
|
|
154
155
|
...t,
|
|
155
156
|
scheduledStop: {
|
|
156
157
|
...t.scheduledStop,
|
|
157
158
|
stops: t.scheduledStop.stops.filter((t) => t.id !== e)
|
|
158
159
|
}
|
|
159
160
|
}));
|
|
160
|
-
},
|
|
161
|
-
|
|
161
|
+
}, K = (e, t, n) => {
|
|
162
|
+
P((r) => ({
|
|
162
163
|
...r,
|
|
163
164
|
scheduledStop: {
|
|
164
165
|
...r.scheduledStop,
|
|
@@ -168,8 +169,8 @@ var y = [
|
|
|
168
169
|
} : r)
|
|
169
170
|
}
|
|
170
171
|
}));
|
|
171
|
-
},
|
|
172
|
-
|
|
172
|
+
}, q = (e, t) => {
|
|
173
|
+
P((n) => ({
|
|
173
174
|
...n,
|
|
174
175
|
scheduledStop: {
|
|
175
176
|
...n.scheduledStop,
|
|
@@ -185,47 +186,47 @@ var y = [
|
|
|
185
186
|
})
|
|
186
187
|
}
|
|
187
188
|
}));
|
|
188
|
-
},
|
|
189
|
+
}, J = () => {
|
|
189
190
|
let e = [];
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
for (let t of
|
|
191
|
+
if (N.delivery.enabled && (N.delivery.deliveryRadius <= 0 && e.push("Delivery radius must be greater than 0"), N.delivery.deliveryFee < 0 && e.push("Delivery fee cannot be negative"), N.delivery.minimumOrderValue < 0 && e.push("Minimum order value cannot be negative")), N.pickup.enabled && N.pickup.preparationTime <= 0 && e.push("Preparation time must be greater than 0"), N.scheduledStop.enabled) {
|
|
192
|
+
N.scheduledStop.stops.length === 0 && e.push("At least one scheduled stop is required when scheduled stop service is enabled");
|
|
193
|
+
for (let t of N.scheduledStop.stops) t.name.trim() || e.push("All scheduled stops must have a name"), t.address.trim() || e.push("All scheduled stops must have an address"), t.daysOfWeek.length === 0 && e.push("All scheduled stops must have at least one day selected"), t.arrivalTime >= t.departureTime && e.push("Departure time must be after arrival time for all stops");
|
|
193
194
|
}
|
|
194
|
-
return
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
let e =
|
|
195
|
+
return N.directService.enabled && (N.directService.config.serviceFee < 0 && e.push("Service fee cannot be negative"), N.directService.config.minimumAdvancePayment < 0 && e.push("Minimum advance payment cannot be negative"), N.directService.config.serviceRadius <= 0 && e.push("Service radius must be greater than 0"), N.directService.config.estimatedArrivalTime <= 0 && e.push("Estimated arrival time must be greater than 0")), Object.values(j).some((e) => e.isOpen) || e.push("At least one day must be open"), e;
|
|
196
|
+
}, Y = () => {
|
|
197
|
+
B([]);
|
|
198
|
+
let e = J();
|
|
198
199
|
if (e.length > 0) {
|
|
199
|
-
|
|
200
|
+
B(e);
|
|
200
201
|
return;
|
|
201
202
|
}
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
I(!0), setTimeout(() => {
|
|
204
|
+
I(!1), R(!0), setTimeout(() => R(!1), 3e3);
|
|
204
205
|
}, 1e3);
|
|
205
|
-
},
|
|
206
|
+
}, X = x.find((e) => e.value === k);
|
|
206
207
|
return /* @__PURE__ */ _(n, {
|
|
207
208
|
title: "Service Provider Configuration",
|
|
208
209
|
description: "Manage your service status, operating hours, and service types",
|
|
209
210
|
actions: /* @__PURE__ */ _("button", {
|
|
210
211
|
type: "button",
|
|
211
|
-
onClick:
|
|
212
|
-
disabled:
|
|
213
|
-
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
|
214
|
-
children:
|
|
212
|
+
onClick: Y,
|
|
213
|
+
disabled: F,
|
|
214
|
+
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", F ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
|
|
215
|
+
children: F ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, { className: "h-4 w-4" }), "Save Configuration"] })
|
|
215
216
|
}),
|
|
216
217
|
children: /* @__PURE__ */ v("div", {
|
|
217
218
|
className: "space-y-6 max-w-4xl",
|
|
218
219
|
children: [
|
|
219
|
-
|
|
220
|
+
L && /* @__PURE__ */ v("div", {
|
|
220
221
|
className: "flex items-center gap-2 rounded-lg border border-status-success-border bg-status-success-bg-subtle p-4",
|
|
221
222
|
children: [/* @__PURE__ */ _(o, { className: "h-5 w-5 text-status-success-text shrink-0" }), /* @__PURE__ */ _("span", {
|
|
222
223
|
className: "text-sm font-medium text-status-success-text",
|
|
223
224
|
children: "Configuration saved successfully!"
|
|
224
225
|
})]
|
|
225
226
|
}),
|
|
226
|
-
|
|
227
|
+
z.length > 0 && /* @__PURE__ */ _("div", {
|
|
227
228
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4 space-y-1",
|
|
228
|
-
children:
|
|
229
|
+
children: z.map((e, t) => /* @__PURE__ */ v("div", {
|
|
229
230
|
className: "flex items-start gap-2",
|
|
230
231
|
children: [/* @__PURE__ */ _(i, { className: "h-4 w-4 text-status-error-text shrink-0 mt-0.5" }), /* @__PURE__ */ _("span", {
|
|
231
232
|
className: "text-sm text-status-error-text",
|
|
@@ -233,8 +234,12 @@ var y = [
|
|
|
233
234
|
})]
|
|
234
235
|
}, t))
|
|
235
236
|
}),
|
|
236
|
-
/* @__PURE__ */ _(
|
|
237
|
-
|
|
237
|
+
/* @__PURE__ */ _(b, {
|
|
238
|
+
icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" }),
|
|
239
|
+
children: "Tell the platform how your cart operates. Flip your service open or closed, choose whether you sell products, services or both, set the fulfilment options (pickup, delivery, cart dispatch) and operating hours — this is what decides when and how customers can order."
|
|
240
|
+
}),
|
|
241
|
+
/* @__PURE__ */ _(y, {
|
|
242
|
+
className: "p-6",
|
|
238
243
|
children: /* @__PURE__ */ v("div", {
|
|
239
244
|
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
|
|
240
245
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -249,13 +254,13 @@ var y = [
|
|
|
249
254
|
}), /* @__PURE__ */ v("div", {
|
|
250
255
|
className: "flex items-center gap-3",
|
|
251
256
|
children: [/* @__PURE__ */ _("span", {
|
|
252
|
-
className: t("inline-flex items-center rounded-full px-3 py-1 text-xs font-medium",
|
|
253
|
-
children:
|
|
257
|
+
className: t("inline-flex items-center rounded-full px-3 py-1 text-xs font-medium", D ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
|
|
258
|
+
children: D ? "Open" : "Closed"
|
|
254
259
|
}), /* @__PURE__ */ _("button", {
|
|
255
260
|
type: "button",
|
|
256
|
-
onClick: () =>
|
|
257
|
-
className: t("rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
|
258
|
-
children:
|
|
261
|
+
onClick: () => O(!D),
|
|
262
|
+
className: t("rounded-md px-4 py-2 text-sm font-medium transition-colors", D ? "bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle" : "bg-status-success-bg-subtle text-status-success-text hover:bg-status-success-bg-subtle"),
|
|
263
|
+
children: D ? "Close Service" : "Open Service"
|
|
259
264
|
})]
|
|
260
265
|
})]
|
|
261
266
|
})
|
|
@@ -275,17 +280,17 @@ var y = [
|
|
|
275
280
|
}),
|
|
276
281
|
/* @__PURE__ */ _("select", {
|
|
277
282
|
id: "offering-type",
|
|
278
|
-
value:
|
|
279
|
-
onChange: (e) =>
|
|
283
|
+
value: k,
|
|
284
|
+
onChange: (e) => A(e.target.value),
|
|
280
285
|
className: "w-full sm:w-64 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
281
|
-
children:
|
|
286
|
+
children: x.map((e) => /* @__PURE__ */ _("option", {
|
|
282
287
|
value: e.value,
|
|
283
288
|
children: e.label
|
|
284
289
|
}, e.value))
|
|
285
290
|
}),
|
|
286
291
|
/* @__PURE__ */ _("p", {
|
|
287
292
|
className: "text-sm text-text-secondary",
|
|
288
|
-
children:
|
|
293
|
+
children: X.description
|
|
289
294
|
})
|
|
290
295
|
]
|
|
291
296
|
})]
|
|
@@ -297,19 +302,19 @@ var y = [
|
|
|
297
302
|
children: [/* @__PURE__ */ _(s, { className: "h-5 w-5 text-text-secondary" }), "Operating Hours"]
|
|
298
303
|
}), /* @__PURE__ */ _("div", {
|
|
299
304
|
className: "grid grid-cols-1 md:grid-cols-2 gap-3",
|
|
300
|
-
children:
|
|
301
|
-
let n =
|
|
305
|
+
children: S.map((e) => {
|
|
306
|
+
let n = j[e];
|
|
302
307
|
return /* @__PURE__ */ v("div", {
|
|
303
308
|
className: t("flex flex-col sm:flex-row sm:items-center gap-3 p-4 rounded-lg", n.isOpen ? "bg-bg-sunken/50" : "bg-bg-sunken/30 opacity-60"),
|
|
304
309
|
children: [/* @__PURE__ */ _("span", {
|
|
305
310
|
className: "min-w-[50px] text-sm font-medium text-text-primary",
|
|
306
|
-
children:
|
|
311
|
+
children: C[e]
|
|
307
312
|
}), /* @__PURE__ */ v("div", {
|
|
308
313
|
className: "flex items-center gap-3 flex-1",
|
|
309
314
|
children: [
|
|
310
315
|
/* @__PURE__ */ _("button", {
|
|
311
316
|
type: "button",
|
|
312
|
-
onClick: () =>
|
|
317
|
+
onClick: () => V(e, "isOpen", !n.isOpen),
|
|
313
318
|
className: t("h-5 w-5 rounded border transition-colors shrink-0", n.isOpen ? "bg-status-info-bg border-status-info-border" : "border-border-seam bg-bg-surface"),
|
|
314
319
|
children: n.isOpen && /* @__PURE__ */ _(o, { className: "h-5 w-5 text-white" })
|
|
315
320
|
}),
|
|
@@ -323,7 +328,7 @@ var y = [
|
|
|
323
328
|
/* @__PURE__ */ _("input", {
|
|
324
329
|
type: "time",
|
|
325
330
|
value: n.open,
|
|
326
|
-
onChange: (t) =>
|
|
331
|
+
onChange: (t) => V(e, "open", t.target.value),
|
|
327
332
|
className: "text-sm rounded border border-border-seam bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
|
|
328
333
|
}),
|
|
329
334
|
/* @__PURE__ */ _("span", {
|
|
@@ -333,7 +338,7 @@ var y = [
|
|
|
333
338
|
/* @__PURE__ */ _("input", {
|
|
334
339
|
type: "time",
|
|
335
340
|
value: n.close,
|
|
336
|
-
onChange: (t) =>
|
|
341
|
+
onChange: (t) => V(e, "close", t.target.value),
|
|
337
342
|
className: "text-sm rounded border border-border-seam bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
|
|
338
343
|
})
|
|
339
344
|
]
|
|
@@ -364,17 +369,17 @@ var y = [
|
|
|
364
369
|
})]
|
|
365
370
|
}), /* @__PURE__ */ _("button", {
|
|
366
371
|
type: "button",
|
|
367
|
-
onClick: () =>
|
|
368
|
-
className: t("h-6 w-11 rounded-full transition-colors relative",
|
|
369
|
-
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform",
|
|
372
|
+
onClick: () => H("pickup", "enabled", !N.pickup.enabled),
|
|
373
|
+
className: t("h-6 w-11 rounded-full transition-colors relative", N.pickup.enabled ? "bg-status-info-bg" : "bg-muted-foreground/30"),
|
|
374
|
+
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", N.pickup.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
370
375
|
})]
|
|
371
|
-
}),
|
|
376
|
+
}), N.pickup.enabled && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
372
377
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
373
378
|
children: "Preparation Time (minutes)"
|
|
374
379
|
}), /* @__PURE__ */ _("input", {
|
|
375
380
|
type: "number",
|
|
376
|
-
value:
|
|
377
|
-
onChange: (e) =>
|
|
381
|
+
value: N.pickup.preparationTime,
|
|
382
|
+
onChange: (e) => H("pickup", "preparationTime", parseInt(e.target.value) || 0),
|
|
378
383
|
className: "w-full sm:w-32 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
379
384
|
})] })]
|
|
380
385
|
}),
|
|
@@ -390,11 +395,11 @@ var y = [
|
|
|
390
395
|
})]
|
|
391
396
|
}), /* @__PURE__ */ _("button", {
|
|
392
397
|
type: "button",
|
|
393
|
-
onClick: () =>
|
|
394
|
-
className: t("h-6 w-11 rounded-full transition-colors relative",
|
|
395
|
-
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform",
|
|
398
|
+
onClick: () => H("delivery", "enabled", !N.delivery.enabled),
|
|
399
|
+
className: t("h-6 w-11 rounded-full transition-colors relative", N.delivery.enabled ? "bg-status-info-bg" : "bg-muted-foreground/30"),
|
|
400
|
+
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", N.delivery.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
396
401
|
})]
|
|
397
|
-
}),
|
|
402
|
+
}), N.delivery.enabled && /* @__PURE__ */ v("div", {
|
|
398
403
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
399
404
|
children: [
|
|
400
405
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -402,8 +407,8 @@ var y = [
|
|
|
402
407
|
children: "Delivery Radius (km)"
|
|
403
408
|
}), /* @__PURE__ */ _("input", {
|
|
404
409
|
type: "number",
|
|
405
|
-
value:
|
|
406
|
-
onChange: (e) =>
|
|
410
|
+
value: N.delivery.deliveryRadius,
|
|
411
|
+
onChange: (e) => H("delivery", "deliveryRadius", parseInt(e.target.value) || 0),
|
|
407
412
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
408
413
|
})] }),
|
|
409
414
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -411,8 +416,8 @@ var y = [
|
|
|
411
416
|
children: "Delivery Fee (₹)"
|
|
412
417
|
}), /* @__PURE__ */ _("input", {
|
|
413
418
|
type: "number",
|
|
414
|
-
value:
|
|
415
|
-
onChange: (e) =>
|
|
419
|
+
value: N.delivery.deliveryFee,
|
|
420
|
+
onChange: (e) => H("delivery", "deliveryFee", parseInt(e.target.value) || 0),
|
|
416
421
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
417
422
|
})] }),
|
|
418
423
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -420,8 +425,8 @@ var y = [
|
|
|
420
425
|
children: "Minimum Order (₹)"
|
|
421
426
|
}), /* @__PURE__ */ _("input", {
|
|
422
427
|
type: "number",
|
|
423
|
-
value:
|
|
424
|
-
onChange: (e) =>
|
|
428
|
+
value: N.delivery.minimumOrderValue,
|
|
429
|
+
onChange: (e) => H("delivery", "minimumOrderValue", parseInt(e.target.value) || 0),
|
|
425
430
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
426
431
|
})] })
|
|
427
432
|
]
|
|
@@ -439,11 +444,11 @@ var y = [
|
|
|
439
444
|
})]
|
|
440
445
|
}), /* @__PURE__ */ _("button", {
|
|
441
446
|
type: "button",
|
|
442
|
-
onClick: () =>
|
|
443
|
-
className: t("h-6 w-11 rounded-full transition-colors relative",
|
|
444
|
-
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform",
|
|
447
|
+
onClick: () => H("scheduledStop", "enabled", !N.scheduledStop.enabled),
|
|
448
|
+
className: t("h-6 w-11 rounded-full transition-colors relative", N.scheduledStop.enabled ? "bg-status-info-bg" : "bg-muted-foreground/30"),
|
|
449
|
+
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", N.scheduledStop.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
445
450
|
})]
|
|
446
|
-
}),
|
|
451
|
+
}), N.scheduledStop.enabled && /* @__PURE__ */ v("div", {
|
|
447
452
|
className: "space-y-4",
|
|
448
453
|
children: [
|
|
449
454
|
/* @__PURE__ */ v("div", {
|
|
@@ -453,12 +458,12 @@ var y = [
|
|
|
453
458
|
children: "Configure locations and times where your cart will be available"
|
|
454
459
|
}), /* @__PURE__ */ v("button", {
|
|
455
460
|
type: "button",
|
|
456
|
-
onClick:
|
|
461
|
+
onClick: W,
|
|
457
462
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
458
463
|
children: [/* @__PURE__ */ _(u, { className: "h-4 w-4" }), "Add Stop"]
|
|
459
464
|
})]
|
|
460
465
|
}),
|
|
461
|
-
|
|
466
|
+
N.scheduledStop.stops.map((e) => /* @__PURE__ */ v("div", {
|
|
462
467
|
className: "border border-border-seam rounded-lg p-4 bg-bg-sunken/50",
|
|
463
468
|
children: [
|
|
464
469
|
/* @__PURE__ */ v("div", {
|
|
@@ -468,7 +473,7 @@ var y = [
|
|
|
468
473
|
children: "Stop Configuration"
|
|
469
474
|
}), /* @__PURE__ */ v("button", {
|
|
470
475
|
type: "button",
|
|
471
|
-
onClick: () =>
|
|
476
|
+
onClick: () => G(e.id),
|
|
472
477
|
className: "inline-flex items-center gap-1 rounded-md bg-status-error-bg-subtle px-2 py-1 text-xs text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
|
|
473
478
|
children: [/* @__PURE__ */ _(m, { className: "h-3.5 w-3.5" }), "Remove"]
|
|
474
479
|
})]
|
|
@@ -481,7 +486,7 @@ var y = [
|
|
|
481
486
|
}), /* @__PURE__ */ _("input", {
|
|
482
487
|
type: "text",
|
|
483
488
|
value: e.name,
|
|
484
|
-
onChange: (t) =>
|
|
489
|
+
onChange: (t) => K(e.id, "name", t.target.value),
|
|
485
490
|
placeholder: "e.g., Tech Park Morning",
|
|
486
491
|
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"
|
|
487
492
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -490,7 +495,7 @@ var y = [
|
|
|
490
495
|
}), /* @__PURE__ */ _("input", {
|
|
491
496
|
type: "text",
|
|
492
497
|
value: e.address,
|
|
493
|
-
onChange: (t) =>
|
|
498
|
+
onChange: (t) => K(e.id, "address", t.target.value),
|
|
494
499
|
placeholder: "Full address",
|
|
495
500
|
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"
|
|
496
501
|
})] })]
|
|
@@ -503,7 +508,7 @@ var y = [
|
|
|
503
508
|
}), /* @__PURE__ */ _("input", {
|
|
504
509
|
type: "time",
|
|
505
510
|
value: e.arrivalTime,
|
|
506
|
-
onChange: (t) =>
|
|
511
|
+
onChange: (t) => K(e.id, "arrivalTime", t.target.value),
|
|
507
512
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
508
513
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
509
514
|
className: "block text-xs font-medium text-text-primary mb-1",
|
|
@@ -511,7 +516,7 @@ var y = [
|
|
|
511
516
|
}), /* @__PURE__ */ _("input", {
|
|
512
517
|
type: "time",
|
|
513
518
|
value: e.departureTime,
|
|
514
|
-
onChange: (t) =>
|
|
519
|
+
onChange: (t) => K(e.id, "departureTime", t.target.value),
|
|
515
520
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
516
521
|
})] })]
|
|
517
522
|
}),
|
|
@@ -520,16 +525,16 @@ var y = [
|
|
|
520
525
|
children: "Days of Week"
|
|
521
526
|
}), /* @__PURE__ */ _("div", {
|
|
522
527
|
className: "flex flex-wrap gap-1.5",
|
|
523
|
-
children:
|
|
528
|
+
children: S.map((n) => /* @__PURE__ */ _("button", {
|
|
524
529
|
type: "button",
|
|
525
|
-
onClick: () =>
|
|
530
|
+
onClick: () => q(e.id, n),
|
|
526
531
|
className: t("px-3 py-1 rounded-full text-xs font-medium transition-colors", e.daysOfWeek.includes(n) ? "bg-status-info-bg text-white" : "bg-bg-sunken text-text-secondary hover:bg-muted-foreground/20"),
|
|
527
|
-
children:
|
|
532
|
+
children: C[n]
|
|
528
533
|
}, n))
|
|
529
534
|
})] })
|
|
530
535
|
]
|
|
531
536
|
}, e.id)),
|
|
532
|
-
|
|
537
|
+
N.scheduledStop.stops.length === 0 && /* @__PURE__ */ _("div", {
|
|
533
538
|
className: "text-center py-6 text-sm text-text-secondary",
|
|
534
539
|
children: "No scheduled stops configured. Click \"Add Stop\" to create one."
|
|
535
540
|
})
|
|
@@ -548,11 +553,11 @@ var y = [
|
|
|
548
553
|
})]
|
|
549
554
|
}), /* @__PURE__ */ _("button", {
|
|
550
555
|
type: "button",
|
|
551
|
-
onClick: () =>
|
|
552
|
-
className: t("h-6 w-11 rounded-full transition-colors relative",
|
|
553
|
-
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform",
|
|
556
|
+
onClick: () => H("directService", "enabled", !N.directService.enabled),
|
|
557
|
+
className: t("h-6 w-11 rounded-full transition-colors relative", N.directService.enabled ? "bg-status-info-bg" : "bg-muted-foreground/30"),
|
|
558
|
+
children: /* @__PURE__ */ _("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", N.directService.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
554
559
|
})]
|
|
555
|
-
}),
|
|
560
|
+
}), N.directService.enabled && /* @__PURE__ */ v("div", {
|
|
556
561
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
557
562
|
children: [
|
|
558
563
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -560,8 +565,8 @@ var y = [
|
|
|
560
565
|
children: "Service Fee (₹)"
|
|
561
566
|
}), /* @__PURE__ */ _("input", {
|
|
562
567
|
type: "number",
|
|
563
|
-
value:
|
|
564
|
-
onChange: (e) =>
|
|
568
|
+
value: N.directService.config.serviceFee,
|
|
569
|
+
onChange: (e) => U("serviceFee", parseInt(e.target.value) || 0),
|
|
565
570
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
566
571
|
})] }),
|
|
567
572
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -569,8 +574,8 @@ var y = [
|
|
|
569
574
|
children: "Minimum Advance Payment (₹)"
|
|
570
575
|
}), /* @__PURE__ */ _("input", {
|
|
571
576
|
type: "number",
|
|
572
|
-
value:
|
|
573
|
-
onChange: (e) =>
|
|
577
|
+
value: N.directService.config.minimumAdvancePayment,
|
|
578
|
+
onChange: (e) => U("minimumAdvancePayment", parseInt(e.target.value) || 0),
|
|
574
579
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
575
580
|
})] }),
|
|
576
581
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -578,8 +583,8 @@ var y = [
|
|
|
578
583
|
children: "Service Radius (km)"
|
|
579
584
|
}), /* @__PURE__ */ _("input", {
|
|
580
585
|
type: "number",
|
|
581
|
-
value:
|
|
582
|
-
onChange: (e) =>
|
|
586
|
+
value: N.directService.config.serviceRadius,
|
|
587
|
+
onChange: (e) => U("serviceRadius", parseInt(e.target.value) || 0),
|
|
583
588
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
584
589
|
})] }),
|
|
585
590
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -587,8 +592,8 @@ var y = [
|
|
|
587
592
|
children: "Estimated Arrival Time (min)"
|
|
588
593
|
}), /* @__PURE__ */ _("input", {
|
|
589
594
|
type: "number",
|
|
590
|
-
value:
|
|
591
|
-
onChange: (e) =>
|
|
595
|
+
value: N.directService.config.estimatedArrivalTime,
|
|
596
|
+
onChange: (e) => U("estimatedArrivalTime", parseInt(e.target.value) || 0),
|
|
592
597
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
593
598
|
})] }),
|
|
594
599
|
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -596,8 +601,8 @@ var y = [
|
|
|
596
601
|
children: "Minimum Order Value (₹)"
|
|
597
602
|
}), /* @__PURE__ */ _("input", {
|
|
598
603
|
type: "number",
|
|
599
|
-
value:
|
|
600
|
-
onChange: (e) =>
|
|
604
|
+
value: N.directService.config.minimumOrderValue,
|
|
605
|
+
onChange: (e) => U("minimumOrderValue", parseInt(e.target.value) || 0),
|
|
601
606
|
className: "w-full rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
602
607
|
})] })
|
|
603
608
|
]
|
|
@@ -610,15 +615,15 @@ var y = [
|
|
|
610
615
|
className: "flex items-center justify-between pt-2",
|
|
611
616
|
children: [/* @__PURE__ */ _("button", {
|
|
612
617
|
type: "button",
|
|
613
|
-
onClick: () =>
|
|
618
|
+
onClick: () => E("/cart-owner/dashboard"),
|
|
614
619
|
className: "rounded-md border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
615
620
|
children: "Cancel"
|
|
616
621
|
}), /* @__PURE__ */ _("button", {
|
|
617
622
|
type: "button",
|
|
618
|
-
onClick:
|
|
619
|
-
disabled:
|
|
620
|
-
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
|
621
|
-
children:
|
|
623
|
+
onClick: Y,
|
|
624
|
+
disabled: F,
|
|
625
|
+
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", F ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
|
|
626
|
+
children: F ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, { className: "h-4 w-4" }), "Save Configuration"] })
|
|
622
627
|
})]
|
|
623
628
|
})
|
|
624
629
|
]
|
|
@@ -626,6 +631,6 @@ var y = [
|
|
|
626
631
|
});
|
|
627
632
|
};
|
|
628
633
|
//#endregion
|
|
629
|
-
export {
|
|
634
|
+
export { E as CartServiceConfigPage };
|
|
630
635
|
|
|
631
636
|
//# sourceMappingURL=CartServiceConfigPage.js.map
|