@burdenoff/microfe-atheletebridge 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/atheletebridge/components/EmptyState.js +18 -11
- package/dist/atheletebridge/components/EmptyState.js.map +1 -1
- package/dist/atheletebridge/components/InvestmentCard.js +7 -7
- package/dist/atheletebridge/components/InvestmentCard.js.map +1 -1
- package/dist/atheletebridge/components/MetricsCard.js +20 -14
- package/dist/atheletebridge/components/MetricsCard.js.map +1 -1
- package/dist/atheletebridge/components/PageLayout.js +30 -19
- package/dist/atheletebridge/components/PageLayout.js.map +1 -1
- package/dist/atheletebridge/pages/HomePage.js +210 -195
- package/dist/atheletebridge/pages/HomePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminDashboard.js +76 -44
- package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +63 -55
- package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +244 -237
- package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js +59 -57
- package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +110 -106
- package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/CartManagementPage.js +166 -159
- package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/admin/UserManagementPage.js +310 -303
- package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +86 -81
- package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +170 -166
- package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +141 -109
- package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +139 -134
- package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +109 -107
- package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +318 -318
- package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +262 -262
- package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +170 -162
- package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/HelpSupportPage.js +292 -298
- package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js +100 -91
- package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/atheletebridge/pages/common/SettingsPage.js +742 -734
- package/dist/atheletebridge/pages/common/SettingsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +365 -356
- package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDetailPage.js +277 -241
- package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +261 -250
- package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CheckoutPage.js +93 -89
- package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js +430 -387
- package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +526 -490
- package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +524 -512
- package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/FavoritesPage.js +84 -75
- package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +117 -108
- package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +66 -61
- package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +81 -75
- package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/ReviewsPage.js +81 -72
- package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +63 -55
- package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +93 -61
- package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +90 -84
- package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +60 -55
- package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js +345 -311
- package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +38 -32
- package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +75 -67
- package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +385 -381
- package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +353 -319
- package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js +353 -318
- package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +134 -128
- package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +81 -77
- package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +352 -342
- package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,466 +1,500 @@
|
|
|
1
1
|
import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
+
import { useUpdateWorkerTaskStatus as i, useWorkerClockInOut as a, useWorkerStats as o, useWorkerTasks as s } from "../../hooks/useAthleteBridgeApi.js";
|
|
6
|
+
import { formatCurrency as c } from "../../utils/formatters.js";
|
|
7
|
+
import { useState as l } from "react";
|
|
8
|
+
import { Boxes as u, CalendarDays as d, CheckCircle2 as f, ChefHat as p, ChevronRight as m, ClipboardList as h, Clock as g, Loader2 as _, MapPin as v, Package as y, Pause as b, Play as x, Sparkles as S, Star as C, Timer as w, TrendingUp as T, Truck as E, User as D, Zap as O } from "lucide-react";
|
|
9
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
10
|
+
import { EmphasisPanel as j, NextSteps as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
|
|
9
11
|
//#region src/atheletebridge/pages/worker/WorkerDashboard.tsx
|
|
10
|
-
var
|
|
12
|
+
var P = {
|
|
11
13
|
high: "bg-red-500/20 text-red-600 dark:text-red-400",
|
|
12
14
|
medium: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
|
|
13
15
|
low: "bg-green-500/20 text-green-600 dark:text-green-400"
|
|
14
|
-
},
|
|
16
|
+
}, F = {
|
|
15
17
|
pending: "bg-secondary text-secondary-foreground",
|
|
16
18
|
in_progress: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
|
|
17
19
|
completed: "bg-green-500/20 text-green-600 dark:text-green-400"
|
|
18
20
|
};
|
|
19
|
-
function
|
|
21
|
+
function I(e) {
|
|
20
22
|
switch (e) {
|
|
21
|
-
case "delivery": return
|
|
22
|
-
case "preparation": return
|
|
23
|
-
case "inventory": return
|
|
24
|
-
case "cleanup": return
|
|
25
|
-
default: return
|
|
23
|
+
case "delivery": return E;
|
|
24
|
+
case "preparation": return p;
|
|
25
|
+
case "inventory": return u;
|
|
26
|
+
case "cleanup": return S;
|
|
27
|
+
default: return h;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
var
|
|
30
|
+
var L = {
|
|
29
31
|
high: 3,
|
|
30
32
|
medium: 2,
|
|
31
33
|
low: 1
|
|
32
|
-
},
|
|
33
|
-
let { navigateTo:
|
|
34
|
+
}, R = () => {
|
|
35
|
+
let { navigateTo: u, currentUser: p } = e(), h = p?.id || "", { data: S = [], isLoading: E } = s(h), { data: R, isLoading: z } = o(h), B = i(), V = a(), [H, U] = l(null), [W, G] = l(!1), [K, q] = l(null), J = async (e, t) => {
|
|
34
36
|
let n = "";
|
|
35
37
|
switch (t) {
|
|
36
38
|
case "start":
|
|
37
|
-
n = "IN_PROGRESS",
|
|
39
|
+
n = "IN_PROGRESS", U(e);
|
|
38
40
|
break;
|
|
39
41
|
case "complete":
|
|
40
|
-
n = "COMPLETED",
|
|
42
|
+
n = "COMPLETED", H === e && U(null);
|
|
41
43
|
break;
|
|
42
44
|
case "pause":
|
|
43
|
-
n = "PENDING",
|
|
45
|
+
n = "PENDING", H === e && U(null);
|
|
44
46
|
break;
|
|
45
47
|
}
|
|
46
48
|
try {
|
|
47
|
-
await
|
|
49
|
+
await B.mutateAsync({
|
|
48
50
|
taskId: e,
|
|
49
51
|
status: n
|
|
50
52
|
});
|
|
51
53
|
} catch (e) {
|
|
52
54
|
console.error("Failed to update task status:", e), alert("Failed to update task status. Please try again.");
|
|
53
55
|
}
|
|
54
|
-
},
|
|
55
|
-
let e =
|
|
56
|
+
}, Y = async () => {
|
|
57
|
+
let e = W ? "CLOCK_OUT" : "CLOCK_IN";
|
|
56
58
|
try {
|
|
57
|
-
let t = await
|
|
58
|
-
workerId:
|
|
59
|
+
let t = await V.mutateAsync({
|
|
60
|
+
workerId: h,
|
|
59
61
|
action: e
|
|
60
62
|
});
|
|
61
63
|
if (t.success) {
|
|
62
|
-
if (
|
|
64
|
+
if (W) G(!1), q(null);
|
|
63
65
|
else {
|
|
64
66
|
let e = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-IN", {
|
|
65
67
|
hour: "2-digit",
|
|
66
68
|
minute: "2-digit",
|
|
67
69
|
hour12: !0
|
|
68
70
|
});
|
|
69
|
-
|
|
71
|
+
G(!0), q(e);
|
|
70
72
|
}
|
|
71
|
-
alert(t.message || `${
|
|
73
|
+
alert(t.message || `${W ? "Clocked out" : "Clocked in"} successfully`);
|
|
72
74
|
}
|
|
73
75
|
} catch (e) {
|
|
74
76
|
console.error("Failed to clock in/out:", e), alert("Action failed. Please try again.");
|
|
75
77
|
}
|
|
76
78
|
};
|
|
77
|
-
if (
|
|
79
|
+
if (E || z) return /* @__PURE__ */ k(n, {
|
|
78
80
|
title: "Dashboard",
|
|
79
81
|
description: "Your work overview for today",
|
|
80
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ k("div", {
|
|
81
83
|
className: "flex items-center justify-center py-24",
|
|
82
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ A("div", {
|
|
83
85
|
className: "text-center",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ k(_, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ k("p", {
|
|
85
87
|
className: "text-sm text-text-secondary",
|
|
86
88
|
children: "Loading your dashboard..."
|
|
87
89
|
})]
|
|
88
90
|
})
|
|
89
91
|
})
|
|
90
92
|
});
|
|
91
|
-
let
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
+
let X = H ? S.find((e) => e.id === H) : null, Z = S.filter((e) => e.status !== "completed").sort((e, t) => (L[t.priority] ?? 0) - (L[e.priority] ?? 0)), Q = S.filter((e) => e.status === "completed");
|
|
94
|
+
return /* @__PURE__ */ k(n, {
|
|
93
95
|
title: "Dashboard",
|
|
94
96
|
description: "Manage your tasks and assignments",
|
|
95
|
-
actions: /* @__PURE__ */
|
|
97
|
+
actions: /* @__PURE__ */ A("button", {
|
|
96
98
|
type: "button",
|
|
97
|
-
onClick: () =>
|
|
99
|
+
onClick: () => u("/worker/orders"),
|
|
98
100
|
className: "inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
99
|
-
children: ["View All Orders", /* @__PURE__ */
|
|
101
|
+
children: ["View All Orders", /* @__PURE__ */ k(m, { className: "h-4 w-4" })]
|
|
100
102
|
}),
|
|
101
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ A("div", {
|
|
102
104
|
className: "space-y-6",
|
|
103
105
|
children: [
|
|
104
|
-
/* @__PURE__ */ k(
|
|
106
|
+
/* @__PURE__ */ k(N, { children: "Your shift command center. Clock in to start tracking your hours, work through tasks assigned to you in priority order, and keep an eye on today's completion stats and rating. Use this page to know exactly what to do next and to mark work done." }),
|
|
107
|
+
/* @__PURE__ */ k(M, {
|
|
108
|
+
storageKey: "atheletebridge-worker-dashboard",
|
|
109
|
+
steps: [
|
|
110
|
+
{
|
|
111
|
+
id: "clock-in",
|
|
112
|
+
label: W ? "You are clocked in" : "Clock in to start your shift",
|
|
113
|
+
description: "Time tracking begins so your hours and earnings are recorded.",
|
|
114
|
+
icon: /* @__PURE__ */ k(w, { className: "h-4 w-4" }),
|
|
115
|
+
onClick: Y,
|
|
116
|
+
done: W
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "start-task",
|
|
120
|
+
label: "Start your highest-priority task",
|
|
121
|
+
description: "Tasks are sorted by priority — begin the one at the top.",
|
|
122
|
+
icon: /* @__PURE__ */ k(x, { className: "h-4 w-4" }),
|
|
123
|
+
onClick: () => {
|
|
124
|
+
let e = Z.find((e) => e.status === "pending");
|
|
125
|
+
e && J(e.id, "start");
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "schedule",
|
|
130
|
+
label: "Review your schedule",
|
|
131
|
+
description: "Check your upcoming shifts and breaks.",
|
|
132
|
+
icon: /* @__PURE__ */ k(d, { className: "h-4 w-4" }),
|
|
133
|
+
onClick: () => u("/worker/schedule")
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}),
|
|
137
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h2", {
|
|
105
138
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
106
139
|
children: "Quick Actions"
|
|
107
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ A("div", {
|
|
108
141
|
className: "grid grid-cols-2 lg:grid-cols-4 gap-3",
|
|
109
142
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ A("button", {
|
|
111
144
|
type: "button",
|
|
112
|
-
onClick: () =>
|
|
145
|
+
onClick: () => u("/worker/orders"),
|
|
113
146
|
className: "flex items-center justify-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-4 py-3 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ k(y, { className: "h-4 w-4" }), "My Orders"]
|
|
115
148
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ A("button", {
|
|
117
150
|
type: "button",
|
|
118
|
-
onClick: () =>
|
|
151
|
+
onClick: () => u("/worker/schedule"),
|
|
119
152
|
className: "flex items-center justify-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-4 py-3 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ k(d, { className: "h-4 w-4" }), "Schedule"]
|
|
121
154
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ A("button", {
|
|
123
156
|
type: "button",
|
|
124
|
-
onClick: () =>
|
|
157
|
+
onClick: () => u("/worker/profile"),
|
|
125
158
|
className: "flex items-center justify-center gap-2 rounded-lg border border-border-subtle bg-bg-surface px-4 py-3 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ k(D, { className: "h-4 w-4" }), "Profile"]
|
|
127
160
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ A("button", {
|
|
129
162
|
type: "button",
|
|
130
|
-
onClick:
|
|
131
|
-
className: t("flex items-center justify-center gap-2 rounded-lg px-4 py-3 text-sm font-medium transition-colors",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
163
|
+
onClick: Y,
|
|
164
|
+
className: t("flex items-center justify-center gap-2 rounded-lg px-4 py-3 text-sm font-medium transition-colors", W ? "bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/30 hover:bg-red-500/20" : "bg-green-500/10 text-green-600 dark:text-green-400 border border-green-500/30 hover:bg-green-500/20"),
|
|
165
|
+
children: [/* @__PURE__ */ k(w, { className: "h-4 w-4" }), W ? "Clock Out" : "Clock In"]
|
|
133
166
|
})
|
|
134
167
|
]
|
|
135
168
|
})] }),
|
|
136
|
-
|
|
137
|
-
className: "
|
|
138
|
-
children: [/* @__PURE__ */
|
|
139
|
-
className: "
|
|
140
|
-
children: "
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
className: "
|
|
145
|
-
children: [/* @__PURE__ */
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
169
|
+
R && /* @__PURE__ */ A(j, {
|
|
170
|
+
className: "p-5",
|
|
171
|
+
children: [/* @__PURE__ */ A("div", {
|
|
172
|
+
className: "flex items-center justify-between mb-3",
|
|
173
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
174
|
+
className: "text-base font-semibold text-text-primary",
|
|
175
|
+
children: "Today's Overview"
|
|
176
|
+
}), W && K && /* @__PURE__ */ A("div", {
|
|
177
|
+
className: "flex items-center gap-2 rounded-lg bg-green-500/10 border border-green-500/20 px-3 py-1.5",
|
|
178
|
+
children: [/* @__PURE__ */ A("span", {
|
|
179
|
+
className: "relative flex h-2 w-2",
|
|
180
|
+
children: [/* @__PURE__ */ k("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" }), /* @__PURE__ */ k("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-green-500" })]
|
|
181
|
+
}), /* @__PURE__ */ A("span", {
|
|
182
|
+
className: "text-xs font-medium text-green-600 dark:text-green-400",
|
|
183
|
+
children: ["Working since ", K]
|
|
184
|
+
})]
|
|
149
185
|
})]
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
186
|
+
}), /* @__PURE__ */ A("div", {
|
|
187
|
+
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ A("div", {
|
|
190
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ k("div", {
|
|
193
|
+
className: "flex items-center gap-2 mb-2",
|
|
194
|
+
children: /* @__PURE__ */ k("div", {
|
|
195
|
+
className: "inline-flex rounded-md p-1.5 bg-green-500/10 text-green-600 dark:text-green-400",
|
|
196
|
+
children: /* @__PURE__ */ k(f, { className: "h-4 w-4" })
|
|
197
|
+
})
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ k("p", {
|
|
200
|
+
className: "text-2xl font-bold text-green-600 dark:text-green-400",
|
|
201
|
+
children: R.tasksCompleted
|
|
202
|
+
}),
|
|
203
|
+
/* @__PURE__ */ k("p", {
|
|
204
|
+
className: "text-xs text-text-secondary",
|
|
205
|
+
children: "Completed"
|
|
162
206
|
})
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
className: "
|
|
181
|
-
children:
|
|
207
|
+
]
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ A("div", {
|
|
210
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ k("div", {
|
|
213
|
+
className: "flex items-center gap-2 mb-2",
|
|
214
|
+
children: /* @__PURE__ */ k("div", {
|
|
215
|
+
className: "inline-flex rounded-md p-1.5 bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
216
|
+
children: /* @__PURE__ */ k(x, { className: "h-4 w-4" })
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
/* @__PURE__ */ k("p", {
|
|
220
|
+
className: "text-2xl font-bold text-blue-600 dark:text-blue-400",
|
|
221
|
+
children: R.tasksInProgress
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ k("p", {
|
|
224
|
+
className: "text-xs text-text-secondary",
|
|
225
|
+
children: "In Progress"
|
|
182
226
|
})
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
className: "
|
|
201
|
-
children:
|
|
227
|
+
]
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ A("div", {
|
|
230
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ k("div", {
|
|
233
|
+
className: "flex items-center gap-2 mb-2",
|
|
234
|
+
children: /* @__PURE__ */ k("div", {
|
|
235
|
+
className: "inline-flex rounded-md p-1.5 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",
|
|
236
|
+
children: /* @__PURE__ */ k(g, { className: "h-4 w-4" })
|
|
237
|
+
})
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ k("p", {
|
|
240
|
+
className: "text-2xl font-bold text-yellow-600 dark:text-yellow-400",
|
|
241
|
+
children: R.tasksPending
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ k("p", {
|
|
244
|
+
className: "text-xs text-text-secondary",
|
|
245
|
+
children: "Pending"
|
|
202
246
|
})
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
className: "
|
|
221
|
-
children:
|
|
247
|
+
]
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ A("div", {
|
|
250
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ k("div", {
|
|
253
|
+
className: "flex items-center gap-2 mb-2",
|
|
254
|
+
children: /* @__PURE__ */ k("div", {
|
|
255
|
+
className: "inline-flex rounded-md p-1.5 bg-purple-500/10 text-purple-600 dark:text-purple-400",
|
|
256
|
+
children: /* @__PURE__ */ k(w, { className: "h-4 w-4" })
|
|
257
|
+
})
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ A("p", {
|
|
260
|
+
className: "text-2xl font-bold text-purple-600 dark:text-purple-400",
|
|
261
|
+
children: [R.hoursWorked, "h"]
|
|
262
|
+
}),
|
|
263
|
+
/* @__PURE__ */ k("p", {
|
|
264
|
+
className: "text-xs text-text-secondary",
|
|
265
|
+
children: "Hours Worked"
|
|
222
266
|
})
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
className: "
|
|
241
|
-
children:
|
|
267
|
+
]
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ A("div", {
|
|
270
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
271
|
+
children: [
|
|
272
|
+
/* @__PURE__ */ k("div", {
|
|
273
|
+
className: "flex items-center gap-2 mb-2",
|
|
274
|
+
children: /* @__PURE__ */ k("div", {
|
|
275
|
+
className: "inline-flex rounded-md p-1.5 bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",
|
|
276
|
+
children: /* @__PURE__ */ k(O, { className: "h-4 w-4" })
|
|
277
|
+
})
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ A("p", {
|
|
280
|
+
className: "text-2xl font-bold text-indigo-600 dark:text-indigo-400",
|
|
281
|
+
children: [R.efficiency, "%"]
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ k("p", {
|
|
284
|
+
className: "text-xs text-text-secondary",
|
|
285
|
+
children: "Efficiency"
|
|
242
286
|
})
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
className: "
|
|
261
|
-
children:
|
|
287
|
+
]
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ A("div", {
|
|
290
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ k("div", {
|
|
293
|
+
className: "flex items-center gap-2 mb-2",
|
|
294
|
+
children: /* @__PURE__ */ k("div", {
|
|
295
|
+
className: "inline-flex rounded-md p-1.5 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",
|
|
296
|
+
children: /* @__PURE__ */ k(C, { className: "h-4 w-4" })
|
|
297
|
+
})
|
|
298
|
+
}),
|
|
299
|
+
/* @__PURE__ */ A("p", {
|
|
300
|
+
className: "text-2xl font-bold text-yellow-500",
|
|
301
|
+
children: [R.rating, "/5"]
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ k("p", {
|
|
304
|
+
className: "text-xs text-text-secondary",
|
|
305
|
+
children: "Rating"
|
|
262
306
|
})
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
className: "text-xs text-text-secondary",
|
|
270
|
-
children: "Rating"
|
|
271
|
-
})
|
|
272
|
-
]
|
|
273
|
-
})
|
|
274
|
-
]
|
|
275
|
-
})] }),
|
|
276
|
-
K && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h2", {
|
|
307
|
+
]
|
|
308
|
+
})
|
|
309
|
+
]
|
|
310
|
+
})]
|
|
311
|
+
}),
|
|
312
|
+
X && /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h2", {
|
|
277
313
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
278
314
|
children: "Current Task"
|
|
279
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ k("div", {
|
|
280
316
|
className: "rounded-lg border-2 border-blue-500/40 bg-blue-500/5 p-6",
|
|
281
|
-
children: /* @__PURE__ */
|
|
317
|
+
children: /* @__PURE__ */ A("div", {
|
|
282
318
|
className: "flex items-start justify-between mb-4",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ A("div", {
|
|
284
320
|
className: "flex items-start gap-3",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ k("div", {
|
|
286
322
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-blue-500/10",
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
-
}), /* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
323
|
+
children: /* @__PURE__ */ k(I(X.type), { className: "h-5 w-5 text-blue-600 dark:text-blue-400" })
|
|
324
|
+
}), /* @__PURE__ */ A("div", { children: [
|
|
325
|
+
/* @__PURE__ */ k("h3", {
|
|
290
326
|
className: "text-lg font-semibold text-text-primary",
|
|
291
|
-
children:
|
|
327
|
+
children: X.title
|
|
292
328
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ k("p", {
|
|
294
330
|
className: "text-sm text-text-secondary mt-1",
|
|
295
|
-
children:
|
|
331
|
+
children: X.description
|
|
296
332
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ A("div", {
|
|
298
334
|
className: "flex flex-wrap items-center gap-3 mt-2 text-sm text-text-secondary",
|
|
299
335
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ A("span", {
|
|
301
337
|
className: "flex items-center gap-1",
|
|
302
338
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
|
|
339
|
+
/* @__PURE__ */ k(g, { className: "h-3.5 w-3.5" }),
|
|
340
|
+
X.estimatedTime,
|
|
305
341
|
" min"
|
|
306
342
|
]
|
|
307
343
|
}),
|
|
308
|
-
|
|
344
|
+
X.dueTime && /* @__PURE__ */ A("span", {
|
|
309
345
|
className: "flex items-center gap-1",
|
|
310
346
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ k(w, { className: "h-3.5 w-3.5" }),
|
|
312
348
|
"Due: ",
|
|
313
|
-
|
|
349
|
+
X.dueTime
|
|
314
350
|
]
|
|
315
351
|
}),
|
|
316
|
-
|
|
352
|
+
X.location && /* @__PURE__ */ A("span", {
|
|
317
353
|
className: "flex items-center gap-1",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ k(v, { className: "h-3.5 w-3.5" }), X.location]
|
|
319
355
|
})
|
|
320
356
|
]
|
|
321
357
|
})
|
|
322
358
|
] })]
|
|
323
|
-
}), /* @__PURE__ */
|
|
359
|
+
}), /* @__PURE__ */ A("div", {
|
|
324
360
|
className: "flex gap-2 shrink-0",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ A("button", {
|
|
326
362
|
type: "button",
|
|
327
|
-
onClick: () =>
|
|
363
|
+
onClick: () => J(X.id, "complete"),
|
|
328
364
|
className: "inline-flex items-center gap-1.5 rounded-md bg-green-500/10 px-3 py-2 text-sm font-medium text-green-600 dark:text-green-400 hover:bg-green-500/20 transition-colors",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
330
|
-
}), /* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ k(f, { className: "h-4 w-4" }), "Complete"]
|
|
366
|
+
}), /* @__PURE__ */ A("button", {
|
|
331
367
|
type: "button",
|
|
332
|
-
onClick: () =>
|
|
368
|
+
onClick: () => J(X.id, "pause"),
|
|
333
369
|
className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent/80 transition-colors",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ k(b, { className: "h-4 w-4" }), "Pause"]
|
|
335
371
|
})]
|
|
336
372
|
})]
|
|
337
373
|
})
|
|
338
374
|
})] }),
|
|
339
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h2", {
|
|
340
376
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
341
377
|
children: "Assigned Tasks"
|
|
342
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ k("div", {
|
|
343
379
|
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm overflow-hidden",
|
|
344
|
-
children:
|
|
380
|
+
children: Z.length > 0 ? /* @__PURE__ */ k("div", {
|
|
345
381
|
className: "divide-y divide-border",
|
|
346
|
-
children:
|
|
382
|
+
children: Z.map((e) => /* @__PURE__ */ k("div", {
|
|
347
383
|
className: "p-4 hover:bg-bg-sunken/30 transition-colors",
|
|
348
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ A("div", {
|
|
349
385
|
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ A("div", {
|
|
351
387
|
className: "flex items-start gap-3 flex-1 min-w-0",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ k("div", {
|
|
353
389
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken",
|
|
354
|
-
children: /* @__PURE__ */
|
|
355
|
-
}), /* @__PURE__ */
|
|
390
|
+
children: /* @__PURE__ */ k(I(e.type), { className: "h-4.5 w-4.5 text-text-secondary" })
|
|
391
|
+
}), /* @__PURE__ */ A("div", {
|
|
356
392
|
className: "flex-1 min-w-0",
|
|
357
393
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ A("div", {
|
|
359
395
|
className: "flex flex-wrap items-center gap-2 mb-1",
|
|
360
396
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ k("h3", {
|
|
362
398
|
className: "text-sm font-medium text-text-primary",
|
|
363
399
|
children: e.title
|
|
364
400
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize",
|
|
401
|
+
/* @__PURE__ */ k("span", {
|
|
402
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", P[e.priority]),
|
|
367
403
|
children: e.priority
|
|
368
404
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
405
|
+
/* @__PURE__ */ k("span", {
|
|
406
|
+
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium", F[e.status]),
|
|
371
407
|
children: e.status.replace("_", " ")
|
|
372
408
|
})
|
|
373
409
|
]
|
|
374
410
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ k("p", {
|
|
376
412
|
className: "text-xs text-text-secondary line-clamp-1",
|
|
377
413
|
children: e.description
|
|
378
414
|
}),
|
|
379
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ A("div", {
|
|
380
416
|
className: "flex flex-wrap items-center gap-3 mt-1.5 text-xs text-text-secondary",
|
|
381
417
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ A("span", {
|
|
383
419
|
className: "flex items-center gap-1",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ k(D, { className: "h-3 w-3" }), e.assignedBy]
|
|
385
421
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ A("span", {
|
|
387
423
|
className: "flex items-center gap-1",
|
|
388
424
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ k(g, { className: "h-3 w-3" }),
|
|
390
426
|
e.estimatedTime,
|
|
391
427
|
" min"
|
|
392
428
|
]
|
|
393
429
|
}),
|
|
394
|
-
e.dueTime && /* @__PURE__ */
|
|
430
|
+
e.dueTime && /* @__PURE__ */ A("span", {
|
|
395
431
|
className: "flex items-center gap-1",
|
|
396
432
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ k(w, { className: "h-3 w-3" }),
|
|
398
434
|
"Due: ",
|
|
399
435
|
e.dueTime
|
|
400
436
|
]
|
|
401
437
|
}),
|
|
402
|
-
e.location && /* @__PURE__ */
|
|
438
|
+
e.location && /* @__PURE__ */ A("span", {
|
|
403
439
|
className: "flex items-center gap-1",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ k(v, { className: "h-3 w-3" }), e.location]
|
|
405
441
|
})
|
|
406
442
|
]
|
|
407
443
|
})
|
|
408
444
|
]
|
|
409
445
|
})]
|
|
410
|
-
}), /* @__PURE__ */
|
|
446
|
+
}), /* @__PURE__ */ A("div", {
|
|
411
447
|
className: "flex gap-2 shrink-0",
|
|
412
448
|
children: [
|
|
413
|
-
e.status === "pending" && /* @__PURE__ */
|
|
449
|
+
e.status === "pending" && /* @__PURE__ */ A("button", {
|
|
414
450
|
type: "button",
|
|
415
|
-
onClick: () =>
|
|
416
|
-
disabled:
|
|
417
|
-
className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
451
|
+
onClick: () => J(e.id, "start"),
|
|
452
|
+
disabled: H !== null,
|
|
453
|
+
className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", H === null ? "bg-blue-500/10 text-blue-600 dark:text-blue-400 hover:bg-blue-500/20" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
|
|
454
|
+
children: [/* @__PURE__ */ k(x, { className: "h-3.5 w-3.5" }), "Start"]
|
|
419
455
|
}),
|
|
420
|
-
e.status === "in_progress" && e.id !==
|
|
456
|
+
e.status === "in_progress" && e.id !== H && /* @__PURE__ */ A("button", {
|
|
421
457
|
type: "button",
|
|
422
|
-
onClick: () =>
|
|
458
|
+
onClick: () => U(e.id),
|
|
423
459
|
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
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ k(x, { className: "h-3.5 w-3.5" }), "Resume"]
|
|
425
461
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ A("button", {
|
|
427
463
|
type: "button",
|
|
428
|
-
onClick: () =>
|
|
464
|
+
onClick: () => u(`/worker/task/${e.id}`),
|
|
429
465
|
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",
|
|
430
|
-
children: ["Details", /* @__PURE__ */
|
|
466
|
+
children: ["Details", /* @__PURE__ */ k(m, { className: "h-3.5 w-3.5" })]
|
|
431
467
|
})
|
|
432
468
|
]
|
|
433
469
|
})]
|
|
434
470
|
})
|
|
435
471
|
}, e.id))
|
|
436
|
-
}) : /* @__PURE__ */ k(
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
children: "All tasks completed!"
|
|
441
|
-
})]
|
|
472
|
+
}) : /* @__PURE__ */ k(r, {
|
|
473
|
+
illustration: "empty-sessions",
|
|
474
|
+
title: "All tasks completed!",
|
|
475
|
+
description: "You're all caught up — no tasks are assigned to you right now. New tasks will appear here as they come in."
|
|
442
476
|
})
|
|
443
477
|
})] }),
|
|
444
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("h2", {
|
|
445
479
|
className: "text-base font-semibold text-text-primary mb-3",
|
|
446
480
|
children: "Recently Completed"
|
|
447
|
-
}), /* @__PURE__ */
|
|
481
|
+
}), /* @__PURE__ */ k("div", {
|
|
448
482
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
|
|
449
|
-
children:
|
|
483
|
+
children: Q.length > 0 ? /* @__PURE__ */ k("div", {
|
|
450
484
|
className: "space-y-3",
|
|
451
|
-
children:
|
|
485
|
+
children: Q.slice(0, 3).map((e) => /* @__PURE__ */ A("div", {
|
|
452
486
|
className: "flex items-center gap-3 p-3 rounded-lg bg-green-500/5 border border-green-500/10",
|
|
453
487
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ k("div", {
|
|
455
489
|
className: "flex h-8 w-8 items-center justify-center rounded-md bg-green-500/10",
|
|
456
|
-
children: /* @__PURE__ */
|
|
490
|
+
children: /* @__PURE__ */ k(I(e.type), { className: "h-4 w-4 text-green-600 dark:text-green-400" })
|
|
457
491
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ A("div", {
|
|
459
493
|
className: "flex-1 min-w-0",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ k("p", {
|
|
461
495
|
className: "text-sm font-medium text-text-primary",
|
|
462
496
|
children: e.title
|
|
463
|
-
}), /* @__PURE__ */
|
|
497
|
+
}), /* @__PURE__ */ A("p", {
|
|
464
498
|
className: "text-xs text-text-secondary",
|
|
465
499
|
children: [
|
|
466
500
|
"Completed at",
|
|
@@ -473,110 +507,111 @@ var N = {
|
|
|
473
507
|
]
|
|
474
508
|
})]
|
|
475
509
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ k(f, { className: "h-4 w-4 text-green-600 dark:text-green-400 shrink-0" })
|
|
477
511
|
]
|
|
478
512
|
}, e.id))
|
|
479
|
-
}) : /* @__PURE__ */
|
|
480
|
-
|
|
481
|
-
|
|
513
|
+
}) : /* @__PURE__ */ k(r, {
|
|
514
|
+
illustration: "empty-generic",
|
|
515
|
+
title: "No completed tasks yet today",
|
|
516
|
+
description: "Finish a task to see it recorded here."
|
|
482
517
|
})
|
|
483
518
|
})] }),
|
|
484
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ A("div", {
|
|
485
520
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
486
|
-
children: [/* @__PURE__ */
|
|
521
|
+
children: [/* @__PURE__ */ A("div", {
|
|
487
522
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
|
|
488
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ A("h3", {
|
|
489
524
|
className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-4",
|
|
490
|
-
children: [/* @__PURE__ */
|
|
491
|
-
}), /* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ k(T, { className: "h-4 w-4 text-text-secondary" }), "Performance This Week"]
|
|
526
|
+
}), /* @__PURE__ */ A("div", {
|
|
492
527
|
className: "space-y-3",
|
|
493
528
|
children: [
|
|
494
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ A("div", {
|
|
495
530
|
className: "flex items-center justify-between",
|
|
496
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ k("span", {
|
|
497
532
|
className: "text-sm text-text-secondary",
|
|
498
533
|
children: "Tasks Completed"
|
|
499
|
-
}), /* @__PURE__ */
|
|
534
|
+
}), /* @__PURE__ */ k("span", {
|
|
500
535
|
className: "text-sm font-medium text-text-primary",
|
|
501
536
|
children: "47"
|
|
502
537
|
})]
|
|
503
538
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ A("div", {
|
|
505
540
|
className: "flex items-center justify-between",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ k("span", {
|
|
507
542
|
className: "text-sm text-text-secondary",
|
|
508
543
|
children: "Average Time per Task"
|
|
509
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ k("span", {
|
|
510
545
|
className: "text-sm font-medium text-text-primary",
|
|
511
546
|
children: "23 min"
|
|
512
547
|
})]
|
|
513
548
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ A("div", {
|
|
515
550
|
className: "flex items-center justify-between",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ k("span", {
|
|
517
552
|
className: "text-sm text-text-secondary",
|
|
518
553
|
children: "On-time Completion"
|
|
519
|
-
}), /* @__PURE__ */
|
|
554
|
+
}), /* @__PURE__ */ k("span", {
|
|
520
555
|
className: "text-sm font-medium text-text-primary",
|
|
521
556
|
children: "94%"
|
|
522
557
|
})]
|
|
523
558
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ A("div", {
|
|
525
560
|
className: "flex items-center justify-between",
|
|
526
|
-
children: [/* @__PURE__ */
|
|
561
|
+
children: [/* @__PURE__ */ k("span", {
|
|
527
562
|
className: "text-sm text-text-secondary",
|
|
528
563
|
children: "Customer Feedback"
|
|
529
|
-
}), /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ A("span", {
|
|
530
565
|
className: "text-sm font-medium text-text-primary flex items-center gap-1",
|
|
531
|
-
children: ["4.7/5", /* @__PURE__ */
|
|
566
|
+
children: ["4.7/5", /* @__PURE__ */ k(C, { className: "h-3.5 w-3.5 fill-yellow-400 text-yellow-400" })]
|
|
532
567
|
})]
|
|
533
568
|
})
|
|
534
569
|
]
|
|
535
570
|
})]
|
|
536
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ A("div", {
|
|
537
572
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
573
|
+
children: [/* @__PURE__ */ A("h3", {
|
|
539
574
|
className: "text-base font-semibold text-text-primary flex items-center gap-2 mb-4",
|
|
540
|
-
children: [/* @__PURE__ */
|
|
541
|
-
}), /* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ k(d, { className: "h-4 w-4 text-text-secondary" }), "Shift Information"]
|
|
576
|
+
}), /* @__PURE__ */ A("div", {
|
|
542
577
|
className: "space-y-3",
|
|
543
578
|
children: [
|
|
544
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ A("div", {
|
|
545
580
|
className: "flex items-center justify-between",
|
|
546
|
-
children: [/* @__PURE__ */
|
|
581
|
+
children: [/* @__PURE__ */ k("span", {
|
|
547
582
|
className: "text-sm text-text-secondary",
|
|
548
583
|
children: "Shift Start"
|
|
549
|
-
}), /* @__PURE__ */
|
|
584
|
+
}), /* @__PURE__ */ k("span", {
|
|
550
585
|
className: "text-sm font-medium text-text-primary",
|
|
551
586
|
children: "9:00 AM"
|
|
552
587
|
})]
|
|
553
588
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ A("div", {
|
|
555
590
|
className: "flex items-center justify-between",
|
|
556
|
-
children: [/* @__PURE__ */
|
|
591
|
+
children: [/* @__PURE__ */ k("span", {
|
|
557
592
|
className: "text-sm text-text-secondary",
|
|
558
593
|
children: "Shift End"
|
|
559
|
-
}), /* @__PURE__ */
|
|
594
|
+
}), /* @__PURE__ */ k("span", {
|
|
560
595
|
className: "text-sm font-medium text-text-primary",
|
|
561
596
|
children: "6:00 PM"
|
|
562
597
|
})]
|
|
563
598
|
}),
|
|
564
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ A("div", {
|
|
565
600
|
className: "flex items-center justify-between",
|
|
566
|
-
children: [/* @__PURE__ */
|
|
601
|
+
children: [/* @__PURE__ */ k("span", {
|
|
567
602
|
className: "text-sm text-text-secondary",
|
|
568
603
|
children: "Break Time"
|
|
569
|
-
}), /* @__PURE__ */
|
|
604
|
+
}), /* @__PURE__ */ k("span", {
|
|
570
605
|
className: "text-sm font-medium text-text-primary",
|
|
571
606
|
children: "1:00 PM - 2:00 PM"
|
|
572
607
|
})]
|
|
573
608
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ A("div", {
|
|
575
610
|
className: "flex items-center justify-between",
|
|
576
|
-
children: [/* @__PURE__ */
|
|
611
|
+
children: [/* @__PURE__ */ k("span", {
|
|
577
612
|
className: "text-sm text-text-secondary",
|
|
578
613
|
children: "Supervisor"
|
|
579
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ k("span", {
|
|
580
615
|
className: "text-sm font-medium text-text-primary",
|
|
581
616
|
children: "Rajesh Kumar"
|
|
582
617
|
})]
|
|
@@ -585,41 +620,41 @@ var N = {
|
|
|
585
620
|
})]
|
|
586
621
|
})]
|
|
587
622
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ A("div", {
|
|
589
624
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
591
626
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
592
627
|
children: "Overall Performance"
|
|
593
|
-
}), /* @__PURE__ */
|
|
628
|
+
}), /* @__PURE__ */ A("div", {
|
|
594
629
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
595
630
|
children: [
|
|
596
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
597
632
|
className: "text-xs text-text-secondary",
|
|
598
633
|
children: "Total Deliveries"
|
|
599
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ k("p", {
|
|
600
635
|
className: "text-lg font-bold text-text-primary",
|
|
601
|
-
children:
|
|
636
|
+
children: R?.totalDeliveries || 0
|
|
602
637
|
})] }),
|
|
603
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
604
639
|
className: "text-xs text-text-secondary",
|
|
605
640
|
children: "Total Earnings"
|
|
606
|
-
}), /* @__PURE__ */
|
|
641
|
+
}), /* @__PURE__ */ k("p", {
|
|
607
642
|
className: "text-lg font-bold text-text-primary",
|
|
608
|
-
children:
|
|
643
|
+
children: c(R?.totalEarnings || 0, { minimumFractionDigits: 0 })
|
|
609
644
|
})] }),
|
|
610
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
611
646
|
className: "text-xs text-text-secondary",
|
|
612
647
|
children: "Average Rating"
|
|
613
|
-
}), /* @__PURE__ */
|
|
648
|
+
}), /* @__PURE__ */ A("p", {
|
|
614
649
|
className: "text-lg font-bold text-text-primary flex items-center gap-1",
|
|
615
|
-
children: [
|
|
650
|
+
children: [R?.averageRating || 0, /* @__PURE__ */ k(C, { className: "h-4 w-4 fill-yellow-400 text-yellow-400" })]
|
|
616
651
|
})] }),
|
|
617
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
618
653
|
className: "text-xs text-text-secondary",
|
|
619
654
|
children: "Completion Rate"
|
|
620
|
-
}), /* @__PURE__ */
|
|
655
|
+
}), /* @__PURE__ */ A("p", {
|
|
621
656
|
className: "text-lg font-bold text-text-primary",
|
|
622
|
-
children: [
|
|
657
|
+
children: [R?.completionRate || 0, "%"]
|
|
623
658
|
})] })
|
|
624
659
|
]
|
|
625
660
|
})]
|
|
@@ -629,6 +664,6 @@ var N = {
|
|
|
629
664
|
});
|
|
630
665
|
};
|
|
631
666
|
//#endregion
|
|
632
|
-
export {
|
|
667
|
+
export { R as WorkerDashboard };
|
|
633
668
|
|
|
634
669
|
//# sourceMappingURL=WorkerDashboard.js.map
|