@burdenoff/microfe-kadaikodi 2026.704.2 → 2026.704.4
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/KadaikodiRoutes.js +30 -26
- package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,49 +2,49 @@ 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
4
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
-
import { useProviders as i } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { AlertCircle as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { EmphasisPanel as
|
|
5
|
+
import { useProviders as i, useUpdateProvider as a } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
+
import { useEffect as o, useMemo as s, useState as c } from "react";
|
|
7
|
+
import { AlertCircle as l, Bell as u, CheckCircle2 as d, Clock as f, Link2 as p, MapPin as m, Phone as h, Save as g, Shield as _, Store 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, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/kadaikodi/pages/cart-owner/BusinessSettingsPage.tsx
|
|
11
|
-
var
|
|
11
|
+
var T = [
|
|
12
12
|
{
|
|
13
13
|
id: "general",
|
|
14
14
|
label: "General",
|
|
15
|
-
icon:
|
|
15
|
+
icon: v
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
id: "contact",
|
|
19
19
|
label: "Contact",
|
|
20
|
-
icon:
|
|
20
|
+
icon: h
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
id: "location",
|
|
24
24
|
label: "Location",
|
|
25
|
-
icon:
|
|
25
|
+
icon: m
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: "operating",
|
|
29
29
|
label: "Operating",
|
|
30
|
-
icon:
|
|
30
|
+
icon: f
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
id: "policies",
|
|
34
34
|
label: "Policies",
|
|
35
|
-
icon:
|
|
35
|
+
icon: _
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: "notifications",
|
|
39
39
|
label: "Notifications",
|
|
40
|
-
icon:
|
|
40
|
+
icon: u
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: "integration",
|
|
44
44
|
label: "Integrations",
|
|
45
|
-
icon:
|
|
45
|
+
icon: p
|
|
46
46
|
}
|
|
47
|
-
],
|
|
47
|
+
], E = [
|
|
48
48
|
"Food & Beverage",
|
|
49
49
|
"Personal Care & Beauty",
|
|
50
50
|
"Repair & Maintenance",
|
|
@@ -54,58 +54,61 @@ var C = [
|
|
|
54
54
|
"Education & Skills",
|
|
55
55
|
"Retail & Merchandise",
|
|
56
56
|
"Grocery & Essentials"
|
|
57
|
-
],
|
|
58
|
-
let
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
htmlFor:
|
|
57
|
+
], D = ({ label: e, value: n, onChange: r, type: i = "text", options: a, placeholder: o, hint: s, rows: c = 3, disabled: l = !1 }) => {
|
|
58
|
+
let u = e.toLowerCase().replace(/\s+/g, "-");
|
|
59
|
+
return /* @__PURE__ */ x("div", { children: [
|
|
60
|
+
/* @__PURE__ */ b("label", {
|
|
61
|
+
htmlFor: u,
|
|
62
62
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
63
63
|
children: e
|
|
64
64
|
}),
|
|
65
|
-
|
|
66
|
-
id:
|
|
67
|
-
value:
|
|
68
|
-
onChange: (e) =>
|
|
69
|
-
rows:
|
|
70
|
-
placeholder:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
i === "textarea" ? /* @__PURE__ */ b("textarea", {
|
|
66
|
+
id: u,
|
|
67
|
+
value: n,
|
|
68
|
+
onChange: (e) => r(e.target.value),
|
|
69
|
+
rows: c,
|
|
70
|
+
placeholder: o,
|
|
71
|
+
disabled: l,
|
|
72
|
+
className: t("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none", l && "bg-bg-sunken/50 cursor-not-allowed")
|
|
73
|
+
}) : i === "select" ? /* @__PURE__ */ b("select", {
|
|
74
|
+
id: u,
|
|
75
|
+
value: n,
|
|
76
|
+
onChange: (e) => r(e.target.value),
|
|
77
|
+
disabled: l,
|
|
78
|
+
className: t("w-full 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)]", l && "bg-bg-sunken/50 cursor-not-allowed"),
|
|
79
|
+
children: a?.map((e) => /* @__PURE__ */ b("option", {
|
|
78
80
|
value: e,
|
|
79
81
|
children: e
|
|
80
82
|
}, e))
|
|
81
|
-
}) : /* @__PURE__ */
|
|
82
|
-
id:
|
|
83
|
-
type:
|
|
84
|
-
value:
|
|
85
|
-
onChange: (e) =>
|
|
86
|
-
placeholder:
|
|
87
|
-
|
|
83
|
+
}) : /* @__PURE__ */ b("input", {
|
|
84
|
+
id: u,
|
|
85
|
+
type: i,
|
|
86
|
+
value: n,
|
|
87
|
+
onChange: (e) => r(e.target.value),
|
|
88
|
+
placeholder: o,
|
|
89
|
+
disabled: l,
|
|
90
|
+
className: t("w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", l && "bg-bg-sunken/50 cursor-not-allowed")
|
|
88
91
|
}),
|
|
89
|
-
|
|
92
|
+
s && /* @__PURE__ */ b("p", {
|
|
90
93
|
className: "mt-1 text-xs text-text-secondary",
|
|
91
|
-
children:
|
|
94
|
+
children: s
|
|
92
95
|
})
|
|
93
96
|
] });
|
|
94
|
-
},
|
|
97
|
+
}, O = ({ label: e, description: n, checked: r, onChange: i }) => /* @__PURE__ */ x("div", {
|
|
95
98
|
className: "flex items-center justify-between py-3",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
97
100
|
className: "text-sm font-medium text-text-primary",
|
|
98
101
|
children: e
|
|
99
|
-
}), n && /* @__PURE__ */
|
|
102
|
+
}), n && /* @__PURE__ */ b("p", {
|
|
100
103
|
className: "text-xs text-text-secondary mt-0.5",
|
|
101
104
|
children: n
|
|
102
|
-
})] }), /* @__PURE__ */
|
|
105
|
+
})] }), /* @__PURE__ */ b("button", {
|
|
103
106
|
type: "button",
|
|
104
107
|
onClick: () => i(!r),
|
|
105
108
|
className: t("h-6 w-11 rounded-full transition-colors relative", r ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
|
|
106
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ b("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", r ? "translate-x-5" : "translate-x-0.5") })
|
|
107
110
|
})]
|
|
108
|
-
}),
|
|
111
|
+
}), ee = {
|
|
109
112
|
FOOD_BEVERAGE: "Food & Beverage",
|
|
110
113
|
PERSONAL_CARE_BEAUTY: "Personal Care & Beauty",
|
|
111
114
|
CLOTHING_FASHION: "Clothing & Fashion",
|
|
@@ -115,8 +118,8 @@ var C = [
|
|
|
115
118
|
EDUCATION_SKILLS: "Education & Skills",
|
|
116
119
|
RETAIL_MERCHANDISE: "Retail & Merchandise",
|
|
117
120
|
GROCERY_ESSENTIALS: "Grocery & Essentials"
|
|
118
|
-
},
|
|
119
|
-
let { navigateTo:
|
|
121
|
+
}, k = () => {
|
|
122
|
+
let { navigateTo: u, currentUser: f } = e(), [p, m] = c("general"), h = a(), _ = h.isPending, [v, k] = c(!1), [te, A] = c(!1), { data: j = [], isLoading: M } = i(), N = s(() => j.find((e) => e.ownerId === f?.id) ?? j[0], [j, f?.id]), [P, F] = c({
|
|
120
123
|
businessName: "",
|
|
121
124
|
description: "",
|
|
122
125
|
category: "Food & Beverage",
|
|
@@ -124,7 +127,7 @@ var C = [
|
|
|
124
127
|
panNumber: "",
|
|
125
128
|
fssaiLicense: "",
|
|
126
129
|
establishedYear: ""
|
|
127
|
-
}), [
|
|
130
|
+
}), [I, L] = c({
|
|
128
131
|
phone: "",
|
|
129
132
|
email: "",
|
|
130
133
|
website: "",
|
|
@@ -132,7 +135,7 @@ var C = [
|
|
|
132
135
|
instagram: "",
|
|
133
136
|
twitter: "",
|
|
134
137
|
facebook: ""
|
|
135
|
-
}), [
|
|
138
|
+
}), [R, z] = c({
|
|
136
139
|
address: "",
|
|
137
140
|
city: "",
|
|
138
141
|
state: "",
|
|
@@ -142,17 +145,17 @@ var C = [
|
|
|
142
145
|
deliveryRadius: 5,
|
|
143
146
|
deliveryCharge: 30,
|
|
144
147
|
freeDeliveryAbove: 300
|
|
145
|
-
}), [
|
|
148
|
+
}), [B, V] = c({
|
|
146
149
|
autoAcceptOrders: !0,
|
|
147
150
|
preparationTime: 15,
|
|
148
151
|
maxConcurrentOrders: 10,
|
|
149
152
|
advanceBookingDays: 3
|
|
150
|
-
}), [
|
|
153
|
+
}), [H, U] = c({
|
|
151
154
|
returnPolicy: "",
|
|
152
155
|
cancellationPolicy: "",
|
|
153
156
|
privacyPolicy: "",
|
|
154
157
|
termsOfService: ""
|
|
155
|
-
}), [
|
|
158
|
+
}), [W, ne] = c({
|
|
156
159
|
newOrderEmail: !0,
|
|
157
160
|
newOrderSms: !0,
|
|
158
161
|
newOrderPush: !0,
|
|
@@ -163,75 +166,96 @@ var C = [
|
|
|
163
166
|
lowStockAlert: !0,
|
|
164
167
|
reviewNotification: !0,
|
|
165
168
|
marketingEmails: !1
|
|
166
|
-
}), [
|
|
169
|
+
}), [G, re] = c({
|
|
167
170
|
paymentGateway: "razorpay",
|
|
168
171
|
paymentGatewayKey: "",
|
|
169
172
|
smsProvider: "twilio",
|
|
170
173
|
smsApiKey: "",
|
|
171
174
|
analyticsId: ""
|
|
172
|
-
}), [
|
|
173
|
-
|
|
174
|
-
if (!
|
|
175
|
-
let e =
|
|
176
|
-
|
|
175
|
+
}), [K, ie] = c(!1);
|
|
176
|
+
o(() => {
|
|
177
|
+
if (!N || K) return;
|
|
178
|
+
let e = ee[N.category] ?? N.category;
|
|
179
|
+
F((t) => ({
|
|
177
180
|
...t,
|
|
178
|
-
businessName:
|
|
179
|
-
category:
|
|
181
|
+
businessName: N.name,
|
|
182
|
+
category: E.includes(e) ? e : t.category
|
|
180
183
|
}));
|
|
181
|
-
let t =
|
|
182
|
-
|
|
184
|
+
let t = N.location?.coordinates;
|
|
185
|
+
z((e) => ({
|
|
183
186
|
...e,
|
|
184
|
-
address:
|
|
187
|
+
address: N.location?.address ?? "",
|
|
185
188
|
latitude: t?.lat ? String(t.lat) : "",
|
|
186
189
|
longitude: t?.lng ? String(t.lng) : ""
|
|
187
|
-
})),
|
|
188
|
-
}, [
|
|
190
|
+
})), ie(!0);
|
|
191
|
+
}, [N, K]);
|
|
189
192
|
let q = () => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
if (!N) return;
|
|
194
|
+
A(!1);
|
|
195
|
+
let e = parseFloat(R.latitude), t = parseFloat(R.longitude), n = {
|
|
196
|
+
name: P.businessName,
|
|
197
|
+
description: P.description || void 0,
|
|
198
|
+
location: {
|
|
199
|
+
address: R.address,
|
|
200
|
+
latitude: Number.isFinite(e) ? e : void 0,
|
|
201
|
+
longitude: Number.isFinite(t) ? t : void 0,
|
|
202
|
+
coordinates: {
|
|
203
|
+
lat: Number.isFinite(e) ? e : 0,
|
|
204
|
+
lng: Number.isFinite(t) ? t : 0
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
h.mutate({
|
|
209
|
+
id: N.id,
|
|
210
|
+
input: n
|
|
211
|
+
}, {
|
|
212
|
+
onSuccess: () => {
|
|
213
|
+
k(!0), setTimeout(() => k(!1), 3e3);
|
|
214
|
+
},
|
|
215
|
+
onError: () => A(!0)
|
|
216
|
+
});
|
|
217
|
+
}, J = (e) => (t) => F((n) => ({
|
|
194
218
|
...n,
|
|
195
219
|
[e]: t
|
|
196
|
-
})), Y = (e) => (t) =>
|
|
220
|
+
})), Y = (e) => (t) => L((n) => ({
|
|
197
221
|
...n,
|
|
198
222
|
[e]: t
|
|
199
|
-
})), X = (e) => (t) =>
|
|
223
|
+
})), X = (e) => (t) => z((n) => ({
|
|
200
224
|
...n,
|
|
201
225
|
[e]: e === "deliveryRadius" || e === "deliveryCharge" || e === "freeDeliveryAbove" ? parseInt(t) || 0 : t
|
|
202
|
-
})), Z = (e) => (t) =>
|
|
226
|
+
})), Z = (e) => (t) => U((n) => ({
|
|
203
227
|
...n,
|
|
204
228
|
[e]: t
|
|
205
|
-
})), Q = (e) => (t) =>
|
|
229
|
+
})), Q = (e) => (t) => ne((n) => ({
|
|
206
230
|
...n,
|
|
207
231
|
[e]: t
|
|
208
|
-
})), $ = (e) => (t) =>
|
|
232
|
+
})), $ = (e) => (t) => re((n) => ({
|
|
209
233
|
...n,
|
|
210
234
|
[e]: t
|
|
211
235
|
}));
|
|
212
|
-
return
|
|
236
|
+
return M ? /* @__PURE__ */ b(n, {
|
|
213
237
|
title: "Business Settings",
|
|
214
238
|
description: "Manage your business profile and configuration",
|
|
215
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ b("div", {
|
|
216
240
|
className: "flex items-center justify-center py-24",
|
|
217
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ b("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
|
|
218
242
|
})
|
|
219
|
-
}) :
|
|
243
|
+
}) : N ? /* @__PURE__ */ x(n, {
|
|
220
244
|
title: "Business Settings",
|
|
221
245
|
description: "Manage your business profile and configuration",
|
|
222
|
-
actions: /* @__PURE__ */
|
|
246
|
+
actions: /* @__PURE__ */ b("button", {
|
|
223
247
|
type: "button",
|
|
224
248
|
onClick: q,
|
|
225
|
-
disabled:
|
|
226
|
-
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors",
|
|
227
|
-
children:
|
|
249
|
+
disabled: _,
|
|
250
|
+
className: t("inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors", v ? "bg-status-success-bg-subtle text-status-success-text" : _ ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
|
|
251
|
+
children: _ ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : v ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(d, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Save Settings"] })
|
|
228
252
|
}),
|
|
229
253
|
children: [
|
|
230
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ b(w, {
|
|
231
255
|
className: "mb-6",
|
|
232
256
|
children: "Your business's public identity and ground rules. Use this page to set your business name and branding, contact details and location, operating hours, and the policies (refunds, delivery radius, taxes) customers agree to — plus the alerts you receive and any integrations you connect. These details shape how customers find and trust your cart."
|
|
233
257
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ b(C, {
|
|
235
259
|
storageKey: "kadaikodi-owner-business-settings",
|
|
236
260
|
className: "mb-6",
|
|
237
261
|
steps: [
|
|
@@ -239,45 +263,52 @@ var C = [
|
|
|
239
263
|
id: "location",
|
|
240
264
|
label: "Confirm your location & hours",
|
|
241
265
|
description: "So customers know where and when to find you.",
|
|
242
|
-
onClick: () =>
|
|
266
|
+
onClick: () => m("location")
|
|
243
267
|
},
|
|
244
268
|
{
|
|
245
269
|
id: "policies",
|
|
246
270
|
label: "Set your policies",
|
|
247
271
|
description: "Refunds, delivery radius and taxes.",
|
|
248
|
-
onClick: () =>
|
|
272
|
+
onClick: () => m("policies")
|
|
249
273
|
},
|
|
250
274
|
{
|
|
251
275
|
id: "config",
|
|
252
276
|
label: "Configure your service types",
|
|
253
277
|
description: "Pickup, delivery and scheduled stops.",
|
|
254
|
-
onClick: () =>
|
|
278
|
+
onClick: () => u("/cart-owner/service-config")
|
|
255
279
|
}
|
|
256
280
|
]
|
|
257
281
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ x("div", {
|
|
259
283
|
className: "mb-6 flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ b("p", {
|
|
261
285
|
className: "text-xs text-text-secondary",
|
|
262
|
-
children: "Business name,
|
|
286
|
+
children: "Business name, description and location save to your cart record. Category is fixed at cart creation. Contact, policy, notification and integration settings are kept in this browser for now."
|
|
287
|
+
})]
|
|
288
|
+
}),
|
|
289
|
+
te && /* @__PURE__ */ x("div", {
|
|
290
|
+
className: "mb-6 flex items-start gap-3 rounded-md border border-status-error-text/30 bg-status-error-bg-subtle p-3",
|
|
291
|
+
children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-status-error-text shrink-0 mt-0.5" }), /* @__PURE__ */ b("p", {
|
|
292
|
+
className: "text-xs text-status-error-text",
|
|
293
|
+
children: "We couldn't save your changes just now. Please check your connection and try again."
|
|
263
294
|
})]
|
|
264
295
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ x("div", {
|
|
266
297
|
className: "flex flex-col lg:flex-row gap-6",
|
|
267
298
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ b("div", {
|
|
269
300
|
className: "lg:hidden",
|
|
270
|
-
children: /* @__PURE__ */
|
|
301
|
+
children: /* @__PURE__ */ b("div", {
|
|
271
302
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-3 shadow-sm",
|
|
272
|
-
children: /* @__PURE__ */
|
|
303
|
+
children: /* @__PURE__ */ b("div", {
|
|
273
304
|
className: "grid grid-cols-4 gap-2",
|
|
274
|
-
children:
|
|
305
|
+
children: T.map((e) => {
|
|
275
306
|
let n = e.icon;
|
|
276
|
-
return /* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ x("button", {
|
|
277
308
|
type: "button",
|
|
278
|
-
onClick: () =>
|
|
279
|
-
className: t("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
309
|
+
onClick: () => m(e.id),
|
|
310
|
+
className: t("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors", p === e.id ? "bg-accent text-text-primary" : "text-text-secondary hover:bg-bg-sunken"),
|
|
311
|
+
children: [/* @__PURE__ */ b(n, { className: "h-4 w-4" }), /* @__PURE__ */ b("span", {
|
|
281
312
|
className: "hidden sm:inline",
|
|
282
313
|
children: e.label
|
|
283
314
|
})]
|
|
@@ -286,88 +317,90 @@ var C = [
|
|
|
286
317
|
})
|
|
287
318
|
})
|
|
288
319
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ b("div", {
|
|
290
321
|
className: "hidden lg:block lg:w-56 shrink-0",
|
|
291
|
-
children: /* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ x("div", {
|
|
292
323
|
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm sticky top-24",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ b("div", {
|
|
294
325
|
className: "p-4 border-b border-border-subtle",
|
|
295
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ b("h2", {
|
|
296
327
|
className: "font-semibold text-text-primary text-sm",
|
|
297
328
|
children: "Settings"
|
|
298
329
|
})
|
|
299
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ b("nav", {
|
|
300
331
|
className: "p-2",
|
|
301
|
-
children:
|
|
332
|
+
children: T.map((e) => {
|
|
302
333
|
let n = e.icon;
|
|
303
|
-
return /* @__PURE__ */
|
|
334
|
+
return /* @__PURE__ */ x("button", {
|
|
304
335
|
type: "button",
|
|
305
|
-
onClick: () =>
|
|
306
|
-
className: t("w-full text-left px-3 py-2 rounded-md mb-1 flex items-center gap-3 text-sm transition-colors",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
336
|
+
onClick: () => m(e.id),
|
|
337
|
+
className: t("w-full text-left px-3 py-2 rounded-md mb-1 flex items-center gap-3 text-sm transition-colors", p === e.id ? "bg-accent text-text-primary font-medium" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
338
|
+
children: [/* @__PURE__ */ b(n, { className: "h-4 w-4" }), e.label]
|
|
308
339
|
}, e.id);
|
|
309
340
|
})
|
|
310
341
|
})]
|
|
311
342
|
})
|
|
312
343
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ b("div", {
|
|
314
345
|
className: "flex-1 min-w-0",
|
|
315
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ x(S, {
|
|
316
347
|
className: "p-5 sm:p-6",
|
|
317
348
|
children: [
|
|
318
|
-
|
|
349
|
+
p === "general" && /* @__PURE__ */ x("div", {
|
|
319
350
|
className: "space-y-5",
|
|
320
351
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ b(D, {
|
|
322
353
|
label: "Business Name",
|
|
323
|
-
value:
|
|
354
|
+
value: P.businessName,
|
|
324
355
|
onChange: J("businessName")
|
|
325
356
|
}),
|
|
326
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ b(D, {
|
|
327
358
|
label: "Description",
|
|
328
|
-
value:
|
|
359
|
+
value: P.description,
|
|
329
360
|
onChange: J("description"),
|
|
330
361
|
type: "textarea"
|
|
331
362
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ x("div", {
|
|
333
364
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ b(D, {
|
|
335
366
|
label: "Category",
|
|
336
|
-
value:
|
|
367
|
+
value: P.category,
|
|
337
368
|
onChange: J("category"),
|
|
338
369
|
type: "select",
|
|
339
|
-
options:
|
|
340
|
-
|
|
370
|
+
options: E,
|
|
371
|
+
disabled: !0,
|
|
372
|
+
hint: "Set when your cart was created and can't be changed here."
|
|
373
|
+
}), /* @__PURE__ */ b(D, {
|
|
341
374
|
label: "Established Year",
|
|
342
|
-
value:
|
|
375
|
+
value: P.establishedYear,
|
|
343
376
|
onChange: J("establishedYear")
|
|
344
377
|
})]
|
|
345
378
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ x("div", {
|
|
347
380
|
className: "flex items-start gap-3 rounded-md bg-[var(--color-accent-soft)] border border-border-focus/20 p-3",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ b(l, { className: "h-4 w-4 text-text-primary shrink-0 mt-0.5" }), /* @__PURE__ */ b("p", {
|
|
349
382
|
className: "text-xs text-text-primary",
|
|
350
383
|
children: "GST, PAN, and FSSAI details are used for invoicing and compliance. Changes require verification."
|
|
351
384
|
})]
|
|
352
385
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ x("div", {
|
|
354
387
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
|
|
355
388
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ b(D, {
|
|
357
390
|
label: "GST Number",
|
|
358
|
-
value:
|
|
391
|
+
value: P.gstNumber,
|
|
359
392
|
onChange: J("gstNumber"),
|
|
360
393
|
hint: "15-digit GST ID"
|
|
361
394
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ b(D, {
|
|
363
396
|
label: "PAN Number",
|
|
364
|
-
value:
|
|
397
|
+
value: P.panNumber,
|
|
365
398
|
onChange: J("panNumber"),
|
|
366
399
|
hint: "10-digit PAN"
|
|
367
400
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ b(D, {
|
|
369
402
|
label: "FSSAI License",
|
|
370
|
-
value:
|
|
403
|
+
value: P.fssaiLicense,
|
|
371
404
|
onChange: J("fssaiLicense"),
|
|
372
405
|
hint: "FSSAI license number"
|
|
373
406
|
})
|
|
@@ -375,60 +408,60 @@ var C = [
|
|
|
375
408
|
})
|
|
376
409
|
]
|
|
377
410
|
}),
|
|
378
|
-
|
|
411
|
+
p === "contact" && /* @__PURE__ */ x("div", {
|
|
379
412
|
className: "space-y-5",
|
|
380
413
|
children: [
|
|
381
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ x("div", {
|
|
382
415
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ b(D, {
|
|
384
417
|
label: "Phone",
|
|
385
|
-
value:
|
|
418
|
+
value: I.phone,
|
|
386
419
|
onChange: Y("phone"),
|
|
387
420
|
type: "tel"
|
|
388
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ b(D, {
|
|
389
422
|
label: "Email",
|
|
390
|
-
value:
|
|
423
|
+
value: I.email,
|
|
391
424
|
onChange: Y("email"),
|
|
392
425
|
type: "email"
|
|
393
426
|
})]
|
|
394
427
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ x("div", {
|
|
396
429
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ b(D, {
|
|
398
431
|
label: "Website",
|
|
399
|
-
value:
|
|
432
|
+
value: I.website,
|
|
400
433
|
onChange: Y("website"),
|
|
401
434
|
type: "url",
|
|
402
435
|
placeholder: "https://"
|
|
403
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ b(D, {
|
|
404
437
|
label: "WhatsApp",
|
|
405
|
-
value:
|
|
438
|
+
value: I.whatsapp,
|
|
406
439
|
onChange: Y("whatsapp"),
|
|
407
440
|
type: "tel"
|
|
408
441
|
})]
|
|
409
442
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ b("h3", {
|
|
411
444
|
className: "text-sm font-semibold text-text-primary pt-2",
|
|
412
445
|
children: "Social Media"
|
|
413
446
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ x("div", {
|
|
415
448
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
|
|
416
449
|
children: [
|
|
417
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ b(D, {
|
|
418
451
|
label: "Instagram",
|
|
419
|
-
value:
|
|
452
|
+
value: I.instagram,
|
|
420
453
|
onChange: Y("instagram"),
|
|
421
454
|
placeholder: "@handle"
|
|
422
455
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ b(D, {
|
|
424
457
|
label: "Twitter / X",
|
|
425
|
-
value:
|
|
458
|
+
value: I.twitter,
|
|
426
459
|
onChange: Y("twitter"),
|
|
427
460
|
placeholder: "@handle"
|
|
428
461
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ b(D, {
|
|
430
463
|
label: "Facebook",
|
|
431
|
-
value:
|
|
464
|
+
value: I.facebook,
|
|
432
465
|
onChange: Y("facebook"),
|
|
433
466
|
placeholder: "Page name"
|
|
434
467
|
})
|
|
@@ -436,72 +469,72 @@ var C = [
|
|
|
436
469
|
})
|
|
437
470
|
]
|
|
438
471
|
}),
|
|
439
|
-
|
|
472
|
+
p === "location" && /* @__PURE__ */ x("div", {
|
|
440
473
|
className: "space-y-5",
|
|
441
474
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ b(D, {
|
|
443
476
|
label: "Address",
|
|
444
|
-
value:
|
|
477
|
+
value: R.address,
|
|
445
478
|
onChange: X("address"),
|
|
446
479
|
type: "textarea",
|
|
447
480
|
rows: 2
|
|
448
481
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ x("div", {
|
|
450
483
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
|
|
451
484
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ b(D, {
|
|
453
486
|
label: "City",
|
|
454
|
-
value:
|
|
487
|
+
value: R.city,
|
|
455
488
|
onChange: X("city")
|
|
456
489
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ b(D, {
|
|
458
491
|
label: "State",
|
|
459
|
-
value:
|
|
492
|
+
value: R.state,
|
|
460
493
|
onChange: X("state")
|
|
461
494
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ b(D, {
|
|
463
496
|
label: "Pincode",
|
|
464
|
-
value:
|
|
497
|
+
value: R.pincode,
|
|
465
498
|
onChange: X("pincode")
|
|
466
499
|
})
|
|
467
500
|
]
|
|
468
501
|
}),
|
|
469
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ x("div", {
|
|
470
503
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ b(D, {
|
|
472
505
|
label: "Latitude",
|
|
473
|
-
value:
|
|
506
|
+
value: R.latitude,
|
|
474
507
|
onChange: X("latitude"),
|
|
475
508
|
hint: "e.g., 12.9352"
|
|
476
|
-
}), /* @__PURE__ */
|
|
509
|
+
}), /* @__PURE__ */ b(D, {
|
|
477
510
|
label: "Longitude",
|
|
478
|
-
value:
|
|
511
|
+
value: R.longitude,
|
|
479
512
|
onChange: X("longitude"),
|
|
480
513
|
hint: "e.g., 77.6245"
|
|
481
514
|
})]
|
|
482
515
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ b("h3", {
|
|
484
517
|
className: "text-sm font-semibold text-text-primary pt-2",
|
|
485
518
|
children: "Delivery Settings"
|
|
486
519
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ x("div", {
|
|
488
521
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
|
|
489
522
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ b(D, {
|
|
491
524
|
label: "Delivery Radius (km)",
|
|
492
|
-
value:
|
|
525
|
+
value: R.deliveryRadius,
|
|
493
526
|
onChange: X("deliveryRadius"),
|
|
494
527
|
type: "number"
|
|
495
528
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ b(D, {
|
|
497
530
|
label: "Delivery Charge (₹)",
|
|
498
|
-
value:
|
|
531
|
+
value: R.deliveryCharge,
|
|
499
532
|
onChange: X("deliveryCharge"),
|
|
500
533
|
type: "number"
|
|
501
534
|
}),
|
|
502
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ b(D, {
|
|
503
536
|
label: "Free Delivery Above (₹)",
|
|
504
|
-
value:
|
|
537
|
+
value: R.freeDeliveryAbove,
|
|
505
538
|
onChange: X("freeDeliveryAbove"),
|
|
506
539
|
type: "number"
|
|
507
540
|
})
|
|
@@ -509,41 +542,41 @@ var C = [
|
|
|
509
542
|
})
|
|
510
543
|
]
|
|
511
544
|
}),
|
|
512
|
-
|
|
545
|
+
p === "operating" && /* @__PURE__ */ x("div", {
|
|
513
546
|
className: "space-y-5",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ b(O, {
|
|
515
548
|
label: "Auto-Accept Orders",
|
|
516
549
|
description: "Automatically accept incoming orders without manual confirmation",
|
|
517
|
-
checked:
|
|
518
|
-
onChange: (e) =>
|
|
550
|
+
checked: B.autoAcceptOrders,
|
|
551
|
+
onChange: (e) => V((t) => ({
|
|
519
552
|
...t,
|
|
520
553
|
autoAcceptOrders: e
|
|
521
554
|
}))
|
|
522
|
-
}), /* @__PURE__ */
|
|
555
|
+
}), /* @__PURE__ */ x("div", {
|
|
523
556
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
|
|
524
557
|
children: [
|
|
525
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ b(D, {
|
|
526
559
|
label: "Default Preparation Time (min)",
|
|
527
|
-
value:
|
|
528
|
-
onChange: (e) =>
|
|
560
|
+
value: B.preparationTime,
|
|
561
|
+
onChange: (e) => V((t) => ({
|
|
529
562
|
...t,
|
|
530
563
|
preparationTime: parseInt(e) || 0
|
|
531
564
|
})),
|
|
532
565
|
type: "number"
|
|
533
566
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ b(D, {
|
|
535
568
|
label: "Max Concurrent Orders",
|
|
536
|
-
value:
|
|
537
|
-
onChange: (e) =>
|
|
569
|
+
value: B.maxConcurrentOrders,
|
|
570
|
+
onChange: (e) => V((t) => ({
|
|
538
571
|
...t,
|
|
539
572
|
maxConcurrentOrders: parseInt(e) || 0
|
|
540
573
|
})),
|
|
541
574
|
type: "number"
|
|
542
575
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ b(D, {
|
|
544
577
|
label: "Advance Booking (days)",
|
|
545
|
-
value:
|
|
546
|
-
onChange: (e) =>
|
|
578
|
+
value: B.advanceBookingDays,
|
|
579
|
+
onChange: (e) => V((t) => ({
|
|
547
580
|
...t,
|
|
548
581
|
advanceBookingDays: parseInt(e) || 0
|
|
549
582
|
})),
|
|
@@ -552,212 +585,212 @@ var C = [
|
|
|
552
585
|
]
|
|
553
586
|
})]
|
|
554
587
|
}),
|
|
555
|
-
|
|
588
|
+
p === "policies" && /* @__PURE__ */ x("div", {
|
|
556
589
|
className: "space-y-5",
|
|
557
590
|
children: [
|
|
558
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ b(D, {
|
|
559
592
|
label: "Return Policy",
|
|
560
|
-
value:
|
|
593
|
+
value: H.returnPolicy,
|
|
561
594
|
onChange: Z("returnPolicy"),
|
|
562
595
|
type: "textarea",
|
|
563
596
|
rows: 4
|
|
564
597
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ b(D, {
|
|
566
599
|
label: "Cancellation Policy",
|
|
567
|
-
value:
|
|
600
|
+
value: H.cancellationPolicy,
|
|
568
601
|
onChange: Z("cancellationPolicy"),
|
|
569
602
|
type: "textarea",
|
|
570
603
|
rows: 4
|
|
571
604
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ b(D, {
|
|
573
606
|
label: "Privacy Policy",
|
|
574
|
-
value:
|
|
607
|
+
value: H.privacyPolicy,
|
|
575
608
|
onChange: Z("privacyPolicy"),
|
|
576
609
|
type: "textarea",
|
|
577
610
|
rows: 4
|
|
578
611
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ b(D, {
|
|
580
613
|
label: "Terms of Service",
|
|
581
|
-
value:
|
|
614
|
+
value: H.termsOfService,
|
|
582
615
|
onChange: Z("termsOfService"),
|
|
583
616
|
type: "textarea",
|
|
584
617
|
rows: 4
|
|
585
618
|
})
|
|
586
619
|
]
|
|
587
620
|
}),
|
|
588
|
-
|
|
621
|
+
p === "notifications" && /* @__PURE__ */ x("div", {
|
|
589
622
|
className: "space-y-1 divide-y divide-border",
|
|
590
623
|
children: [
|
|
591
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ b("h3", {
|
|
592
625
|
className: "text-sm font-semibold text-text-primary pb-2",
|
|
593
626
|
children: "New Orders"
|
|
594
627
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ b(O, {
|
|
596
629
|
label: "Email Notification",
|
|
597
630
|
description: "Receive email for new orders",
|
|
598
|
-
checked:
|
|
631
|
+
checked: W.newOrderEmail,
|
|
599
632
|
onChange: Q("newOrderEmail")
|
|
600
633
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ b(O, {
|
|
602
635
|
label: "SMS Notification",
|
|
603
636
|
description: "Receive SMS for new orders",
|
|
604
|
-
checked:
|
|
637
|
+
checked: W.newOrderSms,
|
|
605
638
|
onChange: Q("newOrderSms")
|
|
606
639
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ b(O, {
|
|
608
641
|
label: "Push Notification",
|
|
609
642
|
description: "Receive push notifications for new orders",
|
|
610
|
-
checked:
|
|
643
|
+
checked: W.newOrderPush,
|
|
611
644
|
onChange: Q("newOrderPush")
|
|
612
645
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ b("h3", {
|
|
614
647
|
className: "text-sm font-semibold text-text-primary pt-4 pb-2",
|
|
615
648
|
children: "Order Updates"
|
|
616
649
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ b(O, {
|
|
618
651
|
label: "Email Updates",
|
|
619
652
|
description: "Get email when order status changes",
|
|
620
|
-
checked:
|
|
653
|
+
checked: W.orderUpdateEmail,
|
|
621
654
|
onChange: Q("orderUpdateEmail")
|
|
622
655
|
}),
|
|
623
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ b(O, {
|
|
624
657
|
label: "Push Updates",
|
|
625
658
|
description: "Get push notifications for order updates",
|
|
626
|
-
checked:
|
|
659
|
+
checked: W.orderUpdatePush,
|
|
627
660
|
onChange: Q("orderUpdatePush")
|
|
628
661
|
}),
|
|
629
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ b("h3", {
|
|
630
663
|
className: "text-sm font-semibold text-text-primary pt-4 pb-2",
|
|
631
664
|
children: "Reports & Alerts"
|
|
632
665
|
}),
|
|
633
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ b(O, {
|
|
634
667
|
label: "Daily Summary",
|
|
635
668
|
description: "Receive daily business summary email",
|
|
636
|
-
checked:
|
|
669
|
+
checked: W.dailySummaryEmail,
|
|
637
670
|
onChange: Q("dailySummaryEmail")
|
|
638
671
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ b(O, {
|
|
640
673
|
label: "Weekly Summary",
|
|
641
674
|
description: "Receive weekly performance report",
|
|
642
|
-
checked:
|
|
675
|
+
checked: W.weeklySummaryEmail,
|
|
643
676
|
onChange: Q("weeklySummaryEmail")
|
|
644
677
|
}),
|
|
645
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ b(O, {
|
|
646
679
|
label: "Low Stock Alert",
|
|
647
680
|
description: "Get alerted when items are low on stock",
|
|
648
|
-
checked:
|
|
681
|
+
checked: W.lowStockAlert,
|
|
649
682
|
onChange: Q("lowStockAlert")
|
|
650
683
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ b(O, {
|
|
652
685
|
label: "Review Notifications",
|
|
653
686
|
description: "Get notified for new customer reviews",
|
|
654
|
-
checked:
|
|
687
|
+
checked: W.reviewNotification,
|
|
655
688
|
onChange: Q("reviewNotification")
|
|
656
689
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ b(O, {
|
|
658
691
|
label: "Marketing Emails",
|
|
659
692
|
description: "Receive tips and promotional content",
|
|
660
|
-
checked:
|
|
693
|
+
checked: W.marketingEmails,
|
|
661
694
|
onChange: Q("marketingEmails")
|
|
662
695
|
})
|
|
663
696
|
]
|
|
664
697
|
}),
|
|
665
|
-
|
|
698
|
+
p === "integration" && /* @__PURE__ */ x("div", {
|
|
666
699
|
className: "space-y-5",
|
|
667
700
|
children: [
|
|
668
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ b("h3", {
|
|
669
702
|
className: "text-sm font-semibold text-text-primary",
|
|
670
703
|
children: "Payment Gateway"
|
|
671
704
|
}),
|
|
672
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ x("div", {
|
|
673
706
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
707
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
675
708
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
676
709
|
children: "Provider"
|
|
677
|
-
}), /* @__PURE__ */
|
|
678
|
-
value:
|
|
710
|
+
}), /* @__PURE__ */ x("select", {
|
|
711
|
+
value: G.paymentGateway,
|
|
679
712
|
onChange: (e) => $("paymentGateway")(e.target.value),
|
|
680
713
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
681
714
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ b("option", {
|
|
683
716
|
value: "razorpay",
|
|
684
717
|
children: "Razorpay"
|
|
685
718
|
}),
|
|
686
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ b("option", {
|
|
687
720
|
value: "paytm",
|
|
688
721
|
children: "Paytm"
|
|
689
722
|
}),
|
|
690
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ b("option", {
|
|
691
724
|
value: "stripe",
|
|
692
725
|
children: "Stripe"
|
|
693
726
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ b("option", {
|
|
695
728
|
value: "phonepe",
|
|
696
729
|
children: "PhonePe"
|
|
697
730
|
})
|
|
698
731
|
]
|
|
699
|
-
})] }), /* @__PURE__ */
|
|
732
|
+
})] }), /* @__PURE__ */ b(D, {
|
|
700
733
|
label: "API Key",
|
|
701
|
-
value:
|
|
734
|
+
value: G.paymentGatewayKey,
|
|
702
735
|
onChange: $("paymentGatewayKey"),
|
|
703
736
|
placeholder: "Enter API key",
|
|
704
737
|
hint: "Keep this secret"
|
|
705
738
|
})]
|
|
706
739
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ b("h3", {
|
|
708
741
|
className: "text-sm font-semibold text-text-primary pt-2",
|
|
709
742
|
children: "SMS Provider"
|
|
710
743
|
}),
|
|
711
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ x("div", {
|
|
712
745
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-5",
|
|
713
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
714
747
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
715
748
|
children: "Provider"
|
|
716
|
-
}), /* @__PURE__ */
|
|
717
|
-
value:
|
|
749
|
+
}), /* @__PURE__ */ x("select", {
|
|
750
|
+
value: G.smsProvider,
|
|
718
751
|
onChange: (e) => $("smsProvider")(e.target.value),
|
|
719
752
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
720
753
|
children: [
|
|
721
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ b("option", {
|
|
722
755
|
value: "twilio",
|
|
723
756
|
children: "Twilio"
|
|
724
757
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
758
|
+
/* @__PURE__ */ b("option", {
|
|
726
759
|
value: "msg91",
|
|
727
760
|
children: "MSG91"
|
|
728
761
|
}),
|
|
729
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ b("option", {
|
|
730
763
|
value: "textlocal",
|
|
731
764
|
children: "Textlocal"
|
|
732
765
|
})
|
|
733
766
|
]
|
|
734
|
-
})] }), /* @__PURE__ */
|
|
767
|
+
})] }), /* @__PURE__ */ b(D, {
|
|
735
768
|
label: "SMS API Key",
|
|
736
|
-
value:
|
|
769
|
+
value: G.smsApiKey,
|
|
737
770
|
onChange: $("smsApiKey"),
|
|
738
771
|
placeholder: "Enter SMS API key"
|
|
739
772
|
})]
|
|
740
773
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ b("h3", {
|
|
742
775
|
className: "text-sm font-semibold text-text-primary pt-2",
|
|
743
776
|
children: "Analytics"
|
|
744
777
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
778
|
+
/* @__PURE__ */ b(D, {
|
|
746
779
|
label: "Google Analytics ID",
|
|
747
|
-
value:
|
|
780
|
+
value: G.analyticsId,
|
|
748
781
|
onChange: $("analyticsId"),
|
|
749
782
|
placeholder: "GA-XXXXXXXXX"
|
|
750
783
|
})
|
|
751
784
|
]
|
|
752
785
|
}),
|
|
753
|
-
/* @__PURE__ */
|
|
786
|
+
/* @__PURE__ */ b("div", {
|
|
754
787
|
className: "flex justify-end mt-8 pt-6 border-t border-border-subtle",
|
|
755
|
-
children: /* @__PURE__ */
|
|
788
|
+
children: /* @__PURE__ */ b("button", {
|
|
756
789
|
type: "button",
|
|
757
790
|
onClick: q,
|
|
758
|
-
disabled:
|
|
759
|
-
className: t("inline-flex items-center gap-2 rounded-md px-6 py-2 text-sm font-medium transition-colors",
|
|
760
|
-
children:
|
|
791
|
+
disabled: _,
|
|
792
|
+
className: t("inline-flex items-center gap-2 rounded-md px-6 py-2 text-sm font-medium transition-colors", v ? "bg-status-success-bg-subtle text-status-success-text" : _ ? "bg-bg-sunken text-text-secondary cursor-not-allowed" : "bg-accent text-text-primary hover:bg-accent/80"),
|
|
793
|
+
children: _ ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), "Saving..."] }) : v ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(d, { className: "h-4 w-4" }), "Saved!"] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(g, { className: "h-4 w-4" }), "Save Settings"] })
|
|
761
794
|
})
|
|
762
795
|
})
|
|
763
796
|
]
|
|
@@ -766,16 +799,16 @@ var C = [
|
|
|
766
799
|
]
|
|
767
800
|
})
|
|
768
801
|
]
|
|
769
|
-
}) : /* @__PURE__ */
|
|
802
|
+
}) : /* @__PURE__ */ b(n, {
|
|
770
803
|
title: "Business Settings",
|
|
771
804
|
description: "Manage your business profile and configuration",
|
|
772
|
-
children: /* @__PURE__ */
|
|
805
|
+
children: /* @__PURE__ */ b(r, {
|
|
773
806
|
illustration: "empty-generic",
|
|
774
807
|
title: "Create your cart first",
|
|
775
808
|
description: "You don't have a service provider yet. Set up your cart before configuring its business settings.",
|
|
776
|
-
action: /* @__PURE__ */
|
|
809
|
+
action: /* @__PURE__ */ b("button", {
|
|
777
810
|
type: "button",
|
|
778
|
-
onClick: () =>
|
|
811
|
+
onClick: () => u("/cart-owner/service-config"),
|
|
779
812
|
className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80",
|
|
780
813
|
children: "Set up your cart"
|
|
781
814
|
})
|
|
@@ -783,6 +816,6 @@ var C = [
|
|
|
783
816
|
});
|
|
784
817
|
};
|
|
785
818
|
//#endregion
|
|
786
|
-
export {
|
|
819
|
+
export { k as BusinessSettingsPage };
|
|
787
820
|
|
|
788
821
|
//# sourceMappingURL=BusinessSettingsPage.js.map
|