@burdenoff/microfe-coolandlovely 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 (165) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoot.js +66 -122
  2. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js +87 -175
  4. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  5. package/dist/coolandlovely/components/Field.js +81 -0
  6. package/dist/coolandlovely/components/Field.js.map +1 -0
  7. package/dist/coolandlovely/components/StateViews.js +34 -0
  8. package/dist/coolandlovely/components/StateViews.js.map +1 -0
  9. package/dist/coolandlovely/components/StatusBadge.js +25 -22
  10. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  11. package/dist/coolandlovely/components/TagList.js +21 -0
  12. package/dist/coolandlovely/components/TagList.js.map +1 -0
  13. package/dist/coolandlovely/components/Thumbnail.js +29 -0
  14. package/dist/coolandlovely/components/Thumbnail.js.map +1 -0
  15. package/dist/coolandlovely/context/CoolAndLovelyContext.js +10 -10
  16. package/dist/coolandlovely/context/CoolAndLovelyContext.js.map +1 -1
  17. package/dist/coolandlovely/hooks/index.js +1 -0
  18. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +462 -169
  19. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  20. package/dist/coolandlovely/pages/HomePage.js +251 -845
  21. package/dist/coolandlovely/pages/HomePage.js.map +1 -1
  22. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +319 -0
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -0
  24. package/dist/coolandlovely/pages/brands/BrandFormPage.js +190 -0
  25. package/dist/coolandlovely/pages/brands/BrandFormPage.js.map +1 -0
  26. package/dist/coolandlovely/pages/brands/BrandsListPage.js +158 -0
  27. package/dist/coolandlovely/pages/brands/BrandsListPage.js.map +1 -0
  28. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +253 -0
  29. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +206 -0
  31. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -0
  32. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +129 -0
  33. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -0
  34. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js +217 -0
  35. package/dist/coolandlovely/pages/collections/CollectionDetailPage.js.map +1 -0
  36. package/dist/coolandlovely/pages/collections/CollectionFormPage.js +217 -0
  37. package/dist/coolandlovely/pages/collections/CollectionFormPage.js.map +1 -0
  38. package/dist/coolandlovely/pages/collections/CollectionsListPage.js +122 -0
  39. package/dist/coolandlovely/pages/collections/CollectionsListPage.js.map +1 -0
  40. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +230 -0
  41. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -0
  42. package/dist/coolandlovely/pages/items/StyleItemFormPage.js +276 -0
  43. package/dist/coolandlovely/pages/items/StyleItemFormPage.js.map +1 -0
  44. package/dist/coolandlovely/pages/items/StyleItemsListPage.js +170 -0
  45. package/dist/coolandlovely/pages/items/StyleItemsListPage.js.map +1 -0
  46. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +124 -0
  47. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -0
  48. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js +156 -0
  49. package/dist/coolandlovely/pages/lookbooks/LookbooksListPage.js.map +1 -0
  50. package/dist/coolandlovely/pages/looks/LookDetailPage.js +238 -0
  51. package/dist/coolandlovely/pages/looks/LookDetailPage.js.map +1 -0
  52. package/dist/coolandlovely/pages/looks/LookFormPage.js +209 -0
  53. package/dist/coolandlovely/pages/looks/LookFormPage.js.map +1 -0
  54. package/dist/coolandlovely/pages/looks/LooksListPage.js +181 -0
  55. package/dist/coolandlovely/pages/looks/LooksListPage.js.map +1 -0
  56. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +224 -0
  57. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -0
  58. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js +173 -0
  59. package/dist/coolandlovely/pages/wardrobe/WardrobeFormPage.js.map +1 -0
  60. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +172 -0
  61. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -0
  62. package/dist/coolandlovely/store/coolandlovelyStore.js +2 -6
  63. package/dist/coolandlovely/store/coolandlovelyStore.js.map +1 -1
  64. package/dist/coolandlovely/utils/formatters.js +31 -23
  65. package/dist/coolandlovely/utils/formatters.js.map +1 -1
  66. package/dist/coolandlovely/utils/icons.js +34 -0
  67. package/dist/coolandlovely/utils/icons.js.map +1 -0
  68. package/dist/index.js +4 -4
  69. package/package.json +1 -1
  70. package/dist/coolandlovely/components/InvestmentCard.js +0 -98
  71. package/dist/coolandlovely/components/InvestmentCard.js.map +0 -1
  72. package/dist/coolandlovely/components/RatingDisplay.js +0 -35
  73. package/dist/coolandlovely/components/RatingDisplay.js.map +0 -1
  74. package/dist/coolandlovely/mocks/data.js +0 -1517
  75. package/dist/coolandlovely/mocks/data.js.map +0 -1
  76. package/dist/coolandlovely/mocks/users.js +0 -34
  77. package/dist/coolandlovely/mocks/users.js.map +0 -1
  78. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js +0 -651
  79. package/dist/coolandlovely/pages/admin/AdminAnalyticsPage.js.map +0 -1
  80. package/dist/coolandlovely/pages/admin/AdminDashboard.js +0 -673
  81. package/dist/coolandlovely/pages/admin/AdminDashboard.js.map +0 -1
  82. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js +0 -427
  83. package/dist/coolandlovely/pages/admin/AdminFinancialPage.js.map +0 -1
  84. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js +0 -665
  85. package/dist/coolandlovely/pages/admin/AdminOrdersPage.js.map +0 -1
  86. package/dist/coolandlovely/pages/admin/AdminProfilePage.js +0 -264
  87. package/dist/coolandlovely/pages/admin/AdminProfilePage.js.map +0 -1
  88. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js +0 -654
  89. package/dist/coolandlovely/pages/admin/AdminSettingsPage.js.map +0 -1
  90. package/dist/coolandlovely/pages/admin/CartManagementPage.js +0 -874
  91. package/dist/coolandlovely/pages/admin/CartManagementPage.js.map +0 -1
  92. package/dist/coolandlovely/pages/admin/UserManagementPage.js +0 -898
  93. package/dist/coolandlovely/pages/admin/UserManagementPage.js.map +0 -1
  94. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js +0 -842
  95. package/dist/coolandlovely/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  96. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js +0 -705
  97. package/dist/coolandlovely/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  98. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js +0 -802
  99. package/dist/coolandlovely/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  100. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  101. package/dist/coolandlovely/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  102. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js +0 -639
  103. package/dist/coolandlovely/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  104. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js +0 -914
  105. package/dist/coolandlovely/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  106. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js +0 -882
  107. package/dist/coolandlovely/pages/cart-owner/OrderManagementPage.js.map +0 -1
  108. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js +0 -831
  109. package/dist/coolandlovely/pages/cart-owner/StaffManagementPage.js.map +0 -1
  110. package/dist/coolandlovely/pages/common/HelpSupportPage.js +0 -1325
  111. package/dist/coolandlovely/pages/common/HelpSupportPage.js.map +0 -1
  112. package/dist/coolandlovely/pages/common/NotificationCenterPage.js +0 -671
  113. package/dist/coolandlovely/pages/common/NotificationCenterPage.js.map +0 -1
  114. package/dist/coolandlovely/pages/common/SettingsPage.js +0 -973
  115. package/dist/coolandlovely/pages/common/SettingsPage.js.map +0 -1
  116. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js +0 -630
  117. package/dist/coolandlovely/pages/customer/BookingDetailsPage.js.map +0 -1
  118. package/dist/coolandlovely/pages/customer/CartDetailPage.js +0 -623
  119. package/dist/coolandlovely/pages/customer/CartDetailPage.js.map +0 -1
  120. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js +0 -558
  121. package/dist/coolandlovely/pages/customer/CartDiscoveryPage.js.map +0 -1
  122. package/dist/coolandlovely/pages/customer/CheckoutPage.js +0 -529
  123. package/dist/coolandlovely/pages/customer/CheckoutPage.js.map +0 -1
  124. package/dist/coolandlovely/pages/customer/CustomerDashboard.js +0 -538
  125. package/dist/coolandlovely/pages/customer/CustomerDashboard.js.map +0 -1
  126. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js +0 -658
  127. package/dist/coolandlovely/pages/customer/CustomerProfilePage.js.map +0 -1
  128. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js +0 -632
  129. package/dist/coolandlovely/pages/customer/DirectServiceBookingPage.js.map +0 -1
  130. package/dist/coolandlovely/pages/customer/FavoritesPage.js +0 -487
  131. package/dist/coolandlovely/pages/customer/FavoritesPage.js.map +0 -1
  132. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js +0 -447
  133. package/dist/coolandlovely/pages/customer/OrderHistoryPage.js.map +0 -1
  134. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js +0 -425
  135. package/dist/coolandlovely/pages/customer/OrderTrackingPage.js.map +0 -1
  136. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js +0 -494
  137. package/dist/coolandlovely/pages/customer/PaymentMethodsPage.js.map +0 -1
  138. package/dist/coolandlovely/pages/customer/ReviewsPage.js +0 -616
  139. package/dist/coolandlovely/pages/customer/ReviewsPage.js.map +0 -1
  140. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js +0 -449
  141. package/dist/coolandlovely/pages/customer/SavedAddressesPage.js.map +0 -1
  142. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js +0 -887
  143. package/dist/coolandlovely/pages/investor/InvestmentDetailsPage.js.map +0 -1
  144. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  145. package/dist/coolandlovely/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  146. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js +0 -687
  147. package/dist/coolandlovely/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  148. package/dist/coolandlovely/pages/investor/InvestorDashboard.js +0 -455
  149. package/dist/coolandlovely/pages/investor/InvestorDashboard.js.map +0 -1
  150. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js +0 -405
  151. package/dist/coolandlovely/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  152. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js +0 -602
  153. package/dist/coolandlovely/pages/investor/InvestorPortfolioPage.js.map +0 -1
  154. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js +0 -1070
  155. package/dist/coolandlovely/pages/investor/InvestorProfilePage.js.map +0 -1
  156. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js +0 -533
  157. package/dist/coolandlovely/pages/worker/TaskDetailsPage.js.map +0 -1
  158. package/dist/coolandlovely/pages/worker/WorkerDashboard.js +0 -671
  159. package/dist/coolandlovely/pages/worker/WorkerDashboard.js.map +0 -1
  160. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js +0 -680
  161. package/dist/coolandlovely/pages/worker/WorkerOrdersPage.js.map +0 -1
  162. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js +0 -692
  163. package/dist/coolandlovely/pages/worker/WorkerProfilePage.js.map +0 -1
  164. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js +0 -583
  165. package/dist/coolandlovely/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,680 +0,0 @@
1
- import { useCoolAndLovely as e } from "../../context/CoolAndLovelyContext.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, PagePurpose as D } from "@burdenoff/fe-libs/ui";
11
- //#region src/coolandlovely/pages/worker/WorkerOrdersPage.tsx
12
- var O = [
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 k(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 A(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 j(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 M = () => {
166
- let { navigateTo: f } = e(), [v, x] = c(!0), [C, M] = c([]), [N, P] = c(null), [F, I] = c({
167
- status: "",
168
- type: "",
169
- priority: "",
170
- sortBy: "priority"
171
- }), [L, R] = c({
172
- totalTasks: 0,
173
- completedToday: 0,
174
- pendingTasks: 0,
175
- averageTime: 0,
176
- earnings: 0,
177
- rating: 4.8
178
- }), [, z] = c(0);
179
- s(() => {
180
- let e = setInterval(() => z((e) => e + 1), 6e4);
181
- return () => clearInterval(e);
182
- }, []);
183
- let B = o(() => {
184
- x(!0), setTimeout(() => {
185
- let e = [...O];
186
- F.status && (e = e.filter((e) => e.status === F.status)), F.type && (e = e.filter((e) => e.type === F.type)), F.priority && (e = e.filter((e) => e.priority === F.priority));
187
- let t = {
188
- urgent: 0,
189
- high: 1,
190
- medium: 2,
191
- low: 3
192
- };
193
- switch (F.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
- M(e), P(O.find((e) => e.status === "in_progress") ?? null), R({
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
- }, [F]);
214
- s(() => {
215
- B();
216
- }, [B]);
217
- let V = (e, t) => {
218
- I((n) => ({
219
- ...n,
220
- [e]: t
221
- }));
222
- }, H = (e) => {
223
- let t = O.find((t) => t.id === e);
224
- t && (t.status = "in_progress", P(t), B());
225
- }, U = (e) => {
226
- let t = O.find((t) => t.id === e);
227
- t && (t.status = "completed"), P(null), B(), alert("Task completed successfully");
228
- }, W = (e) => {
229
- window.location.href = `tel:${e.replace(/\s/g, "")}`;
230
- }, G = (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__ */ T(n, {
250
- title: "My Orders",
251
- description: "Manage your assigned orders",
252
- children: [/* @__PURE__ */ w(D, {
253
- className: "mb-6",
254
- icon: /* @__PURE__ */ w(p, { className: "h-4 w-4" }),
255
- children: "Every order and task assigned to you, with the active one front and centre. Start, update and complete tasks as you work through them, filter to find a specific job, and watch today's completion count and earnings climb as you go."
256
- }), /* @__PURE__ */ T("div", {
257
- className: "space-y-6",
258
- children: [
259
- /* @__PURE__ */ T(E, {
260
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 p-4",
261
- children: [
262
- /* @__PURE__ */ T("div", {
263
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
264
- children: [/* @__PURE__ */ w("p", {
265
- className: "text-xs text-text-secondary",
266
- children: "Today's Tasks"
267
- }), /* @__PURE__ */ w("p", {
268
- className: "text-2xl font-bold text-text-primary",
269
- children: L.totalTasks
270
- })]
271
- }),
272
- /* @__PURE__ */ T("div", {
273
- className: "rounded-lg border border-status-success-border/20 bg-status-success-bg-subtle/5 p-4 shadow-sm",
274
- children: [/* @__PURE__ */ w("p", {
275
- className: "text-xs text-status-success-text",
276
- children: "Completed"
277
- }), /* @__PURE__ */ w("p", {
278
- className: "text-2xl font-bold text-status-success-text",
279
- children: L.completedToday
280
- })]
281
- }),
282
- /* @__PURE__ */ T("div", {
283
- className: "rounded-lg border border-status-warning-border/20 bg-status-warning-bg-subtle/5 p-4 shadow-sm",
284
- children: [/* @__PURE__ */ w("p", {
285
- className: "text-xs text-status-warning-text",
286
- children: "Pending"
287
- }), /* @__PURE__ */ w("p", {
288
- className: "text-2xl font-bold text-status-warning-text",
289
- children: L.pendingTasks
290
- })]
291
- }),
292
- /* @__PURE__ */ T("div", {
293
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
294
- children: [/* @__PURE__ */ w("p", {
295
- className: "text-xs text-text-secondary",
296
- children: "Avg Time"
297
- }), /* @__PURE__ */ T("p", {
298
- className: "text-2xl font-bold text-text-primary",
299
- children: [L.averageTime, " min"]
300
- })]
301
- }),
302
- /* @__PURE__ */ T("div", {
303
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
304
- children: [/* @__PURE__ */ w("p", {
305
- className: "text-xs text-text-secondary",
306
- children: "Today's Earnings"
307
- }), /* @__PURE__ */ w("p", {
308
- className: "text-2xl font-bold text-text-primary",
309
- children: a(L.earnings, { minimumFractionDigits: 0 })
310
- })]
311
- }),
312
- /* @__PURE__ */ T("div", {
313
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
314
- children: [/* @__PURE__ */ w("p", {
315
- className: "text-xs text-text-secondary",
316
- children: "Rating"
317
- }), /* @__PURE__ */ T("p", {
318
- className: "text-2xl font-bold text-text-primary flex items-center gap-1",
319
- children: [/* @__PURE__ */ w(S, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), L.rating]
320
- })]
321
- })
322
- ]
323
- }),
324
- N && /* @__PURE__ */ T("div", {
325
- className: "rounded-lg border-2 border-accent-blue-subtle/30 bg-accent-blue-subtle/5 p-5",
326
- children: [/* @__PURE__ */ w("h2", {
327
- className: "text-base font-semibold text-accent-blue mb-4",
328
- children: "Current Task"
329
- }), /* @__PURE__ */ T("div", {
330
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
331
- children: [/* @__PURE__ */ T("div", {
332
- className: "flex items-center justify-between mb-4",
333
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
334
- className: "flex items-center gap-2 flex-wrap",
335
- children: [
336
- /* @__PURE__ */ T("h3", {
337
- className: "text-sm font-semibold text-text-primary",
338
- children: ["Order #", N.orderId]
339
- }),
340
- (() => {
341
- let e = A(N.type), n = e.icon;
342
- return /* @__PURE__ */ T("span", {
343
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", e.style),
344
- children: [/* @__PURE__ */ w(n, { className: "h-3 w-3" }), e.label]
345
- });
346
- })(),
347
- /* @__PURE__ */ w("span", {
348
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(N.priority)),
349
- children: N.priority
350
- })
351
- ]
352
- }), /* @__PURE__ */ w("p", {
353
- className: "text-xs text-text-secondary mt-1",
354
- children: N.cartName
355
- })] }), /* @__PURE__ */ T("div", {
356
- className: "text-right",
357
- children: [/* @__PURE__ */ w("p", {
358
- className: "text-xl font-bold text-accent-blue",
359
- children: k(N.estimatedTime)
360
- }), /* @__PURE__ */ w("p", {
361
- className: "text-xs text-text-secondary",
362
- children: "Time remaining"
363
- })]
364
- })]
365
- }), /* @__PURE__ */ T("div", {
366
- className: "border-t border-border-subtle pt-4",
367
- children: [
368
- /* @__PURE__ */ T("div", {
369
- className: "grid grid-cols-1 md:grid-cols-2 gap-4",
370
- children: [/* @__PURE__ */ T("div", { children: [
371
- /* @__PURE__ */ w("p", {
372
- className: "text-xs font-medium text-text-secondary",
373
- children: "Customer"
374
- }),
375
- /* @__PURE__ */ w("p", {
376
- className: "text-sm font-medium text-text-primary",
377
- children: N.customerName
378
- }),
379
- N.address && /* @__PURE__ */ T("p", {
380
- className: "text-xs text-text-secondary mt-1",
381
- children: [
382
- N.address.addressLine1,
383
- ", ",
384
- N.address.city
385
- ]
386
- })
387
- ] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
388
- className: "text-xs font-medium text-text-secondary",
389
- children: "Items"
390
- }), /* @__PURE__ */ w("div", {
391
- className: "space-y-0.5",
392
- children: N.items.map((e, t) => /* @__PURE__ */ T("p", {
393
- className: "text-xs text-text-primary",
394
- children: [
395
- e.quantity,
396
- "x ",
397
- e.name
398
- ]
399
- }, t))
400
- })] })]
401
- }),
402
- N.specialInstructions && /* @__PURE__ */ T("div", {
403
- className: "mt-3 p-3 rounded-md bg-status-warning-bg-subtle/10 border border-status-warning-border/20",
404
- children: [/* @__PURE__ */ T("p", {
405
- className: "text-xs font-medium text-status-warning-text flex items-center gap-1",
406
- children: [/* @__PURE__ */ w(l, { className: "h-3 w-3" }), "Special Instructions:"]
407
- }), /* @__PURE__ */ w("p", {
408
- className: "text-xs text-status-warning-text mt-0.5",
409
- children: N.specialInstructions
410
- })]
411
- }),
412
- /* @__PURE__ */ T("div", {
413
- className: "flex flex-wrap gap-2 mt-4",
414
- children: [
415
- /* @__PURE__ */ T("button", {
416
- type: "button",
417
- onClick: () => W(N.customerPhone),
418
- 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",
419
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call Customer"]
420
- }),
421
- N.type === "delivery" && N.address && /* @__PURE__ */ T("button", {
422
- type: "button",
423
- onClick: () => G(N),
424
- 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",
425
- children: [/* @__PURE__ */ w(_, { className: "h-3.5 w-3.5" }), "Navigate"]
426
- }),
427
- /* @__PURE__ */ T("button", {
428
- type: "button",
429
- onClick: () => U(N.id),
430
- 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",
431
- children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete Task"]
432
- })
433
- ]
434
- })
435
- ]
436
- })]
437
- })]
438
- }),
439
- /* @__PURE__ */ w("div", {
440
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 bg-gloss-card shadow-pop",
441
- children: /* @__PURE__ */ T("div", {
442
- className: "grid grid-cols-1 md:grid-cols-4 gap-3",
443
- children: [
444
- /* @__PURE__ */ T("select", {
445
- value: F.status,
446
- onChange: (e) => V("status", e.target.value),
447
- 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",
448
- children: [
449
- /* @__PURE__ */ w("option", {
450
- value: "",
451
- children: "All Tasks"
452
- }),
453
- /* @__PURE__ */ w("option", {
454
- value: "pending",
455
- children: "Pending Tasks"
456
- }),
457
- /* @__PURE__ */ w("option", {
458
- value: "in_progress",
459
- children: "In Progress"
460
- }),
461
- /* @__PURE__ */ w("option", {
462
- value: "completed",
463
- children: "Completed"
464
- })
465
- ]
466
- }),
467
- /* @__PURE__ */ T("select", {
468
- value: F.type,
469
- onChange: (e) => V("type", e.target.value),
470
- 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",
471
- children: [
472
- /* @__PURE__ */ w("option", {
473
- value: "",
474
- children: "All Types"
475
- }),
476
- /* @__PURE__ */ w("option", {
477
- value: "delivery",
478
- children: "Delivery"
479
- }),
480
- /* @__PURE__ */ w("option", {
481
- value: "pickup",
482
- children: "Pickup"
483
- }),
484
- /* @__PURE__ */ w("option", {
485
- value: "preparation",
486
- children: "Preparation"
487
- })
488
- ]
489
- }),
490
- /* @__PURE__ */ T("select", {
491
- value: F.priority,
492
- onChange: (e) => V("priority", e.target.value),
493
- 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",
494
- children: [
495
- /* @__PURE__ */ w("option", {
496
- value: "",
497
- children: "All Priorities"
498
- }),
499
- /* @__PURE__ */ w("option", {
500
- value: "urgent",
501
- children: "Urgent"
502
- }),
503
- /* @__PURE__ */ w("option", {
504
- value: "high",
505
- children: "High"
506
- }),
507
- /* @__PURE__ */ w("option", {
508
- value: "medium",
509
- children: "Medium"
510
- }),
511
- /* @__PURE__ */ w("option", {
512
- value: "low",
513
- children: "Low"
514
- })
515
- ]
516
- }),
517
- /* @__PURE__ */ T("select", {
518
- value: F.sortBy,
519
- onChange: (e) => V("sortBy", e.target.value),
520
- 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",
521
- children: [
522
- /* @__PURE__ */ w("option", {
523
- value: "priority",
524
- children: "Sort by Priority"
525
- }),
526
- /* @__PURE__ */ w("option", {
527
- value: "time",
528
- children: "Sort by Time"
529
- }),
530
- /* @__PURE__ */ w("option", {
531
- value: "distance",
532
- children: "Sort by Distance"
533
- })
534
- ]
535
- })
536
- ]
537
- })
538
- }),
539
- C.length === 0 ? /* @__PURE__ */ w(i, {
540
- illustration: "empty-sessions",
541
- title: "No tasks available",
542
- description: "Check back later for new tasks"
543
- }) : /* @__PURE__ */ w("div", {
544
- className: "space-y-3",
545
- children: C.map((e) => {
546
- let n = A(e.type), i = n.icon;
547
- return /* @__PURE__ */ T("div", {
548
- className: "rounded-lg border border-border-seam bg-bg-surface p-5 hover:shadow-md transition-shadow bg-gloss-card shadow-pop",
549
- children: [
550
- /* @__PURE__ */ T("div", {
551
- className: "flex items-center justify-between mb-3",
552
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("div", {
553
- className: "flex items-center gap-2 flex-wrap",
554
- children: [
555
- /* @__PURE__ */ T("h3", {
556
- className: "text-sm font-semibold text-text-primary",
557
- children: ["Order #", e.orderId]
558
- }),
559
- /* @__PURE__ */ T("span", {
560
- className: t("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium", n.style),
561
- children: [/* @__PURE__ */ w(i, { className: "h-3 w-3" }), n.label]
562
- }),
563
- /* @__PURE__ */ w("span", {
564
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", j(e.priority)),
565
- children: e.priority
566
- })
567
- ]
568
- }), /* @__PURE__ */ T("p", {
569
- className: "text-xs text-text-secondary mt-1",
570
- children: [
571
- e.cartName,
572
- " · ",
573
- e.customerName
574
- ]
575
- })] }), /* @__PURE__ */ T("div", {
576
- className: "text-right",
577
- children: [/* @__PURE__ */ w("p", {
578
- className: "text-lg font-bold text-text-primary",
579
- children: a(e.payment.amount, { minimumFractionDigits: 0 })
580
- }), /* @__PURE__ */ w("p", {
581
- className: t("text-xs", e.payment.status === "completed" ? "text-status-success-text" : "text-status-warning-text"),
582
- children: /* @__PURE__ */ T("span", {
583
- className: "flex items-center gap-1 justify-end",
584
- children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }), e.payment.status === "completed" ? "Paid" : "COD"]
585
- })
586
- })]
587
- })]
588
- }),
589
- /* @__PURE__ */ T("div", {
590
- className: "grid grid-cols-1 md:grid-cols-3 gap-3 mb-3 text-sm",
591
- children: [
592
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
593
- className: "text-xs text-text-secondary",
594
- children: "Items"
595
- }), /* @__PURE__ */ w("div", {
596
- className: "text-xs text-text-primary",
597
- children: e.items.map((t, n) => /* @__PURE__ */ T("span", { children: [
598
- t.quantity,
599
- "x ",
600
- t.name,
601
- n < e.items.length - 1 && ", "
602
- ] }, n))
603
- })] }),
604
- e.address && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
605
- className: "text-xs text-text-secondary",
606
- children: "Delivery Address"
607
- }), /* @__PURE__ */ w("p", {
608
- className: "text-xs text-text-primary",
609
- children: e.address.addressLine1
610
- })] }),
611
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
612
- className: "text-xs text-text-secondary",
613
- children: "Time"
614
- }), /* @__PURE__ */ w("p", {
615
- className: t("text-xs font-medium", k(e.estimatedTime) === "Overdue" ? "text-status-error-text" : "text-text-primary"),
616
- children: k(e.estimatedTime)
617
- })] })
618
- ]
619
- }),
620
- e.status === "pending" && /* @__PURE__ */ T("div", {
621
- className: "flex items-center flex-wrap gap-2 border-t border-border-subtle pt-3",
622
- children: [
623
- /* @__PURE__ */ T("button", {
624
- type: "button",
625
- onClick: () => H(e.id),
626
- disabled: N !== null,
627
- className: t("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors", N === null ? "bg-accent-blue-subtle/10 text-accent-blue hover:bg-accent-blue-subtle/20" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
628
- children: [/* @__PURE__ */ w(b, { className: "h-3.5 w-3.5" }), N ? "Complete current first" : "Start Task"]
629
- }),
630
- /* @__PURE__ */ T("button", {
631
- type: "button",
632
- onClick: () => W(e.customerPhone),
633
- 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",
634
- children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Call"]
635
- }),
636
- e.type === "delivery" && e.distance != null && /* @__PURE__ */ T("span", {
637
- className: "ml-auto text-xs text-text-secondary flex items-center gap-1",
638
- children: [
639
- /* @__PURE__ */ w(g, { className: "h-3 w-3" }),
640
- e.distance,
641
- " km away"
642
- ]
643
- })
644
- ]
645
- }),
646
- e.status === "in_progress" && e.id !== N?.id && /* @__PURE__ */ T("div", {
647
- className: "flex items-center gap-2 border-t border-border-subtle pt-3",
648
- children: [/* @__PURE__ */ T("button", {
649
- type: "button",
650
- onClick: () => U(e.id),
651
- 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",
652
- children: [/* @__PURE__ */ w(d, { className: "h-3.5 w-3.5" }), "Complete"]
653
- }), /* @__PURE__ */ T("button", {
654
- type: "button",
655
- onClick: () => f(`/worker/task/${e.id}`),
656
- 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",
657
- children: ["Details", /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" })]
658
- })]
659
- }),
660
- e.status === "completed" && /* @__PURE__ */ T("div", {
661
- className: "flex items-center gap-2 border-t border-border-subtle pt-3",
662
- children: [/* @__PURE__ */ w(r, { status: "completed" }), /* @__PURE__ */ T("button", {
663
- type: "button",
664
- onClick: () => f(`/worker/task/${e.id}`),
665
- 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",
666
- children: ["Details", /* @__PURE__ */ w(u, { className: "h-3.5 w-3.5" })]
667
- })]
668
- })
669
- ]
670
- }, e.id);
671
- })
672
- })
673
- ]
674
- })]
675
- });
676
- };
677
- //#endregion
678
- export { M as WorkerOrdersPage };
679
-
680
- //# sourceMappingURL=WorkerOrdersPage.js.map