@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
|
@@ -1,9 +1,9 @@
|
|
|
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 { useOrders as r, useProviders as i } from "../../hooks/useKadaikodiApi.js";
|
|
5
|
-
import { useEffect as
|
|
6
|
-
import { AlertCircle as
|
|
4
|
+
import { useOrders as r, useProviders as i, useUpdateProvider as a } from "../../hooks/useKadaikodiApi.js";
|
|
5
|
+
import { useEffect as o, useMemo as s, useState as c } from "react";
|
|
6
|
+
import { AlertCircle as l, BadgeCheck as u, Bell as d, Building2 as f, Camera as p, CheckCircle2 as ee, Clock as m, CreditCard as h, Edit2 as g, Key as _, Lock as v, Save as y, Shield as b, Star as x, User as S } from "lucide-react";
|
|
7
7
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
8
8
|
import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
9
9
|
//#region src/kadaikodi/pages/cart-owner/CartOwnerProfilePage.tsx
|
|
@@ -16,7 +16,7 @@ var O = [
|
|
|
16
16
|
{
|
|
17
17
|
id: "business",
|
|
18
18
|
label: "Business Details",
|
|
19
|
-
icon:
|
|
19
|
+
icon: f
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
id: "operations",
|
|
@@ -36,7 +36,7 @@ var O = [
|
|
|
36
36
|
{
|
|
37
37
|
id: "notifications",
|
|
38
38
|
label: "Notifications",
|
|
39
|
-
icon:
|
|
39
|
+
icon: d
|
|
40
40
|
}
|
|
41
41
|
], k = [
|
|
42
42
|
"Monday",
|
|
@@ -63,16 +63,16 @@ var O = [
|
|
|
63
63
|
RETAIL_MERCHANDISE: "Retail & Merchandise",
|
|
64
64
|
GROCERY_ESSENTIALS: "Grocery & Essentials"
|
|
65
65
|
}, M = () => {
|
|
66
|
-
let { navigateTo:
|
|
67
|
-
firstName:
|
|
68
|
-
lastName:
|
|
69
|
-
email:
|
|
70
|
-
phone:
|
|
66
|
+
let { navigateTo: d, currentUser: f } = e(), [m, h] = c("personal"), [S, M] = c(!1), [N, P] = c(!1), [F, I] = c(!1), L = a(), { data: R = [] } = i(), z = s(() => R.find((e) => e.ownerId === f?.id) ?? R[0], [R, f?.id]), { data: B = [] } = r({ providerId: z?.id }), [V, H] = c({
|
|
67
|
+
firstName: f?.firstName ?? f?.name?.split(" ")[0] ?? "",
|
|
68
|
+
lastName: f?.lastName ?? f?.name?.split(" ").slice(1).join(" ") ?? "",
|
|
69
|
+
email: f?.email ?? "",
|
|
70
|
+
phone: f?.phone ?? "",
|
|
71
71
|
dateOfBirth: "",
|
|
72
72
|
gender: "",
|
|
73
73
|
address: "",
|
|
74
74
|
bio: ""
|
|
75
|
-
}), [
|
|
75
|
+
}), [U, W] = c({
|
|
76
76
|
businessName: "",
|
|
77
77
|
category: "Food & Beverage",
|
|
78
78
|
description: "",
|
|
@@ -82,7 +82,7 @@ var O = [
|
|
|
82
82
|
businessAddress: "",
|
|
83
83
|
businessPhone: "",
|
|
84
84
|
businessEmail: ""
|
|
85
|
-
}), [
|
|
85
|
+
}), [G, K] = c({
|
|
86
86
|
workingDays: [
|
|
87
87
|
"Monday",
|
|
88
88
|
"Tuesday",
|
|
@@ -96,40 +96,62 @@ var O = [
|
|
|
96
96
|
preparationTime: 15,
|
|
97
97
|
deliveryRadius: 5,
|
|
98
98
|
maxOrdersPerDay: 100
|
|
99
|
-
}), [
|
|
99
|
+
}), [q, J] = c({
|
|
100
100
|
bankName: "",
|
|
101
101
|
accountHolder: "",
|
|
102
102
|
accountNumber: "",
|
|
103
103
|
ifscCode: "",
|
|
104
104
|
upiId: "",
|
|
105
105
|
payoutSchedule: "weekly"
|
|
106
|
-
}), [
|
|
106
|
+
}), [Y, X] = c({
|
|
107
107
|
orderAlerts: !0,
|
|
108
108
|
paymentAlerts: !0,
|
|
109
109
|
reviewAlerts: !0,
|
|
110
110
|
promotionalEmails: !1,
|
|
111
111
|
smsAlerts: !0,
|
|
112
112
|
weeklyReport: !0
|
|
113
|
-
}), [
|
|
114
|
-
|
|
115
|
-
if (!
|
|
116
|
-
let e = j[
|
|
117
|
-
|
|
113
|
+
}), [Z, Q] = c(!1);
|
|
114
|
+
o(() => {
|
|
115
|
+
if (!z || Z) return;
|
|
116
|
+
let e = j[z.category] ?? z.category;
|
|
117
|
+
W((t) => ({
|
|
118
118
|
...t,
|
|
119
|
-
businessName:
|
|
119
|
+
businessName: z.name,
|
|
120
120
|
category: A.includes(e) ? e : t.category,
|
|
121
|
-
businessAddress:
|
|
122
|
-
})),
|
|
123
|
-
}, [
|
|
124
|
-
let
|
|
125
|
-
rating:
|
|
126
|
-
totalOrders:
|
|
127
|
-
reviews:
|
|
128
|
-
memberSince:
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
businessAddress: z.location?.address ?? ""
|
|
122
|
+
})), Q(!0);
|
|
123
|
+
}, [z, Z]);
|
|
124
|
+
let $ = {
|
|
125
|
+
rating: z?.rating ?? 0,
|
|
126
|
+
totalOrders: B.length,
|
|
127
|
+
reviews: z?.totalRatings ?? 0,
|
|
128
|
+
memberSince: z?.createdAt ?? null
|
|
129
|
+
}, te = !!z?.isVerified, ne = () => {
|
|
130
|
+
if (!z) {
|
|
131
|
+
M(!1);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
I(!1), L.mutate({
|
|
135
|
+
id: z.id,
|
|
136
|
+
input: {
|
|
137
|
+
name: U.businessName,
|
|
138
|
+
description: U.description || void 0,
|
|
139
|
+
location: {
|
|
140
|
+
address: U.businessAddress,
|
|
141
|
+
coordinates: z.location?.coordinates ?? {
|
|
142
|
+
lat: 0,
|
|
143
|
+
lng: 0
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
onSuccess: () => {
|
|
149
|
+
P(!0), M(!1), setTimeout(() => P(!1), 3e3);
|
|
150
|
+
},
|
|
151
|
+
onError: () => I(!0)
|
|
152
|
+
});
|
|
153
|
+
}, re = (e) => {
|
|
154
|
+
K((t) => ({
|
|
133
155
|
...t,
|
|
134
156
|
workingDays: t.workingDays.includes(e) ? t.workingDays.filter((t) => t !== e) : [...t.workingDays, e]
|
|
135
157
|
}));
|
|
@@ -139,19 +161,20 @@ var O = [
|
|
|
139
161
|
description: "Your business profile and settings",
|
|
140
162
|
actions: /* @__PURE__ */ w("div", {
|
|
141
163
|
className: "flex items-center gap-2",
|
|
142
|
-
children:
|
|
164
|
+
children: S ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
143
165
|
type: "button",
|
|
144
|
-
onClick: () =>
|
|
166
|
+
onClick: () => M(!1),
|
|
145
167
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
146
168
|
children: "Cancel"
|
|
147
169
|
}), /* @__PURE__ */ T("button", {
|
|
148
170
|
type: "button",
|
|
149
|
-
onClick:
|
|
150
|
-
|
|
151
|
-
|
|
171
|
+
onClick: ne,
|
|
172
|
+
disabled: L.isPending,
|
|
173
|
+
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 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",
|
|
174
|
+
children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), L.isPending ? "Saving..." : "Save"]
|
|
152
175
|
})] }) : /* @__PURE__ */ T("button", {
|
|
153
176
|
type: "button",
|
|
154
|
-
onClick: () =>
|
|
177
|
+
onClick: () => M(!0),
|
|
155
178
|
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 transition-colors",
|
|
156
179
|
children: [/* @__PURE__ */ w(g, { className: "h-4 w-4" }), "Edit Profile"]
|
|
157
180
|
})
|
|
@@ -162,11 +185,18 @@ var O = [
|
|
|
162
185
|
}), /* @__PURE__ */ T("div", {
|
|
163
186
|
className: "space-y-4",
|
|
164
187
|
children: [
|
|
165
|
-
|
|
188
|
+
N && /* @__PURE__ */ T("div", {
|
|
166
189
|
className: "flex items-center gap-2 rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-3",
|
|
167
|
-
children: [/* @__PURE__ */ w(
|
|
190
|
+
children: [/* @__PURE__ */ w(ee, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ w("span", {
|
|
168
191
|
className: "text-sm font-medium text-status-success-text",
|
|
169
|
-
children: "
|
|
192
|
+
children: "Business details saved successfully!"
|
|
193
|
+
})]
|
|
194
|
+
}),
|
|
195
|
+
F && /* @__PURE__ */ T("div", {
|
|
196
|
+
className: "flex items-center gap-2 rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-3",
|
|
197
|
+
children: [/* @__PURE__ */ w(l, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ w("span", {
|
|
198
|
+
className: "text-sm font-medium text-status-error-text",
|
|
199
|
+
children: "We couldn't save your business details. Please try again."
|
|
170
200
|
})]
|
|
171
201
|
}),
|
|
172
202
|
/* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h2", {
|
|
@@ -179,7 +209,7 @@ var O = [
|
|
|
179
209
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm text-center",
|
|
180
210
|
children: [/* @__PURE__ */ T("p", {
|
|
181
211
|
className: "text-2xl font-bold text-text-primary flex items-center justify-center gap-1",
|
|
182
|
-
children: [/* @__PURE__ */ w(x, { className: "h-5 w-5 fill-status-warning-text text-status-warning-text" }),
|
|
212
|
+
children: [/* @__PURE__ */ w(x, { className: "h-5 w-5 fill-status-warning-text text-status-warning-text" }), $.reviews > 0 ? $.rating.toFixed(1) : "—"]
|
|
183
213
|
}), /* @__PURE__ */ w("p", {
|
|
184
214
|
className: "text-xs text-text-secondary",
|
|
185
215
|
children: "Rating"
|
|
@@ -189,7 +219,7 @@ var O = [
|
|
|
189
219
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm text-center",
|
|
190
220
|
children: [/* @__PURE__ */ w("p", {
|
|
191
221
|
className: "text-2xl font-bold text-text-primary",
|
|
192
|
-
children:
|
|
222
|
+
children: $.totalOrders.toLocaleString()
|
|
193
223
|
}), /* @__PURE__ */ w("p", {
|
|
194
224
|
className: "text-xs text-text-secondary",
|
|
195
225
|
children: "Total Orders"
|
|
@@ -199,7 +229,7 @@ var O = [
|
|
|
199
229
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm text-center",
|
|
200
230
|
children: [/* @__PURE__ */ w("p", {
|
|
201
231
|
className: "text-2xl font-bold text-text-primary",
|
|
202
|
-
children:
|
|
232
|
+
children: $.reviews
|
|
203
233
|
}), /* @__PURE__ */ w("p", {
|
|
204
234
|
className: "text-xs text-text-secondary",
|
|
205
235
|
children: "Reviews"
|
|
@@ -209,7 +239,7 @@ var O = [
|
|
|
209
239
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm text-center",
|
|
210
240
|
children: [/* @__PURE__ */ w("p", {
|
|
211
241
|
className: "text-sm font-bold text-text-primary",
|
|
212
|
-
children:
|
|
242
|
+
children: $.memberSince ? new Date($.memberSince).toLocaleDateString("en-IN", {
|
|
213
243
|
month: "short",
|
|
214
244
|
year: "numeric"
|
|
215
245
|
}) : "—"
|
|
@@ -267,26 +297,39 @@ var O = [
|
|
|
267
297
|
m === "personal" && /* @__PURE__ */ T("div", {
|
|
268
298
|
className: "space-y-5",
|
|
269
299
|
children: [
|
|
300
|
+
/* @__PURE__ */ T("div", {
|
|
301
|
+
className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
|
|
302
|
+
children: [/* @__PURE__ */ w("p", {
|
|
303
|
+
className: "text-xs text-text-secondary",
|
|
304
|
+
children: "Your name, email, phone and photo are managed in your account. Update them in Account Security and they'll sync everywhere."
|
|
305
|
+
}), /* @__PURE__ */ T("button", {
|
|
306
|
+
type: "button",
|
|
307
|
+
onClick: () => d("/auth/security"),
|
|
308
|
+
className: "shrink-0 inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-surface transition-colors",
|
|
309
|
+
children: [/* @__PURE__ */ w(v, { className: "h-3.5 w-3.5" }), "Manage in Account Security"]
|
|
310
|
+
})]
|
|
311
|
+
}),
|
|
270
312
|
/* @__PURE__ */ T("div", {
|
|
271
313
|
className: "flex items-center gap-5",
|
|
272
314
|
children: [/* @__PURE__ */ T("div", {
|
|
273
315
|
className: "relative",
|
|
274
316
|
children: [/* @__PURE__ */ T("div", {
|
|
275
317
|
className: "flex h-20 w-20 items-center justify-center rounded-full bg-bg-sunken text-2xl font-bold text-text-primary",
|
|
276
|
-
children: [
|
|
277
|
-
}),
|
|
318
|
+
children: [V.firstName[0], V.lastName[0]]
|
|
319
|
+
}), /* @__PURE__ */ w("button", {
|
|
278
320
|
type: "button",
|
|
279
|
-
onClick: () =>
|
|
321
|
+
onClick: () => d("/auth/security"),
|
|
322
|
+
title: "Update your photo in Account Security",
|
|
280
323
|
className: "absolute -bottom-1 -right-1 flex h-7 w-7 items-center justify-center rounded-full bg-accent text-text-primary border-2 border-card hover:bg-accent/80",
|
|
281
|
-
children: /* @__PURE__ */ w(
|
|
324
|
+
children: /* @__PURE__ */ w(p, { className: "h-3.5 w-3.5" })
|
|
282
325
|
})]
|
|
283
326
|
}), /* @__PURE__ */ T("div", { children: [
|
|
284
327
|
/* @__PURE__ */ T("p", {
|
|
285
328
|
className: "text-lg font-semibold text-text-primary",
|
|
286
329
|
children: [
|
|
287
|
-
|
|
330
|
+
V.firstName,
|
|
288
331
|
" ",
|
|
289
|
-
|
|
332
|
+
V.lastName
|
|
290
333
|
]
|
|
291
334
|
}),
|
|
292
335
|
/* @__PURE__ */ w("p", {
|
|
@@ -295,12 +338,12 @@ var O = [
|
|
|
295
338
|
}),
|
|
296
339
|
/* @__PURE__ */ T("div", {
|
|
297
340
|
className: "flex items-center gap-2 mt-1",
|
|
298
|
-
children: [
|
|
341
|
+
children: [te && /* @__PURE__ */ T("span", {
|
|
299
342
|
className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-accent-soft)] px-2.5 py-0.5 text-xs font-medium text-text-primary",
|
|
300
|
-
children: [/* @__PURE__ */ w(
|
|
301
|
-
}),
|
|
343
|
+
children: [/* @__PURE__ */ w(u, { className: "h-3 w-3" }), "Verified"]
|
|
344
|
+
}), $.reviews > 0 && /* @__PURE__ */ T("span", {
|
|
302
345
|
className: "flex items-center gap-0.5 text-xs text-status-warning-text",
|
|
303
|
-
children: [/* @__PURE__ */ w(x, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }),
|
|
346
|
+
children: [/* @__PURE__ */ w(x, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), $.rating.toFixed(1)]
|
|
304
347
|
})]
|
|
305
348
|
})
|
|
306
349
|
] })]
|
|
@@ -312,25 +355,19 @@ var O = [
|
|
|
312
355
|
children: "First Name"
|
|
313
356
|
}), /* @__PURE__ */ w("input", {
|
|
314
357
|
type: "text",
|
|
315
|
-
value:
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
})),
|
|
320
|
-
disabled: !v,
|
|
321
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !v && "bg-bg-sunken/50 cursor-not-allowed")
|
|
358
|
+
value: V.firstName,
|
|
359
|
+
readOnly: !0,
|
|
360
|
+
disabled: !0,
|
|
361
|
+
className: "w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary bg-bg-sunken/50 cursor-not-allowed"
|
|
322
362
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
323
363
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
324
364
|
children: "Last Name"
|
|
325
365
|
}), /* @__PURE__ */ w("input", {
|
|
326
366
|
type: "text",
|
|
327
|
-
value:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
})),
|
|
332
|
-
disabled: !v,
|
|
333
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !v && "bg-bg-sunken/50 cursor-not-allowed")
|
|
367
|
+
value: V.lastName,
|
|
368
|
+
readOnly: !0,
|
|
369
|
+
disabled: !0,
|
|
370
|
+
className: "w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary bg-bg-sunken/50 cursor-not-allowed"
|
|
334
371
|
})] })]
|
|
335
372
|
}),
|
|
336
373
|
/* @__PURE__ */ T("div", {
|
|
@@ -340,25 +377,19 @@ var O = [
|
|
|
340
377
|
children: "Email"
|
|
341
378
|
}), /* @__PURE__ */ w("input", {
|
|
342
379
|
type: "email",
|
|
343
|
-
value:
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
})),
|
|
348
|
-
disabled: !v,
|
|
349
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !v && "bg-bg-sunken/50 cursor-not-allowed")
|
|
380
|
+
value: V.email,
|
|
381
|
+
readOnly: !0,
|
|
382
|
+
disabled: !0,
|
|
383
|
+
className: "w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary bg-bg-sunken/50 cursor-not-allowed"
|
|
350
384
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
351
385
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
352
386
|
children: "Phone"
|
|
353
387
|
}), /* @__PURE__ */ w("input", {
|
|
354
388
|
type: "tel",
|
|
355
|
-
value:
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
})),
|
|
360
|
-
disabled: !v,
|
|
361
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !v && "bg-bg-sunken/50 cursor-not-allowed")
|
|
389
|
+
value: V.phone,
|
|
390
|
+
readOnly: !0,
|
|
391
|
+
disabled: !0,
|
|
392
|
+
className: "w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary bg-bg-sunken/50 cursor-not-allowed"
|
|
362
393
|
})] })]
|
|
363
394
|
}),
|
|
364
395
|
/* @__PURE__ */ T("div", {
|
|
@@ -368,24 +399,24 @@ var O = [
|
|
|
368
399
|
children: "Date of Birth"
|
|
369
400
|
}), /* @__PURE__ */ w("input", {
|
|
370
401
|
type: "date",
|
|
371
|
-
value:
|
|
372
|
-
onChange: (e) =>
|
|
402
|
+
value: V.dateOfBirth,
|
|
403
|
+
onChange: (e) => H((t) => ({
|
|
373
404
|
...t,
|
|
374
405
|
dateOfBirth: e.target.value
|
|
375
406
|
})),
|
|
376
|
-
disabled: !
|
|
377
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
407
|
+
disabled: !S,
|
|
408
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
378
409
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
379
410
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
380
411
|
children: "Gender"
|
|
381
412
|
}), /* @__PURE__ */ T("select", {
|
|
382
|
-
value:
|
|
383
|
-
onChange: (e) =>
|
|
413
|
+
value: V.gender,
|
|
414
|
+
onChange: (e) => H((t) => ({
|
|
384
415
|
...t,
|
|
385
416
|
gender: e.target.value
|
|
386
417
|
})),
|
|
387
|
-
disabled: !
|
|
388
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
418
|
+
disabled: !S,
|
|
419
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed"),
|
|
389
420
|
children: [
|
|
390
421
|
/* @__PURE__ */ w("option", {
|
|
391
422
|
value: "",
|
|
@@ -411,26 +442,26 @@ var O = [
|
|
|
411
442
|
children: "Address"
|
|
412
443
|
}), /* @__PURE__ */ w("input", {
|
|
413
444
|
type: "text",
|
|
414
|
-
value:
|
|
415
|
-
onChange: (e) =>
|
|
445
|
+
value: V.address,
|
|
446
|
+
onChange: (e) => H((t) => ({
|
|
416
447
|
...t,
|
|
417
448
|
address: e.target.value
|
|
418
449
|
})),
|
|
419
|
-
disabled: !
|
|
420
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
450
|
+
disabled: !S,
|
|
451
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
421
452
|
})] }),
|
|
422
453
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
423
454
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
424
455
|
children: "Bio"
|
|
425
456
|
}), /* @__PURE__ */ w("textarea", {
|
|
426
|
-
value:
|
|
427
|
-
onChange: (e) =>
|
|
457
|
+
value: V.bio,
|
|
458
|
+
onChange: (e) => H((t) => ({
|
|
428
459
|
...t,
|
|
429
460
|
bio: e.target.value
|
|
430
461
|
})),
|
|
431
|
-
disabled: !
|
|
462
|
+
disabled: !S,
|
|
432
463
|
rows: 3,
|
|
433
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary resize-none", !
|
|
464
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary resize-none", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
434
465
|
})] })
|
|
435
466
|
]
|
|
436
467
|
}),
|
|
@@ -442,42 +473,45 @@ var O = [
|
|
|
442
473
|
children: "Business Name"
|
|
443
474
|
}), /* @__PURE__ */ w("input", {
|
|
444
475
|
type: "text",
|
|
445
|
-
value:
|
|
446
|
-
onChange: (e) =>
|
|
476
|
+
value: U.businessName,
|
|
477
|
+
onChange: (e) => W((t) => ({
|
|
447
478
|
...t,
|
|
448
479
|
businessName: e.target.value
|
|
449
480
|
})),
|
|
450
|
-
disabled: !
|
|
451
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
452
|
-
})] }),
|
|
453
|
-
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
454
|
-
className: "block text-sm font-medium text-text-primary mb-1",
|
|
455
|
-
children: "Category"
|
|
456
|
-
}), /* @__PURE__ */ w("select", {
|
|
457
|
-
value: z.category,
|
|
458
|
-
onChange: (e) => B((t) => ({
|
|
459
|
-
...t,
|
|
460
|
-
category: e.target.value
|
|
461
|
-
})),
|
|
462
|
-
disabled: !v,
|
|
463
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !v && "bg-bg-sunken/50 cursor-not-allowed"),
|
|
464
|
-
children: A.map((e) => /* @__PURE__ */ w("option", {
|
|
465
|
-
value: e,
|
|
466
|
-
children: e
|
|
467
|
-
}, e))
|
|
481
|
+
disabled: !S,
|
|
482
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
468
483
|
})] }),
|
|
484
|
+
/* @__PURE__ */ T("div", { children: [
|
|
485
|
+
/* @__PURE__ */ w("label", {
|
|
486
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
487
|
+
children: "Category"
|
|
488
|
+
}),
|
|
489
|
+
/* @__PURE__ */ w("select", {
|
|
490
|
+
value: U.category,
|
|
491
|
+
disabled: !0,
|
|
492
|
+
className: "w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary bg-bg-sunken/50 cursor-not-allowed",
|
|
493
|
+
children: A.map((e) => /* @__PURE__ */ w("option", {
|
|
494
|
+
value: e,
|
|
495
|
+
children: e
|
|
496
|
+
}, e))
|
|
497
|
+
}),
|
|
498
|
+
/* @__PURE__ */ w("p", {
|
|
499
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
500
|
+
children: "Set when your cart was created and can't be changed here."
|
|
501
|
+
})
|
|
502
|
+
] }),
|
|
469
503
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
470
504
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
471
505
|
children: "Description"
|
|
472
506
|
}), /* @__PURE__ */ w("textarea", {
|
|
473
|
-
value:
|
|
474
|
-
onChange: (e) =>
|
|
507
|
+
value: U.description,
|
|
508
|
+
onChange: (e) => W((t) => ({
|
|
475
509
|
...t,
|
|
476
510
|
description: e.target.value
|
|
477
511
|
})),
|
|
478
|
-
disabled: !
|
|
512
|
+
disabled: !S,
|
|
479
513
|
rows: 3,
|
|
480
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary resize-none", !
|
|
514
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary resize-none", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
481
515
|
})] }),
|
|
482
516
|
/* @__PURE__ */ T("div", {
|
|
483
517
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-5",
|
|
@@ -487,39 +521,39 @@ var O = [
|
|
|
487
521
|
children: "GST Number"
|
|
488
522
|
}), /* @__PURE__ */ w("input", {
|
|
489
523
|
type: "text",
|
|
490
|
-
value:
|
|
491
|
-
onChange: (e) =>
|
|
524
|
+
value: U.gstNumber,
|
|
525
|
+
onChange: (e) => W((t) => ({
|
|
492
526
|
...t,
|
|
493
527
|
gstNumber: e.target.value
|
|
494
528
|
})),
|
|
495
|
-
disabled: !
|
|
496
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
529
|
+
disabled: !S,
|
|
530
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
497
531
|
})] }),
|
|
498
532
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
499
533
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
500
534
|
children: "PAN Number"
|
|
501
535
|
}), /* @__PURE__ */ w("input", {
|
|
502
536
|
type: "text",
|
|
503
|
-
value:
|
|
504
|
-
onChange: (e) =>
|
|
537
|
+
value: U.panNumber,
|
|
538
|
+
onChange: (e) => W((t) => ({
|
|
505
539
|
...t,
|
|
506
540
|
panNumber: e.target.value
|
|
507
541
|
})),
|
|
508
|
-
disabled: !
|
|
509
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
542
|
+
disabled: !S,
|
|
543
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
510
544
|
})] }),
|
|
511
545
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
512
546
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
513
547
|
children: "FSSAI License"
|
|
514
548
|
}), /* @__PURE__ */ w("input", {
|
|
515
549
|
type: "text",
|
|
516
|
-
value:
|
|
517
|
-
onChange: (e) =>
|
|
550
|
+
value: U.fssaiLicense,
|
|
551
|
+
onChange: (e) => W((t) => ({
|
|
518
552
|
...t,
|
|
519
553
|
fssaiLicense: e.target.value
|
|
520
554
|
})),
|
|
521
|
-
disabled: !
|
|
522
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
555
|
+
disabled: !S,
|
|
556
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
523
557
|
})] })
|
|
524
558
|
]
|
|
525
559
|
}),
|
|
@@ -530,25 +564,25 @@ var O = [
|
|
|
530
564
|
children: "Business Phone"
|
|
531
565
|
}), /* @__PURE__ */ w("input", {
|
|
532
566
|
type: "tel",
|
|
533
|
-
value:
|
|
534
|
-
onChange: (e) =>
|
|
567
|
+
value: U.businessPhone,
|
|
568
|
+
onChange: (e) => W((t) => ({
|
|
535
569
|
...t,
|
|
536
570
|
businessPhone: e.target.value
|
|
537
571
|
})),
|
|
538
|
-
disabled: !
|
|
539
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
572
|
+
disabled: !S,
|
|
573
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
540
574
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
541
575
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
542
576
|
children: "Business Email"
|
|
543
577
|
}), /* @__PURE__ */ w("input", {
|
|
544
578
|
type: "email",
|
|
545
|
-
value:
|
|
546
|
-
onChange: (e) =>
|
|
579
|
+
value: U.businessEmail,
|
|
580
|
+
onChange: (e) => W((t) => ({
|
|
547
581
|
...t,
|
|
548
582
|
businessEmail: e.target.value
|
|
549
583
|
})),
|
|
550
|
-
disabled: !
|
|
551
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
584
|
+
disabled: !S,
|
|
585
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
552
586
|
})] })]
|
|
553
587
|
})
|
|
554
588
|
]
|
|
@@ -563,9 +597,9 @@ var O = [
|
|
|
563
597
|
className: "flex flex-wrap gap-2",
|
|
564
598
|
children: k.map((e) => /* @__PURE__ */ w("button", {
|
|
565
599
|
type: "button",
|
|
566
|
-
onClick: () =>
|
|
567
|
-
disabled: !
|
|
568
|
-
className: t("px-3 py-1.5 rounded-full text-xs font-medium transition-colors",
|
|
600
|
+
onClick: () => S && re(e),
|
|
601
|
+
disabled: !S,
|
|
602
|
+
className: t("px-3 py-1.5 rounded-full text-xs font-medium transition-colors", G.workingDays.includes(e) ? "bg-action-primary-bg text-white" : "bg-bg-sunken text-text-secondary", !S && "cursor-not-allowed opacity-70"),
|
|
569
603
|
children: e.slice(0, 3)
|
|
570
604
|
}, e))
|
|
571
605
|
})] }),
|
|
@@ -576,25 +610,25 @@ var O = [
|
|
|
576
610
|
children: "Opening Time"
|
|
577
611
|
}), /* @__PURE__ */ w("input", {
|
|
578
612
|
type: "time",
|
|
579
|
-
value:
|
|
580
|
-
onChange: (e) =>
|
|
613
|
+
value: G.openTime,
|
|
614
|
+
onChange: (e) => K((t) => ({
|
|
581
615
|
...t,
|
|
582
616
|
openTime: e.target.value
|
|
583
617
|
})),
|
|
584
|
-
disabled: !
|
|
585
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
618
|
+
disabled: !S,
|
|
619
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
586
620
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
587
621
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
588
622
|
children: "Closing Time"
|
|
589
623
|
}), /* @__PURE__ */ w("input", {
|
|
590
624
|
type: "time",
|
|
591
|
-
value:
|
|
592
|
-
onChange: (e) =>
|
|
625
|
+
value: G.closeTime,
|
|
626
|
+
onChange: (e) => K((t) => ({
|
|
593
627
|
...t,
|
|
594
628
|
closeTime: e.target.value
|
|
595
629
|
})),
|
|
596
|
-
disabled: !
|
|
597
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
630
|
+
disabled: !S,
|
|
631
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
598
632
|
})] })]
|
|
599
633
|
}),
|
|
600
634
|
/* @__PURE__ */ T("div", {
|
|
@@ -605,39 +639,39 @@ var O = [
|
|
|
605
639
|
children: "Prep Time (min)"
|
|
606
640
|
}), /* @__PURE__ */ w("input", {
|
|
607
641
|
type: "number",
|
|
608
|
-
value:
|
|
609
|
-
onChange: (e) =>
|
|
642
|
+
value: G.preparationTime,
|
|
643
|
+
onChange: (e) => K((t) => ({
|
|
610
644
|
...t,
|
|
611
645
|
preparationTime: parseInt(e.target.value) || 0
|
|
612
646
|
})),
|
|
613
|
-
disabled: !
|
|
614
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
647
|
+
disabled: !S,
|
|
648
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
615
649
|
})] }),
|
|
616
650
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
617
651
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
618
652
|
children: "Delivery Radius (km)"
|
|
619
653
|
}), /* @__PURE__ */ w("input", {
|
|
620
654
|
type: "number",
|
|
621
|
-
value:
|
|
622
|
-
onChange: (e) =>
|
|
655
|
+
value: G.deliveryRadius,
|
|
656
|
+
onChange: (e) => K((t) => ({
|
|
623
657
|
...t,
|
|
624
658
|
deliveryRadius: parseInt(e.target.value) || 0
|
|
625
659
|
})),
|
|
626
|
-
disabled: !
|
|
627
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
660
|
+
disabled: !S,
|
|
661
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
628
662
|
})] }),
|
|
629
663
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
630
664
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
631
665
|
children: "Max Orders/Day"
|
|
632
666
|
}), /* @__PURE__ */ w("input", {
|
|
633
667
|
type: "number",
|
|
634
|
-
value:
|
|
635
|
-
onChange: (e) =>
|
|
668
|
+
value: G.maxOrdersPerDay,
|
|
669
|
+
onChange: (e) => K((t) => ({
|
|
636
670
|
...t,
|
|
637
671
|
maxOrdersPerDay: parseInt(e.target.value) || 0
|
|
638
672
|
})),
|
|
639
|
-
disabled: !
|
|
640
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
673
|
+
disabled: !S,
|
|
674
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
641
675
|
})] })
|
|
642
676
|
]
|
|
643
677
|
})
|
|
@@ -648,7 +682,7 @@ var O = [
|
|
|
648
682
|
children: [
|
|
649
683
|
/* @__PURE__ */ T("div", {
|
|
650
684
|
className: "flex items-start gap-3 rounded-md bg-[var(--color-accent-soft)] border border-border-focus/20 p-3",
|
|
651
|
-
children: [/* @__PURE__ */ w(
|
|
685
|
+
children: [/* @__PURE__ */ w(l, { className: "h-4 w-4 text-text-primary shrink-0 mt-0.5" }), /* @__PURE__ */ w("p", {
|
|
652
686
|
className: "text-xs text-text-primary",
|
|
653
687
|
children: "Bank details are used for payouts. Changes require verification and may take 2-3 business days to process."
|
|
654
688
|
})]
|
|
@@ -660,25 +694,25 @@ var O = [
|
|
|
660
694
|
children: "Bank Name"
|
|
661
695
|
}), /* @__PURE__ */ w("input", {
|
|
662
696
|
type: "text",
|
|
663
|
-
value:
|
|
664
|
-
onChange: (e) =>
|
|
697
|
+
value: q.bankName,
|
|
698
|
+
onChange: (e) => J((t) => ({
|
|
665
699
|
...t,
|
|
666
700
|
bankName: e.target.value
|
|
667
701
|
})),
|
|
668
|
-
disabled: !
|
|
669
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
702
|
+
disabled: !S,
|
|
703
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
670
704
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
671
705
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
672
706
|
children: "Account Holder"
|
|
673
707
|
}), /* @__PURE__ */ w("input", {
|
|
674
708
|
type: "text",
|
|
675
|
-
value:
|
|
676
|
-
onChange: (e) =>
|
|
709
|
+
value: q.accountHolder,
|
|
710
|
+
onChange: (e) => J((t) => ({
|
|
677
711
|
...t,
|
|
678
712
|
accountHolder: e.target.value
|
|
679
713
|
})),
|
|
680
|
-
disabled: !
|
|
681
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
714
|
+
disabled: !S,
|
|
715
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
682
716
|
})] })]
|
|
683
717
|
}),
|
|
684
718
|
/* @__PURE__ */ T("div", {
|
|
@@ -688,25 +722,25 @@ var O = [
|
|
|
688
722
|
children: "Account Number"
|
|
689
723
|
}), /* @__PURE__ */ w("input", {
|
|
690
724
|
type: "text",
|
|
691
|
-
value:
|
|
692
|
-
onChange: (e) =>
|
|
725
|
+
value: S ? q.accountNumber : `****${q.accountNumber.slice(-4)}`,
|
|
726
|
+
onChange: (e) => J((t) => ({
|
|
693
727
|
...t,
|
|
694
728
|
accountNumber: e.target.value
|
|
695
729
|
})),
|
|
696
|
-
disabled: !
|
|
697
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
730
|
+
disabled: !S,
|
|
731
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
698
732
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
699
733
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
700
734
|
children: "IFSC Code"
|
|
701
735
|
}), /* @__PURE__ */ w("input", {
|
|
702
736
|
type: "text",
|
|
703
|
-
value:
|
|
704
|
-
onChange: (e) =>
|
|
737
|
+
value: q.ifscCode,
|
|
738
|
+
onChange: (e) => J((t) => ({
|
|
705
739
|
...t,
|
|
706
740
|
ifscCode: e.target.value
|
|
707
741
|
})),
|
|
708
|
-
disabled: !
|
|
709
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
742
|
+
disabled: !S,
|
|
743
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
710
744
|
})] })]
|
|
711
745
|
}),
|
|
712
746
|
/* @__PURE__ */ T("div", {
|
|
@@ -716,24 +750,24 @@ var O = [
|
|
|
716
750
|
children: "UPI ID"
|
|
717
751
|
}), /* @__PURE__ */ w("input", {
|
|
718
752
|
type: "text",
|
|
719
|
-
value:
|
|
720
|
-
onChange: (e) =>
|
|
753
|
+
value: q.upiId,
|
|
754
|
+
onChange: (e) => J((t) => ({
|
|
721
755
|
...t,
|
|
722
756
|
upiId: e.target.value
|
|
723
757
|
})),
|
|
724
|
-
disabled: !
|
|
725
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
758
|
+
disabled: !S,
|
|
759
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed")
|
|
726
760
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
727
761
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
728
762
|
children: "Payout Schedule"
|
|
729
763
|
}), /* @__PURE__ */ T("select", {
|
|
730
|
-
value:
|
|
731
|
-
onChange: (e) =>
|
|
764
|
+
value: q.payoutSchedule,
|
|
765
|
+
onChange: (e) => J((t) => ({
|
|
732
766
|
...t,
|
|
733
767
|
payoutSchedule: e.target.value
|
|
734
768
|
})),
|
|
735
|
-
disabled: !
|
|
736
|
-
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !
|
|
769
|
+
disabled: !S,
|
|
770
|
+
className: t("w-full rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary", !S && "bg-bg-sunken/50 cursor-not-allowed"),
|
|
737
771
|
children: [
|
|
738
772
|
/* @__PURE__ */ w("option", {
|
|
739
773
|
value: "daily",
|
|
@@ -759,6 +793,13 @@ var O = [
|
|
|
759
793
|
m === "security" && /* @__PURE__ */ T("div", {
|
|
760
794
|
className: "space-y-6",
|
|
761
795
|
children: [
|
|
796
|
+
/* @__PURE__ */ T("div", {
|
|
797
|
+
className: "flex items-start gap-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-4",
|
|
798
|
+
children: [/* @__PURE__ */ w(b, { className: "h-5 w-5 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ w("p", {
|
|
799
|
+
className: "text-sm text-text-secondary",
|
|
800
|
+
children: "Your password, two-factor authentication and signed-in devices are handled by your platform account, so they stay consistent across every product you use. Manage them in Account Security."
|
|
801
|
+
})]
|
|
802
|
+
}),
|
|
762
803
|
/* @__PURE__ */ T("div", {
|
|
763
804
|
className: "rounded-lg border border-border-subtle p-5",
|
|
764
805
|
children: [
|
|
@@ -768,52 +809,53 @@ var O = [
|
|
|
768
809
|
}),
|
|
769
810
|
/* @__PURE__ */ w("p", {
|
|
770
811
|
className: "text-xs text-text-secondary mb-3",
|
|
771
|
-
children: "Keep your account secure
|
|
812
|
+
children: "Keep your account secure with a strong, unique password."
|
|
772
813
|
}),
|
|
773
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ T("button", {
|
|
774
815
|
type: "button",
|
|
775
|
-
onClick: () =>
|
|
776
|
-
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
777
|
-
children: "Change Password"
|
|
816
|
+
onClick: () => d("/auth/security"),
|
|
817
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
818
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Change Password in Account Security"]
|
|
778
819
|
})
|
|
779
820
|
]
|
|
780
821
|
}),
|
|
781
822
|
/* @__PURE__ */ T("div", {
|
|
782
823
|
className: "rounded-lg border border-border-subtle p-5",
|
|
783
|
-
children: [
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
className: "text-sm font-semibold text-text-primary flex items-center gap-2",
|
|
824
|
+
children: [
|
|
825
|
+
/* @__PURE__ */ T("h3", {
|
|
826
|
+
className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-1",
|
|
787
827
|
children: [/* @__PURE__ */ w(b, { className: "h-4 w-4 text-text-secondary" }), "Two-Factor Authentication"]
|
|
788
|
-
}),
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
828
|
+
}),
|
|
829
|
+
/* @__PURE__ */ w("p", {
|
|
830
|
+
className: "text-xs text-text-secondary mb-3",
|
|
831
|
+
children: "Add an extra layer of security to your account."
|
|
832
|
+
}),
|
|
833
|
+
/* @__PURE__ */ T("button", {
|
|
792
834
|
type: "button",
|
|
793
|
-
onClick: () =>
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
children: /* @__PURE__ */ w("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", G.twoFactorEnabled ? "translate-x-5" : "translate-x-0.5") })
|
|
799
|
-
})]
|
|
800
|
-
}), G.twoFactorEnabled && /* @__PURE__ */ T("div", {
|
|
801
|
-
className: "mt-3 flex items-center gap-2",
|
|
802
|
-
children: [/* @__PURE__ */ w(p, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ w("span", {
|
|
803
|
-
className: "text-xs text-status-success-text font-medium",
|
|
804
|
-
children: "2FA is enabled"
|
|
805
|
-
})]
|
|
806
|
-
})]
|
|
835
|
+
onClick: () => d("/auth/security"),
|
|
836
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
837
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Manage 2FA in Account Security"]
|
|
838
|
+
})
|
|
839
|
+
]
|
|
807
840
|
}),
|
|
808
841
|
/* @__PURE__ */ T("div", {
|
|
809
842
|
className: "rounded-lg border border-border-subtle p-5",
|
|
810
|
-
children: [
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
843
|
+
children: [
|
|
844
|
+
/* @__PURE__ */ w("h3", {
|
|
845
|
+
className: "text-sm font-semibold text-text-primary mb-3",
|
|
846
|
+
children: "Active Sessions"
|
|
847
|
+
}),
|
|
848
|
+
/* @__PURE__ */ w("p", {
|
|
849
|
+
className: "text-xs text-text-secondary mb-3",
|
|
850
|
+
children: "Review and sign out of devices connected to your account."
|
|
851
|
+
}),
|
|
852
|
+
/* @__PURE__ */ T("button", {
|
|
853
|
+
type: "button",
|
|
854
|
+
onClick: () => d("/auth/security"),
|
|
855
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
856
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Manage Sessions in Account Security"]
|
|
857
|
+
})
|
|
858
|
+
]
|
|
817
859
|
})
|
|
818
860
|
]
|
|
819
861
|
}),
|
|
@@ -860,12 +902,12 @@ var O = [
|
|
|
860
902
|
children: e.description
|
|
861
903
|
})] }), /* @__PURE__ */ w("button", {
|
|
862
904
|
type: "button",
|
|
863
|
-
onClick: () =>
|
|
905
|
+
onClick: () => X((t) => ({
|
|
864
906
|
...t,
|
|
865
907
|
[e.key]: !t[e.key]
|
|
866
908
|
})),
|
|
867
|
-
className: t("h-6 w-11 rounded-full transition-colors relative",
|
|
868
|
-
children: /* @__PURE__ */ w("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform",
|
|
909
|
+
className: t("h-6 w-11 rounded-full transition-colors relative", Y[e.key] ? "bg-action-primary-bg" : "bg-muted-foreground/30"),
|
|
910
|
+
children: /* @__PURE__ */ w("div", { className: t("absolute top-0.5 h-5 w-5 rounded-full bg-white transition-transform", Y[e.key] ? "translate-x-5" : "translate-x-0.5") })
|
|
869
911
|
})]
|
|
870
912
|
}, e.key))
|
|
871
913
|
})
|