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