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