@burdenoff/microfe-adaptercloud 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/adaptercloud/components/PageLayout.js +24 -17
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +18 -16
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +70 -44
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +60 -55
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +97 -92
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +59 -57
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +118 -104
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +145 -140
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +152 -147
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +87 -81
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +179 -165
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +73 -48
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +95 -93
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +110 -107
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +293 -299
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +218 -224
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +122 -128
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +248 -244
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +96 -91
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/SettingsPage.js +754 -736
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +110 -108
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +221 -217
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +89 -87
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +410 -381
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +120 -118
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +86 -81
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +53 -51
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +114 -109
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +60 -58
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +87 -72
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +65 -63
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +68 -53
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +86 -84
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +57 -55
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +341 -308
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +34 -32
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +48 -46
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +383 -381
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +348 -319
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +84 -59
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +73 -71
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +76 -74
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +70 -68
- package/dist/adaptercloud/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 } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/adaptercloud/pages/worker/WorkerSchedulePage.tsx
|
|
10
|
-
function
|
|
11
|
+
function E(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 D(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 O(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 k(e) {
|
|
38
39
|
switch (e) {
|
|
39
40
|
case "scheduled": return "bg-accent-blue-subtle/20 text-accent-blue";
|
|
40
41
|
case "ongoing": return "bg-status-success-bg-subtle/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 A(e) {
|
|
47
48
|
switch (e) {
|
|
48
49
|
case "pending": return "bg-status-warning-bg-subtle/20 text-status-warning-text";
|
|
49
50
|
case "approved": return "bg-status-success-bg-subtle/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 j = () => {
|
|
56
|
+
let { navigateTo: j } = e(), [M, N] = s(!0), [P, F] = s("schedule"), [I, L] = s(0), [R, z] = s([]), [B, V] = s([]), [H, U] = s([]);
|
|
56
57
|
a(() => {
|
|
57
|
-
|
|
58
|
+
N(!0);
|
|
58
59
|
let e = setTimeout(() => {
|
|
59
|
-
|
|
60
|
+
z([
|
|
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
|
+
]), V([
|
|
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
|
+
]), U([
|
|
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
|
+
]), N(!1);
|
|
182
183
|
}, 600);
|
|
183
184
|
return () => clearTimeout(e);
|
|
184
|
-
}, [
|
|
185
|
-
let
|
|
186
|
-
let e =
|
|
185
|
+
}, [I]);
|
|
186
|
+
let W = o(() => {
|
|
187
|
+
let e = R.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 = R.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
|
+
}, [R]), G = B.filter((e) => e.status === "pending").length, K = O(I), q = (e) => {
|
|
198
|
+
z((t) => t.map((t) => t.id === e ? {
|
|
198
199
|
...t,
|
|
199
200
|
status: "ongoing"
|
|
200
201
|
} : t)), alert("Checked in successfully");
|
|
201
|
-
},
|
|
202
|
-
|
|
202
|
+
}, J = (e) => {
|
|
203
|
+
z((t) => t.map((t) => t.id === e ? {
|
|
203
204
|
...t,
|
|
204
205
|
status: "completed"
|
|
205
206
|
} : t)), alert("Checked out successfully");
|
|
206
|
-
},
|
|
207
|
-
|
|
207
|
+
}, Y = (e) => {
|
|
208
|
+
V((t) => t.map((t) => t.id === e ? {
|
|
208
209
|
...t,
|
|
209
210
|
status: "approved"
|
|
210
211
|
} : t)), alert("Shift accepted");
|
|
211
|
-
},
|
|
212
|
-
|
|
212
|
+
}, X = (e) => {
|
|
213
|
+
V((t) => t.map((t) => t.id === e ? {
|
|
213
214
|
...t,
|
|
214
215
|
status: "rejected"
|
|
215
216
|
} : t)), alert("Shift rejected");
|
|
216
|
-
},
|
|
217
|
-
|
|
217
|
+
}, Z = (e, t, n) => {
|
|
218
|
+
U((r) => r.map((r) => r.dayOfWeek === e ? {
|
|
218
219
|
...r,
|
|
219
220
|
[t]: n
|
|
220
221
|
} : r));
|
|
221
222
|
};
|
|
222
|
-
return
|
|
223
|
+
return M ? /* @__PURE__ */ C(n, {
|
|
223
224
|
title: "Schedule",
|
|
224
225
|
description: "Manage your work schedule",
|
|
225
226
|
children: /* @__PURE__ */ C("div", {
|
|
@@ -235,9 +236,10 @@ var A = () => {
|
|
|
235
236
|
}) : /* @__PURE__ */ C(n, {
|
|
236
237
|
title: "Schedule",
|
|
237
238
|
description: "Manage your work schedule",
|
|
239
|
+
purpose: "Plan your week — see your hours, shifts, and expected earnings, check when your next shift starts, and request shift changes or time off. Keep it up to date so you and the cart owner are always in sync.",
|
|
238
240
|
children: /* @__PURE__ */ w("div", {
|
|
239
241
|
className: "space-y-6",
|
|
240
|
-
children: [/* @__PURE__ */ w("div", {
|
|
242
|
+
children: [/* @__PURE__ */ C(T, { children: /* @__PURE__ */ w("div", {
|
|
241
243
|
className: "grid grid-cols-2 md:grid-cols-4 gap-3",
|
|
242
244
|
children: [
|
|
243
245
|
/* @__PURE__ */ w("div", {
|
|
@@ -247,7 +249,7 @@ var A = () => {
|
|
|
247
249
|
children: "Hours This Week"
|
|
248
250
|
}), /* @__PURE__ */ w("p", {
|
|
249
251
|
className: "text-2xl font-bold text-text-primary",
|
|
250
|
-
children: [
|
|
252
|
+
children: [W.hoursThisWeek, "h"]
|
|
251
253
|
})]
|
|
252
254
|
}),
|
|
253
255
|
/* @__PURE__ */ w("div", {
|
|
@@ -257,7 +259,7 @@ var A = () => {
|
|
|
257
259
|
children: "Shifts This Week"
|
|
258
260
|
}), /* @__PURE__ */ C("p", {
|
|
259
261
|
className: "text-2xl font-bold text-text-primary",
|
|
260
|
-
children:
|
|
262
|
+
children: W.shiftsThisWeek
|
|
261
263
|
})]
|
|
262
264
|
}),
|
|
263
265
|
/* @__PURE__ */ w("div", {
|
|
@@ -267,7 +269,7 @@ var A = () => {
|
|
|
267
269
|
children: "Week Earnings"
|
|
268
270
|
}), /* @__PURE__ */ C("p", {
|
|
269
271
|
className: "text-2xl font-bold text-text-primary",
|
|
270
|
-
children: i(
|
|
272
|
+
children: i(W.earningsThisWeek, { minimumFractionDigits: 0 })
|
|
271
273
|
})]
|
|
272
274
|
}),
|
|
273
275
|
/* @__PURE__ */ w("div", {
|
|
@@ -277,76 +279,76 @@ var A = () => {
|
|
|
277
279
|
children: "Next Shift"
|
|
278
280
|
}), /* @__PURE__ */ C("p", {
|
|
279
281
|
className: "text-sm font-bold text-text-primary",
|
|
280
|
-
children:
|
|
282
|
+
children: W.nextShift ? `${E(W.nextShift.date)} ${D(W.nextShift.startTime)}` : "None scheduled"
|
|
281
283
|
})]
|
|
282
284
|
})
|
|
283
285
|
]
|
|
284
|
-
}), /* @__PURE__ */ w("div", {
|
|
286
|
+
}) }), /* @__PURE__ */ w("div", {
|
|
285
287
|
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
|
|
286
288
|
children: [/* @__PURE__ */ w("div", {
|
|
287
289
|
className: "flex border-b border-border-subtle",
|
|
288
290
|
children: [
|
|
289
291
|
/* @__PURE__ */ w("button", {
|
|
290
292
|
type: "button",
|
|
291
|
-
onClick: () =>
|
|
292
|
-
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2",
|
|
293
|
+
onClick: () => F("schedule"),
|
|
294
|
+
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", P === "schedule" ? "border-b-2 border-accent-blue-subtle text-accent-blue bg-accent-blue-subtle/5" : "text-text-secondary hover:text-text-primary"),
|
|
293
295
|
children: [/* @__PURE__ */ C(l, { className: "h-4 w-4" }), "My Schedule"]
|
|
294
296
|
}),
|
|
295
297
|
/* @__PURE__ */ w("button", {
|
|
296
298
|
type: "button",
|
|
297
|
-
onClick: () =>
|
|
298
|
-
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2",
|
|
299
|
+
onClick: () => F("requests"),
|
|
300
|
+
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", P === "requests" ? "border-b-2 border-accent-blue-subtle text-accent-blue bg-accent-blue-subtle/5" : "text-text-secondary hover:text-text-primary"),
|
|
299
301
|
children: [
|
|
300
302
|
/* @__PURE__ */ C(y, { className: "h-4 w-4" }),
|
|
301
303
|
"Shift Requests",
|
|
302
|
-
|
|
304
|
+
G > 0 && /* @__PURE__ */ C("span", {
|
|
303
305
|
className: "ml-1 inline-flex items-center justify-center rounded-full bg-status-error-bg-subtle px-1.5 py-0.5 text-[10px] font-medium text-white",
|
|
304
|
-
children:
|
|
306
|
+
children: G
|
|
305
307
|
})
|
|
306
308
|
]
|
|
307
309
|
}),
|
|
308
310
|
/* @__PURE__ */ w("button", {
|
|
309
311
|
type: "button",
|
|
310
|
-
onClick: () =>
|
|
311
|
-
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2",
|
|
312
|
+
onClick: () => F("availability"),
|
|
313
|
+
className: t("flex-1 py-3 px-4 text-sm font-medium transition-colors flex items-center justify-center gap-2", P === "availability" ? "border-b-2 border-accent-blue-subtle text-accent-blue bg-accent-blue-subtle/5" : "text-text-secondary hover:text-text-primary"),
|
|
312
314
|
children: [/* @__PURE__ */ C(S, { className: "h-4 w-4" }), "Availability"]
|
|
313
315
|
})
|
|
314
316
|
]
|
|
315
317
|
}), /* @__PURE__ */ w("div", {
|
|
316
318
|
className: "p-5",
|
|
317
319
|
children: [
|
|
318
|
-
|
|
320
|
+
P === "schedule" && /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
|
|
319
321
|
className: "flex items-center justify-between mb-5",
|
|
320
322
|
children: [
|
|
321
323
|
/* @__PURE__ */ w("button", {
|
|
322
324
|
type: "button",
|
|
323
|
-
onClick: () =>
|
|
325
|
+
onClick: () => L((e) => e - 1),
|
|
324
326
|
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",
|
|
325
327
|
children: [/* @__PURE__ */ C(d, { className: "h-3.5 w-3.5" }), "Previous Week"]
|
|
326
328
|
}),
|
|
327
329
|
/* @__PURE__ */ w("h3", {
|
|
328
330
|
className: "text-sm font-medium text-text-primary",
|
|
329
331
|
children: [
|
|
330
|
-
|
|
332
|
+
K.start,
|
|
331
333
|
" - ",
|
|
332
|
-
|
|
334
|
+
K.end
|
|
333
335
|
]
|
|
334
336
|
}),
|
|
335
337
|
/* @__PURE__ */ w("button", {
|
|
336
338
|
type: "button",
|
|
337
|
-
onClick: () =>
|
|
339
|
+
onClick: () => L((e) => e + 1),
|
|
338
340
|
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
341
|
children: ["Next Week", /* @__PURE__ */ C(f, { className: "h-3.5 w-3.5" })]
|
|
340
342
|
})
|
|
341
343
|
]
|
|
342
|
-
}),
|
|
344
|
+
}), R.length === 0 ? /* @__PURE__ */ C(r, {
|
|
343
345
|
illustration: "empty-data",
|
|
344
346
|
icon: /* @__PURE__ */ C(c, { className: "h-12 w-12" }),
|
|
345
347
|
title: "No shifts scheduled",
|
|
346
348
|
description: "No shifts scheduled for this week"
|
|
347
349
|
}) : /* @__PURE__ */ C("div", {
|
|
348
350
|
className: "space-y-3",
|
|
349
|
-
children:
|
|
351
|
+
children: R.map((e) => /* @__PURE__ */ w("div", {
|
|
350
352
|
className: t("rounded-lg border p-4 transition-colors", e.status === "ongoing" ? "border-status-success-border/30 bg-status-success-bg-subtle/5" : "border-border-subtle hover:bg-bg-sunken/30"),
|
|
351
353
|
children: [
|
|
352
354
|
/* @__PURE__ */ w("div", {
|
|
@@ -355,17 +357,17 @@ var A = () => {
|
|
|
355
357
|
className: "flex items-center gap-2 flex-wrap",
|
|
356
358
|
children: [/* @__PURE__ */ C("h4", {
|
|
357
359
|
className: "text-sm font-semibold text-text-primary",
|
|
358
|
-
children:
|
|
360
|
+
children: E(e.date)
|
|
359
361
|
}), /* @__PURE__ */ C("span", {
|
|
360
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize",
|
|
362
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", k(e.status)),
|
|
361
363
|
children: e.status === "ongoing" ? "Ongoing" : e.status
|
|
362
364
|
})]
|
|
363
365
|
}), /* @__PURE__ */ w("p", {
|
|
364
366
|
className: "text-xs text-text-secondary mt-1",
|
|
365
367
|
children: [
|
|
366
|
-
|
|
368
|
+
D(e.startTime),
|
|
367
369
|
" - ",
|
|
368
|
-
|
|
370
|
+
D(e.endTime)
|
|
369
371
|
]
|
|
370
372
|
})] }), /* @__PURE__ */ w("div", {
|
|
371
373
|
className: "text-right",
|
|
@@ -408,7 +410,7 @@ var A = () => {
|
|
|
408
410
|
className: "mt-3 pt-3 border-t border-border-subtle",
|
|
409
411
|
children: /* @__PURE__ */ w("button", {
|
|
410
412
|
type: "button",
|
|
411
|
-
onClick: () =>
|
|
413
|
+
onClick: () => q(e.id),
|
|
412
414
|
className: "inline-flex items-center gap-1.5 rounded-md bg-accent-blue-subtle/10 px-3 py-1.5 text-xs font-medium text-accent-blue hover:bg-accent-blue-subtle/20 transition-colors",
|
|
413
415
|
children: [/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }), "Check In"]
|
|
414
416
|
})
|
|
@@ -420,7 +422,7 @@ var A = () => {
|
|
|
420
422
|
children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Shift in progress"]
|
|
421
423
|
}), /* @__PURE__ */ w("button", {
|
|
422
424
|
type: "button",
|
|
423
|
-
onClick: () =>
|
|
425
|
+
onClick: () => J(e.id),
|
|
424
426
|
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
427
|
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Check Out"]
|
|
426
428
|
})]
|
|
@@ -428,30 +430,30 @@ var A = () => {
|
|
|
428
430
|
]
|
|
429
431
|
}, e.id))
|
|
430
432
|
})] }),
|
|
431
|
-
|
|
433
|
+
P === "requests" && /* @__PURE__ */ C("div", { children: B.length === 0 ? /* @__PURE__ */ C(r, {
|
|
432
434
|
illustration: "empty-data",
|
|
433
435
|
icon: /* @__PURE__ */ C(y, { className: "h-12 w-12" }),
|
|
434
436
|
title: "No shift requests",
|
|
435
437
|
description: "No shift requests available"
|
|
436
438
|
}) : /* @__PURE__ */ C("div", {
|
|
437
439
|
className: "space-y-3",
|
|
438
|
-
children:
|
|
440
|
+
children: B.map((e) => /* @__PURE__ */ w("div", {
|
|
439
441
|
className: "rounded-lg border border-border-subtle p-4",
|
|
440
442
|
children: [
|
|
441
443
|
/* @__PURE__ */ w("div", {
|
|
442
444
|
className: "flex items-center justify-between mb-3",
|
|
443
445
|
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h4", {
|
|
444
446
|
className: "text-sm font-semibold text-text-primary",
|
|
445
|
-
children:
|
|
447
|
+
children: E(e.date)
|
|
446
448
|
}), /* @__PURE__ */ w("p", {
|
|
447
449
|
className: "text-xs text-text-secondary mt-0.5",
|
|
448
450
|
children: [
|
|
449
|
-
|
|
451
|
+
D(e.startTime),
|
|
450
452
|
" - ",
|
|
451
|
-
|
|
453
|
+
D(e.endTime)
|
|
452
454
|
]
|
|
453
455
|
})] }), /* @__PURE__ */ C("span", {
|
|
454
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize",
|
|
456
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", A(e.status)),
|
|
455
457
|
children: e.status
|
|
456
458
|
})]
|
|
457
459
|
}),
|
|
@@ -489,12 +491,12 @@ var A = () => {
|
|
|
489
491
|
className: "flex gap-2",
|
|
490
492
|
children: [/* @__PURE__ */ w("button", {
|
|
491
493
|
type: "button",
|
|
492
|
-
onClick: () =>
|
|
494
|
+
onClick: () => Y(e.id),
|
|
493
495
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
|
|
494
496
|
children: [/* @__PURE__ */ C(u, { className: "h-3.5 w-3.5" }), "Accept"]
|
|
495
497
|
}), /* @__PURE__ */ C("button", {
|
|
496
498
|
type: "button",
|
|
497
|
-
onClick: () =>
|
|
499
|
+
onClick: () => X(e.id),
|
|
498
500
|
className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle/20 transition-colors",
|
|
499
501
|
children: "Reject"
|
|
500
502
|
})]
|
|
@@ -502,14 +504,14 @@ var A = () => {
|
|
|
502
504
|
]
|
|
503
505
|
}, e.id))
|
|
504
506
|
}) }),
|
|
505
|
-
|
|
507
|
+
P === "availability" && /* @__PURE__ */ w("div", { children: [
|
|
506
508
|
/* @__PURE__ */ C("p", {
|
|
507
509
|
className: "text-xs text-text-secondary mb-5",
|
|
508
510
|
children: "Set your preferred working hours for each day of the week"
|
|
509
511
|
}),
|
|
510
512
|
/* @__PURE__ */ C("div", {
|
|
511
513
|
className: "space-y-3",
|
|
512
|
-
children:
|
|
514
|
+
children: H.map((e) => /* @__PURE__ */ w("div", {
|
|
513
515
|
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"),
|
|
514
516
|
children: [/* @__PURE__ */ C("div", {
|
|
515
517
|
className: "w-32 shrink-0",
|
|
@@ -518,7 +520,7 @@ var A = () => {
|
|
|
518
520
|
children: [/* @__PURE__ */ C("input", {
|
|
519
521
|
type: "checkbox",
|
|
520
522
|
checked: e.isAvailable,
|
|
521
|
-
onChange: (t) =>
|
|
523
|
+
onChange: (t) => Z(e.dayOfWeek, "isAvailable", t.target.checked),
|
|
522
524
|
className: "h-4 w-4 rounded border-border-subtle text-accent-blue focus:ring-accent-blue-subtle/40"
|
|
523
525
|
}), /* @__PURE__ */ C("span", {
|
|
524
526
|
className: "text-sm font-medium text-text-primary",
|
|
@@ -535,7 +537,7 @@ var A = () => {
|
|
|
535
537
|
}), /* @__PURE__ */ C("input", {
|
|
536
538
|
type: "time",
|
|
537
539
|
value: e.preferredStartTime,
|
|
538
|
-
onChange: (t) =>
|
|
540
|
+
onChange: (t) => Z(e.dayOfWeek, "preferredStartTime", t.target.value),
|
|
539
541
|
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-accent-blue-subtle/40"
|
|
540
542
|
})]
|
|
541
543
|
}), /* @__PURE__ */ w("div", {
|
|
@@ -546,7 +548,7 @@ var A = () => {
|
|
|
546
548
|
}), /* @__PURE__ */ C("input", {
|
|
547
549
|
type: "time",
|
|
548
550
|
value: e.preferredEndTime,
|
|
549
|
-
onChange: (t) =>
|
|
551
|
+
onChange: (t) => Z(e.dayOfWeek, "preferredEndTime", t.target.value),
|
|
550
552
|
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-accent-blue-subtle/40"
|
|
551
553
|
})]
|
|
552
554
|
})]
|
|
@@ -575,6 +577,6 @@ var A = () => {
|
|
|
575
577
|
});
|
|
576
578
|
};
|
|
577
579
|
//#endregion
|
|
578
|
-
export {
|
|
580
|
+
export { j as WorkerSchedulePage };
|
|
579
581
|
|
|
580
582
|
//# sourceMappingURL=WorkerSchedulePage.js.map
|