@burdenoff/microfe-kadaikodi 2026.1124.1 → 2026.1126.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/kadaikodi/components/AppointmentSettingsSection.d.ts +13 -0
- package/dist/kadaikodi/components/AppointmentSettingsSection.js +206 -0
- package/dist/kadaikodi/components/AppointmentSettingsSection.js.map +1 -0
- package/dist/kadaikodi/components/AppointmentSlotPicker.d.ts +19 -0
- package/dist/kadaikodi/components/AppointmentSlotPicker.js +106 -0
- package/dist/kadaikodi/components/AppointmentSlotPicker.js.map +1 -0
- package/dist/kadaikodi/components/ProviderAppointmentQueue.d.ts +15 -0
- package/dist/kadaikodi/components/ProviderAppointmentQueue.js +179 -0
- package/dist/kadaikodi/components/ProviderAppointmentQueue.js.map +1 -0
- package/dist/kadaikodi/hooks/useAppointmentsApi.d.ts +122 -0
- package/dist/kadaikodi/hooks/useAppointmentsApi.js +184 -0
- package/dist/kadaikodi/hooks/useAppointmentsApi.js.map +1 -0
- package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts +3 -0
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +5 -4
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +97 -94
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +172 -170
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +250 -241
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.d.ts +3 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +317 -178
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.d.ts +3 -3
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +307 -338
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { EmptyState as t } from "../../components/EmptyState.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { AppointmentSettingsSection as n } from "../../components/AppointmentSettingsSection.js";
|
|
4
|
+
import { useKadaikodi as r } from "../../context/KadaikodiContext.js";
|
|
5
|
+
import { useProviders as i, useUpdateProvider as ee } from "../../hooks/useKadaikodiApi.js";
|
|
5
6
|
import { cn as a } from "../../utils/cn.js";
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { AlertCircle as c, Calendar as l, CheckCircle2 as u, Clock as d, Home as f, Package as p, Plus as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { EmphasisPanel as
|
|
7
|
+
import { useEffect as o, useMemo as te, useState as s } from "react";
|
|
8
|
+
import { AlertCircle as c, Calendar as l, CheckCircle2 as u, Clock as d, Home as f, Package as p, Plus as ne, Save as m, Settings as h, ShoppingBag as re, Trash2 as g, Truck as _ } from "lucide-react";
|
|
9
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
10
|
+
import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
|
|
10
11
|
// src/kadaikodi/pages/cart-owner/CartServiceConfigPage.tsx
|
|
11
|
-
var
|
|
12
|
+
var C = [
|
|
12
13
|
{
|
|
13
14
|
value: "products_only",
|
|
14
15
|
label: "Products Only",
|
|
@@ -24,7 +25,7 @@ var w = [
|
|
|
24
25
|
label: "Products & Services",
|
|
25
26
|
description: "You'll manage both products and services with full flexibility."
|
|
26
27
|
}
|
|
27
|
-
],
|
|
28
|
+
], w = [
|
|
28
29
|
"monday",
|
|
29
30
|
"tuesday",
|
|
30
31
|
"wednesday",
|
|
@@ -32,7 +33,7 @@ var w = [
|
|
|
32
33
|
"friday",
|
|
33
34
|
"saturday",
|
|
34
35
|
"sunday"
|
|
35
|
-
],
|
|
36
|
+
], T = {
|
|
36
37
|
monday: "Mon",
|
|
37
38
|
tuesday: "Tue",
|
|
38
39
|
wednesday: "Wed",
|
|
@@ -40,7 +41,7 @@ var w = [
|
|
|
40
41
|
friday: "Fri",
|
|
41
42
|
saturday: "Sat",
|
|
42
43
|
sunday: "Sun"
|
|
43
|
-
},
|
|
44
|
+
}, E = {
|
|
44
45
|
monday: {
|
|
45
46
|
isOpen: !0,
|
|
46
47
|
open: "09:00",
|
|
@@ -76,7 +77,7 @@ var w = [
|
|
|
76
77
|
open: "10:00",
|
|
77
78
|
close: "18:00"
|
|
78
79
|
}
|
|
79
|
-
},
|
|
80
|
+
}, D = {
|
|
80
81
|
pickup: {
|
|
81
82
|
enabled: !0,
|
|
82
83
|
preparationTime: 15
|
|
@@ -101,15 +102,15 @@ var w = [
|
|
|
101
102
|
minimumOrderValue: 300
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
},
|
|
105
|
-
let { navigateTo:
|
|
106
|
-
|
|
107
|
-
if (!
|
|
108
|
-
|
|
109
|
-
let e =
|
|
105
|
+
}, O = () => {
|
|
106
|
+
let { navigateTo: O, currentUser: k } = r(), { data: A = [], isLoading: j } = i(), M = te(() => A.find((e) => e.ownerId === k?.id) ?? A[0], [A, k?.id]), [N, P] = s(!0), [F, I] = s("both"), [L, R] = s(E), [z, B] = s(D), [V, H] = s(!1);
|
|
107
|
+
o(() => {
|
|
108
|
+
if (!M || V) return;
|
|
109
|
+
P(M.isOpen);
|
|
110
|
+
let e = M.businessHours;
|
|
110
111
|
e && R((t) => {
|
|
111
112
|
let n = { ...t };
|
|
112
|
-
return
|
|
113
|
+
return w.forEach((r) => {
|
|
113
114
|
let i = e[r] ?? e[r.charAt(0).toUpperCase() + r.slice(1)] ?? e[r.toUpperCase()];
|
|
114
115
|
i && (n[r] = {
|
|
115
116
|
isOpen: !!i.isOpen,
|
|
@@ -118,8 +119,8 @@ var w = [
|
|
|
118
119
|
});
|
|
119
120
|
}), n;
|
|
120
121
|
}), H(!0);
|
|
121
|
-
}, [
|
|
122
|
-
let U =
|
|
122
|
+
}, [M, V]);
|
|
123
|
+
let U = ee(), W = U.isPending, [G, K] = s(!1), [q, J] = s([]), Y = (e, t, n) => {
|
|
123
124
|
R((r) => ({
|
|
124
125
|
...r,
|
|
125
126
|
[e]: {
|
|
@@ -146,7 +147,7 @@ var w = [
|
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
}));
|
|
149
|
-
},
|
|
150
|
+
}, ie = () => {
|
|
150
151
|
let e = {
|
|
151
152
|
id: `stop-${Date.now()}`,
|
|
152
153
|
name: "",
|
|
@@ -169,7 +170,7 @@ var w = [
|
|
|
169
170
|
stops: [...t.scheduledStop.stops, e]
|
|
170
171
|
}
|
|
171
172
|
}));
|
|
172
|
-
},
|
|
173
|
+
}, ae = (e) => {
|
|
173
174
|
B((t) => ({
|
|
174
175
|
...t,
|
|
175
176
|
scheduledStop: {
|
|
@@ -188,7 +189,7 @@ var w = [
|
|
|
188
189
|
} : r)
|
|
189
190
|
}
|
|
190
191
|
}));
|
|
191
|
-
},
|
|
192
|
+
}, oe = (e, t) => {
|
|
192
193
|
B((n) => ({
|
|
193
194
|
...n,
|
|
194
195
|
scheduledStop: {
|
|
@@ -205,7 +206,7 @@ var w = [
|
|
|
205
206
|
})
|
|
206
207
|
}
|
|
207
208
|
}));
|
|
208
|
-
},
|
|
209
|
+
}, se = () => {
|
|
209
210
|
let e = [];
|
|
210
211
|
if (z.delivery.enabled && (z.delivery.deliveryRadius <= 0 && e.push("Delivery radius must be greater than 0"), z.delivery.deliveryFee < 0 && e.push("Delivery fee cannot be negative"), z.delivery.minimumOrderValue < 0 && e.push("Minimum order value cannot be negative")), z.pickup.enabled && z.pickup.preparationTime <= 0 && e.push("Preparation time must be greater than 0"), z.scheduledStop.enabled) {
|
|
211
212
|
z.scheduledStop.stops.length === 0 && e.push("At least one scheduled stop is required when scheduled stop service is enabled");
|
|
@@ -214,13 +215,13 @@ var w = [
|
|
|
214
215
|
return z.directService.enabled && (z.directService.config.serviceFee < 0 && e.push("Service fee cannot be negative"), z.directService.config.minimumAdvancePayment < 0 && e.push("Minimum advance payment cannot be negative"), z.directService.config.serviceRadius <= 0 && e.push("Service radius must be greater than 0"), z.directService.config.estimatedArrivalTime <= 0 && e.push("Estimated arrival time must be greater than 0")), Object.values(L).some((e) => e.isOpen) || e.push("At least one day must be open"), e;
|
|
215
216
|
}, $ = () => {
|
|
216
217
|
J([]);
|
|
217
|
-
let e =
|
|
218
|
+
let e = se();
|
|
218
219
|
if (e.length > 0) {
|
|
219
220
|
J(e);
|
|
220
221
|
return;
|
|
221
222
|
}
|
|
222
|
-
if (!
|
|
223
|
-
let t =
|
|
223
|
+
if (!M) return;
|
|
224
|
+
let t = w.reduce((e, t) => (e[t] = {
|
|
224
225
|
isOpen: L[t].isOpen,
|
|
225
226
|
open: L[t].open,
|
|
226
227
|
close: L[t].close
|
|
@@ -231,9 +232,9 @@ var w = [
|
|
|
231
232
|
z.directService.enabled ? "direct_service" : null
|
|
232
233
|
].filter((e) => e !== null);
|
|
233
234
|
U.mutate({
|
|
234
|
-
id:
|
|
235
|
+
id: M.id,
|
|
235
236
|
input: {
|
|
236
|
-
status:
|
|
237
|
+
status: N ? "ACTIVE" : "PAUSED",
|
|
237
238
|
businessHours: t,
|
|
238
239
|
serviceTypes: n
|
|
239
240
|
}
|
|
@@ -243,149 +244,149 @@ var w = [
|
|
|
243
244
|
},
|
|
244
245
|
onError: () => J(["Could not save your configuration. Please try again."])
|
|
245
246
|
});
|
|
246
|
-
},
|
|
247
|
-
return
|
|
247
|
+
}, ce = C.find((e) => e.value === F);
|
|
248
|
+
return j ? /* @__PURE__ */ y(e, {
|
|
248
249
|
title: "Service Provider Configuration",
|
|
249
250
|
description: "Manage your service status, operating hours, and service types",
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ y("div", {
|
|
251
252
|
className: "flex items-center justify-center py-24",
|
|
252
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ y("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
|
|
253
254
|
})
|
|
254
|
-
}) :
|
|
255
|
+
}) : M ? /* @__PURE__ */ b(e, {
|
|
255
256
|
title: "Service Provider Configuration",
|
|
256
|
-
description: `Configure how ${
|
|
257
|
-
actions: /* @__PURE__ */
|
|
257
|
+
description: `Configure how ${M.name} serves customers`,
|
|
258
|
+
actions: /* @__PURE__ */ y("button", {
|
|
258
259
|
type: "button",
|
|
259
260
|
onClick: $,
|
|
260
261
|
disabled: W,
|
|
261
262
|
className: a("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", W ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
|
|
262
|
-
children: W ? /* @__PURE__ */
|
|
263
|
+
children: W ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), "Save Configuration"] })
|
|
263
264
|
}),
|
|
264
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ y(S, {
|
|
265
266
|
className: "mb-6 max-w-4xl",
|
|
266
267
|
children: "Define how your cart actually serves customers. Use this page to flip your service open or closed, set your operating hours, and choose which fulfilment types you offer — pickup, delivery, scheduled stops, or on-the-spot direct service. Get this right and customers see accurate availability and only the service options you can deliver."
|
|
267
|
-
}), /* @__PURE__ */
|
|
268
|
+
}), /* @__PURE__ */ b("div", {
|
|
268
269
|
className: "space-y-6 max-w-4xl",
|
|
269
270
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ b("div", {
|
|
271
272
|
className: "flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ y(c, { className: "h-4 w-4 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ y("p", {
|
|
273
274
|
className: "text-xs text-text-secondary",
|
|
274
275
|
children: "Your service status, operating hours and enabled service types are saved to your cart record. The finer per-service settings below (delivery fees, scheduled stops, prep and advance-payment values) are kept in this browser for now."
|
|
275
276
|
})]
|
|
276
277
|
}),
|
|
277
|
-
G && /* @__PURE__ */
|
|
278
|
+
G && /* @__PURE__ */ b("div", {
|
|
278
279
|
className: "flex items-center gap-2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
|
|
279
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ y(u, { className: "h-5 w-5 text-status-success-text shrink-0" }), /* @__PURE__ */ y("span", {
|
|
280
281
|
className: "text-sm font-medium text-status-success-text",
|
|
281
282
|
children: "Configuration saved successfully!"
|
|
282
283
|
})]
|
|
283
284
|
}),
|
|
284
|
-
q.length > 0 && /* @__PURE__ */
|
|
285
|
+
q.length > 0 && /* @__PURE__ */ y("div", {
|
|
285
286
|
className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-4 space-y-1",
|
|
286
|
-
children: q.map((e, t) => /* @__PURE__ */
|
|
287
|
+
children: q.map((e, t) => /* @__PURE__ */ b("div", {
|
|
287
288
|
className: "flex items-start gap-2",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ y(c, { className: "h-4 w-4 text-status-error-text shrink-0 mt-0.5" }), /* @__PURE__ */ y("span", {
|
|
289
290
|
className: "text-sm text-status-error-text",
|
|
290
291
|
children: e
|
|
291
292
|
})]
|
|
292
293
|
}, t))
|
|
293
294
|
}),
|
|
294
|
-
/* @__PURE__ */ x
|
|
295
|
+
/* @__PURE__ */ y(x, { children: /* @__PURE__ */ b("div", {
|
|
295
296
|
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ b("div", {
|
|
297
298
|
className: "flex-1",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
299
300
|
className: "text-lg font-semibold text-text-primary flex items-center gap-2",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
301
|
-
}), /* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ y(h, { className: "h-5 w-5 text-text-secondary" }), "Service Status"]
|
|
302
|
+
}), /* @__PURE__ */ y("p", {
|
|
302
303
|
className: "text-sm text-text-secondary mt-1",
|
|
303
304
|
children: "Control whether your service is currently accepting orders"
|
|
304
305
|
})]
|
|
305
|
-
}), /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ b("div", {
|
|
306
307
|
className: "flex items-center gap-3",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
308
|
-
className: a("inline-flex items-center rounded-full px-3 py-1 text-xs font-medium",
|
|
309
|
-
children:
|
|
310
|
-
}), /* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ y("span", {
|
|
309
|
+
className: a("inline-flex items-center rounded-full px-3 py-1 text-xs font-medium", N ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
|
|
310
|
+
children: N ? "Open" : "Closed"
|
|
311
|
+
}), /* @__PURE__ */ y("button", {
|
|
311
312
|
type: "button",
|
|
312
|
-
onClick: () =>
|
|
313
|
-
className: a("rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
|
314
|
-
children:
|
|
313
|
+
onClick: () => P(!N),
|
|
314
|
+
className: a("rounded-md px-4 py-2 text-sm font-medium transition-colors", N ? "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"),
|
|
315
|
+
children: N ? "Close Service" : "Open Service"
|
|
315
316
|
})]
|
|
316
317
|
})]
|
|
317
318
|
}) }),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ b("section", {
|
|
319
320
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6 shadow-sm",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
321
322
|
className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-4",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
323
|
-
}), /* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ y(p, { className: "h-5 w-5 text-text-secondary" }), "Offering Type"]
|
|
324
|
+
}), /* @__PURE__ */ b("div", {
|
|
324
325
|
className: "space-y-3",
|
|
325
326
|
children: [
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ y("label", {
|
|
327
328
|
htmlFor: "offering-type",
|
|
328
329
|
className: "block text-sm font-medium text-text-primary",
|
|
329
330
|
children: "What do you provide?"
|
|
330
331
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ y("select", {
|
|
332
333
|
id: "offering-type",
|
|
333
|
-
value:
|
|
334
|
-
onChange: (e) =>
|
|
334
|
+
value: F,
|
|
335
|
+
onChange: (e) => I(e.target.value),
|
|
335
336
|
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)]",
|
|
336
|
-
children:
|
|
337
|
+
children: C.map((e) => /* @__PURE__ */ y("option", {
|
|
337
338
|
value: e.value,
|
|
338
339
|
children: e.label
|
|
339
340
|
}, e.value))
|
|
340
341
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ y("p", {
|
|
342
343
|
className: "text-sm text-text-secondary",
|
|
343
|
-
children:
|
|
344
|
+
children: ce.description
|
|
344
345
|
})
|
|
345
346
|
]
|
|
346
347
|
})]
|
|
347
348
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ b("section", {
|
|
349
350
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6 shadow-sm",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
351
352
|
className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-4",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
353
|
-
}), /* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ y(d, { className: "h-5 w-5 text-text-secondary" }), "Operating Hours"]
|
|
354
|
+
}), /* @__PURE__ */ y("div", {
|
|
354
355
|
className: "grid grid-cols-1 md:grid-cols-2 gap-3",
|
|
355
|
-
children:
|
|
356
|
+
children: w.map((e) => {
|
|
356
357
|
let t = L[e];
|
|
357
|
-
return /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ b("div", {
|
|
358
359
|
className: a("flex flex-col sm:flex-row sm:items-center gap-3 p-4 rounded-lg", t.isOpen ? "bg-bg-sunken/50" : "bg-bg-sunken/30 opacity-60"),
|
|
359
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ y("span", {
|
|
360
361
|
className: "min-w-[50px] text-sm font-medium text-text-primary",
|
|
361
|
-
children:
|
|
362
|
-
}), /* @__PURE__ */
|
|
362
|
+
children: T[e]
|
|
363
|
+
}), /* @__PURE__ */ b("div", {
|
|
363
364
|
className: "flex items-center gap-3 flex-1",
|
|
364
365
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ y("button", {
|
|
366
367
|
type: "button",
|
|
367
368
|
onClick: () => Y(e, "isOpen", !t.isOpen),
|
|
368
369
|
className: a("h-5 w-5 rounded border transition-colors shrink-0", t.isOpen ? "bg-action-primary-bg border-border-focus" : "border-border-subtle bg-bg-surface"),
|
|
369
|
-
children: t.isOpen && /* @__PURE__ */
|
|
370
|
+
children: t.isOpen && /* @__PURE__ */ y(u, { className: "h-5 w-5 text-white" })
|
|
370
371
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ y("span", {
|
|
372
373
|
className: "text-xs text-text-secondary min-w-[35px]",
|
|
373
374
|
children: "Open"
|
|
374
375
|
}),
|
|
375
|
-
t.isOpen && /* @__PURE__ */
|
|
376
|
+
t.isOpen && /* @__PURE__ */ b("div", {
|
|
376
377
|
className: "flex items-center gap-2",
|
|
377
378
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ y("input", {
|
|
379
380
|
type: "time",
|
|
380
381
|
value: t.open,
|
|
381
382
|
onChange: (t) => Y(e, "open", t.target.value),
|
|
382
383
|
className: "text-sm rounded border border-border-subtle bg-bg-surface px-2 py-1.5 text-text-primary w-[110px]"
|
|
383
384
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ y("span", {
|
|
385
386
|
className: "text-xs text-text-secondary",
|
|
386
387
|
children: "to"
|
|
387
388
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ y("input", {
|
|
389
390
|
type: "time",
|
|
390
391
|
value: t.close,
|
|
391
392
|
onChange: (t) => Y(e, "close", t.target.value),
|
|
@@ -399,81 +400,82 @@ var w = [
|
|
|
399
400
|
})
|
|
400
401
|
})]
|
|
401
402
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ y(n, { providerId: M.id }),
|
|
404
|
+
/* @__PURE__ */ b("section", {
|
|
403
405
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6 shadow-sm",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
405
407
|
className: "text-lg font-semibold text-text-primary flex items-center gap-2 mb-6",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
407
|
-
}), /* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ y(_, { className: "h-5 w-5 text-text-secondary" }), "Service Types"]
|
|
409
|
+
}), /* @__PURE__ */ b("div", {
|
|
408
410
|
className: "space-y-6",
|
|
409
411
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ b("div", {
|
|
411
413
|
className: "border border-border-subtle rounded-lg p-4",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ b("div", {
|
|
413
415
|
className: "flex items-center justify-between mb-4",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ b("div", {
|
|
415
417
|
className: "flex items-center gap-2",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ y(re, { className: "h-5 w-5 text-text-primary" }), /* @__PURE__ */ y("span", {
|
|
417
419
|
className: "font-medium text-text-primary",
|
|
418
420
|
children: "Pickup Service"
|
|
419
421
|
})]
|
|
420
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ y("button", {
|
|
421
423
|
type: "button",
|
|
422
424
|
onClick: () => X("pickup", "enabled", !z.pickup.enabled),
|
|
423
425
|
className: a("h-6 w-11 rounded-full transition-colors relative", z.pickup.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
|
|
424
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ y("div", { className: a("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", z.pickup.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
425
427
|
})]
|
|
426
|
-
}), z.pickup.enabled && /* @__PURE__ */
|
|
428
|
+
}), z.pickup.enabled && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
427
429
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
428
430
|
children: "Preparation Time (minutes)"
|
|
429
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ y("input", {
|
|
430
432
|
type: "number",
|
|
431
433
|
value: z.pickup.preparationTime,
|
|
432
434
|
onChange: (e) => X("pickup", "preparationTime", parseInt(e.target.value) || 0),
|
|
433
435
|
className: "w-full sm:w-32 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
434
436
|
})] })]
|
|
435
437
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ b("div", {
|
|
437
439
|
className: "border border-border-subtle rounded-lg p-4",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ b("div", {
|
|
439
441
|
className: "flex items-center justify-between mb-4",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
442
|
+
children: [/* @__PURE__ */ b("div", {
|
|
441
443
|
className: "flex items-center gap-2",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ y(_, { className: "h-5 w-5 text-status-success-text" }), /* @__PURE__ */ y("span", {
|
|
443
445
|
className: "font-medium text-text-primary",
|
|
444
446
|
children: "Delivery Service"
|
|
445
447
|
})]
|
|
446
|
-
}), /* @__PURE__ */
|
|
448
|
+
}), /* @__PURE__ */ y("button", {
|
|
447
449
|
type: "button",
|
|
448
450
|
onClick: () => X("delivery", "enabled", !z.delivery.enabled),
|
|
449
451
|
className: a("h-6 w-11 rounded-full transition-colors relative", z.delivery.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
|
|
450
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ y("div", { className: a("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", z.delivery.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
451
453
|
})]
|
|
452
|
-
}), z.delivery.enabled && /* @__PURE__ */
|
|
454
|
+
}), z.delivery.enabled && /* @__PURE__ */ b("div", {
|
|
453
455
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
454
456
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
456
458
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
457
459
|
children: "Delivery Radius (km)"
|
|
458
|
-
}), /* @__PURE__ */
|
|
460
|
+
}), /* @__PURE__ */ y("input", {
|
|
459
461
|
type: "number",
|
|
460
462
|
value: z.delivery.deliveryRadius,
|
|
461
463
|
onChange: (e) => X("delivery", "deliveryRadius", parseInt(e.target.value) || 0),
|
|
462
464
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
463
465
|
})] }),
|
|
464
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
465
467
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
466
468
|
children: "Delivery Fee (₹)"
|
|
467
|
-
}), /* @__PURE__ */
|
|
469
|
+
}), /* @__PURE__ */ y("input", {
|
|
468
470
|
type: "number",
|
|
469
471
|
value: z.delivery.deliveryFee,
|
|
470
472
|
onChange: (e) => X("delivery", "deliveryFee", parseInt(e.target.value) || 0),
|
|
471
473
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
472
474
|
})] }),
|
|
473
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
474
476
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
475
477
|
children: "Minimum Order (₹)"
|
|
476
|
-
}), /* @__PURE__ */
|
|
478
|
+
}), /* @__PURE__ */ y("input", {
|
|
477
479
|
type: "number",
|
|
478
480
|
value: z.delivery.minimumOrderValue,
|
|
479
481
|
onChange: (e) => X("delivery", "minimumOrderValue", parseInt(e.target.value) || 0),
|
|
@@ -482,67 +484,67 @@ var w = [
|
|
|
482
484
|
]
|
|
483
485
|
})]
|
|
484
486
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ b("div", {
|
|
486
488
|
className: "border border-border-subtle rounded-lg p-4",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ b("div", {
|
|
488
490
|
className: "flex items-center justify-between mb-4",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
491
|
+
children: [/* @__PURE__ */ b("div", {
|
|
490
492
|
className: "flex items-center gap-2",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
493
|
+
children: [/* @__PURE__ */ y(l, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ y("span", {
|
|
492
494
|
className: "font-medium text-text-primary",
|
|
493
495
|
children: "Scheduled Stop Service"
|
|
494
496
|
})]
|
|
495
|
-
}), /* @__PURE__ */
|
|
497
|
+
}), /* @__PURE__ */ y("button", {
|
|
496
498
|
type: "button",
|
|
497
499
|
onClick: () => X("scheduledStop", "enabled", !z.scheduledStop.enabled),
|
|
498
500
|
className: a("h-6 w-11 rounded-full transition-colors relative", z.scheduledStop.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
|
|
499
|
-
children: /* @__PURE__ */
|
|
501
|
+
children: /* @__PURE__ */ y("div", { className: a("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", z.scheduledStop.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
500
502
|
})]
|
|
501
|
-
}), z.scheduledStop.enabled && /* @__PURE__ */
|
|
503
|
+
}), z.scheduledStop.enabled && /* @__PURE__ */ b("div", {
|
|
502
504
|
className: "space-y-4",
|
|
503
505
|
children: [
|
|
504
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ b("div", {
|
|
505
507
|
className: "flex items-center justify-between",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
508
|
+
children: [/* @__PURE__ */ y("span", {
|
|
507
509
|
className: "text-sm text-text-secondary",
|
|
508
510
|
children: "Configure locations and times where your cart will be available"
|
|
509
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ b("button", {
|
|
510
512
|
type: "button",
|
|
511
|
-
onClick:
|
|
513
|
+
onClick: ie,
|
|
512
514
|
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",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ y(ne, { className: "h-4 w-4" }), "Add Stop"]
|
|
514
516
|
})]
|
|
515
517
|
}),
|
|
516
|
-
z.scheduledStop.stops.map((e) => /* @__PURE__ */
|
|
518
|
+
z.scheduledStop.stops.map((e) => /* @__PURE__ */ b("div", {
|
|
517
519
|
className: "border border-border-subtle rounded-lg p-4 bg-bg-sunken/50",
|
|
518
520
|
children: [
|
|
519
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ b("div", {
|
|
520
522
|
className: "flex items-center justify-between mb-3",
|
|
521
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ y("h4", {
|
|
522
524
|
className: "font-medium text-text-primary text-sm",
|
|
523
525
|
children: "Stop Configuration"
|
|
524
|
-
}), /* @__PURE__ */
|
|
526
|
+
}), /* @__PURE__ */ b("button", {
|
|
525
527
|
type: "button",
|
|
526
|
-
onClick: () =>
|
|
528
|
+
onClick: () => ae(e.id),
|
|
527
529
|
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",
|
|
528
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ y(g, { className: "h-3.5 w-3.5" }), "Remove"]
|
|
529
531
|
})]
|
|
530
532
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ b("div", {
|
|
532
534
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
535
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
534
536
|
className: "block text-xs font-medium text-text-primary mb-1",
|
|
535
537
|
children: "Stop Name"
|
|
536
|
-
}), /* @__PURE__ */
|
|
538
|
+
}), /* @__PURE__ */ y("input", {
|
|
537
539
|
type: "text",
|
|
538
540
|
value: e.name,
|
|
539
541
|
onChange: (t) => Q(e.id, "name", t.target.value),
|
|
540
542
|
placeholder: "e.g., Tech Park Morning",
|
|
541
543
|
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"
|
|
542
|
-
})] }), /* @__PURE__ */
|
|
544
|
+
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
543
545
|
className: "block text-xs font-medium text-text-primary mb-1",
|
|
544
546
|
children: "Address"
|
|
545
|
-
}), /* @__PURE__ */
|
|
547
|
+
}), /* @__PURE__ */ y("input", {
|
|
546
548
|
type: "text",
|
|
547
549
|
value: e.address,
|
|
548
550
|
onChange: (t) => Q(e.id, "address", t.target.value),
|
|
@@ -550,106 +552,106 @@ var w = [
|
|
|
550
552
|
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"
|
|
551
553
|
})] })]
|
|
552
554
|
}),
|
|
553
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ b("div", {
|
|
554
556
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
557
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
556
558
|
className: "block text-xs font-medium text-text-primary mb-1",
|
|
557
559
|
children: "Arrival Time"
|
|
558
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ y("input", {
|
|
559
561
|
type: "time",
|
|
560
562
|
value: e.arrivalTime,
|
|
561
563
|
onChange: (t) => Q(e.id, "arrivalTime", t.target.value),
|
|
562
564
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
563
|
-
})] }), /* @__PURE__ */
|
|
565
|
+
})] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
564
566
|
className: "block text-xs font-medium text-text-primary mb-1",
|
|
565
567
|
children: "Departure Time"
|
|
566
|
-
}), /* @__PURE__ */
|
|
568
|
+
}), /* @__PURE__ */ y("input", {
|
|
567
569
|
type: "time",
|
|
568
570
|
value: e.departureTime,
|
|
569
571
|
onChange: (t) => Q(e.id, "departureTime", t.target.value),
|
|
570
572
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
571
573
|
})] })]
|
|
572
574
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
574
576
|
className: "block text-xs font-medium text-text-primary mb-2",
|
|
575
577
|
children: "Days of Week"
|
|
576
|
-
}), /* @__PURE__ */
|
|
578
|
+
}), /* @__PURE__ */ y("div", {
|
|
577
579
|
className: "flex flex-wrap gap-1.5",
|
|
578
|
-
children:
|
|
580
|
+
children: w.map((t) => /* @__PURE__ */ y("button", {
|
|
579
581
|
type: "button",
|
|
580
|
-
onClick: () =>
|
|
582
|
+
onClick: () => oe(e.id, t),
|
|
581
583
|
className: a("px-3 py-1 rounded-full text-xs font-medium transition-colors", e.daysOfWeek.includes(t) ? "bg-action-primary-bg text-white" : "bg-bg-sunken text-text-secondary hover:bg-muted-foreground/20"),
|
|
582
|
-
children:
|
|
584
|
+
children: T[t]
|
|
583
585
|
}, t))
|
|
584
586
|
})] })
|
|
585
587
|
]
|
|
586
588
|
}, e.id)),
|
|
587
|
-
z.scheduledStop.stops.length === 0 && /* @__PURE__ */
|
|
589
|
+
z.scheduledStop.stops.length === 0 && /* @__PURE__ */ y("div", {
|
|
588
590
|
className: "text-center py-6 text-sm text-text-secondary",
|
|
589
591
|
children: "No scheduled stops configured. Click \"Add Stop\" to create one."
|
|
590
592
|
})
|
|
591
593
|
]
|
|
592
594
|
})]
|
|
593
595
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ b("div", {
|
|
595
597
|
className: "border border-border-subtle rounded-lg p-4",
|
|
596
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ b("div", {
|
|
597
599
|
className: "flex items-center justify-between mb-4",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
600
|
+
children: [/* @__PURE__ */ b("div", {
|
|
599
601
|
className: "flex items-center gap-2",
|
|
600
|
-
children: [/* @__PURE__ */
|
|
602
|
+
children: [/* @__PURE__ */ y(f, { className: "h-5 w-5 text-text-primary" }), /* @__PURE__ */ y("span", {
|
|
601
603
|
className: "font-medium text-text-primary",
|
|
602
604
|
children: "Direct Service"
|
|
603
605
|
})]
|
|
604
|
-
}), /* @__PURE__ */
|
|
606
|
+
}), /* @__PURE__ */ y("button", {
|
|
605
607
|
type: "button",
|
|
606
608
|
onClick: () => X("directService", "enabled", !z.directService.enabled),
|
|
607
609
|
className: a("h-6 w-11 rounded-full transition-colors relative", z.directService.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
|
|
608
|
-
children: /* @__PURE__ */
|
|
610
|
+
children: /* @__PURE__ */ y("div", { className: a("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", z.directService.enabled ? "translate-x-5" : "translate-x-0.5") })
|
|
609
611
|
})]
|
|
610
|
-
}), z.directService.enabled && /* @__PURE__ */
|
|
612
|
+
}), z.directService.enabled && /* @__PURE__ */ b("div", {
|
|
611
613
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
612
614
|
children: [
|
|
613
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
614
616
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
615
617
|
children: "Service Fee (₹)"
|
|
616
|
-
}), /* @__PURE__ */
|
|
618
|
+
}), /* @__PURE__ */ y("input", {
|
|
617
619
|
type: "number",
|
|
618
620
|
value: z.directService.config.serviceFee,
|
|
619
621
|
onChange: (e) => Z("serviceFee", parseInt(e.target.value) || 0),
|
|
620
622
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
621
623
|
})] }),
|
|
622
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
623
625
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
624
626
|
children: "Minimum Advance Payment (₹)"
|
|
625
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ y("input", {
|
|
626
628
|
type: "number",
|
|
627
629
|
value: z.directService.config.minimumAdvancePayment,
|
|
628
630
|
onChange: (e) => Z("minimumAdvancePayment", parseInt(e.target.value) || 0),
|
|
629
631
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
630
632
|
})] }),
|
|
631
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
632
634
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
633
635
|
children: "Service Radius (km)"
|
|
634
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ y("input", {
|
|
635
637
|
type: "number",
|
|
636
638
|
value: z.directService.config.serviceRadius,
|
|
637
639
|
onChange: (e) => Z("serviceRadius", parseInt(e.target.value) || 0),
|
|
638
640
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
639
641
|
})] }),
|
|
640
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
641
643
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
642
644
|
children: "Estimated Arrival Time (min)"
|
|
643
|
-
}), /* @__PURE__ */
|
|
645
|
+
}), /* @__PURE__ */ y("input", {
|
|
644
646
|
type: "number",
|
|
645
647
|
value: z.directService.config.estimatedArrivalTime,
|
|
646
648
|
onChange: (e) => Z("estimatedArrivalTime", parseInt(e.target.value) || 0),
|
|
647
649
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
648
650
|
})] }),
|
|
649
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
650
652
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
651
653
|
children: "Minimum Order Value (₹)"
|
|
652
|
-
}), /* @__PURE__ */
|
|
654
|
+
}), /* @__PURE__ */ y("input", {
|
|
653
655
|
type: "number",
|
|
654
656
|
value: z.directService.config.minimumOrderValue,
|
|
655
657
|
onChange: (e) => Z("minimumOrderValue", parseInt(e.target.value) || 0),
|
|
@@ -661,33 +663,33 @@ var w = [
|
|
|
661
663
|
]
|
|
662
664
|
})]
|
|
663
665
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ b("div", {
|
|
665
667
|
className: "flex items-center justify-between pt-2",
|
|
666
|
-
children: [/* @__PURE__ */
|
|
668
|
+
children: [/* @__PURE__ */ y("button", {
|
|
667
669
|
type: "button",
|
|
668
|
-
onClick: () =>
|
|
670
|
+
onClick: () => O("/cart-owner/dashboard"),
|
|
669
671
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
670
672
|
children: "Cancel"
|
|
671
|
-
}), /* @__PURE__ */
|
|
673
|
+
}), /* @__PURE__ */ y("button", {
|
|
672
674
|
type: "button",
|
|
673
675
|
onClick: $,
|
|
674
676
|
disabled: W,
|
|
675
677
|
className: a("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", W ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
|
|
676
|
-
children: W ? /* @__PURE__ */
|
|
678
|
+
children: W ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), "Save Configuration"] })
|
|
677
679
|
})]
|
|
678
680
|
})
|
|
679
681
|
]
|
|
680
682
|
})]
|
|
681
|
-
}) : /* @__PURE__ */
|
|
683
|
+
}) : /* @__PURE__ */ y(e, {
|
|
682
684
|
title: "Service Provider Configuration",
|
|
683
685
|
description: "Manage your service status, operating hours, and service types",
|
|
684
|
-
children: /* @__PURE__ */
|
|
686
|
+
children: /* @__PURE__ */ y(t, {
|
|
685
687
|
illustration: "empty-generic",
|
|
686
688
|
title: "Create your cart first",
|
|
687
689
|
description: "You don't have a service provider yet. Set up your cart before configuring how it serves customers."
|
|
688
690
|
})
|
|
689
691
|
});
|
|
690
692
|
};
|
|
691
|
-
export {
|
|
693
|
+
export { O as CartServiceConfigPage };
|
|
692
694
|
|
|
693
695
|
//# sourceMappingURL=CartServiceConfigPage.js.map
|