@burdenoff/microfe-adaptercloud 2026.624.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/EmptyState.js +17 -21
- package/dist/adaptercloud/components/EmptyState.js.map +1 -1
- package/dist/adaptercloud/components/InvestmentCard.js +25 -23
- package/dist/adaptercloud/components/InvestmentCard.js.map +1 -1
- package/dist/adaptercloud/components/MetricsCard.js +18 -12
- package/dist/adaptercloud/components/MetricsCard.js.map +1 -1
- package/dist/adaptercloud/components/PageLayout.js +45 -19
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/components/RatingDisplay.js +3 -3
- package/dist/adaptercloud/components/RatingDisplay.js.map +1 -1
- package/dist/adaptercloud/components/StatusBadge.js +36 -16
- package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +244 -231
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +121 -113
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +102 -76
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +70 -65
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +108 -103
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +61 -59
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +119 -105
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +165 -160
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +174 -169
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +103 -97
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +186 -172
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +109 -81
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +111 -109
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +127 -124
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +310 -316
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +251 -257
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +142 -148
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +287 -283
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +120 -114
- 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 +83 -80
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +120 -117
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +231 -226
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +97 -95
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +418 -389
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +134 -132
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +108 -102
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +62 -59
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +117 -111
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +71 -68
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +97 -81
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +83 -80
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +82 -66
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +93 -91
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +100 -97
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +83 -81
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +344 -311
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +43 -40
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +59 -57
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +394 -392
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +354 -324
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +122 -97
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +107 -104
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +109 -107
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +94 -90
- 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,29 +35,29 @@ function D(e) {
|
|
|
34
35
|
})
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function k(e) {
|
|
38
39
|
switch (e) {
|
|
39
|
-
case "scheduled": return "bg-blue-
|
|
40
|
-
case "ongoing": return "bg-
|
|
40
|
+
case "scheduled": return "bg-accent-blue-subtle/20 text-accent-blue";
|
|
41
|
+
case "ongoing": return "bg-status-success-bg-subtle/20 text-status-success-text";
|
|
41
42
|
case "completed": return "bg-secondary text-secondary-foreground";
|
|
42
|
-
case "cancelled": return "bg-
|
|
43
|
+
case "cancelled": return "bg-status-error-bg-subtle/20 text-status-error-text";
|
|
43
44
|
default: return "bg-secondary text-secondary-foreground";
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function A(e) {
|
|
47
48
|
switch (e) {
|
|
48
|
-
case "pending": return "bg-
|
|
49
|
-
case "approved": return "bg-
|
|
50
|
-
case "rejected": return "bg-
|
|
49
|
+
case "pending": return "bg-status-warning-bg-subtle/20 text-status-warning-text";
|
|
50
|
+
case "approved": return "bg-status-success-bg-subtle/20 text-status-success-text";
|
|
51
|
+
case "rejected": return "bg-status-error-bg-subtle/20 text-status-error-text";
|
|
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,118 +236,120 @@ 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", {
|
|
244
|
-
className: "rounded-lg border border-border-
|
|
246
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
245
247
|
children: [/* @__PURE__ */ C("p", {
|
|
246
248
|
className: "text-xs text-text-secondary",
|
|
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", {
|
|
254
|
-
className: "rounded-lg border border-border-
|
|
256
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
255
257
|
children: [/* @__PURE__ */ C("p", {
|
|
256
258
|
className: "text-xs text-text-secondary",
|
|
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", {
|
|
264
|
-
className: "rounded-lg border border-border-
|
|
266
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
265
267
|
children: [/* @__PURE__ */ C("p", {
|
|
266
268
|
className: "text-xs text-text-secondary",
|
|
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", {
|
|
274
|
-
className: "rounded-lg border border-border-
|
|
276
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
|
|
275
277
|
children: [/* @__PURE__ */ C("p", {
|
|
276
278
|
className: "text-xs text-text-secondary",
|
|
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
|
-
|
|
303
|
-
className: "ml-1 inline-flex items-center justify-center rounded-full bg-
|
|
304
|
-
children:
|
|
304
|
+
G > 0 && /* @__PURE__ */ C("span", {
|
|
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",
|
|
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, {
|
|
345
|
+
illustration: "empty-data",
|
|
343
346
|
icon: /* @__PURE__ */ C(c, { className: "h-12 w-12" }),
|
|
344
347
|
title: "No shifts scheduled",
|
|
345
348
|
description: "No shifts scheduled for this week"
|
|
346
349
|
}) : /* @__PURE__ */ C("div", {
|
|
347
350
|
className: "space-y-3",
|
|
348
|
-
children:
|
|
349
|
-
className: t("rounded-lg border p-4 transition-colors", e.status === "ongoing" ? "border-
|
|
351
|
+
children: R.map((e) => /* @__PURE__ */ w("div", {
|
|
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"),
|
|
350
353
|
children: [
|
|
351
354
|
/* @__PURE__ */ w("div", {
|
|
352
355
|
className: "flex items-center justify-between mb-3",
|
|
@@ -354,17 +357,17 @@ var A = () => {
|
|
|
354
357
|
className: "flex items-center gap-2 flex-wrap",
|
|
355
358
|
children: [/* @__PURE__ */ C("h4", {
|
|
356
359
|
className: "text-sm font-semibold text-text-primary",
|
|
357
|
-
children:
|
|
360
|
+
children: E(e.date)
|
|
358
361
|
}), /* @__PURE__ */ C("span", {
|
|
359
|
-
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)),
|
|
360
363
|
children: e.status === "ongoing" ? "Ongoing" : e.status
|
|
361
364
|
})]
|
|
362
365
|
}), /* @__PURE__ */ w("p", {
|
|
363
366
|
className: "text-xs text-text-secondary mt-1",
|
|
364
367
|
children: [
|
|
365
|
-
|
|
368
|
+
D(e.startTime),
|
|
366
369
|
" - ",
|
|
367
|
-
|
|
370
|
+
D(e.endTime)
|
|
368
371
|
]
|
|
369
372
|
})] }), /* @__PURE__ */ w("div", {
|
|
370
373
|
className: "text-right",
|
|
@@ -373,7 +376,7 @@ var A = () => {
|
|
|
373
376
|
children: i(e.earnings, { minimumFractionDigits: 0 })
|
|
374
377
|
}), e.rating != null && /* @__PURE__ */ w("p", {
|
|
375
378
|
className: "text-xs text-text-secondary flex items-center gap-1 justify-end",
|
|
376
|
-
children: [/* @__PURE__ */ C(x, { className: "h-3 w-3 fill-
|
|
379
|
+
children: [/* @__PURE__ */ C(x, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }), e.rating]
|
|
377
380
|
})]
|
|
378
381
|
})]
|
|
379
382
|
}),
|
|
@@ -407,19 +410,19 @@ var A = () => {
|
|
|
407
410
|
className: "mt-3 pt-3 border-t border-border-subtle",
|
|
408
411
|
children: /* @__PURE__ */ w("button", {
|
|
409
412
|
type: "button",
|
|
410
|
-
onClick: () =>
|
|
411
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-blue-
|
|
413
|
+
onClick: () => q(e.id),
|
|
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",
|
|
412
415
|
children: [/* @__PURE__ */ C(m, { className: "h-3.5 w-3.5" }), "Check In"]
|
|
413
416
|
})
|
|
414
417
|
}),
|
|
415
418
|
e.status === "ongoing" && /* @__PURE__ */ w("div", {
|
|
416
|
-
className: "mt-3 pt-3 border-t border-
|
|
419
|
+
className: "mt-3 pt-3 border-t border-status-success-border/20 flex items-center justify-between",
|
|
417
420
|
children: [/* @__PURE__ */ w("span", {
|
|
418
|
-
className: "text-xs font-medium text-
|
|
421
|
+
className: "text-xs font-medium text-status-success-text flex items-center gap-1",
|
|
419
422
|
children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Shift in progress"]
|
|
420
423
|
}), /* @__PURE__ */ w("button", {
|
|
421
424
|
type: "button",
|
|
422
|
-
onClick: () =>
|
|
425
|
+
onClick: () => J(e.id),
|
|
423
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",
|
|
424
427
|
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Check Out"]
|
|
425
428
|
})]
|
|
@@ -427,29 +430,30 @@ var A = () => {
|
|
|
427
430
|
]
|
|
428
431
|
}, e.id))
|
|
429
432
|
})] }),
|
|
430
|
-
|
|
433
|
+
P === "requests" && /* @__PURE__ */ C("div", { children: B.length === 0 ? /* @__PURE__ */ C(r, {
|
|
434
|
+
illustration: "empty-data",
|
|
431
435
|
icon: /* @__PURE__ */ C(y, { className: "h-12 w-12" }),
|
|
432
436
|
title: "No shift requests",
|
|
433
437
|
description: "No shift requests available"
|
|
434
438
|
}) : /* @__PURE__ */ C("div", {
|
|
435
439
|
className: "space-y-3",
|
|
436
|
-
children:
|
|
440
|
+
children: B.map((e) => /* @__PURE__ */ w("div", {
|
|
437
441
|
className: "rounded-lg border border-border-subtle p-4",
|
|
438
442
|
children: [
|
|
439
443
|
/* @__PURE__ */ w("div", {
|
|
440
444
|
className: "flex items-center justify-between mb-3",
|
|
441
445
|
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h4", {
|
|
442
446
|
className: "text-sm font-semibold text-text-primary",
|
|
443
|
-
children:
|
|
447
|
+
children: E(e.date)
|
|
444
448
|
}), /* @__PURE__ */ w("p", {
|
|
445
449
|
className: "text-xs text-text-secondary mt-0.5",
|
|
446
450
|
children: [
|
|
447
|
-
|
|
451
|
+
D(e.startTime),
|
|
448
452
|
" - ",
|
|
449
|
-
|
|
453
|
+
D(e.endTime)
|
|
450
454
|
]
|
|
451
455
|
})] }), /* @__PURE__ */ C("span", {
|
|
452
|
-
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)),
|
|
453
457
|
children: e.status
|
|
454
458
|
})]
|
|
455
459
|
}),
|
|
@@ -487,27 +491,27 @@ var A = () => {
|
|
|
487
491
|
className: "flex gap-2",
|
|
488
492
|
children: [/* @__PURE__ */ w("button", {
|
|
489
493
|
type: "button",
|
|
490
|
-
onClick: () =>
|
|
491
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-
|
|
494
|
+
onClick: () => Y(e.id),
|
|
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",
|
|
492
496
|
children: [/* @__PURE__ */ C(u, { className: "h-3.5 w-3.5" }), "Accept"]
|
|
493
497
|
}), /* @__PURE__ */ C("button", {
|
|
494
498
|
type: "button",
|
|
495
|
-
onClick: () =>
|
|
496
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-
|
|
499
|
+
onClick: () => X(e.id),
|
|
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",
|
|
497
501
|
children: "Reject"
|
|
498
502
|
})]
|
|
499
503
|
})
|
|
500
504
|
]
|
|
501
505
|
}, e.id))
|
|
502
506
|
}) }),
|
|
503
|
-
|
|
507
|
+
P === "availability" && /* @__PURE__ */ w("div", { children: [
|
|
504
508
|
/* @__PURE__ */ C("p", {
|
|
505
509
|
className: "text-xs text-text-secondary mb-5",
|
|
506
510
|
children: "Set your preferred working hours for each day of the week"
|
|
507
511
|
}),
|
|
508
512
|
/* @__PURE__ */ C("div", {
|
|
509
513
|
className: "space-y-3",
|
|
510
|
-
children:
|
|
514
|
+
children: H.map((e) => /* @__PURE__ */ w("div", {
|
|
511
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"),
|
|
512
516
|
children: [/* @__PURE__ */ C("div", {
|
|
513
517
|
className: "w-32 shrink-0",
|
|
@@ -516,8 +520,8 @@ var A = () => {
|
|
|
516
520
|
children: [/* @__PURE__ */ C("input", {
|
|
517
521
|
type: "checkbox",
|
|
518
522
|
checked: e.isAvailable,
|
|
519
|
-
onChange: (t) =>
|
|
520
|
-
className: "h-4 w-4 rounded border-border-subtle text-blue
|
|
523
|
+
onChange: (t) => Z(e.dayOfWeek, "isAvailable", t.target.checked),
|
|
524
|
+
className: "h-4 w-4 rounded border-border-subtle text-accent-blue focus:ring-accent-blue-subtle/40"
|
|
521
525
|
}), /* @__PURE__ */ C("span", {
|
|
522
526
|
className: "text-sm font-medium text-text-primary",
|
|
523
527
|
children: e.dayOfWeek
|
|
@@ -533,8 +537,8 @@ var A = () => {
|
|
|
533
537
|
}), /* @__PURE__ */ C("input", {
|
|
534
538
|
type: "time",
|
|
535
539
|
value: e.preferredStartTime,
|
|
536
|
-
onChange: (t) =>
|
|
537
|
-
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-
|
|
540
|
+
onChange: (t) => Z(e.dayOfWeek, "preferredStartTime", t.target.value),
|
|
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"
|
|
538
542
|
})]
|
|
539
543
|
}), /* @__PURE__ */ w("div", {
|
|
540
544
|
className: "flex items-center gap-2",
|
|
@@ -544,8 +548,8 @@ var A = () => {
|
|
|
544
548
|
}), /* @__PURE__ */ C("input", {
|
|
545
549
|
type: "time",
|
|
546
550
|
value: e.preferredEndTime,
|
|
547
|
-
onChange: (t) =>
|
|
548
|
-
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-
|
|
551
|
+
onChange: (t) => Z(e.dayOfWeek, "preferredEndTime", t.target.value),
|
|
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"
|
|
549
553
|
})]
|
|
550
554
|
})]
|
|
551
555
|
}) : /* @__PURE__ */ C("span", {
|
|
@@ -561,7 +565,7 @@ var A = () => {
|
|
|
561
565
|
onClick: () => {
|
|
562
566
|
alert("Availability updated successfully");
|
|
563
567
|
},
|
|
564
|
-
className: "inline-flex items-center gap-2 rounded-md bg-blue-
|
|
568
|
+
className: "inline-flex items-center gap-2 rounded-md bg-accent-blue-subtle/10 px-4 py-2 text-sm font-medium text-accent-blue hover:bg-accent-blue-subtle/20 transition-colors",
|
|
565
569
|
children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Save Availability"]
|
|
566
570
|
})
|
|
567
571
|
})
|
|
@@ -573,6 +577,6 @@ var A = () => {
|
|
|
573
577
|
});
|
|
574
578
|
};
|
|
575
579
|
//#endregion
|
|
576
|
-
export {
|
|
580
|
+
export { j as WorkerSchedulePage };
|
|
577
581
|
|
|
578
582
|
//# sourceMappingURL=WorkerSchedulePage.js.map
|