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