@burdenoff/microfe-atheletebridge 2026.625.1 → 2026.625.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/atheletebridge/pages/HomePage.js +272 -268
- package/dist/atheletebridge/pages/HomePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminDashboard.js +76 -44
- package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +63 -55
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +244 -237
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js +59 -57
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +110 -106
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/CartManagementPage.js +166 -159
- package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/UserManagementPage.js +310 -303
- package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +86 -81
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +170 -166
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +141 -109
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +139 -134
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +109 -107
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +318 -318
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +262 -262
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +170 -162
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/HelpSupportPage.js +292 -298
- package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js +99 -91
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/SettingsPage.js +742 -734
- package/dist/atheletebridge/pages/common/SettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +364 -356
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDetailPage.js +276 -241
- package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +260 -250
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CheckoutPage.js +93 -89
- package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js +430 -387
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +526 -490
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +523 -512
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/FavoritesPage.js +83 -75
- package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +116 -108
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +65 -61
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +80 -75
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/ReviewsPage.js +80 -72
- package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +62 -55
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +93 -61
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +89 -84
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +60 -55
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js +345 -311
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +37 -32
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +75 -67
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +385 -381
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +352 -319
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js +353 -318
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +133 -128
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +81 -77
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +352 -344
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -6,19 +6,20 @@ import { formatCurrency as i } from "../../utils/formatters.js";
|
|
|
6
6
|
import { useEffect as a, useMemo as o, useState as s } from "react";
|
|
7
7
|
import { Calendar as c, CalendarDays as l, CheckCircle2 as u, ChevronLeft as d, ChevronRight as f, Loader2 as p, LogIn as m, LogOut as h, MapPin as g, PlayCircle as _, Save as v, Send as y, ShoppingCart as b, Star as x, Timer as S } from "lucide-react";
|
|
8
8
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/atheletebridge/pages/worker/WorkerSchedulePage.tsx
|
|
10
|
-
function
|
|
11
|
+
function D(e) {
|
|
11
12
|
return new Date(e).toLocaleDateString("en-US", {
|
|
12
13
|
weekday: "short",
|
|
13
14
|
month: "short",
|
|
14
15
|
day: "numeric"
|
|
15
16
|
});
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
+
function O(e) {
|
|
18
19
|
let [t, n] = e.split(":"), r = parseInt(t), i = r >= 12 ? "PM" : "AM";
|
|
19
20
|
return `${r % 12 || 12}:${n} ${i}`;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function k(e) {
|
|
22
23
|
let t = /* @__PURE__ */ new Date(), n = t.getDay(), r = new Date(t);
|
|
23
24
|
r.setDate(t.getDate() - n + e * 7);
|
|
24
25
|
let i = new Date(r);
|
|
@@ -34,7 +35,7 @@ function D(e) {
|
|
|
34
35
|
})
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function A(e) {
|
|
38
39
|
switch (e) {
|
|
39
40
|
case "scheduled": return "bg-blue-500/20 text-blue-600 dark:text-blue-400";
|
|
40
41
|
case "ongoing": return "bg-green-500/20 text-green-600 dark:text-green-400";
|
|
@@ -43,7 +44,7 @@ function O(e) {
|
|
|
43
44
|
default: return "bg-secondary text-secondary-foreground";
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function j(e) {
|
|
47
48
|
switch (e) {
|
|
48
49
|
case "pending": return "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400";
|
|
49
50
|
case "approved": return "bg-green-500/20 text-green-600 dark:text-green-400";
|
|
@@ -51,12 +52,12 @@ function k(e) {
|
|
|
51
52
|
default: return "bg-secondary text-secondary-foreground";
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
var
|
|
55
|
-
let { navigateTo:
|
|
55
|
+
var M = () => {
|
|
56
|
+
let { navigateTo: M } = e(), [N, P] = s(!0), [F, I] = s("schedule"), [L, R] = s(0), [z, B] = s([]), [V, H] = s([]), [U, W] = s([]);
|
|
56
57
|
a(() => {
|
|
57
|
-
|
|
58
|
+
P(!0);
|
|
58
59
|
let e = setTimeout(() => {
|
|
59
|
-
|
|
60
|
+
B([
|
|
60
61
|
{
|
|
61
62
|
id: "shift-001",
|
|
62
63
|
date: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
@@ -104,7 +105,7 @@ var A = () => {
|
|
|
104
105
|
status: "scheduled",
|
|
105
106
|
earnings: 0
|
|
106
107
|
}
|
|
107
|
-
]),
|
|
108
|
+
]), H([
|
|
108
109
|
{
|
|
109
110
|
id: "req-001",
|
|
110
111
|
date: new Date(Date.now() + 2880 * 60 * 1e3).toISOString().split("T")[0],
|
|
@@ -135,7 +136,7 @@ var A = () => {
|
|
|
135
136
|
status: "rejected",
|
|
136
137
|
requestedOn: (/* @__PURE__ */ new Date(Date.now() - 4320 * 60 * 1e3)).toISOString()
|
|
137
138
|
}
|
|
138
|
-
]),
|
|
139
|
+
]), W([
|
|
139
140
|
{
|
|
140
141
|
dayOfWeek: "Monday",
|
|
141
142
|
isAvailable: !0,
|
|
@@ -178,48 +179,48 @@ var A = () => {
|
|
|
178
179
|
preferredStartTime: "09:00",
|
|
179
180
|
preferredEndTime: "18:00"
|
|
180
181
|
}
|
|
181
|
-
]),
|
|
182
|
+
]), P(!1);
|
|
182
183
|
}, 600);
|
|
183
184
|
return () => clearTimeout(e);
|
|
184
|
-
}, [
|
|
185
|
-
let
|
|
186
|
-
let e =
|
|
185
|
+
}, [L]);
|
|
186
|
+
let G = o(() => {
|
|
187
|
+
let e = z.filter((e) => e.status !== "cancelled"), t = e.reduce((e, t) => {
|
|
187
188
|
let n = /* @__PURE__ */ new Date(`2024-01-01T${t.startTime}`);
|
|
188
189
|
return e + ((/* @__PURE__ */ new Date(`2024-01-01T${t.endTime}`)).getTime() - n.getTime()) / (1e3 * 60 * 60);
|
|
189
|
-
}, 0), n = e.reduce((e, t) => e + t.earnings, 0), r =
|
|
190
|
+
}, 0), n = e.reduce((e, t) => e + t.earnings, 0), r = z.find((e) => e.status === "scheduled");
|
|
190
191
|
return {
|
|
191
192
|
hoursThisWeek: t,
|
|
192
193
|
shiftsThisWeek: e.length,
|
|
193
194
|
earningsThisWeek: n,
|
|
194
195
|
nextShift: r
|
|
195
196
|
};
|
|
196
|
-
}, [
|
|
197
|
-
|
|
197
|
+
}, [z]), K = V.filter((e) => e.status === "pending").length, q = k(L), J = (e) => {
|
|
198
|
+
B((t) => t.map((t) => t.id === e ? {
|
|
198
199
|
...t,
|
|
199
200
|
status: "ongoing"
|
|
200
201
|
} : t)), alert("Checked in successfully");
|
|
201
|
-
},
|
|
202
|
-
|
|
202
|
+
}, Y = (e) => {
|
|
203
|
+
B((t) => t.map((t) => t.id === e ? {
|
|
203
204
|
...t,
|
|
204
205
|
status: "completed"
|
|
205
206
|
} : t)), alert("Checked out successfully");
|
|
206
|
-
},
|
|
207
|
-
|
|
207
|
+
}, X = (e) => {
|
|
208
|
+
H((t) => t.map((t) => t.id === e ? {
|
|
208
209
|
...t,
|
|
209
210
|
status: "approved"
|
|
210
211
|
} : t)), alert("Shift accepted");
|
|
211
|
-
},
|
|
212
|
-
|
|
212
|
+
}, Z = (e) => {
|
|
213
|
+
H((t) => t.map((t) => t.id === e ? {
|
|
213
214
|
...t,
|
|
214
215
|
status: "rejected"
|
|
215
216
|
} : t)), alert("Shift rejected");
|
|
216
|
-
},
|
|
217
|
-
|
|
217
|
+
}, Q = (e, t, n) => {
|
|
218
|
+
W((r) => r.map((r) => r.dayOfWeek === e ? {
|
|
218
219
|
...r,
|
|
219
220
|
[t]: n
|
|
220
221
|
} : r));
|
|
221
222
|
};
|
|
222
|
-
return
|
|
223
|
+
return N ? /* @__PURE__ */ C(n, {
|
|
223
224
|
title: "Schedule",
|
|
224
225
|
description: "Manage your work schedule",
|
|
225
226
|
children: /* @__PURE__ */ C("div", {
|
|
@@ -237,344 +238,351 @@ var A = () => {
|
|
|
237
238
|
description: "Manage your work schedule",
|
|
238
239
|
children: /* @__PURE__ */ w("div", {
|
|
239
240
|
className: "space-y-6",
|
|
240
|
-
children: [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */ w("div", {
|
|
244
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
245
|
-
children: [/* @__PURE__ */ C("p", {
|
|
246
|
-
className: "text-xs text-text-secondary",
|
|
247
|
-
children: "Hours This Week"
|
|
248
|
-
}), /* @__PURE__ */ w("p", {
|
|
249
|
-
className: "text-2xl font-bold text-text-primary",
|
|
250
|
-
children: [U.hoursThisWeek, "h"]
|
|
251
|
-
})]
|
|
252
|
-
}),
|
|
253
|
-
/* @__PURE__ */ w("div", {
|
|
254
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
255
|
-
children: [/* @__PURE__ */ C("p", {
|
|
256
|
-
className: "text-xs text-text-secondary",
|
|
257
|
-
children: "Shifts This Week"
|
|
258
|
-
}), /* @__PURE__ */ C("p", {
|
|
259
|
-
className: "text-2xl font-bold text-text-primary",
|
|
260
|
-
children: U.shiftsThisWeek
|
|
261
|
-
})]
|
|
262
|
-
}),
|
|
263
|
-
/* @__PURE__ */ w("div", {
|
|
264
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
265
|
-
children: [/* @__PURE__ */ C("p", {
|
|
266
|
-
className: "text-xs text-text-secondary",
|
|
267
|
-
children: "Week Earnings"
|
|
268
|
-
}), /* @__PURE__ */ C("p", {
|
|
269
|
-
className: "text-2xl font-bold text-text-primary",
|
|
270
|
-
children: i(U.earningsThisWeek, { minimumFractionDigits: 0 })
|
|
271
|
-
})]
|
|
272
|
-
}),
|
|
273
|
-
/* @__PURE__ */ w("div", {
|
|
274
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
275
|
-
children: [/* @__PURE__ */ C("p", {
|
|
276
|
-
className: "text-xs text-text-secondary",
|
|
277
|
-
children: "Next Shift"
|
|
278
|
-
}), /* @__PURE__ */ C("p", {
|
|
279
|
-
className: "text-sm font-bold text-text-primary",
|
|
280
|
-
children: U.nextShift ? `${T(U.nextShift.date)} ${E(U.nextShift.startTime)}` : "None scheduled"
|
|
281
|
-
})]
|
|
282
|
-
})
|
|
283
|
-
]
|
|
284
|
-
}), /* @__PURE__ */ w("div", {
|
|
285
|
-
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
|
|
286
|
-
children: [/* @__PURE__ */ w("div", {
|
|
287
|
-
className: "flex border-b border-border-subtle",
|
|
288
|
-
children: [
|
|
289
|
-
/* @__PURE__ */ w("button", {
|
|
290
|
-
type: "button",
|
|
291
|
-
onClick: () => P("schedule"),
|
|
292
|
-
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", N === "schedule" ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400 bg-blue-500/5" : "text-text-secondary hover:text-text-primary"),
|
|
293
|
-
children: [/* @__PURE__ */ C(l, { className: "h-4 w-4" }), "My Schedule"]
|
|
294
|
-
}),
|
|
295
|
-
/* @__PURE__ */ w("button", {
|
|
296
|
-
type: "button",
|
|
297
|
-
onClick: () => P("requests"),
|
|
298
|
-
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", N === "requests" ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400 bg-blue-500/5" : "text-text-secondary hover:text-text-primary"),
|
|
299
|
-
children: [
|
|
300
|
-
/* @__PURE__ */ C(y, { className: "h-4 w-4" }),
|
|
301
|
-
"Shift Requests",
|
|
302
|
-
W > 0 && /* @__PURE__ */ C("span", {
|
|
303
|
-
className: "ml-1 inline-flex items-center justify-center rounded-full bg-red-500 px-1.5 py-0.5 text-[10px] font-medium text-white",
|
|
304
|
-
children: W
|
|
305
|
-
})
|
|
306
|
-
]
|
|
307
|
-
}),
|
|
308
|
-
/* @__PURE__ */ w("button", {
|
|
309
|
-
type: "button",
|
|
310
|
-
onClick: () => P("availability"),
|
|
311
|
-
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", N === "availability" ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400 bg-blue-500/5" : "text-text-secondary hover:text-text-primary"),
|
|
312
|
-
children: [/* @__PURE__ */ C(S, { className: "h-4 w-4" }), "Availability"]
|
|
313
|
-
})
|
|
314
|
-
]
|
|
315
|
-
}), /* @__PURE__ */ w("div", {
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ C(E, { children: "Plan your work week. See your upcoming shifts, hours and expected earnings at a glance, and submit shift-swap or time-off requests when you need to. Use this page to stay on top of when and where you're working." }),
|
|
243
|
+
/* @__PURE__ */ C(T, {
|
|
316
244
|
className: "p-5",
|
|
317
|
-
children:
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
245
|
+
children: /* @__PURE__ */ w("div", {
|
|
246
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-3",
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ w("div", {
|
|
249
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
250
|
+
children: [/* @__PURE__ */ C("p", {
|
|
251
|
+
className: "text-xs text-text-secondary",
|
|
252
|
+
children: "Hours This Week"
|
|
253
|
+
}), /* @__PURE__ */ w("p", {
|
|
254
|
+
className: "text-2xl font-bold text-text-primary",
|
|
255
|
+
children: [G.hoursThisWeek, "h"]
|
|
256
|
+
})]
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ w("div", {
|
|
259
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
260
|
+
children: [/* @__PURE__ */ C("p", {
|
|
261
|
+
className: "text-xs text-text-secondary",
|
|
262
|
+
children: "Shifts This Week"
|
|
263
|
+
}), /* @__PURE__ */ C("p", {
|
|
264
|
+
className: "text-2xl font-bold text-text-primary",
|
|
265
|
+
children: G.shiftsThisWeek
|
|
266
|
+
})]
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ w("div", {
|
|
269
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
270
|
+
children: [/* @__PURE__ */ C("p", {
|
|
271
|
+
className: "text-xs text-text-secondary",
|
|
272
|
+
children: "Week Earnings"
|
|
273
|
+
}), /* @__PURE__ */ C("p", {
|
|
274
|
+
className: "text-2xl font-bold text-text-primary",
|
|
275
|
+
children: i(G.earningsThisWeek, { minimumFractionDigits: 0 })
|
|
276
|
+
})]
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ w("div", {
|
|
279
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
280
|
+
children: [/* @__PURE__ */ C("p", {
|
|
281
|
+
className: "text-xs text-text-secondary",
|
|
282
|
+
children: "Next Shift"
|
|
283
|
+
}), /* @__PURE__ */ C("p", {
|
|
284
|
+
className: "text-sm font-bold text-text-primary",
|
|
285
|
+
children: G.nextShift ? `${D(G.nextShift.date)} ${O(G.nextShift.startTime)}` : "None scheduled"
|
|
286
|
+
})]
|
|
287
|
+
})
|
|
288
|
+
]
|
|
289
|
+
})
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ w("div", {
|
|
292
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
|
|
293
|
+
children: [/* @__PURE__ */ w("div", {
|
|
294
|
+
className: "flex border-b border-border-subtle",
|
|
295
|
+
children: [
|
|
296
|
+
/* @__PURE__ */ w("button", {
|
|
297
|
+
type: "button",
|
|
298
|
+
onClick: () => I("schedule"),
|
|
299
|
+
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", F === "schedule" ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400 bg-blue-500/5" : "text-text-secondary hover:text-text-primary"),
|
|
300
|
+
children: [/* @__PURE__ */ C(l, { className: "h-4 w-4" }), "My Schedule"]
|
|
301
|
+
}),
|
|
302
|
+
/* @__PURE__ */ w("button", {
|
|
303
|
+
type: "button",
|
|
304
|
+
onClick: () => I("requests"),
|
|
305
|
+
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", F === "requests" ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400 bg-blue-500/5" : "text-text-secondary hover:text-text-primary"),
|
|
351
306
|
children: [
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
className: "text-sm font-semibold text-text-primary",
|
|
358
|
-
children: T(e.date)
|
|
359
|
-
}), /* @__PURE__ */ C("span", {
|
|
360
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", O(e.status)),
|
|
361
|
-
children: e.status === "ongoing" ? "Ongoing" : e.status
|
|
362
|
-
})]
|
|
363
|
-
}), /* @__PURE__ */ w("p", {
|
|
364
|
-
className: "text-xs text-text-secondary mt-1",
|
|
365
|
-
children: [
|
|
366
|
-
E(e.startTime),
|
|
367
|
-
" - ",
|
|
368
|
-
E(e.endTime)
|
|
369
|
-
]
|
|
370
|
-
})] }), /* @__PURE__ */ w("div", {
|
|
371
|
-
className: "text-right",
|
|
372
|
-
children: [/* @__PURE__ */ C("p", {
|
|
373
|
-
className: "text-lg font-bold text-text-primary",
|
|
374
|
-
children: i(e.earnings, { minimumFractionDigits: 0 })
|
|
375
|
-
}), e.rating != null && /* @__PURE__ */ w("p", {
|
|
376
|
-
className: "text-xs text-text-secondary flex items-center gap-1 justify-end",
|
|
377
|
-
children: [/* @__PURE__ */ C(x, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }), e.rating]
|
|
378
|
-
})]
|
|
379
|
-
})]
|
|
380
|
-
}),
|
|
381
|
-
/* @__PURE__ */ w("div", {
|
|
382
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",
|
|
383
|
-
children: [
|
|
384
|
-
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
385
|
-
className: "text-xs text-text-secondary",
|
|
386
|
-
children: "Cart"
|
|
387
|
-
}), /* @__PURE__ */ w("p", {
|
|
388
|
-
className: "text-xs font-medium text-text-primary flex items-center gap-1",
|
|
389
|
-
children: [/* @__PURE__ */ C(b, { className: "h-3 w-3 text-text-secondary" }), e.cartName]
|
|
390
|
-
})] }),
|
|
391
|
-
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
392
|
-
className: "text-xs text-text-secondary",
|
|
393
|
-
children: "Location"
|
|
394
|
-
}), /* @__PURE__ */ w("p", {
|
|
395
|
-
className: "text-xs font-medium text-text-primary flex items-center gap-1",
|
|
396
|
-
children: [/* @__PURE__ */ C(g, { className: "h-3 w-3 text-text-secondary" }), e.location]
|
|
397
|
-
})] }),
|
|
398
|
-
e.tasksCompleted != null && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
399
|
-
className: "text-xs text-text-secondary",
|
|
400
|
-
children: "Tasks Completed"
|
|
401
|
-
}), /* @__PURE__ */ w("p", {
|
|
402
|
-
className: "text-xs font-medium text-text-primary flex items-center gap-1",
|
|
403
|
-
children: [/* @__PURE__ */ C(u, { className: "h-3 w-3 text-text-secondary" }), e.tasksCompleted]
|
|
404
|
-
})] })
|
|
405
|
-
]
|
|
406
|
-
}),
|
|
407
|
-
e.status === "scheduled" && /* @__PURE__ */ C("div", {
|
|
408
|
-
className: "mt-3 pt-3 border-t border-border-subtle",
|
|
409
|
-
children: /* @__PURE__ */ w("button", {
|
|
410
|
-
type: "button",
|
|
411
|
-
onClick: () => K(e.id),
|
|
412
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-blue-500/10 px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-500/20 transition-colors",
|
|
413
|
-
children: [/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }), "Check In"]
|
|
414
|
-
})
|
|
415
|
-
}),
|
|
416
|
-
e.status === "ongoing" && /* @__PURE__ */ w("div", {
|
|
417
|
-
className: "mt-3 pt-3 border-t border-green-500/20 flex items-center justify-between",
|
|
418
|
-
children: [/* @__PURE__ */ w("span", {
|
|
419
|
-
className: "text-xs font-medium text-green-600 dark:text-green-400 flex items-center gap-1",
|
|
420
|
-
children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Shift in progress"]
|
|
421
|
-
}), /* @__PURE__ */ w("button", {
|
|
422
|
-
type: "button",
|
|
423
|
-
onClick: () => q(e.id),
|
|
424
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
425
|
-
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Check Out"]
|
|
426
|
-
})]
|
|
307
|
+
/* @__PURE__ */ C(y, { className: "h-4 w-4" }),
|
|
308
|
+
"Shift Requests",
|
|
309
|
+
K > 0 && /* @__PURE__ */ C("span", {
|
|
310
|
+
className: "ml-1 inline-flex items-center justify-center rounded-full bg-red-500 px-1.5 py-0.5 text-[10px] font-medium text-white",
|
|
311
|
+
children: K
|
|
427
312
|
})
|
|
428
313
|
]
|
|
429
|
-
},
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ w("button", {
|
|
316
|
+
type: "button",
|
|
317
|
+
onClick: () => I("availability"),
|
|
318
|
+
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", F === "availability" ? "border-b-2 border-blue-500 text-blue-600 dark:text-blue-400 bg-blue-500/5" : "text-text-secondary hover:text-text-primary"),
|
|
319
|
+
children: [/* @__PURE__ */ C(S, { className: "h-4 w-4" }), "Availability"]
|
|
320
|
+
})
|
|
321
|
+
]
|
|
322
|
+
}), /* @__PURE__ */ w("div", {
|
|
323
|
+
className: "p-5",
|
|
324
|
+
children: [
|
|
325
|
+
F === "schedule" && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
|
|
326
|
+
className: "flex items-center justify-between mb-5",
|
|
440
327
|
children: [
|
|
441
|
-
/* @__PURE__ */ w("
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
}), /* @__PURE__ */ w("p", {
|
|
447
|
-
className: "text-xs text-text-secondary mt-0.5",
|
|
448
|
-
children: [
|
|
449
|
-
E(e.startTime),
|
|
450
|
-
" - ",
|
|
451
|
-
E(e.endTime)
|
|
452
|
-
]
|
|
453
|
-
})] }), /* @__PURE__ */ C("span", {
|
|
454
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", k(e.status)),
|
|
455
|
-
children: e.status
|
|
456
|
-
})]
|
|
457
|
-
}),
|
|
458
|
-
/* @__PURE__ */ w("div", {
|
|
459
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-3 text-sm mb-3",
|
|
460
|
-
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
461
|
-
className: "text-xs text-text-secondary",
|
|
462
|
-
children: "Cart"
|
|
463
|
-
}), /* @__PURE__ */ C("p", {
|
|
464
|
-
className: "text-xs font-medium text-text-primary",
|
|
465
|
-
children: e.cartName
|
|
466
|
-
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
467
|
-
className: "text-xs text-text-secondary",
|
|
468
|
-
children: "Location"
|
|
469
|
-
}), /* @__PURE__ */ C("p", {
|
|
470
|
-
className: "text-xs font-medium text-text-primary",
|
|
471
|
-
children: e.location
|
|
472
|
-
})] })]
|
|
328
|
+
/* @__PURE__ */ w("button", {
|
|
329
|
+
type: "button",
|
|
330
|
+
onClick: () => R((e) => e - 1),
|
|
331
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
332
|
+
children: [/* @__PURE__ */ C(d, { className: "h-3.5 w-3.5" }), "Previous Week"]
|
|
473
333
|
}),
|
|
474
|
-
/* @__PURE__ */ w("
|
|
475
|
-
className: "text-
|
|
334
|
+
/* @__PURE__ */ w("h3", {
|
|
335
|
+
className: "text-sm font-medium text-text-primary",
|
|
476
336
|
children: [
|
|
477
|
-
|
|
478
|
-
" ",
|
|
479
|
-
|
|
480
|
-
day: "numeric",
|
|
481
|
-
month: "short",
|
|
482
|
-
hour: "2-digit",
|
|
483
|
-
minute: "2-digit",
|
|
484
|
-
hour12: !0
|
|
485
|
-
})
|
|
337
|
+
q.start,
|
|
338
|
+
" - ",
|
|
339
|
+
q.end
|
|
486
340
|
]
|
|
487
341
|
}),
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-1.5 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
|
|
494
|
-
children: [/* @__PURE__ */ C(u, { className: "h-3.5 w-3.5" }), "Accept"]
|
|
495
|
-
}), /* @__PURE__ */ C("button", {
|
|
496
|
-
type: "button",
|
|
497
|
-
onClick: () => Y(e.id),
|
|
498
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-red-500/10 px-3 py-1.5 text-xs font-medium text-red-600 dark:text-red-400 hover:bg-red-500/20 transition-colors",
|
|
499
|
-
children: "Reject"
|
|
500
|
-
})]
|
|
342
|
+
/* @__PURE__ */ w("button", {
|
|
343
|
+
type: "button",
|
|
344
|
+
onClick: () => R((e) => e + 1),
|
|
345
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
346
|
+
children: ["Next Week", /* @__PURE__ */ C(f, { className: "h-3.5 w-3.5" })]
|
|
501
347
|
})
|
|
502
348
|
]
|
|
503
|
-
},
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}),
|
|
510
|
-
/* @__PURE__ */ C("div", {
|
|
349
|
+
}), z.length === 0 ? /* @__PURE__ */ C(r, {
|
|
350
|
+
illustration: "empty-data",
|
|
351
|
+
icon: /* @__PURE__ */ C(c, { className: "h-12 w-12" }),
|
|
352
|
+
title: "No shifts scheduled",
|
|
353
|
+
description: "No shifts scheduled for this week"
|
|
354
|
+
}) : /* @__PURE__ */ C("div", {
|
|
511
355
|
className: "space-y-3",
|
|
512
|
-
children:
|
|
513
|
-
className: t("
|
|
514
|
-
children: [
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
356
|
+
children: z.map((e) => /* @__PURE__ */ w("div", {
|
|
357
|
+
className: t("rounded-lg border p-4 transition-colors", e.status === "ongoing" ? "border-green-500/30 bg-green-500/5" : "border-border-subtle hover:bg-bg-sunken/30"),
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ w("div", {
|
|
360
|
+
className: "flex items-center justify-between mb-3",
|
|
361
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
|
|
362
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
363
|
+
children: [/* @__PURE__ */ C("h4", {
|
|
364
|
+
className: "text-sm font-semibold text-text-primary",
|
|
365
|
+
children: D(e.date)
|
|
366
|
+
}), /* @__PURE__ */ C("span", {
|
|
367
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", A(e.status)),
|
|
368
|
+
children: e.status === "ongoing" ? "Ongoing" : e.status
|
|
369
|
+
})]
|
|
370
|
+
}), /* @__PURE__ */ w("p", {
|
|
371
|
+
className: "text-xs text-text-secondary mt-1",
|
|
372
|
+
children: [
|
|
373
|
+
O(e.startTime),
|
|
374
|
+
" - ",
|
|
375
|
+
O(e.endTime)
|
|
376
|
+
]
|
|
377
|
+
})] }), /* @__PURE__ */ w("div", {
|
|
378
|
+
className: "text-right",
|
|
379
|
+
children: [/* @__PURE__ */ C("p", {
|
|
380
|
+
className: "text-lg font-bold text-text-primary",
|
|
381
|
+
children: i(e.earnings, { minimumFractionDigits: 0 })
|
|
382
|
+
}), e.rating != null && /* @__PURE__ */ w("p", {
|
|
383
|
+
className: "text-xs text-text-secondary flex items-center gap-1 justify-end",
|
|
384
|
+
children: [/* @__PURE__ */ C(x, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }), e.rating]
|
|
385
|
+
})]
|
|
386
|
+
})]
|
|
387
|
+
}),
|
|
388
|
+
/* @__PURE__ */ w("div", {
|
|
389
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",
|
|
390
|
+
children: [
|
|
391
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
392
|
+
className: "text-xs text-text-secondary",
|
|
393
|
+
children: "Cart"
|
|
394
|
+
}), /* @__PURE__ */ w("p", {
|
|
395
|
+
className: "text-xs font-medium text-text-primary flex items-center gap-1",
|
|
396
|
+
children: [/* @__PURE__ */ C(b, { className: "h-3 w-3 text-text-secondary" }), e.cartName]
|
|
397
|
+
})] }),
|
|
398
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
399
|
+
className: "text-xs text-text-secondary",
|
|
400
|
+
children: "Location"
|
|
401
|
+
}), /* @__PURE__ */ w("p", {
|
|
402
|
+
className: "text-xs font-medium text-text-primary flex items-center gap-1",
|
|
403
|
+
children: [/* @__PURE__ */ C(g, { className: "h-3 w-3 text-text-secondary" }), e.location]
|
|
404
|
+
})] }),
|
|
405
|
+
e.tasksCompleted != null && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
406
|
+
className: "text-xs text-text-secondary",
|
|
407
|
+
children: "Tasks Completed"
|
|
408
|
+
}), /* @__PURE__ */ w("p", {
|
|
409
|
+
className: "text-xs font-medium text-text-primary flex items-center gap-1",
|
|
410
|
+
children: [/* @__PURE__ */ C(u, { className: "h-3 w-3 text-text-secondary" }), e.tasksCompleted]
|
|
411
|
+
})] })
|
|
412
|
+
]
|
|
413
|
+
}),
|
|
414
|
+
e.status === "scheduled" && /* @__PURE__ */ C("div", {
|
|
415
|
+
className: "mt-3 pt-3 border-t border-border-subtle",
|
|
416
|
+
children: /* @__PURE__ */ w("button", {
|
|
417
|
+
type: "button",
|
|
418
|
+
onClick: () => J(e.id),
|
|
419
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-blue-500/10 px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-500/20 transition-colors",
|
|
420
|
+
children: [/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }), "Check In"]
|
|
421
|
+
})
|
|
422
|
+
}),
|
|
423
|
+
e.status === "ongoing" && /* @__PURE__ */ w("div", {
|
|
424
|
+
className: "mt-3 pt-3 border-t border-green-500/20 flex items-center justify-between",
|
|
425
|
+
children: [/* @__PURE__ */ w("span", {
|
|
426
|
+
className: "text-xs font-medium text-green-600 dark:text-green-400 flex items-center gap-1",
|
|
427
|
+
children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Shift in progress"]
|
|
428
|
+
}), /* @__PURE__ */ w("button", {
|
|
429
|
+
type: "button",
|
|
430
|
+
onClick: () => Y(e.id),
|
|
431
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
432
|
+
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Check Out"]
|
|
526
433
|
})]
|
|
527
434
|
})
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
435
|
+
]
|
|
436
|
+
}, e.id))
|
|
437
|
+
})] }),
|
|
438
|
+
F === "requests" && /* @__PURE__ */ C("div", { children: V.length === 0 ? /* @__PURE__ */ C(r, {
|
|
439
|
+
illustration: "empty-notifications",
|
|
440
|
+
icon: /* @__PURE__ */ C(y, { className: "h-12 w-12" }),
|
|
441
|
+
title: "No shift requests",
|
|
442
|
+
description: "No shift requests available"
|
|
443
|
+
}) : /* @__PURE__ */ C("div", {
|
|
444
|
+
className: "space-y-3",
|
|
445
|
+
children: V.map((e) => /* @__PURE__ */ w("div", {
|
|
446
|
+
className: "rounded-lg border border-border-subtle p-4",
|
|
447
|
+
children: [
|
|
448
|
+
/* @__PURE__ */ w("div", {
|
|
449
|
+
className: "flex items-center justify-between mb-3",
|
|
450
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h4", {
|
|
451
|
+
className: "text-sm font-semibold text-text-primary",
|
|
452
|
+
children: D(e.date)
|
|
453
|
+
}), /* @__PURE__ */ w("p", {
|
|
454
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
455
|
+
children: [
|
|
456
|
+
O(e.startTime),
|
|
457
|
+
" - ",
|
|
458
|
+
O(e.endTime)
|
|
459
|
+
]
|
|
460
|
+
})] }), /* @__PURE__ */ C("span", {
|
|
461
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(e.status)),
|
|
462
|
+
children: e.status
|
|
463
|
+
})]
|
|
464
|
+
}),
|
|
465
|
+
/* @__PURE__ */ w("div", {
|
|
466
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-3 text-sm mb-3",
|
|
467
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
468
|
+
className: "text-xs text-text-secondary",
|
|
469
|
+
children: "Cart"
|
|
470
|
+
}), /* @__PURE__ */ C("p", {
|
|
471
|
+
className: "text-xs font-medium text-text-primary",
|
|
472
|
+
children: e.cartName
|
|
473
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
474
|
+
className: "text-xs text-text-secondary",
|
|
475
|
+
children: "Location"
|
|
476
|
+
}), /* @__PURE__ */ C("p", {
|
|
477
|
+
className: "text-xs font-medium text-text-primary",
|
|
478
|
+
children: e.location
|
|
479
|
+
})] })]
|
|
480
|
+
}),
|
|
481
|
+
/* @__PURE__ */ w("p", {
|
|
482
|
+
className: "text-[10px] text-text-secondary mb-3",
|
|
483
|
+
children: [
|
|
484
|
+
"Requested",
|
|
485
|
+
" ",
|
|
486
|
+
new Date(e.requestedOn).toLocaleString("en-IN", {
|
|
487
|
+
day: "numeric",
|
|
488
|
+
month: "short",
|
|
489
|
+
hour: "2-digit",
|
|
490
|
+
minute: "2-digit",
|
|
491
|
+
hour12: !0
|
|
492
|
+
})
|
|
493
|
+
]
|
|
494
|
+
}),
|
|
495
|
+
e.status === "pending" && /* @__PURE__ */ w("div", {
|
|
496
|
+
className: "flex gap-2",
|
|
497
|
+
children: [/* @__PURE__ */ w("button", {
|
|
498
|
+
type: "button",
|
|
499
|
+
onClick: () => X(e.id),
|
|
500
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-1.5 text-xs font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
|
|
501
|
+
children: [/* @__PURE__ */ C(u, { className: "h-3.5 w-3.5" }), "Accept"]
|
|
502
|
+
}), /* @__PURE__ */ C("button", {
|
|
503
|
+
type: "button",
|
|
504
|
+
onClick: () => Z(e.id),
|
|
505
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-red-500/10 px-3 py-1.5 text-xs font-medium text-red-600 dark:text-red-400 hover:bg-red-500/20 transition-colors",
|
|
506
|
+
children: "Reject"
|
|
540
507
|
})]
|
|
541
|
-
})
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
}, e.id))
|
|
511
|
+
}) }),
|
|
512
|
+
F === "availability" && /* @__PURE__ */ w("div", { children: [
|
|
513
|
+
/* @__PURE__ */ C("p", {
|
|
514
|
+
className: "text-xs text-text-secondary mb-5",
|
|
515
|
+
children: "Set your preferred working hours for each day of the week"
|
|
516
|
+
}),
|
|
517
|
+
/* @__PURE__ */ C("div", {
|
|
518
|
+
className: "space-y-3",
|
|
519
|
+
children: U.map((e) => /* @__PURE__ */ w("div", {
|
|
520
|
+
className: t("flex flex-col sm:flex-row sm:items-center gap-3 p-3 rounded-lg border", e.isAvailable ? "border-border-subtle bg-bg-surface" : "border-border-subtle/50 bg-bg-sunken/30"),
|
|
521
|
+
children: [/* @__PURE__ */ C("div", {
|
|
522
|
+
className: "w-32 shrink-0",
|
|
523
|
+
children: /* @__PURE__ */ w("label", {
|
|
524
|
+
className: "flex items-center gap-2 cursor-pointer",
|
|
525
|
+
children: [/* @__PURE__ */ C("input", {
|
|
526
|
+
type: "checkbox",
|
|
527
|
+
checked: e.isAvailable,
|
|
528
|
+
onChange: (t) => Q(e.dayOfWeek, "isAvailable", t.target.checked),
|
|
529
|
+
className: "h-4 w-4 rounded border-border-subtle text-blue-600 focus:ring-blue-500/40"
|
|
530
|
+
}), /* @__PURE__ */ C("span", {
|
|
531
|
+
className: "text-sm font-medium text-text-primary",
|
|
532
|
+
children: e.dayOfWeek
|
|
533
|
+
})]
|
|
534
|
+
})
|
|
535
|
+
}), e.isAvailable ? /* @__PURE__ */ w("div", {
|
|
536
|
+
className: "flex flex-col sm:flex-row gap-3 flex-1",
|
|
537
|
+
children: [/* @__PURE__ */ w("div", {
|
|
538
|
+
className: "flex items-center gap-2",
|
|
539
|
+
children: [/* @__PURE__ */ C("span", {
|
|
540
|
+
className: "text-xs text-text-secondary w-10",
|
|
541
|
+
children: "From"
|
|
542
|
+
}), /* @__PURE__ */ C("input", {
|
|
543
|
+
type: "time",
|
|
544
|
+
value: e.preferredStartTime,
|
|
545
|
+
onChange: (t) => Q(e.dayOfWeek, "preferredStartTime", t.target.value),
|
|
546
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/40"
|
|
547
|
+
})]
|
|
548
|
+
}), /* @__PURE__ */ w("div", {
|
|
549
|
+
className: "flex items-center gap-2",
|
|
550
|
+
children: [/* @__PURE__ */ C("span", {
|
|
551
|
+
className: "text-xs text-text-secondary w-10",
|
|
552
|
+
children: "To"
|
|
553
|
+
}), /* @__PURE__ */ C("input", {
|
|
554
|
+
type: "time",
|
|
555
|
+
value: e.preferredEndTime,
|
|
556
|
+
onChange: (t) => Q(e.dayOfWeek, "preferredEndTime", t.target.value),
|
|
557
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-blue-500/40"
|
|
558
|
+
})]
|
|
551
559
|
})]
|
|
560
|
+
}) : /* @__PURE__ */ C("span", {
|
|
561
|
+
className: "text-xs text-text-secondary",
|
|
562
|
+
children: "Not available"
|
|
552
563
|
})]
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
},
|
|
566
|
-
className: "inline-flex items-center gap-2 rounded-md bg-blue-500/10 px-4 py-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-500/20 transition-colors",
|
|
567
|
-
children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Save Availability"]
|
|
564
|
+
}, e.dayOfWeek))
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ C("div", {
|
|
567
|
+
className: "mt-5",
|
|
568
|
+
children: /* @__PURE__ */ w("button", {
|
|
569
|
+
type: "button",
|
|
570
|
+
onClick: () => {
|
|
571
|
+
alert("Availability updated successfully");
|
|
572
|
+
},
|
|
573
|
+
className: "inline-flex items-center gap-2 rounded-md bg-blue-500/10 px-4 py-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-500/20 transition-colors",
|
|
574
|
+
children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Save Availability"]
|
|
575
|
+
})
|
|
568
576
|
})
|
|
569
|
-
})
|
|
570
|
-
]
|
|
571
|
-
]
|
|
572
|
-
})
|
|
573
|
-
|
|
577
|
+
] })
|
|
578
|
+
]
|
|
579
|
+
})]
|
|
580
|
+
})
|
|
581
|
+
]
|
|
574
582
|
})
|
|
575
583
|
});
|
|
576
584
|
};
|
|
577
585
|
//#endregion
|
|
578
|
-
export {
|
|
586
|
+
export { M as WorkerSchedulePage };
|
|
579
587
|
|
|
580
588
|
//# sourceMappingURL=WorkerSchedulePage.js.map
|