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