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