@burdenoff/microfe-adaptercloud 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.
- package/dist/adaptercloud/components/PageLayout.js +24 -17
- package/dist/adaptercloud/components/PageLayout.js.map +1 -1
- package/dist/adaptercloud/pages/HomePage.js +18 -16
- package/dist/adaptercloud/pages/HomePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js +90 -82
- package/dist/adaptercloud/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminDashboard.js +70 -44
- package/dist/adaptercloud/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js +60 -55
- package/dist/adaptercloud/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js +97 -92
- package/dist/adaptercloud/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js +59 -57
- package/dist/adaptercloud/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js +118 -104
- package/dist/adaptercloud/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/CartManagementPage.js +145 -140
- package/dist/adaptercloud/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/admin/UserManagementPage.js +152 -147
- package/dist/adaptercloud/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js +87 -81
- package/dist/adaptercloud/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js +179 -165
- package/dist/adaptercloud/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js +73 -48
- package/dist/adaptercloud/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js +95 -93
- package/dist/adaptercloud/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js +110 -107
- package/dist/adaptercloud/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js +293 -299
- package/dist/adaptercloud/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js +218 -224
- package/dist/adaptercloud/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js +122 -128
- package/dist/adaptercloud/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/HelpSupportPage.js +248 -244
- package/dist/adaptercloud/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js +96 -91
- package/dist/adaptercloud/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/adaptercloud/pages/common/SettingsPage.js +754 -736
- package/dist/adaptercloud/pages/common/SettingsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDetailPage.js +110 -108
- package/dist/adaptercloud/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js +221 -217
- package/dist/adaptercloud/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CheckoutPage.js +89 -87
- package/dist/adaptercloud/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js +410 -381
- package/dist/adaptercloud/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js +120 -118
- package/dist/adaptercloud/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js +86 -81
- package/dist/adaptercloud/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/FavoritesPage.js +53 -51
- package/dist/adaptercloud/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js +114 -109
- package/dist/adaptercloud/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js +60 -58
- package/dist/adaptercloud/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js +87 -72
- package/dist/adaptercloud/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/ReviewsPage.js +65 -63
- package/dist/adaptercloud/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js +68 -53
- package/dist/adaptercloud/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js +63 -61
- package/dist/adaptercloud/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js +86 -84
- package/dist/adaptercloud/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js +57 -55
- package/dist/adaptercloud/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js +341 -308
- package/dist/adaptercloud/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js +34 -32
- package/dist/adaptercloud/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js +48 -46
- package/dist/adaptercloud/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js +383 -381
- package/dist/adaptercloud/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js +348 -319
- package/dist/adaptercloud/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js +84 -59
- package/dist/adaptercloud/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js +73 -71
- package/dist/adaptercloud/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js +76 -74
- package/dist/adaptercloud/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js +70 -68
- package/dist/adaptercloud/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -6,8 +6,9 @@ import { formatCurrency as i } from "../../utils/formatters.js";
|
|
|
6
6
|
import { useEffect as a, useMemo as o, useState as s } from "react";
|
|
7
7
|
import { AlertCircle as c, CheckCircle2 as l, Clock as u, Eye as d, IndianRupee as f, Loader2 as p, MapPin as m, Phone as h, RefreshCw as g, Search as _, ShoppingBag as v, TrendingUp as y, Truck as b, User as x, X as S, XCircle as C } from "lucide-react";
|
|
8
8
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
9
|
+
import { EmphasisPanel as E } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/adaptercloud/pages/admin/AdminOrdersPage.tsx
|
|
10
|
-
var
|
|
11
|
+
var D = [
|
|
11
12
|
{
|
|
12
13
|
id: "ORD-2024-001",
|
|
13
14
|
customerName: "Rajesh Kumar",
|
|
@@ -64,52 +65,52 @@ var E = [
|
|
|
64
65
|
deliveryAddress: "789, HSR Layout"
|
|
65
66
|
}
|
|
66
67
|
];
|
|
67
|
-
function
|
|
68
|
-
let { navigateTo:
|
|
68
|
+
function O() {
|
|
69
|
+
let { navigateTo: O } = e(), [k, A] = s([]), [j, M] = s(null), [N, P] = s(!0), [F, I] = s(""), [L, R] = s("all"), [z, B] = s("today"), [V, H] = s(null), [U, W] = s(!1);
|
|
69
70
|
a(() => {
|
|
70
71
|
let e = setTimeout(() => {
|
|
71
|
-
|
|
72
|
+
M({
|
|
72
73
|
totalOrders: 156,
|
|
73
74
|
pendingOrders: 12,
|
|
74
75
|
totalRevenue: 125600,
|
|
75
76
|
averageOrderValue: 805
|
|
76
|
-
}),
|
|
77
|
+
}), A(D), P(!1);
|
|
77
78
|
}, 1e3);
|
|
78
79
|
return () => clearTimeout(e);
|
|
79
80
|
}, []);
|
|
80
|
-
let
|
|
81
|
+
let G = (e) => i(e, { minimumFractionDigits: 0 }), K = (e) => new Date(e).toLocaleString("en-IN", {
|
|
81
82
|
day: "2-digit",
|
|
82
83
|
month: "short",
|
|
83
84
|
hour: "2-digit",
|
|
84
85
|
minute: "2-digit"
|
|
85
|
-
}),
|
|
86
|
+
}), q = (e) => ({
|
|
86
87
|
delivered: "bg-status-success-bg-subtle/20 text-status-success-text",
|
|
87
88
|
preparing: "bg-status-warning-bg-subtle/20 text-status-warning-text",
|
|
88
89
|
ready: "bg-status-warning-bg-subtle/20 text-status-warning-text",
|
|
89
90
|
out_for_delivery: "bg-accent-blue-subtle/20 text-accent-blue",
|
|
90
91
|
cancelled: "bg-status-error-bg-subtle/20 text-status-error-text",
|
|
91
92
|
confirmed: "bg-accent-blue-subtle/20 text-accent-blue"
|
|
92
|
-
})[e] ?? "bg-secondary text-secondary-foreground",
|
|
93
|
+
})[e] ?? "bg-secondary text-secondary-foreground", J = (e) => {
|
|
93
94
|
switch (e) {
|
|
94
95
|
case "completed": return /* @__PURE__ */ w(l, { className: "h-4 w-4 text-status-success-text" });
|
|
95
96
|
case "failed": return /* @__PURE__ */ w(C, { className: "h-4 w-4 text-status-error-text" });
|
|
96
97
|
case "refunded": return /* @__PURE__ */ w(g, { className: "h-4 w-4 text-accent-blue" });
|
|
97
98
|
default: return /* @__PURE__ */ w(c, { className: "h-4 w-4 text-status-warning-text" });
|
|
98
99
|
}
|
|
99
|
-
},
|
|
100
|
-
let t = !
|
|
100
|
+
}, Y = o(() => k.filter((e) => {
|
|
101
|
+
let t = !F || e.id.toLowerCase().includes(F.toLowerCase()) || e.customerName.toLowerCase().includes(F.toLowerCase()) || e.cartName.toLowerCase().includes(F.toLowerCase()), n = L === "all" || e.status === L;
|
|
101
102
|
return t && n;
|
|
102
103
|
}), [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
]),
|
|
107
|
-
|
|
104
|
+
k,
|
|
105
|
+
F,
|
|
106
|
+
L
|
|
107
|
+
]), X = (e, t) => {
|
|
108
|
+
A((n) => n.map((n) => n.id === e ? {
|
|
108
109
|
...n,
|
|
109
110
|
status: t
|
|
110
|
-
} : n)),
|
|
111
|
+
} : n)), W(!1), alert(`Order ${e} updated to ${t.replace("_", " ")}`);
|
|
111
112
|
};
|
|
112
|
-
return
|
|
113
|
+
return N ? /* @__PURE__ */ w(n, {
|
|
113
114
|
title: "Order Management",
|
|
114
115
|
description: "Loading orders...",
|
|
115
116
|
children: /* @__PURE__ */ T("div", {
|
|
@@ -121,37 +122,41 @@ function D() {
|
|
|
121
122
|
})
|
|
122
123
|
}) : /* @__PURE__ */ T(n, {
|
|
123
124
|
title: "Order Management",
|
|
124
|
-
description: `${
|
|
125
|
+
description: `${j?.totalOrders ?? 0} total orders on the platform`,
|
|
126
|
+
purpose: "Oversee every order across the marketplace — search, filter by status, and step in on disputes or stuck deliveries. Use it to keep fulfilment moving and catch problem orders before customers complain.",
|
|
125
127
|
children: [
|
|
126
|
-
|
|
127
|
-
className: "
|
|
128
|
-
children:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
128
|
+
j && /* @__PURE__ */ w(E, {
|
|
129
|
+
className: "mb-6",
|
|
130
|
+
children: /* @__PURE__ */ T("div", {
|
|
131
|
+
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ w(r, {
|
|
134
|
+
icon: /* @__PURE__ */ w(v, { className: "h-5 w-5" }),
|
|
135
|
+
value: j.totalOrders,
|
|
136
|
+
label: "Total Orders",
|
|
137
|
+
trendValue: "Orders today"
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ w(r, {
|
|
140
|
+
icon: /* @__PURE__ */ w(f, { className: "h-5 w-5" }),
|
|
141
|
+
value: G(j.totalRevenue),
|
|
142
|
+
label: "Revenue",
|
|
143
|
+
trend: "up",
|
|
144
|
+
trendValue: "+15.2% vs yesterday"
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ w(r, {
|
|
147
|
+
icon: /* @__PURE__ */ w(y, { className: "h-5 w-5" }),
|
|
148
|
+
value: G(j.averageOrderValue),
|
|
149
|
+
label: "Avg Order Value",
|
|
150
|
+
trendValue: "Average order value"
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ w(r, {
|
|
153
|
+
icon: /* @__PURE__ */ w(u, { className: "h-5 w-5" }),
|
|
154
|
+
value: j.pendingOrders,
|
|
155
|
+
label: "Pending Orders",
|
|
156
|
+
trendValue: "Awaiting action"
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
})
|
|
155
160
|
}),
|
|
156
161
|
/* @__PURE__ */ w("div", {
|
|
157
162
|
className: "rounded-lg border border-border-seam bg-bg-surface p-4 mb-6 bg-gloss-card shadow-pop",
|
|
@@ -162,15 +167,15 @@ function D() {
|
|
|
162
167
|
children: [/* @__PURE__ */ w(_, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ w("input", {
|
|
163
168
|
type: "text",
|
|
164
169
|
placeholder: "Search by order ID, customer, or cart name...",
|
|
165
|
-
value:
|
|
166
|
-
onChange: (e) =>
|
|
170
|
+
value: F,
|
|
171
|
+
onChange: (e) => I(e.target.value),
|
|
167
172
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
168
173
|
})]
|
|
169
174
|
}), /* @__PURE__ */ T("div", {
|
|
170
175
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
171
176
|
children: [/* @__PURE__ */ T("select", {
|
|
172
|
-
value:
|
|
173
|
-
onChange: (e) =>
|
|
177
|
+
value: L,
|
|
178
|
+
onChange: (e) => R(e.target.value),
|
|
174
179
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
175
180
|
children: [
|
|
176
181
|
/* @__PURE__ */ w("option", {
|
|
@@ -207,8 +212,8 @@ function D() {
|
|
|
207
212
|
})
|
|
208
213
|
]
|
|
209
214
|
}), /* @__PURE__ */ T("select", {
|
|
210
|
-
value:
|
|
211
|
-
onChange: (e) =>
|
|
215
|
+
value: z,
|
|
216
|
+
onChange: (e) => B(e.target.value),
|
|
212
217
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
213
218
|
children: [
|
|
214
219
|
/* @__PURE__ */ w("option", {
|
|
@@ -237,7 +242,7 @@ function D() {
|
|
|
237
242
|
children: [
|
|
238
243
|
/* @__PURE__ */ w("div", {
|
|
239
244
|
className: "block md:hidden space-y-4 p-4",
|
|
240
|
-
children:
|
|
245
|
+
children: Y.map((e) => /* @__PURE__ */ T("div", {
|
|
241
246
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
|
|
242
247
|
children: [
|
|
243
248
|
/* @__PURE__ */ T("div", {
|
|
@@ -247,9 +252,9 @@ function D() {
|
|
|
247
252
|
children: e.id
|
|
248
253
|
}), /* @__PURE__ */ w("p", {
|
|
249
254
|
className: "text-sm text-text-secondary",
|
|
250
|
-
children:
|
|
255
|
+
children: K(e.orderDate)
|
|
251
256
|
})] }), /* @__PURE__ */ w("span", {
|
|
252
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize",
|
|
257
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", q(e.status)),
|
|
253
258
|
children: e.status.replace("_", " ")
|
|
254
259
|
})]
|
|
255
260
|
}),
|
|
@@ -290,10 +295,10 @@ function D() {
|
|
|
290
295
|
children: "Amount"
|
|
291
296
|
}), /* @__PURE__ */ w("p", {
|
|
292
297
|
className: "text-text-primary font-semibold text-lg",
|
|
293
|
-
children:
|
|
298
|
+
children: G(e.total)
|
|
294
299
|
})] }), /* @__PURE__ */ T("div", {
|
|
295
300
|
className: "flex items-center gap-2",
|
|
296
|
-
children: [
|
|
301
|
+
children: [J(e.paymentStatus), /* @__PURE__ */ T("div", {
|
|
297
302
|
className: "text-right",
|
|
298
303
|
children: [/* @__PURE__ */ w("p", {
|
|
299
304
|
className: "text-sm text-text-primary",
|
|
@@ -308,7 +313,7 @@ function D() {
|
|
|
308
313
|
/* @__PURE__ */ T("button", {
|
|
309
314
|
type: "button",
|
|
310
315
|
onClick: () => {
|
|
311
|
-
|
|
316
|
+
H(e), W(!0);
|
|
312
317
|
},
|
|
313
318
|
className: "w-full rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors flex items-center justify-center gap-2",
|
|
314
319
|
children: [/* @__PURE__ */ w(d, { className: "h-4 w-4" }), " View Details"]
|
|
@@ -358,7 +363,7 @@ function D() {
|
|
|
358
363
|
]
|
|
359
364
|
}) }), /* @__PURE__ */ w("tbody", {
|
|
360
365
|
className: "divide-y divide-border",
|
|
361
|
-
children:
|
|
366
|
+
children: Y.map((e) => /* @__PURE__ */ T("tr", {
|
|
362
367
|
className: "hover:bg-accent/50 transition-colors",
|
|
363
368
|
children: [
|
|
364
369
|
/* @__PURE__ */ w("td", {
|
|
@@ -387,12 +392,12 @@ function D() {
|
|
|
387
392
|
}),
|
|
388
393
|
/* @__PURE__ */ w("td", {
|
|
389
394
|
className: "px-4 py-3 text-sm font-semibold text-text-primary",
|
|
390
|
-
children:
|
|
395
|
+
children: G(e.total)
|
|
391
396
|
}),
|
|
392
397
|
/* @__PURE__ */ w("td", {
|
|
393
398
|
className: "px-4 py-3",
|
|
394
399
|
children: /* @__PURE__ */ w("span", {
|
|
395
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize",
|
|
400
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", q(e.status)),
|
|
396
401
|
children: e.status.replace("_", " ")
|
|
397
402
|
})
|
|
398
403
|
}),
|
|
@@ -400,7 +405,7 @@ function D() {
|
|
|
400
405
|
className: "px-4 py-3",
|
|
401
406
|
children: /* @__PURE__ */ T("div", {
|
|
402
407
|
className: "flex items-center gap-2",
|
|
403
|
-
children: [
|
|
408
|
+
children: [J(e.paymentStatus), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("div", {
|
|
404
409
|
className: "text-sm text-text-primary",
|
|
405
410
|
children: e.paymentMethod
|
|
406
411
|
}), /* @__PURE__ */ w("div", {
|
|
@@ -411,14 +416,14 @@ function D() {
|
|
|
411
416
|
}),
|
|
412
417
|
/* @__PURE__ */ w("td", {
|
|
413
418
|
className: "px-4 py-3 text-sm text-text-secondary",
|
|
414
|
-
children:
|
|
419
|
+
children: K(e.orderDate)
|
|
415
420
|
}),
|
|
416
421
|
/* @__PURE__ */ w("td", {
|
|
417
422
|
className: "px-4 py-3",
|
|
418
423
|
children: /* @__PURE__ */ w("button", {
|
|
419
424
|
type: "button",
|
|
420
425
|
onClick: () => {
|
|
421
|
-
|
|
426
|
+
H(e), W(!0);
|
|
422
427
|
},
|
|
423
428
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
|
|
424
429
|
children: /* @__PURE__ */ w(d, { className: "h-4 w-4" })
|
|
@@ -429,7 +434,7 @@ function D() {
|
|
|
429
434
|
})]
|
|
430
435
|
})
|
|
431
436
|
}),
|
|
432
|
-
|
|
437
|
+
Y.length === 0 && /* @__PURE__ */ T("div", {
|
|
433
438
|
className: "flex flex-col items-center justify-center py-12 px-4",
|
|
434
439
|
children: [/* @__PURE__ */ w(v, { className: "h-10 w-10 text-text-secondary/50 mb-3" }), /* @__PURE__ */ w("p", {
|
|
435
440
|
className: "text-sm text-text-secondary",
|
|
@@ -438,7 +443,7 @@ function D() {
|
|
|
438
443
|
})
|
|
439
444
|
]
|
|
440
445
|
}),
|
|
441
|
-
|
|
446
|
+
U && V && /* @__PURE__ */ w("div", {
|
|
442
447
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
443
448
|
children: /* @__PURE__ */ T("div", {
|
|
444
449
|
className: "w-full max-w-2xl rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
|
|
@@ -449,7 +454,7 @@ function D() {
|
|
|
449
454
|
children: "Order Details"
|
|
450
455
|
}), /* @__PURE__ */ w("button", {
|
|
451
456
|
type: "button",
|
|
452
|
-
onClick: () =>
|
|
457
|
+
onClick: () => W(!1),
|
|
453
458
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
|
|
454
459
|
children: /* @__PURE__ */ w(S, { className: "h-5 w-5" })
|
|
455
460
|
})]
|
|
@@ -467,28 +472,28 @@ function D() {
|
|
|
467
472
|
children: "Order ID"
|
|
468
473
|
}), /* @__PURE__ */ w("p", {
|
|
469
474
|
className: "font-medium text-text-primary",
|
|
470
|
-
children:
|
|
475
|
+
children: V.id
|
|
471
476
|
})] }),
|
|
472
477
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
473
478
|
className: "text-sm text-text-secondary",
|
|
474
479
|
children: "Status"
|
|
475
480
|
}), /* @__PURE__ */ w("span", {
|
|
476
|
-
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize",
|
|
477
|
-
children:
|
|
481
|
+
className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", q(V.status)),
|
|
482
|
+
children: V.status.replace("_", " ")
|
|
478
483
|
})] }),
|
|
479
484
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
480
485
|
className: "text-sm text-text-secondary",
|
|
481
486
|
children: "Order Date"
|
|
482
487
|
}), /* @__PURE__ */ w("p", {
|
|
483
488
|
className: "font-medium text-text-primary",
|
|
484
|
-
children:
|
|
489
|
+
children: K(V.orderDate)
|
|
485
490
|
})] }),
|
|
486
491
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
487
492
|
className: "text-sm text-text-secondary",
|
|
488
493
|
children: "Delivery Time"
|
|
489
494
|
}), /* @__PURE__ */ w("p", {
|
|
490
495
|
className: "font-medium text-text-primary",
|
|
491
|
-
children:
|
|
496
|
+
children: K(V.deliveryTime)
|
|
492
497
|
})] })
|
|
493
498
|
]
|
|
494
499
|
})] }),
|
|
@@ -503,14 +508,14 @@ function D() {
|
|
|
503
508
|
children: "Name"
|
|
504
509
|
}), /* @__PURE__ */ w("p", {
|
|
505
510
|
className: "font-medium text-text-primary",
|
|
506
|
-
children:
|
|
511
|
+
children: V.customerName
|
|
507
512
|
})] }),
|
|
508
513
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
509
514
|
className: "text-sm text-text-secondary",
|
|
510
515
|
children: "Phone"
|
|
511
516
|
}), /* @__PURE__ */ T("p", {
|
|
512
517
|
className: "font-medium text-text-primary flex items-center gap-1",
|
|
513
|
-
children: [/* @__PURE__ */ w(h, { className: "h-3 w-3" }),
|
|
518
|
+
children: [/* @__PURE__ */ w(h, { className: "h-3 w-3" }), V.customerPhone]
|
|
514
519
|
})] }),
|
|
515
520
|
/* @__PURE__ */ T("div", {
|
|
516
521
|
className: "sm:col-span-2",
|
|
@@ -519,7 +524,7 @@ function D() {
|
|
|
519
524
|
children: "Delivery Address"
|
|
520
525
|
}), /* @__PURE__ */ T("p", {
|
|
521
526
|
className: "font-medium text-text-primary flex items-center gap-1",
|
|
522
|
-
children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }),
|
|
527
|
+
children: [/* @__PURE__ */ w(m, { className: "h-3 w-3" }), V.deliveryAddress]
|
|
523
528
|
})]
|
|
524
529
|
})
|
|
525
530
|
]
|
|
@@ -534,13 +539,13 @@ function D() {
|
|
|
534
539
|
children: "Cart Name"
|
|
535
540
|
}), /* @__PURE__ */ w("p", {
|
|
536
541
|
className: "font-medium text-text-primary",
|
|
537
|
-
children:
|
|
542
|
+
children: V.cartName
|
|
538
543
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
539
544
|
className: "text-sm text-text-secondary",
|
|
540
545
|
children: "Cart Owner"
|
|
541
546
|
}), /* @__PURE__ */ w("p", {
|
|
542
547
|
className: "font-medium text-text-primary",
|
|
543
|
-
children:
|
|
548
|
+
children: V.cartOwner
|
|
544
549
|
})] })]
|
|
545
550
|
})] }),
|
|
546
551
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
@@ -550,7 +555,7 @@ function D() {
|
|
|
550
555
|
className: "rounded-lg bg-bg-sunken/50 p-4",
|
|
551
556
|
children: [/* @__PURE__ */ w("ul", {
|
|
552
557
|
className: "space-y-2",
|
|
553
|
-
children:
|
|
558
|
+
children: V.items.map((e, t) => /* @__PURE__ */ w("li", {
|
|
554
559
|
className: "text-sm text-text-primary",
|
|
555
560
|
children: e
|
|
556
561
|
}, t))
|
|
@@ -561,7 +566,7 @@ function D() {
|
|
|
561
566
|
children: "Total Amount"
|
|
562
567
|
}), /* @__PURE__ */ w("span", {
|
|
563
568
|
className: "font-semibold text-lg text-text-primary",
|
|
564
|
-
children:
|
|
569
|
+
children: G(V.total)
|
|
565
570
|
})]
|
|
566
571
|
})]
|
|
567
572
|
})] }),
|
|
@@ -575,19 +580,19 @@ function D() {
|
|
|
575
580
|
children: "Method"
|
|
576
581
|
}), /* @__PURE__ */ w("p", {
|
|
577
582
|
className: "font-medium text-text-primary",
|
|
578
|
-
children:
|
|
583
|
+
children: V.paymentMethod
|
|
579
584
|
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
580
585
|
className: "text-sm text-text-secondary",
|
|
581
586
|
children: "Status"
|
|
582
587
|
}), /* @__PURE__ */ T("div", {
|
|
583
588
|
className: "flex items-center gap-2",
|
|
584
|
-
children: [
|
|
589
|
+
children: [J(V.paymentStatus), /* @__PURE__ */ w("span", {
|
|
585
590
|
className: "font-medium text-text-primary capitalize",
|
|
586
|
-
children:
|
|
591
|
+
children: V.paymentStatus
|
|
587
592
|
})]
|
|
588
593
|
})] })]
|
|
589
594
|
})] }),
|
|
590
|
-
|
|
595
|
+
V.workerAssigned && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h3", {
|
|
591
596
|
className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
592
597
|
children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), " Delivery Assignment"]
|
|
593
598
|
}), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
@@ -595,26 +600,26 @@ function D() {
|
|
|
595
600
|
children: "Assigned Worker"
|
|
596
601
|
}), /* @__PURE__ */ w("p", {
|
|
597
602
|
className: "font-medium text-text-primary",
|
|
598
|
-
children:
|
|
603
|
+
children: V.workerAssigned
|
|
599
604
|
})] })] }),
|
|
600
|
-
|
|
605
|
+
V.notes && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
601
606
|
className: "font-semibold text-text-primary mb-3",
|
|
602
607
|
children: "Special Instructions"
|
|
603
608
|
}), /* @__PURE__ */ w("p", {
|
|
604
609
|
className: "text-sm rounded-lg bg-bg-sunken/50 p-3 text-text-primary",
|
|
605
|
-
children:
|
|
610
|
+
children: V.notes
|
|
606
611
|
})] }),
|
|
607
612
|
/* @__PURE__ */ T("div", {
|
|
608
613
|
className: "flex flex-col sm:flex-row sm:justify-end gap-3 pt-2",
|
|
609
614
|
children: [/* @__PURE__ */ w("button", {
|
|
610
615
|
type: "button",
|
|
611
|
-
onClick: () =>
|
|
616
|
+
onClick: () => W(!1),
|
|
612
617
|
className: "rounded-lg border border-border-subtle py-2 px-4 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
613
618
|
children: "Close"
|
|
614
|
-
}),
|
|
619
|
+
}), V.status !== "delivered" && V.status !== "cancelled" && /* @__PURE__ */ T("select", {
|
|
615
620
|
className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
616
|
-
value:
|
|
617
|
-
onChange: (e) =>
|
|
621
|
+
value: V.status,
|
|
622
|
+
onChange: (e) => X(V.id, e.target.value),
|
|
618
623
|
children: [
|
|
619
624
|
/* @__PURE__ */ w("option", {
|
|
620
625
|
value: "pending",
|
|
@@ -655,6 +660,6 @@ function D() {
|
|
|
655
660
|
});
|
|
656
661
|
}
|
|
657
662
|
//#endregion
|
|
658
|
-
export {
|
|
663
|
+
export { O as AdminOrdersPage };
|
|
659
664
|
|
|
660
665
|
//# sourceMappingURL=AdminOrdersPage.js.map
|