@burdenoff/microfe-kadaikodi 2026.704.2 → 2026.704.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kadaikodi/KadaikodiRoutes.js +30 -26
- package/dist/kadaikodi/KadaikodiRoutes.js.map +1 -1
- package/dist/kadaikodi/hooks/useKadaikodiApi.js +76 -6
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +45 -107
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +30 -32
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +137 -120
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +2 -2
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +332 -276
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +278 -283
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +310 -366
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +105 -111
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +290 -257
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +84 -70
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +270 -228
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +194 -173
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +202 -139
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js +232 -0
- package/dist/kadaikodi/pages/cart-owner/InvestmentListingPage.js.map +1 -0
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +84 -79
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +310 -317
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +502 -586
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +243 -143
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +4 -4
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -4
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +6 -6
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +189 -199
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +6 -4
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +6 -6
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js +4 -4
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +409 -304
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +209 -162
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +441 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +207 -186
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +340 -272
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +122 -75
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,50 +2,50 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
|
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useState as
|
|
7
|
-
import { Award as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { EmphasisPanel as
|
|
5
|
+
import { useProviderWorkers as i, useProviders as a, useUpdateProviderWorker as o, useWorkerStats as s } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
+
import { useEffect as c, useMemo as l, useState as u } from "react";
|
|
7
|
+
import { Award as d, Bell as f, Briefcase as p, CreditCard as m, Loader2 as h, Lock as g, MapPin as _, Pencil as v, Save as y, Shield as b, User as x, X as S } from "lucide-react";
|
|
8
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
10
10
|
//#region src/kadaikodi/pages/worker/WorkerProfilePage.tsx
|
|
11
|
-
var
|
|
11
|
+
var O = [
|
|
12
12
|
{
|
|
13
13
|
id: "personal",
|
|
14
14
|
label: "Personal Info",
|
|
15
|
-
icon:
|
|
15
|
+
icon: x
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
id: "work",
|
|
19
19
|
label: "Work Details",
|
|
20
|
-
icon:
|
|
20
|
+
icon: p
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
id: "address",
|
|
24
24
|
label: "Address",
|
|
25
|
-
icon:
|
|
25
|
+
icon: _
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
id: "documents",
|
|
29
29
|
label: "Documents",
|
|
30
|
-
icon:
|
|
30
|
+
icon: m
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
id: "achievements",
|
|
34
34
|
label: "Achievements",
|
|
35
|
-
icon:
|
|
35
|
+
icon: d
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
id: "notifications",
|
|
39
39
|
label: "Notifications",
|
|
40
|
-
icon:
|
|
40
|
+
icon: f
|
|
41
41
|
}
|
|
42
|
-
],
|
|
43
|
-
let { navigateTo:
|
|
44
|
-
firstName:
|
|
45
|
-
lastName:
|
|
46
|
-
email:
|
|
47
|
-
phone:
|
|
48
|
-
profileImage:
|
|
42
|
+
], k = () => {
|
|
43
|
+
let { navigateTo: f, currentUser: p } = e(), { data: m } = s(p?.id ?? ""), { data: _ = [] } = a(), { data: k = [] } = i(l(() => _.find((e) => e.ownerId === p?.id) ?? _[0], [_, p?.id])?.id), A = l(() => k.find((e) => e.workerId === p?.id) ?? k[0], [k, p?.id]), j = o(), [M, N] = u("personal"), [P, F] = u(!1), [I, L] = u(null), [R, z] = u({
|
|
44
|
+
firstName: p?.firstName ?? p?.name?.split(" ")[0] ?? "",
|
|
45
|
+
lastName: p?.lastName ?? p?.name?.split(" ").slice(1).join(" ") ?? "",
|
|
46
|
+
email: p?.email ?? "",
|
|
47
|
+
phone: p?.phone ?? "",
|
|
48
|
+
profileImage: p?.avatar ?? p?.profilePicture ?? "",
|
|
49
49
|
dateOfBirth: "",
|
|
50
50
|
employeeId: "",
|
|
51
51
|
designation: "",
|
|
@@ -67,7 +67,7 @@ var C = [
|
|
|
67
67
|
ifscCode: "",
|
|
68
68
|
panNumber: "",
|
|
69
69
|
aadharNumber: ""
|
|
70
|
-
}), [
|
|
70
|
+
}), [B, V] = u([
|
|
71
71
|
{
|
|
72
72
|
id: "orders",
|
|
73
73
|
label: "New Order Assignments",
|
|
@@ -98,321 +98,389 @@ var C = [
|
|
|
98
98
|
description: "Important updates from management",
|
|
99
99
|
enabled: !0
|
|
100
100
|
}
|
|
101
|
-
])
|
|
102
|
-
|
|
101
|
+
]);
|
|
102
|
+
c(() => {
|
|
103
|
+
let e = A?.metadata ?? {}, t = e.profile ?? {};
|
|
104
|
+
if (z((e) => ({
|
|
105
|
+
...e,
|
|
106
|
+
firstName: p?.firstName ?? p?.name?.split(" ")[0] ?? e.firstName,
|
|
107
|
+
lastName: p?.lastName ?? p?.name?.split(" ").slice(1).join(" ") ?? e.lastName,
|
|
108
|
+
email: p?.email ?? e.email,
|
|
109
|
+
phone: p?.phone ?? e.phone,
|
|
110
|
+
profileImage: p?.avatar ?? p?.profilePicture ?? e.profileImage,
|
|
111
|
+
dateOfBirth: t.dateOfBirth ?? "",
|
|
112
|
+
designation: t.designation ?? "",
|
|
113
|
+
department: t.department ?? "",
|
|
114
|
+
workLocation: t.workLocation ?? "",
|
|
115
|
+
employmentType: t.employmentType ?? "",
|
|
116
|
+
currentAddress: t.currentAddress ?? "",
|
|
117
|
+
city: t.city ?? "",
|
|
118
|
+
state: t.state ?? "",
|
|
119
|
+
pincode: t.pincode ?? "",
|
|
120
|
+
permanentAddress: t.permanentAddress ?? "",
|
|
121
|
+
sameAsCurrent: t.sameAsCurrent ?? !0,
|
|
122
|
+
emergencyContactName: t.emergencyContactName ?? "",
|
|
123
|
+
emergencyContactPhone: t.emergencyContactPhone ?? "",
|
|
124
|
+
emergencyContactRelation: t.emergencyContactRelation ?? "",
|
|
125
|
+
bankName: t.bankName ?? "",
|
|
126
|
+
ifscCode: t.ifscCode ?? ""
|
|
127
|
+
})), e.notificationPrefs) {
|
|
128
|
+
let t = e.notificationPrefs;
|
|
129
|
+
V((e) => e.map((e) => e.id in t ? {
|
|
130
|
+
...e,
|
|
131
|
+
enabled: !!t[e.id]
|
|
132
|
+
} : e));
|
|
133
|
+
}
|
|
134
|
+
}, [A, p]);
|
|
135
|
+
let H = (e, t) => {
|
|
136
|
+
z((n) => ({
|
|
103
137
|
...n,
|
|
104
138
|
[e]: t
|
|
105
139
|
}));
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, F = (e) => {
|
|
111
|
-
let t = e.target.files?.[0];
|
|
112
|
-
if (t) {
|
|
113
|
-
let e = new FileReader();
|
|
114
|
-
e.onloadend = () => {
|
|
115
|
-
A((t) => ({
|
|
116
|
-
...t,
|
|
117
|
-
profileImage: e.result
|
|
118
|
-
}));
|
|
119
|
-
}, e.readAsDataURL(t);
|
|
140
|
+
}, U = () => {
|
|
141
|
+
if (L(null), !A) {
|
|
142
|
+
L("We couldn't find your worker record yet, so profile changes can't be saved. Please try again once your cart owner has added you as a worker.");
|
|
143
|
+
return;
|
|
120
144
|
}
|
|
121
|
-
|
|
122
|
-
|
|
145
|
+
let e = {
|
|
146
|
+
profile: {
|
|
147
|
+
dateOfBirth: R.dateOfBirth,
|
|
148
|
+
designation: R.designation,
|
|
149
|
+
department: R.department,
|
|
150
|
+
workLocation: R.workLocation,
|
|
151
|
+
employmentType: R.employmentType,
|
|
152
|
+
currentAddress: R.currentAddress,
|
|
153
|
+
city: R.city,
|
|
154
|
+
state: R.state,
|
|
155
|
+
pincode: R.pincode,
|
|
156
|
+
permanentAddress: R.permanentAddress,
|
|
157
|
+
sameAsCurrent: R.sameAsCurrent,
|
|
158
|
+
emergencyContactName: R.emergencyContactName,
|
|
159
|
+
emergencyContactPhone: R.emergencyContactPhone,
|
|
160
|
+
emergencyContactRelation: R.emergencyContactRelation,
|
|
161
|
+
bankName: R.bankName,
|
|
162
|
+
ifscCode: R.ifscCode
|
|
163
|
+
},
|
|
164
|
+
notificationPrefs: B.reduce((e, t) => (e[t.id] = t.enabled, e), {})
|
|
165
|
+
};
|
|
166
|
+
j.mutate({
|
|
167
|
+
id: A.id,
|
|
168
|
+
metadata: e
|
|
169
|
+
}, {
|
|
170
|
+
onSuccess: () => F(!1),
|
|
171
|
+
onError: (e) => L(e instanceof Error ? e.message : "Failed to save profile.")
|
|
172
|
+
});
|
|
173
|
+
}, W = j.isPending, G = (e) => {
|
|
174
|
+
P && V((t) => t.map((t) => t.id === e ? {
|
|
123
175
|
...t,
|
|
124
176
|
enabled: !t.enabled
|
|
125
177
|
} : t));
|
|
126
178
|
};
|
|
127
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ T(n, {
|
|
128
180
|
title: "My Profile",
|
|
129
181
|
description: "Manage your profile information",
|
|
130
|
-
actions: /* @__PURE__ */
|
|
182
|
+
actions: /* @__PURE__ */ w("div", {
|
|
131
183
|
className: "flex items-center gap-2",
|
|
132
|
-
children:
|
|
184
|
+
children: P ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("button", {
|
|
133
185
|
type: "button",
|
|
134
|
-
onClick: () =>
|
|
186
|
+
onClick: () => F(!1),
|
|
135
187
|
className: "inline-flex items-center gap-2 rounded-md bg-accent px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
}), /* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ w(S, { className: "h-4 w-4" }), "Cancel"]
|
|
189
|
+
}), /* @__PURE__ */ w("button", {
|
|
138
190
|
type: "button",
|
|
139
|
-
onClick:
|
|
140
|
-
disabled:
|
|
191
|
+
onClick: U,
|
|
192
|
+
disabled: W,
|
|
141
193
|
className: "inline-flex items-center gap-2 rounded-md bg-[var(--color-accent-soft)] px-3 py-2 text-sm font-medium text-text-primary hover:bg-[var(--color-accent-soft)] transition-colors disabled:opacity-50",
|
|
142
|
-
children:
|
|
143
|
-
})] }) : /* @__PURE__ */
|
|
194
|
+
children: W ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(h, { className: "h-4 w-4 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), "Save Changes"] })
|
|
195
|
+
})] }) : /* @__PURE__ */ T("button", {
|
|
144
196
|
type: "button",
|
|
145
|
-
onClick: () =>
|
|
197
|
+
onClick: () => F(!0),
|
|
146
198
|
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",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Edit Profile"]
|
|
148
200
|
})
|
|
149
201
|
}),
|
|
150
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ w(D, {
|
|
151
203
|
className: "mb-6 max-w-6xl",
|
|
152
204
|
children: "Your worker profile — the details Kadaikodi and your cart owner rely on. Use this page to keep your personal info, emergency contact, work details and address up to date, and to see your performance stats. Accurate details mean smoother shift assignments, faster payouts and fewer mix-ups. Use Edit Profile to make changes."
|
|
153
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ T("div", {
|
|
154
206
|
className: "grid lg:grid-cols-4 gap-6 max-w-6xl",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ T("div", {
|
|
156
208
|
className: "lg:col-span-1 space-y-4",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ T(E, {
|
|
158
210
|
className: "p-5 text-center",
|
|
159
211
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ T("div", {
|
|
161
213
|
className: "relative inline-block",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ w("div", {
|
|
163
215
|
className: "h-20 w-20 rounded-full bg-bg-sunken overflow-hidden mx-auto",
|
|
164
|
-
children:
|
|
165
|
-
src:
|
|
166
|
-
alt: `${
|
|
216
|
+
children: R.profileImage ? /* @__PURE__ */ w("img", {
|
|
217
|
+
src: R.profileImage,
|
|
218
|
+
alt: `${R.firstName} ${R.lastName}`,
|
|
167
219
|
className: "h-full w-full object-cover"
|
|
168
|
-
}) : /* @__PURE__ */
|
|
220
|
+
}) : /* @__PURE__ */ w("div", {
|
|
169
221
|
className: "flex h-full w-full items-center justify-center text-text-secondary",
|
|
170
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ w(x, { className: "h-10 w-10" })
|
|
171
223
|
})
|
|
172
|
-
}),
|
|
224
|
+
}), /* @__PURE__ */ w("button", {
|
|
225
|
+
type: "button",
|
|
226
|
+
onClick: () => f("/auth/security"),
|
|
227
|
+
title: "Your photo and login details are managed in Account Security",
|
|
173
228
|
className: "absolute bottom-0 right-0 flex h-7 w-7 items-center justify-center rounded-full bg-[var(--color-accent-soft)] text-text-primary cursor-pointer hover:bg-[var(--color-accent-soft)] transition-colors",
|
|
174
|
-
children:
|
|
175
|
-
type: "file",
|
|
176
|
-
accept: "image/*",
|
|
177
|
-
onChange: F,
|
|
178
|
-
className: "hidden"
|
|
179
|
-
})]
|
|
229
|
+
children: /* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" })
|
|
180
230
|
})]
|
|
181
231
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ w("h3", {
|
|
183
233
|
className: "mt-3 text-sm font-semibold text-text-primary",
|
|
184
|
-
children:
|
|
234
|
+
children: R.firstName || R.lastName ? `${R.firstName} ${R.lastName}`.trim() : "Your profile"
|
|
185
235
|
}),
|
|
186
|
-
|
|
236
|
+
R.designation && /* @__PURE__ */ w("p", {
|
|
187
237
|
className: "text-xs text-text-secondary",
|
|
188
|
-
children:
|
|
238
|
+
children: R.designation
|
|
189
239
|
}),
|
|
190
|
-
|
|
240
|
+
R.employeeId && /* @__PURE__ */ w("p", {
|
|
191
241
|
className: "text-[10px] text-text-secondary mt-0.5",
|
|
192
|
-
children:
|
|
242
|
+
children: R.employeeId
|
|
193
243
|
})
|
|
194
244
|
]
|
|
195
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ w("div", {
|
|
196
246
|
className: "space-y-1",
|
|
197
|
-
children:
|
|
247
|
+
children: O.map((e) => {
|
|
198
248
|
let n = e.icon;
|
|
199
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ T("button", {
|
|
200
250
|
type: "button",
|
|
201
|
-
onClick: () =>
|
|
202
|
-
className: t("w-full flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
251
|
+
onClick: () => N(e.id),
|
|
252
|
+
className: t("w-full flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors", M === e.id ? "bg-[var(--color-accent-soft)] text-text-primary" : "bg-bg-surface text-text-primary hover:bg-bg-sunken"),
|
|
253
|
+
children: [/* @__PURE__ */ w(n, { className: "h-4 w-4" }), e.label]
|
|
204
254
|
}, e.id);
|
|
205
255
|
})
|
|
206
256
|
})]
|
|
207
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ T("div", {
|
|
208
258
|
className: "lg:col-span-3",
|
|
209
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: [I && /* @__PURE__ */ w("div", {
|
|
260
|
+
className: "mb-4 rounded-lg border border-status-error-text/20 bg-status-error-bg-subtle p-3",
|
|
261
|
+
children: /* @__PURE__ */ w("p", {
|
|
262
|
+
className: "text-xs text-status-error-text",
|
|
263
|
+
children: I
|
|
264
|
+
})
|
|
265
|
+
}), /* @__PURE__ */ T("div", {
|
|
210
266
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-6 shadow-sm",
|
|
211
267
|
children: [
|
|
212
|
-
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
className: "
|
|
215
|
-
children: "
|
|
268
|
+
M === "personal" && /* @__PURE__ */ T("div", { children: [
|
|
269
|
+
/* @__PURE__ */ T("div", {
|
|
270
|
+
className: "flex flex-wrap items-center justify-between gap-2 mb-5",
|
|
271
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
272
|
+
className: "text-lg font-semibold text-text-primary",
|
|
273
|
+
children: "Personal Information"
|
|
274
|
+
}), /* @__PURE__ */ T("button", {
|
|
275
|
+
type: "button",
|
|
276
|
+
onClick: () => f("/auth/security"),
|
|
277
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-bg-sunken px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent transition-colors",
|
|
278
|
+
children: [/* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" }), "Manage in Account Security"]
|
|
279
|
+
})]
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ w("p", {
|
|
282
|
+
className: "text-xs text-text-secondary mb-4",
|
|
283
|
+
children: "Your name, email, phone and photo are part of your login identity and are managed in Account Security. The details below on this page are your work profile."
|
|
216
284
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ T("div", {
|
|
218
286
|
className: "grid sm:grid-cols-2 gap-4",
|
|
219
287
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
221
289
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
222
290
|
children: "First Name"
|
|
223
|
-
}), /* @__PURE__ */
|
|
291
|
+
}), /* @__PURE__ */ w("input", {
|
|
224
292
|
type: "text",
|
|
225
|
-
value:
|
|
226
|
-
|
|
227
|
-
disabled: !
|
|
228
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-
|
|
293
|
+
value: R.firstName,
|
|
294
|
+
readOnly: !0,
|
|
295
|
+
disabled: !0,
|
|
296
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
|
|
229
297
|
})] }),
|
|
230
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
231
299
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
232
300
|
children: "Last Name"
|
|
233
|
-
}), /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ w("input", {
|
|
234
302
|
type: "text",
|
|
235
|
-
value:
|
|
236
|
-
|
|
237
|
-
disabled: !
|
|
238
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-
|
|
303
|
+
value: R.lastName,
|
|
304
|
+
readOnly: !0,
|
|
305
|
+
disabled: !0,
|
|
306
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
|
|
239
307
|
})] }),
|
|
240
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
241
309
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
242
310
|
children: "Email Address"
|
|
243
|
-
}), /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ w("input", {
|
|
244
312
|
type: "email",
|
|
245
|
-
value:
|
|
246
|
-
|
|
247
|
-
disabled: !
|
|
248
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-
|
|
313
|
+
value: R.email,
|
|
314
|
+
readOnly: !0,
|
|
315
|
+
disabled: !0,
|
|
316
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
|
|
249
317
|
})] }),
|
|
250
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
251
319
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
252
320
|
children: "Phone Number"
|
|
253
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ w("input", {
|
|
254
322
|
type: "text",
|
|
255
|
-
value:
|
|
256
|
-
|
|
257
|
-
disabled: !
|
|
258
|
-
className: "w-full rounded-md border border-border-subtle bg-bg-
|
|
323
|
+
value: R.phone,
|
|
324
|
+
readOnly: !0,
|
|
325
|
+
disabled: !0,
|
|
326
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
|
|
259
327
|
})] }),
|
|
260
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
261
329
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
262
330
|
children: "Date of Birth"
|
|
263
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ w("input", {
|
|
264
332
|
type: "date",
|
|
265
|
-
value:
|
|
266
|
-
onChange: (e) =>
|
|
267
|
-
disabled: !
|
|
333
|
+
value: R.dateOfBirth,
|
|
334
|
+
onChange: (e) => H("dateOfBirth", e.target.value),
|
|
335
|
+
disabled: !P,
|
|
268
336
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
269
337
|
})] })
|
|
270
338
|
]
|
|
271
339
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ T("div", {
|
|
273
341
|
className: "mt-7",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
275
343
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
276
344
|
children: "Emergency Contact"
|
|
277
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ T("div", {
|
|
278
346
|
className: "grid sm:grid-cols-3 gap-4",
|
|
279
347
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
281
349
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
282
350
|
children: "Contact Name"
|
|
283
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ w("input", {
|
|
284
352
|
type: "text",
|
|
285
|
-
value:
|
|
286
|
-
onChange: (e) =>
|
|
287
|
-
disabled: !
|
|
353
|
+
value: R.emergencyContactName,
|
|
354
|
+
onChange: (e) => H("emergencyContactName", e.target.value),
|
|
355
|
+
disabled: !P,
|
|
288
356
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
289
357
|
})] }),
|
|
290
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
291
359
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
292
360
|
children: "Contact Phone"
|
|
293
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ w("input", {
|
|
294
362
|
type: "text",
|
|
295
|
-
value:
|
|
296
|
-
onChange: (e) =>
|
|
297
|
-
disabled: !
|
|
363
|
+
value: R.emergencyContactPhone,
|
|
364
|
+
onChange: (e) => H("emergencyContactPhone", e.target.value),
|
|
365
|
+
disabled: !P,
|
|
298
366
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
299
367
|
})] }),
|
|
300
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
301
369
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
302
370
|
children: "Relationship"
|
|
303
|
-
}), /* @__PURE__ */
|
|
371
|
+
}), /* @__PURE__ */ w("input", {
|
|
304
372
|
type: "text",
|
|
305
|
-
value:
|
|
306
|
-
onChange: (e) =>
|
|
307
|
-
disabled: !
|
|
373
|
+
value: R.emergencyContactRelation,
|
|
374
|
+
onChange: (e) => H("emergencyContactRelation", e.target.value),
|
|
375
|
+
disabled: !P,
|
|
308
376
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
309
377
|
})] })
|
|
310
378
|
]
|
|
311
379
|
})]
|
|
312
380
|
})
|
|
313
381
|
] }),
|
|
314
|
-
|
|
315
|
-
/* @__PURE__ */
|
|
382
|
+
M === "work" && /* @__PURE__ */ T("div", { children: [
|
|
383
|
+
/* @__PURE__ */ w("h2", {
|
|
316
384
|
className: "text-lg font-semibold text-text-primary mb-5",
|
|
317
385
|
children: "Work Details"
|
|
318
386
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ T("div", {
|
|
320
388
|
className: "grid sm:grid-cols-2 gap-4",
|
|
321
389
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
323
391
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
324
392
|
children: "Employee ID"
|
|
325
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ w("input", {
|
|
326
394
|
type: "text",
|
|
327
|
-
value:
|
|
395
|
+
value: R.employeeId,
|
|
328
396
|
disabled: !0,
|
|
329
397
|
placeholder: "Assigned by Kadaikodi",
|
|
330
398
|
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
|
|
331
399
|
})] }),
|
|
332
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
333
401
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
334
402
|
children: "Designation"
|
|
335
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ w("input", {
|
|
336
404
|
type: "text",
|
|
337
|
-
value:
|
|
338
|
-
onChange: (e) =>
|
|
339
|
-
disabled: !
|
|
405
|
+
value: R.designation,
|
|
406
|
+
onChange: (e) => H("designation", e.target.value),
|
|
407
|
+
disabled: !P,
|
|
340
408
|
placeholder: "e.g. Delivery Executive",
|
|
341
409
|
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 disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
342
410
|
})] }),
|
|
343
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
344
412
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
345
413
|
children: "Department"
|
|
346
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ w("input", {
|
|
347
415
|
type: "text",
|
|
348
|
-
value:
|
|
349
|
-
onChange: (e) =>
|
|
350
|
-
disabled: !
|
|
416
|
+
value: R.department,
|
|
417
|
+
onChange: (e) => H("department", e.target.value),
|
|
418
|
+
disabled: !P,
|
|
351
419
|
placeholder: "e.g. Operations",
|
|
352
420
|
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 disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
353
421
|
})] }),
|
|
354
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
355
423
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
356
424
|
children: "Work Location"
|
|
357
|
-
}), /* @__PURE__ */
|
|
425
|
+
}), /* @__PURE__ */ w("input", {
|
|
358
426
|
type: "text",
|
|
359
|
-
value:
|
|
360
|
-
onChange: (e) =>
|
|
361
|
-
disabled: !
|
|
427
|
+
value: R.workLocation,
|
|
428
|
+
onChange: (e) => H("workLocation", e.target.value),
|
|
429
|
+
disabled: !P,
|
|
362
430
|
placeholder: "Your primary work area",
|
|
363
431
|
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 disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
364
432
|
})] }),
|
|
365
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
366
434
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
367
435
|
children: "Joining Date"
|
|
368
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ w("input", {
|
|
369
437
|
type: "date",
|
|
370
|
-
value:
|
|
438
|
+
value: R.joiningDate,
|
|
371
439
|
disabled: !0,
|
|
372
440
|
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary cursor-not-allowed"
|
|
373
441
|
})] }),
|
|
374
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
375
443
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
376
444
|
children: "Employment Type"
|
|
377
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ w("input", {
|
|
378
446
|
type: "text",
|
|
379
|
-
value:
|
|
380
|
-
onChange: (e) =>
|
|
381
|
-
disabled: !
|
|
447
|
+
value: R.employmentType,
|
|
448
|
+
onChange: (e) => H("employmentType", e.target.value),
|
|
449
|
+
disabled: !P,
|
|
382
450
|
placeholder: "e.g. Full Time",
|
|
383
451
|
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 disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
384
452
|
})] })
|
|
385
453
|
]
|
|
386
454
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ T("div", {
|
|
388
456
|
className: "mt-7 grid sm:grid-cols-3 gap-4",
|
|
389
457
|
children: [
|
|
390
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ T("div", {
|
|
391
459
|
className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ w("p", {
|
|
393
461
|
className: "text-2xl font-bold text-text-primary",
|
|
394
|
-
children:
|
|
395
|
-
}), /* @__PURE__ */
|
|
462
|
+
children: m?.totalDeliveries ?? 0
|
|
463
|
+
}), /* @__PURE__ */ w("p", {
|
|
396
464
|
className: "text-xs text-text-secondary",
|
|
397
465
|
children: "Total Deliveries"
|
|
398
466
|
})]
|
|
399
467
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ T("div", {
|
|
401
469
|
className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ w("p", {
|
|
403
471
|
className: "text-2xl font-bold text-status-success-text",
|
|
404
|
-
children:
|
|
405
|
-
}), /* @__PURE__ */
|
|
472
|
+
children: m?.averageRating ?? 0
|
|
473
|
+
}), /* @__PURE__ */ w("p", {
|
|
406
474
|
className: "text-xs text-text-secondary",
|
|
407
475
|
children: "Average Rating"
|
|
408
476
|
})]
|
|
409
477
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ T("div", {
|
|
411
479
|
className: "rounded-lg bg-bg-sunken/50 p-4 text-center",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ T("p", {
|
|
413
481
|
className: "text-2xl font-bold text-text-primary",
|
|
414
|
-
children: [
|
|
415
|
-
}), /* @__PURE__ */
|
|
482
|
+
children: [m?.completionRate ?? 0, "%"]
|
|
483
|
+
}), /* @__PURE__ */ w("p", {
|
|
416
484
|
className: "text-xs text-text-secondary",
|
|
417
485
|
children: "On-Time Delivery"
|
|
418
486
|
})]
|
|
@@ -420,239 +488,239 @@ var C = [
|
|
|
420
488
|
]
|
|
421
489
|
})
|
|
422
490
|
] }),
|
|
423
|
-
|
|
491
|
+
M === "address" && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h2", {
|
|
424
492
|
className: "text-lg font-semibold text-text-primary mb-5",
|
|
425
493
|
children: "Address Information"
|
|
426
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ T("div", {
|
|
427
495
|
className: "space-y-6",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
429
497
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
430
498
|
children: "Current Address"
|
|
431
|
-
}), /* @__PURE__ */
|
|
499
|
+
}), /* @__PURE__ */ T("div", {
|
|
432
500
|
className: "grid sm:grid-cols-2 gap-4",
|
|
433
501
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ T("div", {
|
|
435
503
|
className: "sm:col-span-2",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ w("label", {
|
|
437
505
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
438
506
|
children: "Address Line"
|
|
439
|
-
}), /* @__PURE__ */
|
|
507
|
+
}), /* @__PURE__ */ w("textarea", {
|
|
440
508
|
rows: 2,
|
|
441
|
-
value:
|
|
442
|
-
onChange: (e) =>
|
|
443
|
-
disabled: !
|
|
509
|
+
value: R.currentAddress,
|
|
510
|
+
onChange: (e) => H("currentAddress", e.target.value),
|
|
511
|
+
disabled: !P,
|
|
444
512
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40 resize-none"
|
|
445
513
|
})]
|
|
446
514
|
}),
|
|
447
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
448
516
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
449
517
|
children: "City"
|
|
450
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ w("input", {
|
|
451
519
|
type: "text",
|
|
452
|
-
value:
|
|
453
|
-
onChange: (e) =>
|
|
454
|
-
disabled: !
|
|
520
|
+
value: R.city,
|
|
521
|
+
onChange: (e) => H("city", e.target.value),
|
|
522
|
+
disabled: !P,
|
|
455
523
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
456
524
|
})] }),
|
|
457
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
458
526
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
459
527
|
children: "State"
|
|
460
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ w("input", {
|
|
461
529
|
type: "text",
|
|
462
|
-
value:
|
|
463
|
-
onChange: (e) =>
|
|
464
|
-
disabled: !
|
|
530
|
+
value: R.state,
|
|
531
|
+
onChange: (e) => H("state", e.target.value),
|
|
532
|
+
disabled: !P,
|
|
465
533
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
466
534
|
})] }),
|
|
467
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
468
536
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
469
537
|
children: "Pincode"
|
|
470
|
-
}), /* @__PURE__ */
|
|
538
|
+
}), /* @__PURE__ */ w("input", {
|
|
471
539
|
type: "text",
|
|
472
|
-
value:
|
|
473
|
-
onChange: (e) =>
|
|
474
|
-
disabled: !
|
|
540
|
+
value: R.pincode,
|
|
541
|
+
onChange: (e) => H("pincode", e.target.value),
|
|
542
|
+
disabled: !P,
|
|
475
543
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
476
544
|
})] })
|
|
477
545
|
]
|
|
478
|
-
})] }), /* @__PURE__ */
|
|
479
|
-
/* @__PURE__ */
|
|
546
|
+
})] }), /* @__PURE__ */ T("div", { children: [
|
|
547
|
+
/* @__PURE__ */ w("h3", {
|
|
480
548
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
481
549
|
children: "Permanent Address"
|
|
482
550
|
}),
|
|
483
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ T("label", {
|
|
484
552
|
className: "flex items-center gap-2 mb-3 cursor-pointer",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
553
|
+
children: [/* @__PURE__ */ w("input", {
|
|
486
554
|
type: "checkbox",
|
|
487
|
-
checked:
|
|
488
|
-
onChange: (e) =>
|
|
489
|
-
disabled: !
|
|
555
|
+
checked: R.sameAsCurrent,
|
|
556
|
+
onChange: (e) => H("sameAsCurrent", e.target.checked),
|
|
557
|
+
disabled: !P,
|
|
490
558
|
className: "h-4 w-4 rounded border-border-subtle text-text-primary focus:ring-border-focus/40"
|
|
491
|
-
}), /* @__PURE__ */
|
|
559
|
+
}), /* @__PURE__ */ w("span", {
|
|
492
560
|
className: "text-xs text-text-primary",
|
|
493
561
|
children: "Same as current address"
|
|
494
562
|
})]
|
|
495
563
|
}),
|
|
496
|
-
!
|
|
564
|
+
!R.sameAsCurrent && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
497
565
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
498
566
|
children: "Address Line"
|
|
499
|
-
}), /* @__PURE__ */
|
|
567
|
+
}), /* @__PURE__ */ w("textarea", {
|
|
500
568
|
rows: 2,
|
|
501
|
-
value:
|
|
502
|
-
onChange: (e) =>
|
|
503
|
-
disabled: !
|
|
569
|
+
value: R.permanentAddress,
|
|
570
|
+
onChange: (e) => H("permanentAddress", e.target.value),
|
|
571
|
+
disabled: !P,
|
|
504
572
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40 resize-none"
|
|
505
573
|
})] })
|
|
506
574
|
] })]
|
|
507
575
|
})] }),
|
|
508
|
-
|
|
509
|
-
/* @__PURE__ */
|
|
576
|
+
M === "documents" && /* @__PURE__ */ T("div", { children: [
|
|
577
|
+
/* @__PURE__ */ w("h2", {
|
|
510
578
|
className: "text-lg font-semibold text-text-primary mb-5",
|
|
511
579
|
children: "Documents & Banking"
|
|
512
580
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ w("div", {
|
|
514
582
|
className: "rounded-lg bg-status-warning-bg-subtle border border-status-warning-text/20 p-3 mb-5",
|
|
515
|
-
children: /* @__PURE__ */
|
|
583
|
+
children: /* @__PURE__ */ T("p", {
|
|
516
584
|
className: "text-xs text-status-warning-text flex items-center gap-2",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ w(b, { className: "h-4 w-4 shrink-0" }), "Your documents and banking information are encrypted and secure."]
|
|
518
586
|
})
|
|
519
587
|
}),
|
|
520
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ T("div", {
|
|
521
589
|
className: "grid sm:grid-cols-2 gap-4",
|
|
522
590
|
children: [
|
|
523
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
524
592
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
525
593
|
children: "PAN Number"
|
|
526
|
-
}), /* @__PURE__ */
|
|
594
|
+
}), /* @__PURE__ */ w("input", {
|
|
527
595
|
type: "text",
|
|
528
|
-
value:
|
|
596
|
+
value: R.panNumber,
|
|
529
597
|
disabled: !0,
|
|
530
598
|
placeholder: "Not on file",
|
|
531
599
|
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
|
|
532
600
|
})] }),
|
|
533
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
534
602
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
535
603
|
children: "Aadhar Number"
|
|
536
|
-
}), /* @__PURE__ */
|
|
604
|
+
}), /* @__PURE__ */ w("input", {
|
|
537
605
|
type: "text",
|
|
538
|
-
value:
|
|
606
|
+
value: R.aadharNumber,
|
|
539
607
|
disabled: !0,
|
|
540
608
|
placeholder: "Not on file",
|
|
541
609
|
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
|
|
542
610
|
})] }),
|
|
543
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
544
612
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
545
613
|
children: "Bank Name"
|
|
546
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ w("input", {
|
|
547
615
|
type: "text",
|
|
548
|
-
value:
|
|
549
|
-
onChange: (e) =>
|
|
550
|
-
disabled: !
|
|
616
|
+
value: R.bankName,
|
|
617
|
+
onChange: (e) => H("bankName", e.target.value),
|
|
618
|
+
disabled: !P,
|
|
551
619
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
552
620
|
})] }),
|
|
553
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
554
622
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
555
623
|
children: "Account Number"
|
|
556
|
-
}), /* @__PURE__ */
|
|
624
|
+
}), /* @__PURE__ */ w("input", {
|
|
557
625
|
type: "text",
|
|
558
|
-
value:
|
|
626
|
+
value: R.accountNumber,
|
|
559
627
|
disabled: !0,
|
|
560
628
|
placeholder: "Not on file",
|
|
561
629
|
className: "w-full rounded-md border border-border-subtle bg-bg-sunken px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary cursor-not-allowed"
|
|
562
630
|
})] }),
|
|
563
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
564
632
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
565
633
|
children: "IFSC Code"
|
|
566
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ w("input", {
|
|
567
635
|
type: "text",
|
|
568
|
-
value:
|
|
569
|
-
onChange: (e) =>
|
|
570
|
-
disabled: !
|
|
636
|
+
value: R.ifscCode,
|
|
637
|
+
onChange: (e) => H("ifscCode", e.target.value),
|
|
638
|
+
disabled: !P,
|
|
571
639
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary disabled:bg-bg-sunken disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-border-focus/40"
|
|
572
640
|
})] })
|
|
573
641
|
]
|
|
574
642
|
})
|
|
575
643
|
] }),
|
|
576
|
-
|
|
577
|
-
/* @__PURE__ */
|
|
644
|
+
M === "achievements" && /* @__PURE__ */ T("div", { children: [
|
|
645
|
+
/* @__PURE__ */ w("h2", {
|
|
578
646
|
className: "text-lg font-semibold text-text-primary mb-5",
|
|
579
647
|
children: "Achievements & Recognition"
|
|
580
648
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ T("div", {
|
|
582
650
|
className: "mb-7",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ w("h3", {
|
|
584
652
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
585
653
|
children: "Performance Metrics"
|
|
586
|
-
}), /* @__PURE__ */
|
|
654
|
+
}), /* @__PURE__ */ T("div", {
|
|
587
655
|
className: "space-y-4",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
656
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
|
|
589
657
|
className: "flex justify-between items-center mb-1.5",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
658
|
+
children: [/* @__PURE__ */ w("span", {
|
|
591
659
|
className: "text-xs text-text-secondary",
|
|
592
660
|
children: "On-Time Completion Rate"
|
|
593
|
-
}), /* @__PURE__ */
|
|
661
|
+
}), /* @__PURE__ */ T("span", {
|
|
594
662
|
className: "text-xs font-medium text-text-primary",
|
|
595
|
-
children: [
|
|
663
|
+
children: [m?.completionRate ?? 0, "%"]
|
|
596
664
|
})]
|
|
597
|
-
}), /* @__PURE__ */
|
|
665
|
+
}), /* @__PURE__ */ w("div", {
|
|
598
666
|
className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
599
|
-
children: /* @__PURE__ */
|
|
667
|
+
children: /* @__PURE__ */ w("div", {
|
|
600
668
|
className: "h-full rounded-full bg-status-success-text transition-all",
|
|
601
|
-
style: { width: `${
|
|
669
|
+
style: { width: `${m?.completionRate ?? 0}%` }
|
|
602
670
|
})
|
|
603
|
-
})] }), /* @__PURE__ */
|
|
671
|
+
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
|
|
604
672
|
className: "flex justify-between items-center mb-1.5",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
673
|
+
children: [/* @__PURE__ */ w("span", {
|
|
606
674
|
className: "text-xs text-text-secondary",
|
|
607
675
|
children: "Average Customer Rating"
|
|
608
|
-
}), /* @__PURE__ */
|
|
676
|
+
}), /* @__PURE__ */ T("span", {
|
|
609
677
|
className: "text-xs font-medium text-text-primary",
|
|
610
|
-
children: [
|
|
678
|
+
children: [m?.averageRating ?? 0, "/5"]
|
|
611
679
|
})]
|
|
612
|
-
}), /* @__PURE__ */
|
|
680
|
+
}), /* @__PURE__ */ w("div", {
|
|
613
681
|
className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
614
|
-
children: /* @__PURE__ */
|
|
682
|
+
children: /* @__PURE__ */ w("div", {
|
|
615
683
|
className: "h-full rounded-full bg-action-primary-bg transition-all",
|
|
616
|
-
style: { width: `${(
|
|
684
|
+
style: { width: `${(m?.averageRating ?? 0) / 5 * 100}%` }
|
|
617
685
|
})
|
|
618
686
|
})] })]
|
|
619
687
|
})]
|
|
620
688
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
icon: /* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ w(r, {
|
|
690
|
+
icon: /* @__PURE__ */ w(d, { className: "h-12 w-12" }),
|
|
623
691
|
title: "No badges yet",
|
|
624
692
|
description: "Earn recognition as you complete deliveries and hit milestones. Achievement badges are coming soon."
|
|
625
693
|
})
|
|
626
694
|
] }),
|
|
627
|
-
|
|
695
|
+
M === "notifications" && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h2", {
|
|
628
696
|
className: "text-lg font-semibold text-text-primary mb-5",
|
|
629
697
|
children: "Notification Preferences"
|
|
630
|
-
}), /* @__PURE__ */
|
|
698
|
+
}), /* @__PURE__ */ w("div", {
|
|
631
699
|
className: "space-y-4",
|
|
632
|
-
children:
|
|
700
|
+
children: B.map((e) => /* @__PURE__ */ T("div", {
|
|
633
701
|
className: "flex items-center justify-between p-4 rounded-lg bg-bg-sunken/50",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
702
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h4", {
|
|
635
703
|
className: "text-sm font-medium text-text-primary",
|
|
636
704
|
children: e.label
|
|
637
|
-
}), /* @__PURE__ */
|
|
705
|
+
}), /* @__PURE__ */ w("p", {
|
|
638
706
|
className: "text-xs text-text-secondary mt-0.5",
|
|
639
707
|
children: e.description
|
|
640
|
-
})] }), /* @__PURE__ */
|
|
708
|
+
})] }), /* @__PURE__ */ w("button", {
|
|
641
709
|
type: "button",
|
|
642
|
-
onClick: () =>
|
|
643
|
-
disabled: !
|
|
644
|
-
className: t("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", e.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30", !
|
|
645
|
-
children: /* @__PURE__ */
|
|
710
|
+
onClick: () => G(e.id),
|
|
711
|
+
disabled: !P,
|
|
712
|
+
className: t("relative inline-flex h-6 w-11 items-center rounded-full transition-colors", e.enabled ? "bg-action-primary-bg" : "bg-muted-foreground/30", !P && "opacity-60 cursor-not-allowed"),
|
|
713
|
+
children: /* @__PURE__ */ w("span", { className: t("inline-block h-4 w-4 rounded-full bg-white transition-transform", e.enabled ? "translate-x-6" : "translate-x-1") })
|
|
646
714
|
})]
|
|
647
715
|
}, e.id))
|
|
648
716
|
})] })
|
|
649
717
|
]
|
|
650
|
-
})
|
|
718
|
+
})]
|
|
651
719
|
})]
|
|
652
720
|
})]
|
|
653
721
|
});
|
|
654
722
|
};
|
|
655
723
|
//#endregion
|
|
656
|
-
export {
|
|
724
|
+
export { k as WorkerProfilePage };
|
|
657
725
|
|
|
658
726
|
//# sourceMappingURL=WorkerProfilePage.js.map
|