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