@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.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/kadaikodi/hooks/useKadaikodiApi.js +260 -105
- package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
- package/dist/kadaikodi/pages/HomePage.js +4 -4
- package/dist/kadaikodi/pages/HomePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
- package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
- package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
- package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
- package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
- package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
- package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
- package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
- package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
- package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
- package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +329 -432
- package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -384
- package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
- package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +276 -279
- package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +229 -447
- package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
- package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
- package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
- package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
- package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
- package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
- package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
- package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
- package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
- package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
- package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
- package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
- package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
- package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
- package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
- package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
- package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
- package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +258 -523
- package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
- package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js +128 -295
- package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +205 -291
- package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
- package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +426 -514
- package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +231 -225
- package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js +197 -301
- package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +247 -399
- package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +294 -327
- package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +179 -397
- package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +1 -1
- package/dist/kadaikodi/mocks/data.js +0 -1517
- package/dist/kadaikodi/mocks/data.js.map +0 -1
- package/dist/kadaikodi/mocks/users.js +0 -34
- package/dist/kadaikodi/mocks/users.js.map +0 -1
|
@@ -1,668 +1,497 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { formatCurrency as
|
|
7
|
-
import {
|
|
8
|
-
import { AlertCircle as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { EmphasisPanel as
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
2
|
+
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
+
import { MetricsCard as n } from "../../components/MetricsCard.js";
|
|
4
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
5
|
+
import { useDashboardStats as i, useOrders as a, useUpdateOrderStatus as o } from "../../hooks/useKadaikodiApi.js";
|
|
6
|
+
import { formatCurrency as s } from "../../utils/formatters.js";
|
|
7
|
+
import { useMemo as c, useState as l } from "react";
|
|
8
|
+
import { AlertCircle as u, CheckCircle2 as d, Clock as f, Eye as p, IndianRupee as m, Loader2 as h, MapPin as g, RefreshCw as _, Search as v, ShoppingBag as y, Store as b, TrendingUp as x, X as S, XCircle 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
11
|
//#region src/kadaikodi/pages/admin/AdminOrdersPage.tsx
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"Filter Coffee x2",
|
|
22
|
-
"Vada x1"
|
|
23
|
-
],
|
|
24
|
-
total: 280,
|
|
25
|
-
status: "delivered",
|
|
26
|
-
paymentMethod: "UPI",
|
|
27
|
-
paymentStatus: "completed",
|
|
28
|
-
orderDate: "2024-01-15T10:30:00",
|
|
29
|
-
deliveryTime: "2024-01-15T11:15:00",
|
|
30
|
-
deliveryAddress: "123, 4th Cross, Koramangala",
|
|
31
|
-
workerAssigned: "Ravi Kumar"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: "ORD-2024-002",
|
|
35
|
-
customerName: "Priya Sharma",
|
|
36
|
-
customerPhone: "+91 87654 32109",
|
|
37
|
-
cartName: "Juice Junction",
|
|
38
|
-
cartOwner: "Amit Patel",
|
|
39
|
-
items: ["Fresh Orange Juice x1", "Watermelon Juice x1"],
|
|
40
|
-
total: 120,
|
|
41
|
-
status: "preparing",
|
|
42
|
-
paymentMethod: "Cash",
|
|
43
|
-
paymentStatus: "pending",
|
|
44
|
-
orderDate: "2024-01-15T11:45:00",
|
|
45
|
-
deliveryTime: "2024-01-15T12:15:00",
|
|
46
|
-
deliveryAddress: "456, BTM Layout",
|
|
47
|
-
notes: "Extra ice please"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: "ORD-2024-003",
|
|
51
|
-
customerName: "Amit Singh",
|
|
52
|
-
customerPhone: "+91 76543 21098",
|
|
53
|
-
cartName: "Chaat Corner",
|
|
54
|
-
cartOwner: "Ramesh Verma",
|
|
55
|
-
items: [
|
|
56
|
-
"Pani Puri x1",
|
|
57
|
-
"Bhel Puri x1",
|
|
58
|
-
"Dahi Puri x1"
|
|
59
|
-
],
|
|
60
|
-
total: 150,
|
|
61
|
-
status: "pending",
|
|
62
|
-
paymentMethod: "Card",
|
|
63
|
-
paymentStatus: "completed",
|
|
64
|
-
orderDate: "2024-01-15T12:00:00",
|
|
65
|
-
deliveryTime: "2024-01-15T12:30:00",
|
|
66
|
-
deliveryAddress: "789, HSR Layout"
|
|
67
|
-
}
|
|
12
|
+
var O = [
|
|
13
|
+
"pending",
|
|
14
|
+
"confirmed",
|
|
15
|
+
"preparing",
|
|
16
|
+
"ready",
|
|
17
|
+
"picked_up",
|
|
18
|
+
"out_for_delivery",
|
|
19
|
+
"delivered",
|
|
20
|
+
"cancelled"
|
|
68
21
|
];
|
|
69
|
-
function
|
|
70
|
-
let {
|
|
71
|
-
o(() => {
|
|
72
|
-
let e = setTimeout(() => {
|
|
73
|
-
P({
|
|
74
|
-
totalOrders: 156,
|
|
75
|
-
pendingOrders: 12,
|
|
76
|
-
totalRevenue: 125600,
|
|
77
|
-
averageOrderValue: 805
|
|
78
|
-
}), M(k), I(!1);
|
|
79
|
-
}, 1e3);
|
|
80
|
-
return () => clearTimeout(e);
|
|
81
|
-
}, []);
|
|
82
|
-
let q = (e) => a(e, { minimumFractionDigits: 0 }), J = (e) => new Date(e).toLocaleString("en-IN", {
|
|
22
|
+
function k() {
|
|
23
|
+
let { data: k = [], isLoading: A } = a({}), { data: j } = i(), M = o(), [N, P] = l(""), [F, I] = l("all"), [L, R] = l(null), [z, B] = l(!1), V = (e) => s(e, { minimumFractionDigits: 0 }), H = (e) => e ? new Date(e).toLocaleString("en-IN", {
|
|
83
24
|
day: "2-digit",
|
|
84
25
|
month: "short",
|
|
85
26
|
hour: "2-digit",
|
|
86
27
|
minute: "2-digit"
|
|
87
|
-
}),
|
|
28
|
+
}) : "—", U = c(() => j && j.totalOrders > 0 ? j.totalRevenue / j.totalOrders : k.length === 0 ? 0 : k.reduce((e, t) => e + t.total, 0) / k.length, [j, k]), W = (e) => ({
|
|
88
29
|
delivered: "bg-status-success-bg-subtle text-status-success-text",
|
|
89
30
|
preparing: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
90
31
|
ready: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
32
|
+
picked_up: "bg-[var(--color-accent-soft)] text-text-primary",
|
|
91
33
|
out_for_delivery: "bg-[var(--color-accent-soft)] text-text-primary",
|
|
92
34
|
cancelled: "bg-status-error-bg-subtle text-status-error-text",
|
|
93
35
|
confirmed: "bg-[var(--color-accent-soft)] text-text-primary"
|
|
94
|
-
})[e] ?? "bg-
|
|
36
|
+
})[e] ?? "bg-bg-sunken text-text-secondary", G = (e) => {
|
|
95
37
|
switch (e) {
|
|
96
|
-
case "completed": return /* @__PURE__ */
|
|
97
|
-
case "failed": return /* @__PURE__ */
|
|
98
|
-
case "refunded": return /* @__PURE__ */
|
|
99
|
-
default: return /* @__PURE__ */
|
|
38
|
+
case "completed": return /* @__PURE__ */ w(d, { className: "h-4 w-4 text-status-success-text" });
|
|
39
|
+
case "failed": return /* @__PURE__ */ w(C, { className: "h-4 w-4 text-status-error-text" });
|
|
40
|
+
case "refunded": return /* @__PURE__ */ w(_, { className: "h-4 w-4 text-text-primary" });
|
|
41
|
+
default: return /* @__PURE__ */ w(u, { className: "h-4 w-4 text-status-warning-text" });
|
|
100
42
|
}
|
|
101
|
-
},
|
|
102
|
-
let t = !
|
|
43
|
+
}, K = c(() => k.filter((e) => {
|
|
44
|
+
let t = !N || e.id.toLowerCase().includes(N.toLowerCase()) || e.cartName.toLowerCase().includes(N.toLowerCase()), n = F === "all" || e.status === F;
|
|
103
45
|
return t && n;
|
|
104
46
|
}), [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
]),
|
|
109
|
-
M
|
|
110
|
-
|
|
111
|
-
status: t
|
|
112
|
-
} :
|
|
47
|
+
k,
|
|
48
|
+
N,
|
|
49
|
+
F
|
|
50
|
+
]), q = (e, t) => {
|
|
51
|
+
M.mutate({
|
|
52
|
+
id: e,
|
|
53
|
+
status: t.toUpperCase()
|
|
54
|
+
}, { onSuccess: () => {
|
|
55
|
+
R((e) => e && {
|
|
56
|
+
...e,
|
|
57
|
+
status: t
|
|
58
|
+
});
|
|
59
|
+
} });
|
|
60
|
+
}, J = (e) => {
|
|
61
|
+
let t = e.deliveryAddress, n = [
|
|
62
|
+
t.street,
|
|
63
|
+
t.area,
|
|
64
|
+
t.city,
|
|
65
|
+
t.pincode
|
|
66
|
+
].filter(Boolean);
|
|
67
|
+
return n.length > 0 ? n.join(", ") : "—";
|
|
113
68
|
};
|
|
114
|
-
return
|
|
69
|
+
return A ? /* @__PURE__ */ w(t, {
|
|
115
70
|
title: "Order Management",
|
|
116
71
|
description: "Loading orders...",
|
|
117
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ T("div", {
|
|
118
73
|
className: "flex flex-col items-center justify-center py-20",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ w(h, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ w("p", {
|
|
120
75
|
className: "text-text-secondary",
|
|
121
76
|
children: "Loading orders..."
|
|
122
77
|
})]
|
|
123
78
|
})
|
|
124
|
-
}) : /* @__PURE__ */
|
|
79
|
+
}) : /* @__PURE__ */ T(t, {
|
|
125
80
|
title: "Order Management",
|
|
126
|
-
description: `${
|
|
81
|
+
description: `${j?.totalOrders ?? k.length} total orders on the platform`,
|
|
127
82
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ w(D, {
|
|
129
84
|
className: "mb-6",
|
|
130
85
|
children: "Every order placed across Kadaikodi in one queue. Use this page to keep operations running smoothly — search and filter orders, spot anything pending or stuck, open an order to see its full details, and step in when a customer or cart needs help. The metrics up top give you a live read on volume, revenue and what's awaiting action."
|
|
131
86
|
}),
|
|
132
|
-
|
|
87
|
+
j && /* @__PURE__ */ T(E, {
|
|
133
88
|
className: "mb-6",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
135
90
|
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
136
91
|
children: "Orders at a Glance"
|
|
137
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ T("div", {
|
|
138
93
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
139
94
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
icon: /* @__PURE__ */
|
|
142
|
-
value:
|
|
143
|
-
label: "Total Orders"
|
|
144
|
-
trendValue: "Orders today"
|
|
95
|
+
/* @__PURE__ */ w(n, {
|
|
96
|
+
icon: /* @__PURE__ */ w(y, { className: "h-5 w-5" }),
|
|
97
|
+
value: j.totalOrders.toLocaleString("en-IN"),
|
|
98
|
+
label: "Total Orders"
|
|
145
99
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
icon: /* @__PURE__ */
|
|
148
|
-
value:
|
|
149
|
-
label: "Revenue"
|
|
150
|
-
trend: "up",
|
|
151
|
-
trendValue: "+15.2% vs yesterday"
|
|
100
|
+
/* @__PURE__ */ w(n, {
|
|
101
|
+
icon: /* @__PURE__ */ w(m, { className: "h-5 w-5" }),
|
|
102
|
+
value: V(j.totalRevenue),
|
|
103
|
+
label: "Total Revenue"
|
|
152
104
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
icon: /* @__PURE__ */
|
|
155
|
-
value:
|
|
156
|
-
label: "Avg Order Value"
|
|
157
|
-
trendValue: "Average order value"
|
|
105
|
+
/* @__PURE__ */ w(n, {
|
|
106
|
+
icon: /* @__PURE__ */ w(x, { className: "h-5 w-5" }),
|
|
107
|
+
value: V(U),
|
|
108
|
+
label: "Avg Order Value"
|
|
158
109
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
icon: /* @__PURE__ */
|
|
161
|
-
value:
|
|
110
|
+
/* @__PURE__ */ w(n, {
|
|
111
|
+
icon: /* @__PURE__ */ w(f, { className: "h-5 w-5" }),
|
|
112
|
+
value: j.pendingOrders.toLocaleString("en-IN"),
|
|
162
113
|
label: "Pending Orders",
|
|
163
114
|
trendValue: "Awaiting action"
|
|
164
115
|
})
|
|
165
116
|
]
|
|
166
117
|
})]
|
|
167
118
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ w("div", {
|
|
169
120
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
|
|
170
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ T("div", {
|
|
171
122
|
className: "flex flex-col gap-4",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ T("div", {
|
|
173
124
|
className: "relative flex-1",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ w(v, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ w("input", {
|
|
175
126
|
type: "text",
|
|
176
|
-
placeholder: "Search by order ID
|
|
177
|
-
value:
|
|
178
|
-
onChange: (e) =>
|
|
127
|
+
placeholder: "Search by order ID or cart name...",
|
|
128
|
+
value: N,
|
|
129
|
+
onChange: (e) => P(e.target.value),
|
|
179
130
|
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)]"
|
|
180
131
|
})]
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
children:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
/* @__PURE__ */ T("option", {
|
|
193
|
-
value: "pending",
|
|
194
|
-
children: "Pending"
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ T("option", {
|
|
197
|
-
value: "confirmed",
|
|
198
|
-
children: "Confirmed"
|
|
199
|
-
}),
|
|
200
|
-
/* @__PURE__ */ T("option", {
|
|
201
|
-
value: "preparing",
|
|
202
|
-
children: "Preparing"
|
|
203
|
-
}),
|
|
204
|
-
/* @__PURE__ */ T("option", {
|
|
205
|
-
value: "ready",
|
|
206
|
-
children: "Ready"
|
|
207
|
-
}),
|
|
208
|
-
/* @__PURE__ */ T("option", {
|
|
209
|
-
value: "out_for_delivery",
|
|
210
|
-
children: "Out for Delivery"
|
|
211
|
-
}),
|
|
212
|
-
/* @__PURE__ */ T("option", {
|
|
213
|
-
value: "delivered",
|
|
214
|
-
children: "Delivered"
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ T("option", {
|
|
217
|
-
value: "cancelled",
|
|
218
|
-
children: "Cancelled"
|
|
219
|
-
})
|
|
220
|
-
]
|
|
221
|
-
}), /* @__PURE__ */ E("select", {
|
|
222
|
-
value: V,
|
|
223
|
-
onChange: (e) => H(e.target.value),
|
|
224
|
-
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)]",
|
|
225
|
-
children: [
|
|
226
|
-
/* @__PURE__ */ T("option", {
|
|
227
|
-
value: "today",
|
|
228
|
-
children: "Today"
|
|
229
|
-
}),
|
|
230
|
-
/* @__PURE__ */ T("option", {
|
|
231
|
-
value: "yesterday",
|
|
232
|
-
children: "Yesterday"
|
|
233
|
-
}),
|
|
234
|
-
/* @__PURE__ */ T("option", {
|
|
235
|
-
value: "week",
|
|
236
|
-
children: "This Week"
|
|
237
|
-
}),
|
|
238
|
-
/* @__PURE__ */ T("option", {
|
|
239
|
-
value: "month",
|
|
240
|
-
children: "This Month"
|
|
241
|
-
})
|
|
242
|
-
]
|
|
243
|
-
})]
|
|
132
|
+
}), /* @__PURE__ */ T("select", {
|
|
133
|
+
value: F,
|
|
134
|
+
onChange: (e) => I(e.target.value),
|
|
135
|
+
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)]",
|
|
136
|
+
children: [/* @__PURE__ */ w("option", {
|
|
137
|
+
value: "all",
|
|
138
|
+
children: "All Status"
|
|
139
|
+
}), O.map((e) => /* @__PURE__ */ w("option", {
|
|
140
|
+
value: e,
|
|
141
|
+
children: e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
|
|
142
|
+
}, e))]
|
|
244
143
|
})]
|
|
245
144
|
})
|
|
246
145
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ T("div", {
|
|
248
147
|
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
249
148
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ w("div", {
|
|
251
150
|
className: "block md:hidden space-y-4 p-4",
|
|
252
|
-
children:
|
|
151
|
+
children: K.map((t) => /* @__PURE__ */ T("div", {
|
|
253
152
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
|
|
254
153
|
children: [
|
|
255
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ T("div", {
|
|
256
155
|
className: "flex justify-between items-start mb-3",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
258
157
|
className: "font-medium text-text-primary text-lg",
|
|
259
|
-
children:
|
|
260
|
-
}), /* @__PURE__ */
|
|
158
|
+
children: t.cartName
|
|
159
|
+
}), /* @__PURE__ */ w("p", {
|
|
261
160
|
className: "text-sm text-text-secondary",
|
|
262
|
-
children:
|
|
263
|
-
})] }), /* @__PURE__ */
|
|
264
|
-
className:
|
|
265
|
-
children:
|
|
161
|
+
children: H(t.orderDate)
|
|
162
|
+
})] }), /* @__PURE__ */ w("span", {
|
|
163
|
+
className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", W(t.status)),
|
|
164
|
+
children: t.status.replace(/_/g, " ")
|
|
266
165
|
})]
|
|
267
166
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ T("div", {
|
|
269
168
|
className: "grid grid-cols-2 gap-4 mb-3 text-sm",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
] }), /* @__PURE__ */ E("div", { children: [
|
|
284
|
-
/* @__PURE__ */ T("p", {
|
|
285
|
-
className: "text-text-secondary font-medium",
|
|
286
|
-
children: "Cart"
|
|
287
|
-
}),
|
|
288
|
-
/* @__PURE__ */ T("p", {
|
|
289
|
-
className: "text-text-primary",
|
|
290
|
-
children: e.cartName
|
|
291
|
-
}),
|
|
292
|
-
/* @__PURE__ */ T("p", {
|
|
293
|
-
className: "text-text-secondary text-xs",
|
|
294
|
-
children: e.cartOwner
|
|
295
|
-
})
|
|
296
|
-
] })]
|
|
169
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
170
|
+
className: "text-text-secondary font-medium",
|
|
171
|
+
children: "Items"
|
|
172
|
+
}), /* @__PURE__ */ T("p", {
|
|
173
|
+
className: "text-text-primary",
|
|
174
|
+
children: [t.items.length, " item(s)"]
|
|
175
|
+
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
176
|
+
className: "text-text-secondary font-medium",
|
|
177
|
+
children: "Order ID"
|
|
178
|
+
}), /* @__PURE__ */ w("p", {
|
|
179
|
+
className: "text-text-primary font-mono text-xs break-all",
|
|
180
|
+
children: t.id
|
|
181
|
+
})] })]
|
|
297
182
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ T("div", {
|
|
299
184
|
className: "flex justify-between items-center mb-3",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
301
186
|
className: "text-text-secondary font-medium text-sm",
|
|
302
187
|
children: "Amount"
|
|
303
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ w("p", {
|
|
304
189
|
className: "text-text-primary font-semibold text-lg",
|
|
305
|
-
children:
|
|
306
|
-
})] }), /* @__PURE__ */
|
|
190
|
+
children: V(t.total)
|
|
191
|
+
})] }), /* @__PURE__ */ T("div", {
|
|
307
192
|
className: "flex items-center gap-2",
|
|
308
|
-
children: [
|
|
193
|
+
children: [G(t.paymentStatus), /* @__PURE__ */ T("div", {
|
|
309
194
|
className: "text-right",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ w("p", {
|
|
311
196
|
className: "text-sm text-text-primary",
|
|
312
|
-
children:
|
|
313
|
-
}), /* @__PURE__ */
|
|
197
|
+
children: t.paymentMethod
|
|
198
|
+
}), /* @__PURE__ */ w("p", {
|
|
314
199
|
className: "text-xs text-text-secondary capitalize",
|
|
315
|
-
children:
|
|
200
|
+
children: t.paymentStatus
|
|
316
201
|
})]
|
|
317
202
|
})]
|
|
318
203
|
})]
|
|
319
204
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ T("button", {
|
|
321
206
|
type: "button",
|
|
322
207
|
onClick: () => {
|
|
323
|
-
|
|
208
|
+
R(t), B(!0);
|
|
324
209
|
},
|
|
325
210
|
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",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ w(p, { className: "h-4 w-4" }), " View Details"]
|
|
327
212
|
})
|
|
328
213
|
]
|
|
329
|
-
},
|
|
214
|
+
}, t.id))
|
|
330
215
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ w("div", {
|
|
332
217
|
className: "hidden md:block overflow-x-auto",
|
|
333
|
-
children: /* @__PURE__ */
|
|
218
|
+
children: /* @__PURE__ */ T("table", {
|
|
334
219
|
className: "w-full",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
|
|
336
221
|
className: "border-b border-border-subtle bg-bg-sunken/50",
|
|
337
222
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ w("th", {
|
|
339
224
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
340
225
|
children: "Order ID"
|
|
341
226
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ w("th", {
|
|
343
228
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
344
|
-
children: "
|
|
229
|
+
children: "Cart"
|
|
345
230
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ w("th", {
|
|
347
232
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
348
|
-
children: "
|
|
233
|
+
children: "Items"
|
|
349
234
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ w("th", {
|
|
351
236
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
352
237
|
children: "Amount"
|
|
353
238
|
}),
|
|
354
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ w("th", {
|
|
355
240
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
356
241
|
children: "Status"
|
|
357
242
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ w("th", {
|
|
359
244
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
360
245
|
children: "Payment"
|
|
361
246
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ w("th", {
|
|
363
248
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
364
249
|
children: "Time"
|
|
365
250
|
}),
|
|
366
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ w("th", {
|
|
367
252
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
368
253
|
children: "Actions"
|
|
369
254
|
})
|
|
370
255
|
]
|
|
371
|
-
}) }), /* @__PURE__ */
|
|
256
|
+
}) }), /* @__PURE__ */ w("tbody", {
|
|
372
257
|
className: "divide-y divide-border",
|
|
373
|
-
children:
|
|
258
|
+
children: K.map((t) => /* @__PURE__ */ T("tr", {
|
|
374
259
|
className: "hover:bg-accent/50 transition-colors",
|
|
375
260
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ w("td", {
|
|
377
262
|
className: "px-4 py-3 text-sm font-mono font-medium text-text-primary",
|
|
378
|
-
children:
|
|
379
|
-
}),
|
|
380
|
-
/* @__PURE__ */ E("td", {
|
|
381
|
-
className: "px-4 py-3",
|
|
382
|
-
children: [/* @__PURE__ */ T("div", {
|
|
383
|
-
className: "text-sm font-medium text-text-primary",
|
|
384
|
-
children: e.customerName
|
|
385
|
-
}), /* @__PURE__ */ T("div", {
|
|
386
|
-
className: "text-xs text-text-secondary",
|
|
387
|
-
children: e.customerPhone
|
|
388
|
-
})]
|
|
263
|
+
children: t.id.slice(0, 12)
|
|
389
264
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ w("td", {
|
|
391
266
|
className: "px-4 py-3",
|
|
392
|
-
children:
|
|
267
|
+
children: /* @__PURE__ */ w("div", {
|
|
393
268
|
className: "text-sm font-medium text-text-primary",
|
|
394
|
-
children:
|
|
395
|
-
})
|
|
396
|
-
className: "text-xs text-text-secondary",
|
|
397
|
-
children: e.cartOwner
|
|
398
|
-
})]
|
|
269
|
+
children: t.cartName
|
|
270
|
+
})
|
|
399
271
|
}),
|
|
400
272
|
/* @__PURE__ */ T("td", {
|
|
273
|
+
className: "px-4 py-3 text-sm text-text-secondary",
|
|
274
|
+
children: [t.items.length, " item(s)"]
|
|
275
|
+
}),
|
|
276
|
+
/* @__PURE__ */ w("td", {
|
|
401
277
|
className: "px-4 py-3 text-sm font-semibold text-text-primary",
|
|
402
|
-
children:
|
|
278
|
+
children: V(t.total)
|
|
403
279
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ w("td", {
|
|
405
281
|
className: "px-4 py-3",
|
|
406
|
-
children: /* @__PURE__ */
|
|
407
|
-
className:
|
|
408
|
-
children:
|
|
282
|
+
children: /* @__PURE__ */ w("span", {
|
|
283
|
+
className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", W(t.status)),
|
|
284
|
+
children: t.status.replace(/_/g, " ")
|
|
409
285
|
})
|
|
410
286
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ w("td", {
|
|
412
288
|
className: "px-4 py-3",
|
|
413
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ T("div", {
|
|
414
290
|
className: "flex items-center gap-2",
|
|
415
|
-
children: [
|
|
291
|
+
children: [G(t.paymentStatus), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("div", {
|
|
416
292
|
className: "text-sm text-text-primary",
|
|
417
|
-
children:
|
|
418
|
-
}), /* @__PURE__ */
|
|
293
|
+
children: t.paymentMethod
|
|
294
|
+
}), /* @__PURE__ */ w("div", {
|
|
419
295
|
className: "text-xs text-text-secondary capitalize",
|
|
420
|
-
children:
|
|
296
|
+
children: t.paymentStatus
|
|
421
297
|
})] })]
|
|
422
298
|
})
|
|
423
299
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ w("td", {
|
|
425
301
|
className: "px-4 py-3 text-sm text-text-secondary",
|
|
426
|
-
children:
|
|
302
|
+
children: H(t.orderDate)
|
|
427
303
|
}),
|
|
428
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ w("td", {
|
|
429
305
|
className: "px-4 py-3",
|
|
430
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ w("button", {
|
|
431
307
|
type: "button",
|
|
432
308
|
onClick: () => {
|
|
433
|
-
|
|
309
|
+
R(t), B(!0);
|
|
434
310
|
},
|
|
435
311
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
|
|
436
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ w(p, { className: "h-4 w-4" })
|
|
437
313
|
})
|
|
438
314
|
})
|
|
439
315
|
]
|
|
440
|
-
},
|
|
316
|
+
}, t.id))
|
|
441
317
|
})]
|
|
442
318
|
})
|
|
443
319
|
}),
|
|
444
|
-
|
|
320
|
+
K.length === 0 && /* @__PURE__ */ w(r, {
|
|
445
321
|
illustration: "empty-search",
|
|
446
|
-
title: "No orders found",
|
|
447
|
-
description: "No orders match your current search and filters. Try a different status
|
|
448
|
-
action: /* @__PURE__ */
|
|
322
|
+
title: k.length === 0 ? "No orders yet" : "No orders found",
|
|
323
|
+
description: k.length === 0 ? "Orders placed across the platform will appear here as they come in." : "No orders match your current search and filters. Try a different status or search term.",
|
|
324
|
+
action: k.length > 0 ? /* @__PURE__ */ w("button", {
|
|
449
325
|
type: "button",
|
|
450
326
|
onClick: () => {
|
|
451
|
-
|
|
327
|
+
P(""), I("all");
|
|
452
328
|
},
|
|
453
329
|
className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
454
330
|
children: "Clear filters"
|
|
455
|
-
})
|
|
331
|
+
}) : void 0
|
|
456
332
|
})
|
|
457
333
|
]
|
|
458
334
|
}),
|
|
459
|
-
|
|
335
|
+
z && L && /* @__PURE__ */ w("div", {
|
|
460
336
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
|
|
461
|
-
children: /* @__PURE__ */
|
|
337
|
+
children: /* @__PURE__ */ T("div", {
|
|
462
338
|
className: "w-full max-w-2xl rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ T("div", {
|
|
464
340
|
className: "flex items-center justify-between p-4 border-b border-border-subtle",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
466
342
|
className: "text-lg font-semibold text-text-primary",
|
|
467
343
|
children: "Order Details"
|
|
468
|
-
}), /* @__PURE__ */
|
|
344
|
+
}), /* @__PURE__ */ w("button", {
|
|
469
345
|
type: "button",
|
|
470
|
-
onClick: () =>
|
|
346
|
+
onClick: () => B(!1),
|
|
471
347
|
className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
|
|
472
|
-
children: /* @__PURE__ */
|
|
348
|
+
children: /* @__PURE__ */ w(S, { className: "h-5 w-5" })
|
|
473
349
|
})]
|
|
474
|
-
}), /* @__PURE__ */
|
|
350
|
+
}), /* @__PURE__ */ T("div", {
|
|
475
351
|
className: "p-4 space-y-6",
|
|
476
352
|
children: [
|
|
477
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
478
354
|
className: "font-semibold text-text-primary mb-3",
|
|
479
355
|
children: "Order Information"
|
|
480
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ T("div", {
|
|
481
357
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
482
358
|
children: [
|
|
483
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
484
360
|
className: "text-sm text-text-secondary",
|
|
485
361
|
children: "Order ID"
|
|
486
|
-
}), /* @__PURE__ */
|
|
487
|
-
className: "font-medium text-text-primary",
|
|
488
|
-
children:
|
|
362
|
+
}), /* @__PURE__ */ w("p", {
|
|
363
|
+
className: "font-medium text-text-primary font-mono text-sm break-all",
|
|
364
|
+
children: L.id
|
|
489
365
|
})] }),
|
|
490
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
491
367
|
className: "text-sm text-text-secondary",
|
|
492
368
|
children: "Status"
|
|
493
|
-
}), /* @__PURE__ */
|
|
494
|
-
className:
|
|
495
|
-
children:
|
|
369
|
+
}), /* @__PURE__ */ w("span", {
|
|
370
|
+
className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", W(L.status)),
|
|
371
|
+
children: L.status.replace(/_/g, " ")
|
|
496
372
|
})] }),
|
|
497
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
498
374
|
className: "text-sm text-text-secondary",
|
|
499
375
|
children: "Order Date"
|
|
500
|
-
}), /* @__PURE__ */
|
|
376
|
+
}), /* @__PURE__ */ w("p", {
|
|
501
377
|
className: "font-medium text-text-primary",
|
|
502
|
-
children:
|
|
378
|
+
children: H(L.orderDate)
|
|
503
379
|
})] }),
|
|
504
|
-
/* @__PURE__ */
|
|
380
|
+
L.estimatedDeliveryTime && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
505
381
|
className: "text-sm text-text-secondary",
|
|
506
|
-
children: "Delivery
|
|
507
|
-
}), /* @__PURE__ */
|
|
382
|
+
children: "Estimated Delivery"
|
|
383
|
+
}), /* @__PURE__ */ w("p", {
|
|
508
384
|
className: "font-medium text-text-primary",
|
|
509
|
-
children:
|
|
385
|
+
children: H(L.estimatedDeliveryTime)
|
|
510
386
|
})] })
|
|
511
387
|
]
|
|
512
388
|
})] }),
|
|
513
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h3", {
|
|
514
390
|
className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
516
|
-
}), /* @__PURE__ */
|
|
517
|
-
className: "
|
|
518
|
-
children:
|
|
519
|
-
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
520
|
-
className: "text-sm text-text-secondary",
|
|
521
|
-
children: "Name"
|
|
522
|
-
}), /* @__PURE__ */ T("p", {
|
|
523
|
-
className: "font-medium text-text-primary",
|
|
524
|
-
children: U.customerName
|
|
525
|
-
})] }),
|
|
526
|
-
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
527
|
-
className: "text-sm text-text-secondary",
|
|
528
|
-
children: "Phone"
|
|
529
|
-
}), /* @__PURE__ */ E("p", {
|
|
530
|
-
className: "font-medium text-text-primary flex items-center gap-1",
|
|
531
|
-
children: [/* @__PURE__ */ T(g, { className: "h-3 w-3" }), U.customerPhone]
|
|
532
|
-
})] }),
|
|
533
|
-
/* @__PURE__ */ E("div", {
|
|
534
|
-
className: "sm:col-span-2",
|
|
535
|
-
children: [/* @__PURE__ */ T("p", {
|
|
536
|
-
className: "text-sm text-text-secondary",
|
|
537
|
-
children: "Delivery Address"
|
|
538
|
-
}), /* @__PURE__ */ E("p", {
|
|
539
|
-
className: "font-medium text-text-primary flex items-center gap-1",
|
|
540
|
-
children: [/* @__PURE__ */ T(h, { className: "h-3 w-3" }), U.deliveryAddress]
|
|
541
|
-
})]
|
|
542
|
-
})
|
|
543
|
-
]
|
|
391
|
+
children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), " Cart"]
|
|
392
|
+
}), /* @__PURE__ */ w("p", {
|
|
393
|
+
className: "font-medium text-text-primary",
|
|
394
|
+
children: L.cartName
|
|
544
395
|
})] }),
|
|
545
|
-
/* @__PURE__ */
|
|
396
|
+
J(L) !== "—" && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
546
397
|
className: "font-semibold text-text-primary mb-3",
|
|
547
|
-
children: "
|
|
548
|
-
}), /* @__PURE__ */
|
|
549
|
-
className: "
|
|
550
|
-
children: [/* @__PURE__ */
|
|
551
|
-
className: "text-sm text-text-secondary",
|
|
552
|
-
children: "Cart Name"
|
|
553
|
-
}), /* @__PURE__ */ T("p", {
|
|
554
|
-
className: "font-medium text-text-primary",
|
|
555
|
-
children: U.cartName
|
|
556
|
-
})] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
557
|
-
className: "text-sm text-text-secondary",
|
|
558
|
-
children: "Cart Owner"
|
|
559
|
-
}), /* @__PURE__ */ T("p", {
|
|
560
|
-
className: "font-medium text-text-primary",
|
|
561
|
-
children: U.cartOwner
|
|
562
|
-
})] })]
|
|
398
|
+
children: "Delivery Address"
|
|
399
|
+
}), /* @__PURE__ */ T("p", {
|
|
400
|
+
className: "font-medium text-text-primary flex items-start gap-1",
|
|
401
|
+
children: [/* @__PURE__ */ w(g, { className: "h-3 w-3 mt-1 shrink-0" }), J(L)]
|
|
563
402
|
})] }),
|
|
564
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
565
404
|
className: "font-semibold text-text-primary mb-3",
|
|
566
405
|
children: "Order Items"
|
|
567
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ T("div", {
|
|
568
407
|
className: "rounded-lg bg-bg-sunken/50 p-4",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [L.items.length > 0 ? /* @__PURE__ */ w("ul", {
|
|
570
409
|
className: "space-y-2",
|
|
571
|
-
children:
|
|
572
|
-
className: "text-sm text-text-primary",
|
|
573
|
-
children:
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
410
|
+
children: L.items.map((e) => /* @__PURE__ */ T("li", {
|
|
411
|
+
className: "flex justify-between text-sm text-text-primary",
|
|
412
|
+
children: [/* @__PURE__ */ T("span", { children: [
|
|
413
|
+
e.name,
|
|
414
|
+
" × ",
|
|
415
|
+
e.quantity
|
|
416
|
+
] }), /* @__PURE__ */ w("span", {
|
|
417
|
+
className: "font-medium",
|
|
418
|
+
children: V(e.price * e.quantity)
|
|
419
|
+
})]
|
|
420
|
+
}, e.id))
|
|
421
|
+
}) : /* @__PURE__ */ w("p", {
|
|
422
|
+
className: "text-sm text-text-secondary",
|
|
423
|
+
children: "No line items recorded."
|
|
424
|
+
}), /* @__PURE__ */ T("div", {
|
|
425
|
+
className: "mt-4 pt-4 border-t border-border-subtle space-y-1 text-sm",
|
|
426
|
+
children: [
|
|
427
|
+
/* @__PURE__ */ T("div", {
|
|
428
|
+
className: "flex justify-between text-text-secondary",
|
|
429
|
+
children: [/* @__PURE__ */ w("span", { children: "Subtotal" }), /* @__PURE__ */ w("span", { children: V(L.subtotal) })]
|
|
430
|
+
}),
|
|
431
|
+
/* @__PURE__ */ T("div", {
|
|
432
|
+
className: "flex justify-between text-text-secondary",
|
|
433
|
+
children: [/* @__PURE__ */ w("span", { children: "Taxes" }), /* @__PURE__ */ w("span", { children: V(L.taxes) })]
|
|
434
|
+
}),
|
|
435
|
+
/* @__PURE__ */ T("div", {
|
|
436
|
+
className: "flex justify-between text-text-secondary",
|
|
437
|
+
children: [/* @__PURE__ */ w("span", { children: "Delivery Fee" }), /* @__PURE__ */ w("span", { children: V(L.deliveryFee) })]
|
|
438
|
+
}),
|
|
439
|
+
L.discount ? /* @__PURE__ */ T("div", {
|
|
440
|
+
className: "flex justify-between text-text-secondary",
|
|
441
|
+
children: [/* @__PURE__ */ w("span", { children: "Discount" }), /* @__PURE__ */ T("span", { children: ["-", V(L.discount)] })]
|
|
442
|
+
}) : null,
|
|
443
|
+
/* @__PURE__ */ T("div", {
|
|
444
|
+
className: "flex justify-between pt-2 border-t border-border-subtle font-semibold text-text-primary text-base",
|
|
445
|
+
children: [/* @__PURE__ */ w("span", { children: "Total" }), /* @__PURE__ */ w("span", { children: V(L.total) })]
|
|
446
|
+
})
|
|
447
|
+
]
|
|
584
448
|
})]
|
|
585
449
|
})] }),
|
|
586
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
587
451
|
className: "font-semibold text-text-primary mb-3",
|
|
588
452
|
children: "Payment Details"
|
|
589
|
-
}), /* @__PURE__ */
|
|
453
|
+
}), /* @__PURE__ */ T("div", {
|
|
590
454
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
592
456
|
className: "text-sm text-text-secondary",
|
|
593
457
|
children: "Method"
|
|
594
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ w("p", {
|
|
595
459
|
className: "font-medium text-text-primary",
|
|
596
|
-
children:
|
|
597
|
-
})] }), /* @__PURE__ */
|
|
460
|
+
children: L.paymentMethod
|
|
461
|
+
})] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
598
462
|
className: "text-sm text-text-secondary",
|
|
599
463
|
children: "Status"
|
|
600
|
-
}), /* @__PURE__ */
|
|
464
|
+
}), /* @__PURE__ */ T("div", {
|
|
601
465
|
className: "flex items-center gap-2",
|
|
602
|
-
children: [
|
|
466
|
+
children: [G(L.paymentStatus), /* @__PURE__ */ w("span", {
|
|
603
467
|
className: "font-medium text-text-primary capitalize",
|
|
604
|
-
children:
|
|
468
|
+
children: L.paymentStatus
|
|
605
469
|
})]
|
|
606
470
|
})] })]
|
|
607
471
|
})] }),
|
|
608
|
-
|
|
609
|
-
className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
610
|
-
children: [/* @__PURE__ */ T(x, { className: "h-4 w-4" }), " Delivery Assignment"]
|
|
611
|
-
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
612
|
-
className: "text-sm text-text-secondary",
|
|
613
|
-
children: "Assigned Worker"
|
|
614
|
-
}), /* @__PURE__ */ T("p", {
|
|
615
|
-
className: "font-medium text-text-primary",
|
|
616
|
-
children: U.workerAssigned
|
|
617
|
-
})] })] }),
|
|
618
|
-
U.notes && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
|
|
472
|
+
L.customerNotes && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
|
|
619
473
|
className: "font-semibold text-text-primary mb-3",
|
|
620
474
|
children: "Special Instructions"
|
|
621
|
-
}), /* @__PURE__ */
|
|
475
|
+
}), /* @__PURE__ */ w("p", {
|
|
622
476
|
className: "text-sm rounded-lg bg-bg-sunken/50 p-3 text-text-primary",
|
|
623
|
-
children:
|
|
477
|
+
children: L.customerNotes
|
|
624
478
|
})] }),
|
|
625
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ T("div", {
|
|
626
480
|
className: "flex flex-col sm:flex-row sm:justify-end gap-3 pt-2",
|
|
627
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ w("button", {
|
|
628
482
|
type: "button",
|
|
629
|
-
onClick: () =>
|
|
483
|
+
onClick: () => B(!1),
|
|
630
484
|
className: "rounded-lg border border-border-subtle py-2 px-4 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
631
485
|
children: "Close"
|
|
632
|
-
}),
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
/* @__PURE__ */ T("option", {
|
|
642
|
-
value: "confirmed",
|
|
643
|
-
children: "Confirmed"
|
|
644
|
-
}),
|
|
645
|
-
/* @__PURE__ */ T("option", {
|
|
646
|
-
value: "preparing",
|
|
647
|
-
children: "Preparing"
|
|
648
|
-
}),
|
|
649
|
-
/* @__PURE__ */ T("option", {
|
|
650
|
-
value: "ready",
|
|
651
|
-
children: "Ready"
|
|
652
|
-
}),
|
|
653
|
-
/* @__PURE__ */ T("option", {
|
|
654
|
-
value: "out_for_delivery",
|
|
655
|
-
children: "Out for Delivery"
|
|
656
|
-
}),
|
|
657
|
-
/* @__PURE__ */ T("option", {
|
|
658
|
-
value: "delivered",
|
|
659
|
-
children: "Delivered"
|
|
660
|
-
}),
|
|
661
|
-
/* @__PURE__ */ T("option", {
|
|
662
|
-
value: "cancelled",
|
|
663
|
-
children: "Cancelled"
|
|
664
|
-
})
|
|
665
|
-
]
|
|
486
|
+
}), L.status !== "delivered" && L.status !== "cancelled" && /* @__PURE__ */ w("select", {
|
|
487
|
+
disabled: M.isPending,
|
|
488
|
+
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)] disabled:opacity-50",
|
|
489
|
+
value: L.status,
|
|
490
|
+
onChange: (e) => q(L.id, e.target.value),
|
|
491
|
+
children: O.map((e) => /* @__PURE__ */ w("option", {
|
|
492
|
+
value: e,
|
|
493
|
+
children: e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
|
|
494
|
+
}, e))
|
|
666
495
|
})]
|
|
667
496
|
})
|
|
668
497
|
]
|
|
@@ -673,6 +502,6 @@ function A() {
|
|
|
673
502
|
});
|
|
674
503
|
}
|
|
675
504
|
//#endregion
|
|
676
|
-
export {
|
|
505
|
+
export { k as AdminOrdersPage };
|
|
677
506
|
|
|
678
507
|
//# sourceMappingURL=AdminOrdersPage.js.map
|