@burdenoff/microfe-subscriberbot 2026.625.1 → 2026.626.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/subscriberbot/pages/HomePage.js +19 -14
- package/dist/subscriberbot/pages/HomePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +66 -60
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminDashboard.js +83 -44
- package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +38 -32
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +226 -221
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js +127 -125
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +235 -230
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/CartManagementPage.js +267 -262
- package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/UserManagementPage.js +267 -262
- package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +46 -41
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +257 -252
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +231 -194
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +167 -162
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +128 -126
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +297 -300
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +220 -223
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +250 -245
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/HelpSupportPage.js +94 -96
- package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js +48 -42
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/SettingsPage.js +745 -736
- package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +353 -321
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDetailPage.js +258 -225
- package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +82 -76
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CheckoutPage.js +212 -215
- package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js +416 -381
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +488 -479
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +521 -512
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/FavoritesPage.js +57 -51
- package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +56 -50
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +65 -60
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +79 -73
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/ReviewsPage.js +68 -62
- package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +60 -54
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +292 -255
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +237 -231
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +60 -54
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js +350 -319
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +106 -100
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +51 -45
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +387 -382
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +320 -282
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js +92 -61
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +82 -77
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +82 -77
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +348 -340
- package/dist/subscriberbot/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/subscriberbot/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-status-info-bg/20 text-status-info-text";
|
|
40
41
|
case "ongoing": return "bg-status-success-bg/20 text-status-success-text";
|
|
@@ -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-status-warning-bg/20 text-status-warning-text";
|
|
49
50
|
case "approved": return "bg-status-success-bg/20 text-status-success-text";
|
|
@@ -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
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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-seam 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-seam 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-seam 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-seam bg-bg-surface shadow-sm overflow-hidden",
|
|
286
|
-
children: [/* @__PURE__ */ w("div", {
|
|
287
|
-
className: "flex border-b border-border-seam",
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ C(E, {
|
|
243
|
+
icon: /* @__PURE__ */ C(l, { className: "h-4 w-4" }),
|
|
244
|
+
children: "Plan your work week. See your upcoming shifts, the hours and earnings you're on track for, and when your next shift starts. Switch between your schedule and time-off requests to stay organised — and make sure you're never caught off guard by a shift you forgot."
|
|
245
|
+
}),
|
|
246
|
+
/* @__PURE__ */ w(T, {
|
|
247
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-3",
|
|
288
248
|
children: [
|
|
289
|
-
/* @__PURE__ */ w("
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
249
|
+
/* @__PURE__ */ w("div", {
|
|
250
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
251
|
+
children: [/* @__PURE__ */ C("p", {
|
|
252
|
+
className: "text-xs text-text-secondary",
|
|
253
|
+
children: "Hours This Week"
|
|
254
|
+
}), /* @__PURE__ */ w("p", {
|
|
255
|
+
className: "text-2xl font-bold text-text-primary",
|
|
256
|
+
children: [G.hoursThisWeek, "h"]
|
|
257
|
+
})]
|
|
294
258
|
}),
|
|
295
|
-
/* @__PURE__ */ w("
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
"
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
259
|
+
/* @__PURE__ */ w("div", {
|
|
260
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
261
|
+
children: [/* @__PURE__ */ C("p", {
|
|
262
|
+
className: "text-xs text-text-secondary",
|
|
263
|
+
children: "Shifts This Week"
|
|
264
|
+
}), /* @__PURE__ */ C("p", {
|
|
265
|
+
className: "text-2xl font-bold text-text-primary",
|
|
266
|
+
children: G.shiftsThisWeek
|
|
267
|
+
})]
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ w("div", {
|
|
270
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
271
|
+
children: [/* @__PURE__ */ C("p", {
|
|
272
|
+
className: "text-xs text-text-secondary",
|
|
273
|
+
children: "Week Earnings"
|
|
274
|
+
}), /* @__PURE__ */ C("p", {
|
|
275
|
+
className: "text-2xl font-bold text-text-primary",
|
|
276
|
+
children: i(G.earningsThisWeek, { minimumFractionDigits: 0 })
|
|
277
|
+
})]
|
|
307
278
|
}),
|
|
308
|
-
/* @__PURE__ */ w("
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
279
|
+
/* @__PURE__ */ w("div", {
|
|
280
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
|
|
281
|
+
children: [/* @__PURE__ */ C("p", {
|
|
282
|
+
className: "text-xs text-text-secondary",
|
|
283
|
+
children: "Next Shift"
|
|
284
|
+
}), /* @__PURE__ */ C("p", {
|
|
285
|
+
className: "text-sm font-bold text-text-primary",
|
|
286
|
+
children: G.nextShift ? `${D(G.nextShift.date)} ${O(G.nextShift.startTime)}` : "None scheduled"
|
|
287
|
+
})]
|
|
313
288
|
})
|
|
314
289
|
]
|
|
315
|
-
}),
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
" - ",
|
|
332
|
-
G.end
|
|
333
|
-
]
|
|
334
|
-
}),
|
|
335
|
-
/* @__PURE__ */ w("button", {
|
|
336
|
-
type: "button",
|
|
337
|
-
onClick: () => I((e) => e + 1),
|
|
338
|
-
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",
|
|
339
|
-
children: ["Next Week", /* @__PURE__ */ C(f, { className: "h-3.5 w-3.5" })]
|
|
340
|
-
})
|
|
341
|
-
]
|
|
342
|
-
}), L.length === 0 ? /* @__PURE__ */ C(r, {
|
|
343
|
-
illustration: "empty-data",
|
|
344
|
-
icon: /* @__PURE__ */ C(c, { className: "h-12 w-12" }),
|
|
345
|
-
title: "No shifts scheduled",
|
|
346
|
-
description: "No shifts scheduled for this week"
|
|
347
|
-
}) : /* @__PURE__ */ C("div", {
|
|
348
|
-
className: "space-y-3",
|
|
349
|
-
children: L.map((e) => /* @__PURE__ */ w("div", {
|
|
350
|
-
className: t("rounded-lg border p-4 transition-colors", e.status === "ongoing" ? "border-status-success-border/30 bg-status-success-bg/5" : "border-border-seam hover:bg-bg-sunken/30"),
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ w("div", {
|
|
292
|
+
className: "rounded-lg border border-border-seam bg-bg-surface shadow-sm overflow-hidden",
|
|
293
|
+
children: [/* @__PURE__ */ w("div", {
|
|
294
|
+
className: "flex border-b border-border-seam",
|
|
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-status-info-border text-status-info-text bg-status-info-bg/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-status-info-border text-status-info-text bg-status-info-bg/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-status-warning-text text-status-warning-text" }), 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-seam",
|
|
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-status-info-bg/10 px-3 py-1.5 text-xs font-medium text-status-info-text hover:bg-status-info-bg/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-status-success-border/20 flex items-center justify-between",
|
|
418
|
-
children: [/* @__PURE__ */ w("span", {
|
|
419
|
-
className: "text-xs font-medium text-status-success-text 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-status-error-text px-1.5 py-0.5 text-[10px] font-medium text-text-inverse",
|
|
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-status-info-border text-status-info-text bg-status-info-bg/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
|
-
})]
|
|
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"]
|
|
457
333
|
}),
|
|
458
|
-
/* @__PURE__ */ w("
|
|
459
|
-
className: "
|
|
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
|
-
})] })]
|
|
473
|
-
}),
|
|
474
|
-
/* @__PURE__ */ w("p", {
|
|
475
|
-
className: "text-[10px] text-text-secondary mb-3",
|
|
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-status-success-bg/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg/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-status-error-bg/10 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/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-status-success-border/30 bg-status-success-bg/5" : "border-border-seam 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-status-warning-text text-status-warning-text" }), 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-seam",
|
|
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-status-info-bg/10 px-3 py-1.5 text-xs font-medium text-status-info-text hover:bg-status-info-bg/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-status-success-border/20 flex items-center justify-between",
|
|
425
|
+
children: [/* @__PURE__ */ w("span", {
|
|
426
|
+
className: "text-xs font-medium text-status-success-text 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-data",
|
|
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-seam 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
|
|
540
463
|
})]
|
|
541
|
-
}),
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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-status-success-bg/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg/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-status-error-bg/10 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg/20 transition-colors",
|
|
506
|
+
children: "Reject"
|
|
551
507
|
})]
|
|
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-seam bg-bg-surface" : "border-border-seam/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-seam text-status-info-text focus:ring-status-info-border/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-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/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-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-status-info-border/40"
|
|
558
|
+
})]
|
|
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-status-info-bg/10 px-4 py-2 text-sm font-medium text-status-info-text hover:bg-status-info-bg/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-status-info-bg/10 px-4 py-2 text-sm font-medium text-status-info-text hover:bg-status-info-bg/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
|