@burdenoff/microfe-adaptercloud 2026.625.2 → 2026.628.1

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 (153) hide show
  1. package/dist/adaptercloud/AdapterCloudRoot.js +65 -121
  2. package/dist/adaptercloud/AdapterCloudRoot.js.map +1 -1
  3. package/dist/adaptercloud/AdapterCloudRoutes.js +70 -182
  4. package/dist/adaptercloud/AdapterCloudRoutes.js.map +1 -1
  5. package/dist/adaptercloud/components/DataState.js +42 -0
  6. package/dist/adaptercloud/components/DataState.js.map +1 -0
  7. package/dist/adaptercloud/components/SeverityBadge.js +12 -0
  8. package/dist/adaptercloud/components/SeverityBadge.js.map +1 -0
  9. package/dist/adaptercloud/components/StatusBadge.js +43 -44
  10. package/dist/adaptercloud/components/StatusBadge.js.map +1 -1
  11. package/dist/adaptercloud/context/AdapterCloudContext.js +22 -30
  12. package/dist/adaptercloud/context/AdapterCloudContext.js.map +1 -1
  13. package/dist/adaptercloud/hooks/useAdapterCloudApi.js +397 -194
  14. package/dist/adaptercloud/hooks/useAdapterCloudApi.js.map +1 -1
  15. package/dist/adaptercloud/index.js +1 -0
  16. package/dist/adaptercloud/pages/OverviewPage.js +334 -0
  17. package/dist/adaptercloud/pages/OverviewPage.js.map +1 -0
  18. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js +187 -0
  19. package/dist/adaptercloud/pages/adapters/AdapterDetailPage.js.map +1 -0
  20. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js +278 -0
  21. package/dist/adaptercloud/pages/adapters/AdapterFormPage.js.map +1 -0
  22. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js +172 -0
  23. package/dist/adaptercloud/pages/adapters/AdaptersListPage.js.map +1 -0
  24. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js +247 -0
  25. package/dist/adaptercloud/pages/connections/ConnectionDetailPage.js.map +1 -0
  26. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js +271 -0
  27. package/dist/adaptercloud/pages/connections/ConnectionFormPage.js.map +1 -0
  28. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js +167 -0
  29. package/dist/adaptercloud/pages/connections/ConnectionsListPage.js.map +1 -0
  30. package/dist/adaptercloud/pages/costs/CostsPage.js +169 -0
  31. package/dist/adaptercloud/pages/costs/CostsPage.js.map +1 -0
  32. package/dist/adaptercloud/pages/drift/DriftListPage.js +132 -0
  33. package/dist/adaptercloud/pages/drift/DriftListPage.js.map +1 -0
  34. package/dist/adaptercloud/pages/policies/PoliciesListPage.js +171 -0
  35. package/dist/adaptercloud/pages/policies/PoliciesListPage.js.map +1 -0
  36. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js +185 -0
  37. package/dist/adaptercloud/pages/policies/PolicyDetailPage.js.map +1 -0
  38. package/dist/adaptercloud/pages/policies/PolicyFormPage.js +215 -0
  39. package/dist/adaptercloud/pages/policies/PolicyFormPage.js.map +1 -0
  40. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js +207 -0
  41. package/dist/adaptercloud/pages/resources/ResourceDetailPage.js.map +1 -0
  42. package/dist/adaptercloud/pages/resources/ResourcesListPage.js +182 -0
  43. package/dist/adaptercloud/pages/resources/ResourcesListPage.js.map +1 -0
  44. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js +196 -0
  45. package/dist/adaptercloud/pages/sync-runs/SyncRunsListPage.js.map +1 -0
  46. package/dist/adaptercloud/pages/violations/ViolationsListPage.js +258 -0
  47. package/dist/adaptercloud/pages/violations/ViolationsListPage.js.map +1 -0
  48. package/dist/adaptercloud/store/adaptercloudStore.js +1 -7
  49. package/dist/adaptercloud/store/adaptercloudStore.js.map +1 -1
  50. package/dist/adaptercloud/utils/domain.js +105 -0
  51. package/dist/adaptercloud/utils/domain.js.map +1 -0
  52. package/dist/adaptercloud/utils/formatters.js +1 -12
  53. package/dist/adaptercloud/utils/formatters.js.map +1 -1
  54. package/dist/index.js +5 -4
  55. package/package.json +1 -1
  56. package/dist/adaptercloud/components/InvestmentCard.js +0 -98
  57. package/dist/adaptercloud/components/InvestmentCard.js.map +0 -1
  58. package/dist/adaptercloud/components/RatingDisplay.js +0 -35
  59. package/dist/adaptercloud/components/RatingDisplay.js.map +0 -1
  60. package/dist/adaptercloud/mocks/data.js +0 -1517
  61. package/dist/adaptercloud/mocks/data.js.map +0 -1
  62. package/dist/adaptercloud/mocks/users.js +0 -34
  63. package/dist/adaptercloud/mocks/users.js.map +0 -1
  64. package/dist/adaptercloud/pages/HomePage.js +0 -934
  65. package/dist/adaptercloud/pages/HomePage.js.map +0 -1
  66. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +0 -653
  67. package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +0 -1
  68. package/dist/adaptercloud/pages/admin/AdminDashboard.js +0 -665
  69. package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +0 -1
  70. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +0 -426
  71. package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +0 -1
  72. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +0 -665
  73. package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +0 -1
  74. package/dist/adaptercloud/pages/admin/AdminProfilePage.js +0 -261
  75. package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +0 -1
  76. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +0 -663
  77. package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +0 -1
  78. package/dist/adaptercloud/pages/admin/CartManagementPage.js +0 -874
  79. package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +0 -1
  80. package/dist/adaptercloud/pages/admin/UserManagementPage.js +0 -898
  81. package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +0 -1
  82. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +0 -840
  83. package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  84. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +0 -714
  85. package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  86. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +0 -788
  87. package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  88. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +0 -888
  89. package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  90. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +0 -634
  91. package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  92. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +0 -907
  93. package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  94. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +0 -875
  95. package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +0 -1
  96. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +0 -827
  97. package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +0 -1
  98. package/dist/adaptercloud/pages/common/HelpSupportPage.js +0 -1329
  99. package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +0 -1
  100. package/dist/adaptercloud/pages/common/NotificationCenterPage.js +0 -671
  101. package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +0 -1
  102. package/dist/adaptercloud/pages/common/SettingsPage.js +0 -982
  103. package/dist/adaptercloud/pages/common/SettingsPage.js.map +0 -1
  104. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +0 -596
  105. package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +0 -1
  106. package/dist/adaptercloud/pages/customer/CartDetailPage.js +0 -623
  107. package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +0 -1
  108. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +0 -552
  109. package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +0 -1
  110. package/dist/adaptercloud/pages/customer/CheckoutPage.js +0 -534
  111. package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +0 -1
  112. package/dist/adaptercloud/pages/customer/CustomerDashboard.js +0 -525
  113. package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +0 -1
  114. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +0 -623
  115. package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +0 -1
  116. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +0 -629
  117. package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +0 -1
  118. package/dist/adaptercloud/pages/customer/FavoritesPage.js +0 -480
  119. package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +0 -1
  120. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +0 -444
  121. package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +0 -1
  122. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +0 -391
  123. package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +0 -1
  124. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +0 -504
  125. package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +0 -1
  126. package/dist/adaptercloud/pages/customer/ReviewsPage.js +0 -609
  127. package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +0 -1
  128. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +0 -459
  129. package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +0 -1
  130. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +0 -851
  131. package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +0 -1
  132. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +0 -942
  133. package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  134. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +0 -683
  135. package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  136. package/dist/adaptercloud/pages/investor/InvestorDashboard.js +0 -452
  137. package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +0 -1
  138. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +0 -402
  139. package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  140. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +0 -571
  141. package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +0 -1
  142. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +0 -1067
  143. package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +0 -1
  144. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +0 -526
  145. package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +0 -1
  146. package/dist/adaptercloud/pages/worker/WorkerDashboard.js +0 -659
  147. package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +0 -1
  148. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +0 -678
  149. package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +0 -1
  150. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +0 -689
  151. package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +0 -1
  152. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +0 -582
  153. package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,678 +0,0 @@
1
- import { useAdapterCloud as e } from "../../context/AdapterCloudContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { StatusBadge as r } from "../../components/StatusBadge.js";
5
- import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { formatCurrency as a } from "../../utils/formatters.js";
7
- import { useCallback as o, useEffect as s, useState as c } from "react";
8
- import { AlertTriangle as l, ArrowRight as u, CheckCircle2 as d, ChefHat as f, ClipboardList as p, CreditCard as m, Loader2 as h, MapPin as g, Navigation as _, Package as v, Phone as y, PlayCircle as b, ShoppingBag as x, Star as S, Truck as C } from "lucide-react";
9
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
10
- import { EmphasisPanel as E } from "@burdenoff/fe-libs/ui";
11
- //#region src/adaptercloud/pages/worker/WorkerOrdersPage.tsx
12
- var D = [
13
- {
14
- id: "task-001",
15
- orderId: "ORD-2024-001",
16
- cartId: "cart-001",
17
- cartName: "South Indian Express",
18
- type: "delivery",
19
- status: "pending",
20
- priority: "high",
21
- customerName: "Rahul Sharma",
22
- customerPhone: "+91-98765-43210",
23
- items: [{
24
- name: "Masala Dosa",
25
- quantity: 2
26
- }, {
27
- name: "Filter Coffee",
28
- quantity: 2
29
- }],
30
- address: {
31
- addressLine1: "123, MG Road",
32
- addressLine2: "Near Central Mall",
33
- landmark: "Opposite SBI Bank",
34
- city: "Bangalore",
35
- pincode: "560001"
36
- },
37
- estimatedTime: new Date(Date.now() + 1800 * 1e3).toISOString(),
38
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 300 * 1e3)).toISOString(),
39
- distance: 3.5,
40
- specialInstructions: "Please call before delivery",
41
- payment: {
42
- method: "Cash",
43
- amount: 295,
44
- status: "pending"
45
- }
46
- },
47
- {
48
- id: "task-002",
49
- orderId: "ORD-2024-002",
50
- cartId: "cart-001",
51
- cartName: "South Indian Express",
52
- type: "pickup",
53
- status: "in_progress",
54
- priority: "medium",
55
- customerName: "Priya Patel",
56
- customerPhone: "+91-98765-43211",
57
- items: [{
58
- name: "Idli Sambar",
59
- quantity: 3
60
- }],
61
- estimatedTime: new Date(Date.now() + 900 * 1e3).toISOString(),
62
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 600 * 1e3)).toISOString(),
63
- specialInstructions: "",
64
- payment: {
65
- method: "Online",
66
- amount: 198,
67
- status: "completed"
68
- }
69
- },
70
- {
71
- id: "task-003",
72
- orderId: "ORD-2024-003",
73
- cartId: "cart-002",
74
- cartName: "Chaat Corner",
75
- type: "preparation",
76
- status: "pending",
77
- priority: "urgent",
78
- customerName: "Amit Kumar",
79
- customerPhone: "+91-98765-43212",
80
- items: [{
81
- name: "Pani Puri",
82
- quantity: 2
83
- }, {
84
- name: "Bhel Puri",
85
- quantity: 1
86
- }],
87
- estimatedTime: new Date(Date.now() + 1200 * 1e3).toISOString(),
88
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 120 * 1e3)).toISOString(),
89
- specialInstructions: "Extra spicy",
90
- payment: {
91
- method: "UPI",
92
- amount: 150,
93
- status: "completed"
94
- }
95
- },
96
- {
97
- id: "task-004",
98
- orderId: "ORD-2024-004",
99
- cartId: "cart-003",
100
- cartName: "Biryani Pot",
101
- type: "delivery",
102
- status: "completed",
103
- priority: "medium",
104
- customerName: "Deepa Nair",
105
- customerPhone: "+91-98765-43213",
106
- items: [{
107
- name: "Chicken Biryani",
108
- quantity: 1
109
- }, {
110
- name: "Raita",
111
- quantity: 1
112
- }],
113
- address: {
114
- addressLine1: "456, Brigade Road",
115
- city: "Bangalore",
116
- pincode: "560025"
117
- },
118
- estimatedTime: (/* @__PURE__ */ new Date(Date.now() - 1800 * 1e3)).toISOString(),
119
- assignedTime: (/* @__PURE__ */ new Date(Date.now() - 5400 * 1e3)).toISOString(),
120
- distance: 2.1,
121
- payment: {
122
- method: "Online",
123
- amount: 340,
124
- status: "completed"
125
- }
126
- }
127
- ];
128
- function O(e) {
129
- let t = /* @__PURE__ */ new Date(), n = new Date(e), r = Math.floor((n.getTime() - t.getTime()) / (1e3 * 60));
130
- return r < 0 ? "Overdue" : r < 60 ? `${r} min` : `${Math.floor(r / 60)}h ${r % 60}m`;
131
- }
132
- function k(e) {
133
- switch (e) {
134
- case "delivery": return {
135
- icon: C,
136
- label: "Delivery",
137
- style: "bg-accent-purple-subtle/20 text-accent-purple"
138
- };
139
- case "pickup": return {
140
- icon: x,
141
- label: "Pickup",
142
- style: "bg-accent-blue-subtle/20 text-accent-blue"
143
- };
144
- case "preparation": return {
145
- icon: f,
146
- label: "Preparation",
147
- style: "bg-status-success-bg-subtle/20 text-status-success-text"
148
- };
149
- default: return {
150
- icon: v,
151
- label: e,
152
- style: "bg-secondary text-secondary-foreground"
153
- };
154
- }
155
- }
156
- function A(e) {
157
- switch (e) {
158
- case "urgent": return "bg-status-error-bg-subtle/20 text-status-error-text";
159
- case "high": return "bg-accent-orange-subtle/20 text-accent-orange";
160
- case "medium": return "bg-status-warning-bg-subtle/20 text-status-warning-text";
161
- case "low": return "bg-status-success-bg-subtle/20 text-status-success-text";
162
- default: return "bg-secondary text-secondary-foreground";
163
- }
164
- }
165
- var j = () => {
166
- let { navigateTo: f } = e(), [v, x] = c(!0), [C, j] = c([]), [M, N] = c(null), [P, F] = c({
167
- status: "",
168
- type: "",
169
- priority: "",
170
- sortBy: "priority"
171
- }), [I, L] = c({
172
- totalTasks: 0,
173
- completedToday: 0,
174
- pendingTasks: 0,
175
- averageTime: 0,
176
- earnings: 0,
177
- rating: 4.8
178
- }), [, R] = c(0);
179
- s(() => {
180
- let e = setInterval(() => R((e) => e + 1), 6e4);
181
- return () => clearInterval(e);
182
- }, []);
183
- let z = o(() => {
184
- x(!0), setTimeout(() => {
185
- let e = [...D];
186
- P.status && (e = e.filter((e) => e.status === P.status)), P.type && (e = e.filter((e) => e.type === P.type)), P.priority && (e = e.filter((e) => e.priority === P.priority));
187
- let t = {
188
- urgent: 0,
189
- high: 1,
190
- medium: 2,
191
- low: 3
192
- };
193
- switch (P.sortBy) {
194
- case "priority":
195
- e.sort((e, n) => (t[e.priority] ?? 4) - (t[n.priority] ?? 4));
196
- break;
197
- case "time":
198
- e.sort((e, t) => new Date(e.estimatedTime).getTime() - new Date(t.estimatedTime).getTime());
199
- break;
200
- case "distance":
201
- e.sort((e, t) => (e.distance ?? 999) - (t.distance ?? 999));
202
- break;
203
- }
204
- j(e), N(D.find((e) => e.status === "in_progress") ?? null), L({
205
- totalTasks: 45,
206
- completedToday: 12,
207
- pendingTasks: 3,
208
- averageTime: 22,
209
- earnings: 2450,
210
- rating: 4.8
211
- }), x(!1);
212
- }, 600);
213
- }, [P]);
214
- s(() => {
215
- z();
216
- }, [z]);
217
- let B = (e, t) => {
218
- F((n) => ({
219
- ...n,
220
- [e]: t
221
- }));
222
- }, V = (e) => {
223
- let t = D.find((t) => t.id === e);
224
- t && (t.status = "in_progress", N(t), z());
225
- }, H = (e) => {
226
- let t = D.find((t) => t.id === e);
227
- t && (t.status = "completed"), N(null), z(), alert("Task completed successfully");
228
- }, U = (e) => {
229
- window.location.href = `tel:${e.replace(/\s/g, "")}`;
230
- }, W = (e) => {
231
- if (e.address) {
232
- let t = encodeURIComponent(`${e.address.addressLine1}, ${e.address.city}`);
233
- window.open(`https://maps.google.com?q=${t}`, "_blank");
234
- }
235
- };
236
- return v ? /* @__PURE__ */ w(n, {
237
- title: "My Orders",
238
- description: "Manage your assigned orders",
239
- children: /* @__PURE__ */ w("div", {
240
- className: "flex items-center justify-center py-24",
241
- children: /* @__PURE__ */ T("div", {
242
- className: "text-center",
243
- children: [/* @__PURE__ */ w(h, { className: "h-10 w-10 animate-spin text-text-secondary mx-auto mb-4" }), /* @__PURE__ */ w("p", {
244
- className: "text-sm text-text-secondary",
245
- children: "Loading tasks..."
246
- })]
247
- })
248
- })
249
- }) : /* @__PURE__ */ w(n, {
250
- title: "My Orders",
251
- description: "Manage your assigned orders",
252
- purpose: "Every task assigned to you, with today's progress and earnings up top. Filter by status, open a task to get directions and customer details, and work the queue to keep deliveries and services on time.",
253
- children: /* @__PURE__ */ T("div", {
254
- className: "space-y-6",
255
- children: [
256
- /* @__PURE__ */ w(E, { children: /* @__PURE__ */ T("div", {
257
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
258
- children: [
259
- /* @__PURE__ */ T("div", {
260
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
261
- children: [/* @__PURE__ */ w("p", {
262
- className: "text-xs text-text-secondary",
263
- children: "Today's Tasks"
264
- }), /* @__PURE__ */ w("p", {
265
- className: "text-2xl font-bold text-text-primary",
266
- children: I.totalTasks
267
- })]
268
- }),
269
- /* @__PURE__ */ T("div", {
270
- className: "rounded-lg border border-status-success-border/20 bg-status-success-bg-subtle/5 p-4 shadow-sm",
271
- children: [/* @__PURE__ */ w("p", {
272
- className: "text-xs text-status-success-text",
273
- children: "Completed"
274
- }), /* @__PURE__ */ w("p", {
275
- className: "text-2xl font-bold text-status-success-text",
276
- children: I.completedToday
277
- })]
278
- }),
279
- /* @__PURE__ */ T("div", {
280
- className: "rounded-lg border border-status-warning-border/20 bg-status-warning-bg-subtle/5 p-4 shadow-sm",
281
- children: [/* @__PURE__ */ w("p", {
282
- className: "text-xs text-status-warning-text",
283
- children: "Pending"
284
- }), /* @__PURE__ */ w("p", {
285
- className: "text-2xl font-bold text-status-warning-text",
286
- children: I.pendingTasks
287
- })]
288
- }),
289
- /* @__PURE__ */ T("div", {
290
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
291
- children: [/* @__PURE__ */ w("p", {
292
- className: "text-xs text-text-secondary",
293
- children: "Avg Time"
294
- }), /* @__PURE__ */ T("p", {
295
- className: "text-2xl font-bold text-text-primary",
296
- children: [I.averageTime, " min"]
297
- })]
298
- }),
299
- /* @__PURE__ */ T("div", {
300
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
301
- children: [/* @__PURE__ */ w("p", {
302
- className: "text-xs text-text-secondary",
303
- children: "Today's Earnings"
304
- }), /* @__PURE__ */ w("p", {
305
- className: "text-2xl font-bold text-text-primary",
306
- children: a(I.earnings, { minimumFractionDigits: 0 })
307
- })]
308
- }),
309
- /* @__PURE__ */ T("div", {
310
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
311
- children: [/* @__PURE__ */ w("p", {
312
- className: "text-xs text-text-secondary",
313
- children: "Rating"
314
- }), /* @__PURE__ */ T("p", {
315
- className: "text-2xl font-bold text-text-primary flex items-center gap-1",
316
- children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), I.rating]
317
- })]
318
- })
319
- ]
320
- }) }),
321
- M && /* @__PURE__ */ T("div", {
322
- className: "rounded-lg border-2 border-accent-blue-subtle/30 bg-accent-blue-subtle/5 p-5",
323
- children: [/* @__PURE__ */ w("h2", {
324
- className: "text-base font-semibold text-accent-blue mb-4",
325
- children: "Current Task"
326
- }), /* @__PURE__ */ T("div", {
327
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
328
- children: [/* @__PURE__ */ T("div", {
329
- className: "flex items-center justify-between mb-4",
330
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
331
- className: "flex items-center gap-2 flex-wrap",
332
- children: [
333
- /* @__PURE__ */ T("h3", {
334
- className: "text-sm font-semibold text-text-primary",
335
- children: ["Order #", M.orderId]
336
- }),
337
- (() => {
338
- let e = k(M.type), n = e.icon;
339
- return /* @__PURE__ */ T("span", {
340
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", e.style),
341
- children: [/* @__PURE__ */ w(n, { className: "h-3 w-3" }), e.label]
342
- });
343
- })(),
344
- /* @__PURE__ */ w("span", {
345
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", A(M.priority)),
346
- children: M.priority
347
- })
348
- ]
349
- }), /* @__PURE__ */ w("p", {
350
- className: "text-xs text-text-secondary mt-1",
351
- children: M.cartName
352
- })] }), /* @__PURE__ */ T("div", {
353
- className: "text-right",
354
- children: [/* @__PURE__ */ w("p", {
355
- className: "text-xl font-bold text-accent-blue",
356
- children: O(M.estimatedTime)
357
- }), /* @__PURE__ */ w("p", {
358
- className: "text-xs text-text-secondary",
359
- children: "Time remaining"
360
- })]
361
- })]
362
- }), /* @__PURE__ */ T("div", {
363
- className: "border-t border-border-subtle pt-4",
364
- children: [
365
- /* @__PURE__ */ T("div", {
366
- className: "grid grid-cols-1 md:grid-cols-2 gap-4",
367
- children: [/* @__PURE__ */ T("div", { children: [
368
- /* @__PURE__ */ w("p", {
369
- className: "text-xs font-medium text-text-secondary",
370
- children: "Customer"
371
- }),
372
- /* @__PURE__ */ w("p", {
373
- className: "text-sm font-medium text-text-primary",
374
- children: M.customerName
375
- }),
376
- M.address && /* @__PURE__ */ T("p", {
377
- className: "text-xs text-text-secondary mt-1",
378
- children: [
379
- M.address.addressLine1,
380
- ", ",
381
- M.address.city
382
- ]
383
- })
384
- ] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
385
- className: "text-xs font-medium text-text-secondary",
386
- children: "Items"
387
- }), /* @__PURE__ */ w("div", {
388
- className: "space-y-0.5",
389
- children: M.items.map((e, t) => /* @__PURE__ */ T("p", {
390
- className: "text-xs text-text-primary",
391
- children: [
392
- e.quantity,
393
- "x ",
394
- e.name
395
- ]
396
- }, t))
397
- })] })]
398
- }),
399
- M.specialInstructions && /* @__PURE__ */ T("div", {
400
- className: "mt-3 p-3 rounded-md bg-status-warning-bg-subtle/10 border border-status-warning-border/20",
401
- children: [/* @__PURE__ */ T("p", {
402
- className: "text-xs font-medium text-status-warning-text flex items-center gap-1",
403
- children: [/* @__PURE__ */ w(l, { className: "h-3 w-3" }), "Special Instructions:"]
404
- }), /* @__PURE__ */ w("p", {
405
- className: "text-xs text-status-warning-text mt-0.5",
406
- children: M.specialInstructions
407
- })]
408
- }),
409
- /* @__PURE__ */ T("div", {
410
- className: "flex flex-wrap gap-2 mt-4",
411
- children: [
412
- /* @__PURE__ */ T("button", {
413
- type: "button",
414
- onClick: () => U(M.customerPhone),
415
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
416
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call Customer"]
417
- }),
418
- M.type === "delivery" && M.address && /* @__PURE__ */ T("button", {
419
- type: "button",
420
- onClick: () => W(M),
421
- className: "inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-2 text-xs font-medium text-text-primary hover:bg-accent/80 transition-colors",
422
- children: [/* @__PURE__ */ w(_, { className: "h-3.5 w-3.5" }), "Navigate"]
423
- }),
424
- /* @__PURE__ */ T("button", {
425
- type: "button",
426
- onClick: () => H(M.id),
427
- className: "ml-auto inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
428
- children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete Task"]
429
- })
430
- ]
431
- })
432
- ]
433
- })]
434
- })]
435
- }),
436
- /* @__PURE__ */ w("div", {
437
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
438
- children: /* @__PURE__ */ T("div", {
439
- className: "grid grid-cols-1 md:grid-cols-4 gap-3",
440
- children: [
441
- /* @__PURE__ */ T("select", {
442
- value: P.status,
443
- onChange: (e) => B("status", e.target.value),
444
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40",
445
- children: [
446
- /* @__PURE__ */ w("option", {
447
- value: "",
448
- children: "All Tasks"
449
- }),
450
- /* @__PURE__ */ w("option", {
451
- value: "pending",
452
- children: "Pending Tasks"
453
- }),
454
- /* @__PURE__ */ w("option", {
455
- value: "in_progress",
456
- children: "In Progress"
457
- }),
458
- /* @__PURE__ */ w("option", {
459
- value: "completed",
460
- children: "Completed"
461
- })
462
- ]
463
- }),
464
- /* @__PURE__ */ T("select", {
465
- value: P.type,
466
- onChange: (e) => B("type", e.target.value),
467
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40",
468
- children: [
469
- /* @__PURE__ */ w("option", {
470
- value: "",
471
- children: "All Types"
472
- }),
473
- /* @__PURE__ */ w("option", {
474
- value: "delivery",
475
- children: "Delivery"
476
- }),
477
- /* @__PURE__ */ w("option", {
478
- value: "pickup",
479
- children: "Pickup"
480
- }),
481
- /* @__PURE__ */ w("option", {
482
- value: "preparation",
483
- children: "Preparation"
484
- })
485
- ]
486
- }),
487
- /* @__PURE__ */ T("select", {
488
- value: P.priority,
489
- onChange: (e) => B("priority", e.target.value),
490
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40",
491
- children: [
492
- /* @__PURE__ */ w("option", {
493
- value: "",
494
- children: "All Priorities"
495
- }),
496
- /* @__PURE__ */ w("option", {
497
- value: "urgent",
498
- children: "Urgent"
499
- }),
500
- /* @__PURE__ */ w("option", {
501
- value: "high",
502
- children: "High"
503
- }),
504
- /* @__PURE__ */ w("option", {
505
- value: "medium",
506
- children: "Medium"
507
- }),
508
- /* @__PURE__ */ w("option", {
509
- value: "low",
510
- children: "Low"
511
- })
512
- ]
513
- }),
514
- /* @__PURE__ */ T("select", {
515
- value: P.sortBy,
516
- onChange: (e) => B("sortBy", e.target.value),
517
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-blue-subtle/40",
518
- children: [
519
- /* @__PURE__ */ w("option", {
520
- value: "priority",
521
- children: "Sort by Priority"
522
- }),
523
- /* @__PURE__ */ w("option", {
524
- value: "time",
525
- children: "Sort by Time"
526
- }),
527
- /* @__PURE__ */ w("option", {
528
- value: "distance",
529
- children: "Sort by Distance"
530
- })
531
- ]
532
- })
533
- ]
534
- })
535
- }),
536
- C.length === 0 ? /* @__PURE__ */ w(i, {
537
- illustration: "empty-data",
538
- icon: /* @__PURE__ */ w(p, { className: "h-12 w-12" }),
539
- title: "No tasks available",
540
- description: "Check back later for new tasks"
541
- }) : /* @__PURE__ */ w("div", {
542
- className: "space-y-3",
543
- children: C.map((e) => {
544
- let n = k(e.type), i = n.icon;
545
- return /* @__PURE__ */ T("div", {
546
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 hover:shadow-md transition-shadow bg-gloss-card shadow-pop",
547
- children: [
548
- /* @__PURE__ */ T("div", {
549
- className: "flex items-center justify-between mb-3",
550
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
551
- className: "flex items-center gap-2 flex-wrap",
552
- children: [
553
- /* @__PURE__ */ T("h3", {
554
- className: "text-sm font-semibold text-text-primary",
555
- children: ["Order #", e.orderId]
556
- }),
557
- /* @__PURE__ */ T("span", {
558
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", n.style),
559
- children: [/* @__PURE__ */ w(i, { className: "h-3 w-3" }), n.label]
560
- }),
561
- /* @__PURE__ */ w("span", {
562
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", A(e.priority)),
563
- children: e.priority
564
- })
565
- ]
566
- }), /* @__PURE__ */ T("p", {
567
- className: "text-xs text-text-secondary mt-1",
568
- children: [
569
- e.cartName,
570
- " · ",
571
- e.customerName
572
- ]
573
- })] }), /* @__PURE__ */ T("div", {
574
- className: "text-right",
575
- children: [/* @__PURE__ */ w("p", {
576
- className: "text-lg font-bold text-text-primary",
577
- children: a(e.payment.amount, { minimumFractionDigits: 0 })
578
- }), /* @__PURE__ */ w("p", {
579
- className: t("text-xs", e.payment.status === "completed" ? "text-status-success-text" : "text-status-warning-text"),
580
- children: /* @__PURE__ */ T("span", {
581
- className: "flex items-center gap-1 justify-end",
582
- children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }), e.payment.status === "completed" ? "Paid" : "COD"]
583
- })
584
- })]
585
- })]
586
- }),
587
- /* @__PURE__ */ T("div", {
588
- className: "grid grid-cols-1 md:grid-cols-3 gap-3 mb-3 text-sm",
589
- children: [
590
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
591
- className: "text-xs text-text-secondary",
592
- children: "Items"
593
- }), /* @__PURE__ */ w("div", {
594
- className: "text-xs text-text-primary",
595
- children: e.items.map((t, n) => /* @__PURE__ */ T("span", { children: [
596
- t.quantity,
597
- "x ",
598
- t.name,
599
- n < e.items.length - 1 && ", "
600
- ] }, n))
601
- })] }),
602
- e.address && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
603
- className: "text-xs text-text-secondary",
604
- children: "Delivery Address"
605
- }), /* @__PURE__ */ w("p", {
606
- className: "text-xs text-text-primary",
607
- children: e.address.addressLine1
608
- })] }),
609
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
610
- className: "text-xs text-text-secondary",
611
- children: "Time"
612
- }), /* @__PURE__ */ w("p", {
613
- className: t("text-xs font-medium", O(e.estimatedTime) === "Overdue" ? "text-status-error-text" : "text-text-primary"),
614
- children: O(e.estimatedTime)
615
- })] })
616
- ]
617
- }),
618
- e.status === "pending" && /* @__PURE__ */ T("div", {
619
- className: "flex items-center flex-wrap gap-2 border-t border-border-subtle pt-3",
620
- children: [
621
- /* @__PURE__ */ T("button", {
622
- type: "button",
623
- onClick: () => V(e.id),
624
- disabled: M !== null,
625
- className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", M === null ? "bg-accent-blue-subtle/10 text-accent-blue hover:bg-accent-blue-subtle/20" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
626
- children: [/* @__PURE__ */ w(b, { className: "h-3.5 w-3.5" }), M ? "Complete current first" : "Start Task"]
627
- }),
628
- /* @__PURE__ */ T("button", {
629
- type: "button",
630
- onClick: () => U(e.customerPhone),
631
- 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",
632
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call"]
633
- }),
634
- e.type === "delivery" && e.distance != null && /* @__PURE__ */ T("span", {
635
- className: "ml-auto text-xs text-text-secondary flex items-center gap-1",
636
- children: [
637
- /* @__PURE__ */ w(g, { className: "h-3 w-3" }),
638
- e.distance,
639
- " km away"
640
- ]
641
- })
642
- ]
643
- }),
644
- e.status === "in_progress" && e.id !== M?.id && /* @__PURE__ */ T("div", {
645
- className: "flex items-center gap-2 border-t border-border-subtle pt-3",
646
- children: [/* @__PURE__ */ T("button", {
647
- type: "button",
648
- onClick: () => H(e.id),
649
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle/10 px-3 py-1.5 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle/20 transition-colors",
650
- children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete"]
651
- }), /* @__PURE__ */ T("button", {
652
- type: "button",
653
- onClick: () => f(`/worker/task/${e.id}`),
654
- 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",
655
- children: ["Details", /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" })]
656
- })]
657
- }),
658
- e.status === "completed" && /* @__PURE__ */ T("div", {
659
- className: "flex items-center gap-2 border-t border-border-subtle pt-3",
660
- children: [/* @__PURE__ */ w(r, { status: "completed" }), /* @__PURE__ */ T("button", {
661
- type: "button",
662
- onClick: () => f(`/worker/task/${e.id}`),
663
- className: "ml-auto 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",
664
- children: ["Details", /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" })]
665
- })]
666
- })
667
- ]
668
- }, e.id);
669
- })
670
- })
671
- ]
672
- })
673
- });
674
- };
675
- //#endregion
676
- export { j as WorkerOrdersPage };
677
-
678
- //# sourceMappingURL=WorkerOrdersPage.js.map