@burdenoff/microfe-healthybowl 2026.714.1 → 2026.714.3
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/healthybowl/HealthyBowlRoutes.js +123 -107
- package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
- package/dist/healthybowl/hooks/useOrderPayments.js +87 -0
- package/dist/healthybowl/hooks/useOrderPayments.js.map +1 -0
- package/dist/healthybowl/hooks/useSharedMarket.js +54 -0
- package/dist/healthybowl/hooks/useSharedMarket.js.map +1 -0
- package/dist/healthybowl/pages/marketplace/MarketplacePage.js +484 -432
- package/dist/healthybowl/pages/marketplace/MarketplacePage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/OrdersPage.js +400 -267
- package/dist/healthybowl/pages/marketplace/OrdersPage.js.map +1 -1
- package/dist/healthybowl/pages/marketplace/SharedMarketView.js +247 -0
- package/dist/healthybowl/pages/marketplace/SharedMarketView.js.map +1 -0
- package/dist/healthybowl/pages/satellite/CropHealthAlertsPage.js +188 -0
- package/dist/healthybowl/pages/satellite/CropHealthAlertsPage.js.map +1 -0
- package/dist/healthybowl/pages/satellite/NdviComparePanel.js +196 -0
- package/dist/healthybowl/pages/satellite/NdviComparePanel.js.map +1 -0
- package/dist/healthybowl/pages/satellite/NdviGridThumbnail.js +44 -0
- package/dist/healthybowl/pages/satellite/NdviGridThumbnail.js.map +1 -0
- package/dist/healthybowl/pages/satellite/NdviHeatmapMap.js +144 -0
- package/dist/healthybowl/pages/satellite/NdviHeatmapMap.js.map +1 -0
- package/dist/healthybowl/pages/satellite/SatelliteCropHealthPage.js +278 -0
- package/dist/healthybowl/pages/satellite/SatelliteCropHealthPage.js.map +1 -0
- package/dist/healthybowl/pages/satellite/SatelliteFieldDetailPage.js +447 -0
- package/dist/healthybowl/pages/satellite/SatelliteFieldDetailPage.js.map +1 -0
- package/dist/healthybowl/pages/satellite/SatelliteSettingsPage.js +252 -0
- package/dist/healthybowl/pages/satellite/SatelliteSettingsPage.js.map +1 -0
- package/dist/healthybowl/pages/satellite/YieldReportPanel.js +236 -0
- package/dist/healthybowl/pages/satellite/YieldReportPanel.js.map +1 -0
- package/dist/healthybowl/pages/satellite/YieldSimulationPanel.js +363 -0
- package/dist/healthybowl/pages/satellite/YieldSimulationPanel.js.map +1 -0
- package/dist/healthybowl/pages/satellite/ndviColors.js +116 -0
- package/dist/healthybowl/pages/satellite/ndviColors.js.map +1 -0
- package/dist/healthybowl/pages/satellite/satelliteApi.js +191 -0
- package/dist/healthybowl/pages/satellite/satelliteApi.js.map +1 -0
- package/dist/healthybowl/pages/satellite/useSatelliteApi.js +15 -0
- package/dist/healthybowl/pages/satellite/useSatelliteApi.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/Scatter.js +368 -0
- package/dist/node_modules/recharts/es6/cartesian/Scatter.js.map +1 -0
- package/dist/node_modules/recharts/es6/cartesian/ZAxis.js +103 -0
- package/dist/node_modules/recharts/es6/cartesian/ZAxis.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/ComposedChart.js +38 -0
- package/dist/node_modules/recharts/es6/chart/ComposedChart.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/DataUtils.js +12 -2
- package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ScatterUtils.js +48 -0
- package/dist/node_modules/recharts/es6/util/ScatterUtils.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,65 +2,66 @@ import { cn as e, formatCurrency as t, formatDate as n } from "../../utils/helpe
|
|
|
2
2
|
import { PageLayout as r } from "../../components/PageLayout.js";
|
|
3
3
|
import { StatCard as i } from "../../components/StatCard.js";
|
|
4
4
|
import { StatusBadge as a } from "../../components/StatusBadge.js";
|
|
5
|
-
import { EmptyState as
|
|
6
|
-
import { ErrorState as
|
|
7
|
-
import { ToastContainer as
|
|
8
|
-
import { useConfirm as
|
|
9
|
-
import { Breadcrumbs as
|
|
10
|
-
import { PageLoader as
|
|
11
|
-
import { Modal as
|
|
12
|
-
import { useToast as
|
|
5
|
+
import { EmptyState as o } from "../../components/EmptyState.js";
|
|
6
|
+
import { ErrorState as s } from "../../components/ErrorState.js";
|
|
7
|
+
import { ToastContainer as c } from "../../components/Toast.js";
|
|
8
|
+
import { useConfirm as ee } from "../../components/ConfirmDialog.js";
|
|
9
|
+
import { Breadcrumbs as te } from "../../components/Breadcrumbs.js";
|
|
10
|
+
import { PageLoader as ne } from "../../components/PageLoader.js";
|
|
11
|
+
import { Modal as re } from "../../components/Modal.js";
|
|
12
|
+
import { useToast as ie } from "../../hooks/useToast.js";
|
|
13
13
|
import "../../components/index.js";
|
|
14
|
-
import { useHealthyBowlData as
|
|
15
|
-
import { useHealthyBowlStore as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
14
|
+
import { useHealthyBowlData as ae } from "../../hooks/useHealthyBowlData.js";
|
|
15
|
+
import { useHealthyBowlStore as oe } from "../../store/healthybowlStore.js";
|
|
16
|
+
import { loadRazorpayCheckout as se, useOrderPayments as l } from "../../hooks/useOrderPayments.js";
|
|
17
|
+
import { useEffect as u, useState as d } from "react";
|
|
18
|
+
import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
+
import { Calendar as p, CheckCircle as m, ChevronDown as ce, ChevronUp as le, Clock as h, CreditCard as g, Info as ue, Package as _, ReceiptText as de, RotateCcw as fe, Search as pe, Truck as v, Wallet as me, X as he, XCircle as y } from "lucide-react";
|
|
20
|
+
import { useLocation as ge, useNavigate as _e } from "react-router-dom";
|
|
21
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
22
|
+
import { Button as S } from "@burdenoff/fe-libs/ui";
|
|
22
23
|
//#region src/healthybowl/pages/marketplace/OrdersPage.tsx
|
|
23
|
-
var
|
|
24
|
+
var C = [
|
|
24
25
|
"All",
|
|
25
26
|
"Pending",
|
|
26
27
|
"Confirmed",
|
|
27
28
|
"Shipped",
|
|
28
29
|
"Delivered",
|
|
29
30
|
"Cancelled"
|
|
30
|
-
],
|
|
31
|
+
], w = (e) => ({
|
|
31
32
|
delivered: "success",
|
|
32
33
|
shipped: "info",
|
|
33
34
|
confirmed: "warning",
|
|
34
35
|
pending: "muted",
|
|
35
36
|
cancelled: "error"
|
|
36
|
-
})[e] ?? "muted",
|
|
37
|
+
})[e] ?? "muted", T = (e) => {
|
|
37
38
|
switch (e) {
|
|
38
|
-
case "delivered": return /* @__PURE__ */
|
|
39
|
-
case "shipped": return /* @__PURE__ */
|
|
40
|
-
case "confirmed": return /* @__PURE__ */
|
|
41
|
-
case "cancelled": return /* @__PURE__ */
|
|
42
|
-
default: return /* @__PURE__ */
|
|
39
|
+
case "delivered": return /* @__PURE__ */ b(m, { className: "h-4 w-4" });
|
|
40
|
+
case "shipped": return /* @__PURE__ */ b(v, { className: "h-4 w-4" });
|
|
41
|
+
case "confirmed": return /* @__PURE__ */ b(h, { className: "h-4 w-4" });
|
|
42
|
+
case "cancelled": return /* @__PURE__ */ b(y, { className: "h-4 w-4" });
|
|
43
|
+
default: return /* @__PURE__ */ b(h, { className: "h-4 w-4" });
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
+
}, E = (e) => ({
|
|
45
46
|
paid: "success",
|
|
46
47
|
pending: "warning",
|
|
47
48
|
refunded: "error"
|
|
48
|
-
})[e] ?? "muted",
|
|
49
|
-
let { t:
|
|
49
|
+
})[e] ?? "muted", D = () => {
|
|
50
|
+
let { t: D } = f(), O = ee(), { orders: k, errors: A, loadings: j, updateOrder: M, refetch: N } = ae(), { payments: P, refetchPayments: F, checkoutOrder: I, syncOrderPayment: ve } = l(), ye = (e) => {
|
|
50
51
|
switch (e) {
|
|
51
|
-
case "All": return
|
|
52
|
-
case "Pending": return
|
|
53
|
-
case "Confirmed": return
|
|
54
|
-
case "Shipped": return
|
|
55
|
-
case "Delivered": return
|
|
56
|
-
case "Cancelled": return
|
|
52
|
+
case "All": return D("healthybowl.common.all", "All");
|
|
53
|
+
case "Pending": return D("healthybowl.marketplace.orders.tabs.pending", "Pending");
|
|
54
|
+
case "Confirmed": return D("healthybowl.marketplace.orders.tabs.confirmed", "Confirmed");
|
|
55
|
+
case "Shipped": return D("healthybowl.marketplace.orders.tabs.shipped", "Shipped");
|
|
56
|
+
case "Delivered": return D("healthybowl.marketplace.orders.tabs.delivered", "Delivered");
|
|
57
|
+
case "Cancelled": return D("healthybowl.marketplace.orders.tabs.cancelled", "Cancelled");
|
|
57
58
|
default: return e;
|
|
58
59
|
}
|
|
59
|
-
}, [L, R] = d(""), [z, B] = d("All"), [V, H] = d(null), [U, W] = d(null), [G, K] = d(null), { toasts:
|
|
60
|
-
|
|
60
|
+
}, [L, R] = d(""), [z, B] = d("All"), [be, xe] = d(null), [V, H] = d(null), [U, W] = d(null), [G, K] = d(null), { toasts: Se, toast: q, dismiss: Ce } = ie(), { addToCart: we } = oe(), J = ge(), Y = _e();
|
|
61
|
+
u(() => {
|
|
61
62
|
J.state?.orderPlaced && (q({
|
|
62
|
-
title:
|
|
63
|
-
description:
|
|
63
|
+
title: D("healthybowl.marketplace.orders.toast.placed.title", "Order placed"),
|
|
64
|
+
description: D("healthybowl.marketplace.orders.toast.placed.description", "Your order has been placed. Use \"Pay Now\" on the order to pay for it."),
|
|
64
65
|
variant: "success"
|
|
65
66
|
}), Y(J.pathname, {
|
|
66
67
|
replace: !0,
|
|
@@ -71,24 +72,24 @@ var T = [
|
|
|
71
72
|
J.pathname,
|
|
72
73
|
Y,
|
|
73
74
|
q,
|
|
74
|
-
|
|
75
|
+
D
|
|
75
76
|
]);
|
|
76
|
-
let X =
|
|
77
|
+
let X = k.filter((e) => {
|
|
77
78
|
let t = (e.orderNumber ?? "").toLowerCase().includes(L.toLowerCase()), n = z === "All" || e.status === z.toLowerCase();
|
|
78
79
|
return t && n;
|
|
79
|
-
}), Z =
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
80
|
+
}), Z = k.length, Te = k.filter((e) => e.status === "delivered").length, Ee = k.filter((e) => e.status === "shipped").length, De = k.filter((e) => e.status === "pending" || e.status === "confirmed").length, Oe = (e) => {
|
|
81
|
+
xe((t) => t === e ? null : e);
|
|
82
|
+
}, Q = (e) => {
|
|
83
|
+
H(e);
|
|
83
84
|
}, $ = async (e, t, n) => {
|
|
84
|
-
|
|
85
|
+
W(e.id);
|
|
85
86
|
try {
|
|
86
|
-
await
|
|
87
|
+
await M({
|
|
87
88
|
id: e.id,
|
|
88
89
|
status: t
|
|
89
90
|
}), q({
|
|
90
91
|
title: n,
|
|
91
|
-
description:
|
|
92
|
+
description: D("healthybowl.marketplace.orders.toast.statusChanged", "{{orderNumber}} is now {{status}}.", {
|
|
92
93
|
orderNumber: e.orderNumber,
|
|
93
94
|
status: t
|
|
94
95
|
}),
|
|
@@ -96,58 +97,178 @@ var T = [
|
|
|
96
97
|
});
|
|
97
98
|
} catch (e) {
|
|
98
99
|
q({
|
|
99
|
-
title:
|
|
100
|
-
description: e instanceof Error ? e.message :
|
|
100
|
+
title: D("healthybowl.marketplace.orders.toast.updateFailed", "Update failed"),
|
|
101
|
+
description: e instanceof Error ? e.message : D("healthybowl.common.error", "Unknown error"),
|
|
101
102
|
variant: "error"
|
|
102
103
|
});
|
|
103
104
|
} finally {
|
|
104
|
-
|
|
105
|
+
W(null);
|
|
105
106
|
}
|
|
106
|
-
},
|
|
107
|
-
K(e.id);
|
|
107
|
+
}, ke = async (e) => {
|
|
108
108
|
try {
|
|
109
|
-
await
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
let t = await ve(e.id);
|
|
110
|
+
await Promise.all([N(), F()]).catch(() => void 0), (t.paymentStatus ?? "").toLowerCase() === "paid" ? q({
|
|
111
|
+
title: D("healthybowl.marketplace.orders.toast.paid.title", "Payment confirmed"),
|
|
112
|
+
description: t.paymentReference ? D("healthybowl.marketplace.orders.toast.paid.withRef", "{{orderNumber}} paid — reference {{reference}}.", {
|
|
113
|
+
orderNumber: e.orderNumber,
|
|
114
|
+
reference: t.paymentReference
|
|
115
|
+
}) : D("healthybowl.marketplace.orders.toast.paid.description", "{{orderNumber}} is now paid.", { orderNumber: e.orderNumber }),
|
|
115
116
|
variant: "success"
|
|
117
|
+
}) : q({
|
|
118
|
+
title: D("healthybowl.marketplace.orders.toast.notPaid.title", "Payment not completed"),
|
|
119
|
+
description: D("healthybowl.marketplace.orders.toast.notPaid.description", "{{orderNumber}} is still pending. Nothing was charged — you can pay again any time.", { orderNumber: e.orderNumber }),
|
|
120
|
+
variant: "info"
|
|
116
121
|
});
|
|
117
122
|
} catch (e) {
|
|
118
123
|
q({
|
|
119
|
-
title:
|
|
120
|
-
description: e instanceof Error ? e.message :
|
|
124
|
+
title: D("healthybowl.marketplace.orders.toast.syncFailed.title", "Could not confirm the payment"),
|
|
125
|
+
description: e instanceof Error ? e.message : D("healthybowl.common.error", "Unknown error"),
|
|
121
126
|
variant: "error"
|
|
122
127
|
});
|
|
123
128
|
} finally {
|
|
124
|
-
K(null);
|
|
129
|
+
K((t) => t === e.id ? null : t);
|
|
125
130
|
}
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
}, Ae = async (e) => {
|
|
132
|
+
K(e.id);
|
|
133
|
+
let t = !1;
|
|
134
|
+
try {
|
|
135
|
+
let n = await I(e.id);
|
|
136
|
+
if (n.provider !== "RAZORPAY") {
|
|
137
|
+
q({
|
|
138
|
+
title: D("healthybowl.marketplace.orders.toast.unsupportedProvider.title", "Unsupported payment provider"),
|
|
139
|
+
description: D("healthybowl.marketplace.orders.toast.unsupportedProvider.description", "Billing routed this order to {{provider}}, which this checkout cannot open yet. Settle it offline, or contact support.", { provider: n.provider }),
|
|
140
|
+
variant: "warning"
|
|
141
|
+
});
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (!n.providerOrderId || !n.razorpayKeyId) {
|
|
145
|
+
q({
|
|
146
|
+
title: D("healthybowl.marketplace.orders.toast.checkoutIncomplete.title", "Payment session incomplete"),
|
|
147
|
+
description: D("healthybowl.marketplace.orders.toast.checkoutIncomplete.description", "Billing did not return the handles needed to open the checkout. Please try again."),
|
|
148
|
+
variant: "error"
|
|
149
|
+
});
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
let r = await se(), i = !1, a = () => {
|
|
153
|
+
i || (i = !0, ke(e));
|
|
154
|
+
};
|
|
155
|
+
new r({
|
|
156
|
+
key: n.razorpayKeyId,
|
|
157
|
+
order_id: n.providerOrderId,
|
|
158
|
+
amount: Math.round(n.total * 100),
|
|
159
|
+
currency: n.currency,
|
|
160
|
+
name: "HealthyBowl",
|
|
161
|
+
description: e.orderNumber,
|
|
162
|
+
handler: a,
|
|
163
|
+
modal: { ondismiss: a }
|
|
164
|
+
}).open(), t = !0;
|
|
165
|
+
} catch (e) {
|
|
166
|
+
q({
|
|
167
|
+
title: D("healthybowl.marketplace.orders.toast.checkoutFailed.title", "Could not start the payment"),
|
|
168
|
+
description: e instanceof Error ? e.message : D("healthybowl.common.error", "Unknown error"),
|
|
169
|
+
variant: "error"
|
|
170
|
+
});
|
|
171
|
+
} finally {
|
|
172
|
+
t || K(null);
|
|
173
|
+
}
|
|
174
|
+
}, je = async (e) => {
|
|
175
|
+
if (await O({
|
|
176
|
+
title: D("healthybowl.marketplace.orders.confirm.offline.title", "Record an offline payment?"),
|
|
177
|
+
message: D("healthybowl.marketplace.orders.confirm.offline.message", "{{orderNumber}} will be marked paid without going through the payment gateway — use this only when the buyer has settled in cash or by bank transfer. To take a real card/UPI payment, use \"Pay Now\" instead.", { orderNumber: e.orderNumber }),
|
|
178
|
+
okButtonTitle: D("healthybowl.marketplace.orders.actions.markPaidOffline", "Mark Paid (Offline)"),
|
|
179
|
+
cancelButtonTitle: D("healthybowl.common.cancel", "Cancel")
|
|
180
|
+
})) {
|
|
181
|
+
W(e.id);
|
|
129
182
|
try {
|
|
130
|
-
await
|
|
183
|
+
await M({
|
|
184
|
+
id: e.id,
|
|
185
|
+
paymentStatus: "paid"
|
|
186
|
+
}), await F(), q({
|
|
187
|
+
title: D("healthybowl.marketplace.orders.toast.paymentRecorded.title", "Offline payment recorded"),
|
|
188
|
+
description: D("healthybowl.marketplace.orders.toast.paymentRecorded.description", "{{orderNumber}} marked paid offline (no gateway reference).", { orderNumber: e.orderNumber }),
|
|
189
|
+
variant: "success"
|
|
190
|
+
});
|
|
191
|
+
} catch (e) {
|
|
192
|
+
q({
|
|
193
|
+
title: D("healthybowl.marketplace.orders.toast.updateFailed", "Update failed"),
|
|
194
|
+
description: e instanceof Error ? e.message : D("healthybowl.common.error", "Unknown error"),
|
|
195
|
+
variant: "error"
|
|
196
|
+
});
|
|
197
|
+
} finally {
|
|
198
|
+
W(null);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}, Me = async (e) => {
|
|
202
|
+
if (await O({ message: D("healthybowl.marketplace.orders.confirm.cancel", "Cancel order {{orderNumber}}? This cannot be undone.", { orderNumber: e.orderNumber }) })) {
|
|
203
|
+
W(e.id);
|
|
204
|
+
try {
|
|
205
|
+
await M({
|
|
131
206
|
id: e.id,
|
|
132
207
|
status: "cancelled"
|
|
133
208
|
}), q({
|
|
134
|
-
title:
|
|
209
|
+
title: D("healthybowl.marketplace.orders.toast.cancelled", "Order cancelled"),
|
|
135
210
|
description: e.orderNumber,
|
|
136
211
|
variant: "success"
|
|
137
212
|
});
|
|
138
213
|
} catch (e) {
|
|
139
214
|
q({
|
|
140
|
-
title:
|
|
141
|
-
description: e instanceof Error ? e.message :
|
|
215
|
+
title: D("healthybowl.marketplace.orders.toast.updateFailed", "Update failed"),
|
|
216
|
+
description: e instanceof Error ? e.message : D("healthybowl.common.error", "Unknown error"),
|
|
142
217
|
variant: "error"
|
|
143
218
|
});
|
|
144
219
|
} finally {
|
|
145
|
-
|
|
220
|
+
W(null);
|
|
146
221
|
}
|
|
147
222
|
}
|
|
148
|
-
},
|
|
223
|
+
}, Ne = (e) => {
|
|
224
|
+
if (e.paymentStatus !== "paid") return null;
|
|
225
|
+
let r = P[e.id], i = (r?.paymentProvider ?? "").toUpperCase(), a = i === "MANUAL";
|
|
226
|
+
return /* @__PURE__ */ x("div", {
|
|
227
|
+
className: "mt-2 space-y-1.5 rounded-md border border-border-subtle bg-bg-sunken/40 px-3 py-2",
|
|
228
|
+
children: [
|
|
229
|
+
/* @__PURE__ */ x("div", {
|
|
230
|
+
className: "flex items-center gap-2 text-xs font-medium text-text-primary",
|
|
231
|
+
children: [/* @__PURE__ */ b(de, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary" }), a ? D("healthybowl.marketplace.orders.payment.offline", "Paid offline") : i ? D("healthybowl.marketplace.orders.payment.viaProvider", "Paid via {{provider}}", { provider: i }) : D("healthybowl.marketplace.orders.payment.paid", "Paid")]
|
|
232
|
+
}),
|
|
233
|
+
r?.paymentReference && /* @__PURE__ */ x("div", {
|
|
234
|
+
className: "flex items-center justify-between gap-2 text-xs",
|
|
235
|
+
children: [/* @__PURE__ */ b("span", {
|
|
236
|
+
className: "text-text-secondary",
|
|
237
|
+
children: D("healthybowl.marketplace.orders.payment.reference", "Payment reference")
|
|
238
|
+
}), /* @__PURE__ */ b("span", {
|
|
239
|
+
className: "break-all font-mono text-text-primary",
|
|
240
|
+
children: r.paymentReference
|
|
241
|
+
})]
|
|
242
|
+
}),
|
|
243
|
+
r?.paidAmount != null && /* @__PURE__ */ x("div", {
|
|
244
|
+
className: "flex items-center justify-between gap-2 text-xs",
|
|
245
|
+
children: [/* @__PURE__ */ b("span", {
|
|
246
|
+
className: "text-text-secondary",
|
|
247
|
+
children: D("healthybowl.marketplace.orders.payment.paidAmount", "Amount charged")
|
|
248
|
+
}), /* @__PURE__ */ b("span", {
|
|
249
|
+
className: "text-text-primary",
|
|
250
|
+
children: t(r.paidAmount)
|
|
251
|
+
})]
|
|
252
|
+
}),
|
|
253
|
+
r?.paidAt && /* @__PURE__ */ x("div", {
|
|
254
|
+
className: "flex items-center justify-between gap-2 text-xs",
|
|
255
|
+
children: [/* @__PURE__ */ b("span", {
|
|
256
|
+
className: "text-text-secondary",
|
|
257
|
+
children: D("healthybowl.marketplace.orders.payment.paidAt", "Paid on")
|
|
258
|
+
}), /* @__PURE__ */ b("span", {
|
|
259
|
+
className: "text-text-primary",
|
|
260
|
+
children: n(r.paidAt)
|
|
261
|
+
})]
|
|
262
|
+
}),
|
|
263
|
+
a && /* @__PURE__ */ b("p", {
|
|
264
|
+
className: "text-[11px] text-text-secondary",
|
|
265
|
+
children: D("healthybowl.marketplace.orders.payment.offlineHint", "Settled outside the payment gateway, so there is no gateway reference.")
|
|
266
|
+
})
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
}, Pe = (e) => {
|
|
149
270
|
let t = 0;
|
|
150
|
-
for (let n of e.items ?? [])
|
|
271
|
+
for (let n of e.items ?? []) we({
|
|
151
272
|
productId: n.productId ?? n.id,
|
|
152
273
|
name: n.productName,
|
|
153
274
|
price: n.price,
|
|
@@ -155,340 +276,352 @@ var T = [
|
|
|
155
276
|
seller: n.seller
|
|
156
277
|
}), t++;
|
|
157
278
|
q({
|
|
158
|
-
title:
|
|
159
|
-
description:
|
|
279
|
+
title: D("healthybowl.marketplace.orders.toast.reorder.title", "Items added to cart (this session)"),
|
|
280
|
+
description: D("healthybowl.marketplace.orders.toast.reorder.description", "{{count}} item(s) from {{orderNumber}}. Cart isn't saved yet — it resets on refresh.", {
|
|
160
281
|
count: t,
|
|
161
282
|
orderNumber: e.orderNumber
|
|
162
283
|
}),
|
|
163
284
|
variant: "info"
|
|
164
285
|
});
|
|
165
286
|
};
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
title:
|
|
168
|
-
description:
|
|
287
|
+
return /* @__PURE__ */ x(r, {
|
|
288
|
+
title: D("healthybowl.marketplace.orders.title", "Orders"),
|
|
289
|
+
description: D("healthybowl.marketplace.orders.description", "Track and manage your marketplace orders"),
|
|
169
290
|
purpose: "Every order you've placed on the marketplace and where it stands — confirmed, shipped or delivered. Come here to track deliveries, reorder, and keep a record of what you've bought.",
|
|
170
|
-
actions: /* @__PURE__ */
|
|
291
|
+
actions: /* @__PURE__ */ b(_, { className: "h-5 w-5 text-text-secondary" }),
|
|
171
292
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
-
label:
|
|
293
|
+
/* @__PURE__ */ b(te, { items: [{
|
|
294
|
+
label: D("healthybowl.marketplace.orders.breadcrumbs.marketplace", "Marketplace"),
|
|
174
295
|
href: "/marketplace"
|
|
175
|
-
}, { label:
|
|
176
|
-
/* @__PURE__ */
|
|
296
|
+
}, { label: D("healthybowl.marketplace.orders.breadcrumbs.orders", "Orders") }] }),
|
|
297
|
+
/* @__PURE__ */ x("div", {
|
|
177
298
|
className: "flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-xs text-text-secondary",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ b(ue, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ b("p", { children: D("healthybowl.marketplace.orders.notice", "This page shows real orders. Place an order from the cart to record it here, then use \"Pay Now\" to pay for it through the payment gateway — the order is marked paid only once the gateway confirms the money arrived. \"Mark Paid (Offline)\" is for cash or bank-transfer settlements and records no gateway reference.") })]
|
|
179
300
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ x("div", {
|
|
181
302
|
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
182
303
|
children: [
|
|
183
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ b(i, {
|
|
184
305
|
hero: !0,
|
|
185
|
-
label:
|
|
306
|
+
label: D("healthybowl.marketplace.orders.stats.totalOrders", "Total Orders"),
|
|
186
307
|
value: Z,
|
|
187
|
-
icon: /* @__PURE__ */
|
|
308
|
+
icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" })
|
|
188
309
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
label:
|
|
191
|
-
value:
|
|
192
|
-
icon: /* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ b(i, {
|
|
311
|
+
label: D("healthybowl.marketplace.orders.stats.delivered", "Delivered"),
|
|
312
|
+
value: Te,
|
|
313
|
+
icon: /* @__PURE__ */ b(m, { className: "h-5 w-5" })
|
|
193
314
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
label:
|
|
196
|
-
value:
|
|
197
|
-
icon: /* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ b(i, {
|
|
316
|
+
label: D("healthybowl.marketplace.orders.stats.inTransit", "In Transit"),
|
|
317
|
+
value: Ee,
|
|
318
|
+
icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" })
|
|
198
319
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
label:
|
|
201
|
-
value:
|
|
202
|
-
icon: /* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ b(i, {
|
|
321
|
+
label: D("healthybowl.marketplace.orders.stats.pending", "Pending"),
|
|
322
|
+
value: De,
|
|
323
|
+
icon: /* @__PURE__ */ b(h, { className: "h-5 w-5" })
|
|
203
324
|
})
|
|
204
325
|
]
|
|
205
326
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ x("div", {
|
|
207
328
|
className: "flex flex-col gap-4 rounded-lg border border-border-subtle bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ b("div", {
|
|
209
330
|
className: "flex flex-1 flex-wrap items-center gap-3",
|
|
210
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ x("div", {
|
|
211
332
|
className: "relative",
|
|
212
333
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ b(pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }),
|
|
335
|
+
/* @__PURE__ */ b("input", {
|
|
215
336
|
type: "text",
|
|
216
|
-
placeholder:
|
|
337
|
+
placeholder: D("healthybowl.marketplace.orders.searchPlaceholder", "Search by order number..."),
|
|
217
338
|
value: L,
|
|
218
339
|
onChange: (e) => R(e.target.value),
|
|
219
340
|
className: "w-56 rounded-md border border-border-subtle bg-bg-surface py-2 pl-10 pr-8 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
220
341
|
}),
|
|
221
|
-
L && /* @__PURE__ */ S
|
|
342
|
+
L && /* @__PURE__ */ b(S, {
|
|
222
343
|
variant: "ghost",
|
|
223
344
|
size: "icon-sm",
|
|
224
345
|
onClick: () => R(""),
|
|
225
|
-
"aria-label":
|
|
346
|
+
"aria-label": D("healthybowl.common.clearSearch", "Clear search"),
|
|
226
347
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
|
|
227
|
-
children: /* @__PURE__ */
|
|
348
|
+
children: /* @__PURE__ */ b(he, { className: "h-3.5 w-3.5" })
|
|
228
349
|
})
|
|
229
350
|
]
|
|
230
351
|
})
|
|
231
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ b("span", {
|
|
232
353
|
className: "text-xs text-text-secondary",
|
|
233
|
-
children:
|
|
354
|
+
children: D("healthybowl.marketplace.orders.showingCount", "Showing {{shown}} of {{total}} orders", {
|
|
234
355
|
shown: X.length,
|
|
235
356
|
total: Z
|
|
236
357
|
})
|
|
237
358
|
})]
|
|
238
359
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ b("div", {
|
|
240
361
|
className: "flex flex-wrap gap-1.5",
|
|
241
|
-
children:
|
|
242
|
-
let n = t === "All" ?
|
|
243
|
-
return /* @__PURE__ */
|
|
362
|
+
children: C.map((t) => {
|
|
363
|
+
let n = t === "All" ? k.length : k.filter((e) => e.status === t.toLowerCase()).length;
|
|
364
|
+
return /* @__PURE__ */ x("button", {
|
|
244
365
|
type: "button",
|
|
245
366
|
onClick: () => B(t),
|
|
246
367
|
className: e("flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-colors", z === t ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
|
|
247
|
-
children: [
|
|
368
|
+
children: [ye(t), /* @__PURE__ */ b("span", {
|
|
248
369
|
className: e("rounded-full px-1.5 text-[10px] font-bold", z === t ? "bg-primary-foreground/20 text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
|
|
249
370
|
children: n
|
|
250
371
|
})]
|
|
251
372
|
}, t);
|
|
252
373
|
})
|
|
253
374
|
}),
|
|
254
|
-
X.length > 0 ? /* @__PURE__ */
|
|
375
|
+
X.length > 0 ? /* @__PURE__ */ b("div", {
|
|
255
376
|
className: "space-y-3",
|
|
256
377
|
children: X.map((e) => {
|
|
257
|
-
let r =
|
|
258
|
-
return /* @__PURE__ */
|
|
378
|
+
let r = be === e.id;
|
|
379
|
+
return /* @__PURE__ */ x("div", {
|
|
259
380
|
className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm transition-shadow hover:shadow-md",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ x("button", {
|
|
261
382
|
type: "button",
|
|
262
|
-
onClick: () =>
|
|
383
|
+
onClick: () => Oe(e.id),
|
|
263
384
|
className: "flex w-full items-center gap-4 p-4 text-left",
|
|
264
385
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ b("div", {
|
|
266
387
|
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
267
|
-
children:
|
|
388
|
+
children: T(e.status)
|
|
268
389
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ x("div", {
|
|
270
391
|
className: "min-w-0 flex-1",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ x("div", {
|
|
272
393
|
className: "flex items-center gap-2",
|
|
273
394
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ b("span", {
|
|
275
396
|
className: "text-sm font-semibold text-text-primary",
|
|
276
397
|
children: e.orderNumber
|
|
277
398
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ b(a, {
|
|
279
400
|
label: e.status,
|
|
280
|
-
variant:
|
|
401
|
+
variant: w(e.status ?? "unknown"),
|
|
281
402
|
dot: !0
|
|
282
403
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ b(a, {
|
|
284
405
|
label: e.paymentStatus,
|
|
285
|
-
variant:
|
|
406
|
+
variant: E(e.paymentStatus)
|
|
286
407
|
})
|
|
287
408
|
]
|
|
288
|
-
}), /* @__PURE__ */
|
|
409
|
+
}), /* @__PURE__ */ x("div", {
|
|
289
410
|
className: "mt-1 flex items-center gap-3 text-xs text-text-secondary",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ x("span", {
|
|
291
412
|
className: "flex items-center gap-1",
|
|
292
413
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ b(p, { className: "h-3 w-3" }),
|
|
294
415
|
" ",
|
|
295
416
|
n(e.date)
|
|
296
417
|
]
|
|
297
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ b("span", { children: D("healthybowl.marketplace.orders.itemCount", "{{count}} item(s)", { count: (e.items ?? []).length }) })]
|
|
298
419
|
})]
|
|
299
420
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ b("span", {
|
|
301
422
|
className: "text-sm font-bold text-text-primary",
|
|
302
423
|
children: t(e.total)
|
|
303
424
|
}),
|
|
304
|
-
|
|
425
|
+
b(r ? le : ce, { className: "h-4 w-4 shrink-0 text-text-secondary" })
|
|
305
426
|
]
|
|
306
|
-
}), r && /* @__PURE__ */
|
|
427
|
+
}), r && /* @__PURE__ */ x("div", {
|
|
307
428
|
className: "border-t border-border-subtle px-4 pb-4 pt-3",
|
|
308
429
|
children: [
|
|
309
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ b("h4", {
|
|
310
431
|
className: "text-xs font-semibold text-text-secondary uppercase tracking-wide",
|
|
311
|
-
children:
|
|
432
|
+
children: D("healthybowl.marketplace.orders.details.orderItems", "Order Items")
|
|
312
433
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ b("div", {
|
|
314
435
|
className: "mt-2 divide-y divide-border rounded-md border border-border-subtle",
|
|
315
|
-
children: (e.items ?? []).map((e) => /* @__PURE__ */
|
|
436
|
+
children: (e.items ?? []).map((e) => /* @__PURE__ */ x("div", {
|
|
316
437
|
className: "flex items-center justify-between px-3 py-2.5",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ x("div", {
|
|
318
439
|
className: "flex items-center gap-3",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ b(_, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
320
441
|
className: "text-sm font-medium text-text-primary",
|
|
321
442
|
children: e.productName
|
|
322
|
-
}), /* @__PURE__ */
|
|
443
|
+
}), /* @__PURE__ */ b("p", {
|
|
323
444
|
className: "text-xs text-text-secondary",
|
|
324
445
|
children: e.seller
|
|
325
446
|
})] })]
|
|
326
|
-
}), /* @__PURE__ */
|
|
447
|
+
}), /* @__PURE__ */ x("div", {
|
|
327
448
|
className: "text-right",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ x("p", {
|
|
329
450
|
className: "text-sm font-medium text-text-primary",
|
|
330
451
|
children: [
|
|
331
452
|
e.quantity,
|
|
332
453
|
" × ",
|
|
333
454
|
t(e.price)
|
|
334
455
|
]
|
|
335
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ b("p", {
|
|
336
457
|
className: "text-xs text-text-secondary",
|
|
337
458
|
children: t(e.quantity * e.price)
|
|
338
459
|
})]
|
|
339
460
|
})]
|
|
340
461
|
}, e.id))
|
|
341
462
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ x("div", {
|
|
343
464
|
className: "mt-3 grid gap-4 sm:grid-cols-2",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ x("div", {
|
|
345
466
|
className: "space-y-2 text-sm",
|
|
346
467
|
children: [
|
|
347
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ b("h4", {
|
|
348
469
|
className: "text-xs font-semibold text-text-secondary uppercase tracking-wide",
|
|
349
|
-
children:
|
|
470
|
+
children: D("healthybowl.marketplace.orders.details.paymentDetails", "Payment Details")
|
|
350
471
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ x("div", {
|
|
352
473
|
className: "flex justify-between",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ b("span", {
|
|
354
475
|
className: "text-text-secondary",
|
|
355
|
-
children:
|
|
356
|
-
}), /* @__PURE__ */
|
|
476
|
+
children: D("healthybowl.marketplace.orders.details.subtotal", "Subtotal")
|
|
477
|
+
}), /* @__PURE__ */ b("span", {
|
|
357
478
|
className: "text-text-primary",
|
|
358
479
|
children: t(e.subtotal)
|
|
359
480
|
})]
|
|
360
481
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ x("div", {
|
|
362
483
|
className: "flex justify-between",
|
|
363
|
-
children: [/* @__PURE__ */
|
|
484
|
+
children: [/* @__PURE__ */ b("span", {
|
|
364
485
|
className: "text-text-secondary",
|
|
365
|
-
children:
|
|
366
|
-
}), /* @__PURE__ */
|
|
486
|
+
children: D("healthybowl.marketplace.orders.details.tax", "Tax")
|
|
487
|
+
}), /* @__PURE__ */ b("span", {
|
|
367
488
|
className: "text-text-primary",
|
|
368
489
|
children: t(e.tax)
|
|
369
490
|
})]
|
|
370
491
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ x("div", {
|
|
372
493
|
className: "flex justify-between",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
494
|
+
children: [/* @__PURE__ */ b("span", {
|
|
374
495
|
className: "text-text-secondary",
|
|
375
|
-
children:
|
|
376
|
-
}), /* @__PURE__ */
|
|
496
|
+
children: D("healthybowl.marketplace.orders.details.shipping", "Shipping")
|
|
497
|
+
}), /* @__PURE__ */ b("span", {
|
|
377
498
|
className: "text-text-primary",
|
|
378
499
|
children: t(e.shipping)
|
|
379
500
|
})]
|
|
380
501
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ x("div", {
|
|
382
503
|
className: "flex justify-between border-t border-border-subtle pt-2 font-semibold",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ b("span", {
|
|
384
505
|
className: "text-text-primary",
|
|
385
|
-
children:
|
|
386
|
-
}), /* @__PURE__ */
|
|
506
|
+
children: D("healthybowl.marketplace.orders.details.total", "Total")
|
|
507
|
+
}), /* @__PURE__ */ b("span", {
|
|
387
508
|
className: "text-text-primary",
|
|
388
509
|
children: t(e.total)
|
|
389
510
|
})]
|
|
390
|
-
})
|
|
511
|
+
}),
|
|
512
|
+
Ne(e)
|
|
391
513
|
]
|
|
392
|
-
}), /* @__PURE__ */
|
|
514
|
+
}), /* @__PURE__ */ x("div", {
|
|
393
515
|
className: "space-y-2 text-sm",
|
|
394
516
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ b("h4", {
|
|
396
518
|
className: "text-xs font-semibold text-text-secondary uppercase tracking-wide",
|
|
397
|
-
children:
|
|
519
|
+
children: D("healthybowl.marketplace.orders.details.shippingInfo", "Shipping Info")
|
|
398
520
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ x("div", {
|
|
400
522
|
className: "flex items-center gap-2 text-text-secondary",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ b(g, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ b("span", { children: D("healthybowl.marketplace.orders.details.payment", "Payment: {{status}}", { status: e.paymentStatus }) })]
|
|
402
524
|
}),
|
|
403
|
-
e.deliveryDate && /* @__PURE__ */
|
|
525
|
+
e.deliveryDate && /* @__PURE__ */ x("div", {
|
|
404
526
|
className: "flex items-center gap-2 text-text-secondary",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
527
|
+
children: [/* @__PURE__ */ b(p, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ b("span", { children: D("healthybowl.marketplace.orders.details.delivered", "Delivered: {{date}}", { date: n(e.deliveryDate) }) })]
|
|
406
528
|
}),
|
|
407
|
-
!e.deliveryDate && e.status !== "cancelled" && /* @__PURE__ */
|
|
529
|
+
!e.deliveryDate && e.status !== "cancelled" && /* @__PURE__ */ x("div", {
|
|
408
530
|
className: "flex items-center gap-2 text-text-secondary",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ b(v, { className: "h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ b("span", { children: D("healthybowl.marketplace.orders.details.estDelivery", "Est. delivery: 3-5 business days") })]
|
|
410
532
|
})
|
|
411
533
|
]
|
|
412
534
|
})]
|
|
413
535
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ x("div", {
|
|
415
537
|
className: "mt-4 flex flex-wrap gap-2",
|
|
416
538
|
children: [
|
|
417
|
-
e.status === "pending" && /* @__PURE__ */
|
|
539
|
+
e.status === "pending" && /* @__PURE__ */ x(S, {
|
|
418
540
|
variant: "default",
|
|
419
541
|
size: "sm",
|
|
420
|
-
onClick: () => $(e, "confirmed",
|
|
421
|
-
disabled:
|
|
542
|
+
onClick: () => $(e, "confirmed", D("healthybowl.marketplace.orders.toast.confirmed", "Order confirmed")),
|
|
543
|
+
disabled: U === e.id,
|
|
422
544
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ b(m, { className: "h-3.5 w-3.5" }),
|
|
424
546
|
" ",
|
|
425
|
-
|
|
547
|
+
D("healthybowl.marketplace.orders.actions.confirm", "Confirm")
|
|
426
548
|
]
|
|
427
549
|
}),
|
|
428
|
-
e.status === "confirmed" && /* @__PURE__ */
|
|
550
|
+
e.status === "confirmed" && /* @__PURE__ */ x(S, {
|
|
429
551
|
variant: "default",
|
|
430
552
|
size: "sm",
|
|
431
|
-
onClick: () => $(e, "shipped",
|
|
432
|
-
disabled:
|
|
553
|
+
onClick: () => $(e, "shipped", D("healthybowl.marketplace.orders.toast.shipped", "Order marked shipped")),
|
|
554
|
+
disabled: U === e.id,
|
|
433
555
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ b(v, { className: "h-3.5 w-3.5" }),
|
|
435
557
|
" ",
|
|
436
|
-
|
|
558
|
+
D("healthybowl.marketplace.orders.actions.markShipped", "Mark Shipped")
|
|
437
559
|
]
|
|
438
560
|
}),
|
|
439
|
-
e.status === "shipped" && /* @__PURE__ */
|
|
561
|
+
e.status === "shipped" && /* @__PURE__ */ x(S, {
|
|
440
562
|
variant: "secondary",
|
|
441
563
|
size: "sm",
|
|
442
|
-
onClick: () => $(e, "delivered",
|
|
443
|
-
disabled:
|
|
564
|
+
onClick: () => $(e, "delivered", D("healthybowl.marketplace.orders.toast.delivered", "Order marked delivered")),
|
|
565
|
+
disabled: U === e.id,
|
|
444
566
|
className: "bg-success-subtle text-success hover:bg-success-subtle/80",
|
|
445
567
|
children: [
|
|
446
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ b(m, { className: "h-3.5 w-3.5" }),
|
|
569
|
+
" ",
|
|
570
|
+
D("healthybowl.marketplace.orders.actions.markDelivered", "Mark Delivered")
|
|
571
|
+
]
|
|
572
|
+
}),
|
|
573
|
+
e.paymentStatus === "pending" && e.status !== "cancelled" && /* @__PURE__ */ x(S, {
|
|
574
|
+
variant: "default",
|
|
575
|
+
size: "sm",
|
|
576
|
+
onClick: () => void Ae(e),
|
|
577
|
+
disabled: G === e.id || U === e.id,
|
|
578
|
+
children: [
|
|
579
|
+
/* @__PURE__ */ b(me, { className: "h-3.5 w-3.5" }),
|
|
447
580
|
" ",
|
|
448
|
-
|
|
581
|
+
G === e.id ? D("healthybowl.marketplace.orders.actions.paying", "Opening checkout...") : D("healthybowl.marketplace.orders.actions.payNow", "Pay Now")
|
|
449
582
|
]
|
|
450
583
|
}),
|
|
451
|
-
e.paymentStatus === "pending" && e.status !== "cancelled" && /* @__PURE__ */
|
|
584
|
+
e.paymentStatus === "pending" && e.status !== "cancelled" && /* @__PURE__ */ x(S, {
|
|
452
585
|
variant: "outline",
|
|
453
586
|
size: "sm",
|
|
454
|
-
onClick: () =>
|
|
455
|
-
disabled: G === e.id,
|
|
587
|
+
onClick: () => je(e),
|
|
588
|
+
disabled: U === e.id || G === e.id,
|
|
456
589
|
children: [
|
|
457
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ b(g, { className: "h-3.5 w-3.5" }),
|
|
458
591
|
" ",
|
|
459
|
-
|
|
592
|
+
D("healthybowl.marketplace.orders.actions.markPaidOffline", "Mark Paid (Offline)")
|
|
460
593
|
]
|
|
461
594
|
}),
|
|
462
|
-
(e.status === "shipped" || e.status === "confirmed") && /* @__PURE__ */
|
|
595
|
+
(e.status === "shipped" || e.status === "confirmed") && /* @__PURE__ */ x(S, {
|
|
463
596
|
variant: "outline",
|
|
464
597
|
size: "sm",
|
|
465
|
-
onClick: () =>
|
|
598
|
+
onClick: () => Q(e),
|
|
466
599
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ b(v, { className: "h-3.5 w-3.5" }),
|
|
468
601
|
" ",
|
|
469
|
-
|
|
602
|
+
D("healthybowl.marketplace.orders.actions.trackOrder", "Track Order")
|
|
470
603
|
]
|
|
471
604
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ x(S, {
|
|
473
606
|
variant: "outline",
|
|
474
607
|
size: "sm",
|
|
475
|
-
onClick: () =>
|
|
608
|
+
onClick: () => Pe(e),
|
|
476
609
|
children: [
|
|
477
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ b(fe, { className: "h-3.5 w-3.5" }),
|
|
478
611
|
" ",
|
|
479
|
-
|
|
612
|
+
D("healthybowl.marketplace.orders.actions.reorder", "Reorder")
|
|
480
613
|
]
|
|
481
614
|
}),
|
|
482
|
-
(e.status === "pending" || e.status === "confirmed") && /* @__PURE__ */
|
|
615
|
+
(e.status === "pending" || e.status === "confirmed") && /* @__PURE__ */ x(S, {
|
|
483
616
|
variant: "outline",
|
|
484
617
|
size: "sm",
|
|
485
|
-
onClick: () =>
|
|
486
|
-
disabled:
|
|
618
|
+
onClick: () => Me(e),
|
|
619
|
+
disabled: U === e.id,
|
|
487
620
|
className: "text-text-secondary hover:border-status-error-border hover:text-status-error-text",
|
|
488
621
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ b(y, { className: "h-3.5 w-3.5" }),
|
|
490
623
|
" ",
|
|
491
|
-
|
|
624
|
+
D("healthybowl.common.cancel", "Cancel")
|
|
492
625
|
]
|
|
493
626
|
})
|
|
494
627
|
]
|
|
@@ -497,138 +630,138 @@ var T = [
|
|
|
497
630
|
})]
|
|
498
631
|
}, e.id);
|
|
499
632
|
})
|
|
500
|
-
}) :
|
|
633
|
+
}) : j.marketplace ? /* @__PURE__ */ b(ne, {}) : A.marketplace ? /* @__PURE__ */ b(s, { onRetry: N }) : /* @__PURE__ */ b(o, {
|
|
501
634
|
illustration: "empty-files",
|
|
502
|
-
title: L || z !== "All" ?
|
|
503
|
-
description: L || z !== "All" ?
|
|
504
|
-
action: L || z !== "All" ? /* @__PURE__ */ S
|
|
635
|
+
title: L || z !== "All" ? D("healthybowl.marketplace.orders.emptyState.noResults.title", "No orders found") : D("healthybowl.marketplace.orders.emptyState.noOrders.title", "No orders yet"),
|
|
636
|
+
description: L || z !== "All" ? D("healthybowl.marketplace.orders.emptyState.noResults.description", "Try adjusting your search or filter.") : D("healthybowl.marketplace.orders.emptyState.noOrders.description", "You have no orders yet. Orders shown here come only from real backend data."),
|
|
637
|
+
action: L || z !== "All" ? /* @__PURE__ */ b(S, {
|
|
505
638
|
variant: "default",
|
|
506
639
|
onClick: () => {
|
|
507
640
|
R(""), B("All");
|
|
508
641
|
},
|
|
509
|
-
children:
|
|
642
|
+
children: D("healthybowl.marketplace.orders.emptyState.clearFilters", "Clear Filters")
|
|
510
643
|
}) : void 0
|
|
511
644
|
}),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
open:
|
|
514
|
-
onClose: () =>
|
|
515
|
-
title:
|
|
516
|
-
description:
|
|
645
|
+
/* @__PURE__ */ b(re, {
|
|
646
|
+
open: V !== null,
|
|
647
|
+
onClose: () => H(null),
|
|
648
|
+
title: D("healthybowl.marketplace.orders.tracking.title", "Order Tracking"),
|
|
649
|
+
description: V ? D("healthybowl.marketplace.orders.tracking.subtitle", "Tracking {{orderNumber}}", { orderNumber: V.orderNumber }) : "",
|
|
517
650
|
size: "md",
|
|
518
|
-
footer: /* @__PURE__ */ S
|
|
651
|
+
footer: /* @__PURE__ */ b(S, {
|
|
519
652
|
variant: "outline",
|
|
520
|
-
onClick: () =>
|
|
521
|
-
children:
|
|
653
|
+
onClick: () => H(null),
|
|
654
|
+
children: D("healthybowl.common.close", "Close")
|
|
522
655
|
}),
|
|
523
|
-
children:
|
|
656
|
+
children: V && /* @__PURE__ */ x("div", {
|
|
524
657
|
className: "space-y-4",
|
|
525
658
|
children: [
|
|
526
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ x("div", {
|
|
527
660
|
className: "flex items-center gap-3",
|
|
528
|
-
children: [/* @__PURE__ */
|
|
661
|
+
children: [/* @__PURE__ */ b(v, { className: "h-6 w-6 text-primary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
529
662
|
className: "text-sm font-medium text-text-primary",
|
|
530
|
-
children:
|
|
531
|
-
}), /* @__PURE__ */
|
|
663
|
+
children: D("healthybowl.marketplace.orders.tracking.status", "Status: {{status}}", { status: V.status })
|
|
664
|
+
}), /* @__PURE__ */ b("p", {
|
|
532
665
|
className: "text-xs text-text-secondary",
|
|
533
|
-
children:
|
|
666
|
+
children: D("healthybowl.marketplace.orders.tracking.orderPlacedDate", "Order placed: {{date}}", { date: n(V.date) })
|
|
534
667
|
})] })]
|
|
535
668
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ x("div", {
|
|
537
670
|
className: "space-y-3 border-l-2 border-primary/30 pl-4",
|
|
538
671
|
children: [
|
|
539
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ x("div", {
|
|
540
673
|
className: "relative",
|
|
541
674
|
children: [
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ b("div", { className: "absolute -left-[21px] top-1 h-3 w-3 rounded-full bg-action-primary-bg" }),
|
|
676
|
+
/* @__PURE__ */ b("p", {
|
|
544
677
|
className: "text-sm font-medium text-text-primary",
|
|
545
|
-
children:
|
|
678
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.placed.label", "Order Placed")
|
|
546
679
|
}),
|
|
547
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ b("p", {
|
|
548
681
|
className: "text-xs text-text-secondary",
|
|
549
|
-
children: n(
|
|
682
|
+
children: n(V.date)
|
|
550
683
|
})
|
|
551
684
|
]
|
|
552
685
|
}),
|
|
553
|
-
|
|
686
|
+
V.status !== "pending" && /* @__PURE__ */ x("div", {
|
|
554
687
|
className: "relative",
|
|
555
688
|
children: [
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ b("div", { className: "absolute -left-[21px] top-1 h-3 w-3 rounded-full bg-action-primary-bg" }),
|
|
690
|
+
/* @__PURE__ */ b("p", {
|
|
558
691
|
className: "text-sm font-medium text-text-primary",
|
|
559
|
-
children:
|
|
692
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.confirmed.label", "Confirmed")
|
|
560
693
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ b("p", {
|
|
562
695
|
className: "text-xs text-text-secondary",
|
|
563
|
-
children:
|
|
696
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.confirmed.detail", "Order confirmed by seller")
|
|
564
697
|
})
|
|
565
698
|
]
|
|
566
699
|
}),
|
|
567
|
-
(
|
|
700
|
+
(V.status === "shipped" || V.status === "delivered") && /* @__PURE__ */ x("div", {
|
|
568
701
|
className: "relative",
|
|
569
702
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ b("div", { className: "absolute -left-[21px] top-1 h-3 w-3 rounded-full bg-action-primary-bg" }),
|
|
704
|
+
/* @__PURE__ */ b("p", {
|
|
572
705
|
className: "text-sm font-medium text-text-primary",
|
|
573
|
-
children:
|
|
706
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.shipped.label", "Shipped")
|
|
574
707
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ b("p", {
|
|
576
709
|
className: "text-xs text-text-secondary",
|
|
577
|
-
children:
|
|
710
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.shipped.detail", "Package is on its way")
|
|
578
711
|
})
|
|
579
712
|
]
|
|
580
713
|
}),
|
|
581
|
-
|
|
714
|
+
V.status === "delivered" && /* @__PURE__ */ x("div", {
|
|
582
715
|
className: "relative",
|
|
583
716
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ b("div", { className: "absolute -left-[21px] top-1 h-3 w-3 rounded-full bg-success" }),
|
|
718
|
+
/* @__PURE__ */ b("p", {
|
|
586
719
|
className: "text-sm font-medium text-text-primary",
|
|
587
|
-
children:
|
|
720
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.delivered.label", "Delivered")
|
|
588
721
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
722
|
+
/* @__PURE__ */ b("p", {
|
|
590
723
|
className: "text-xs text-text-secondary",
|
|
591
|
-
children:
|
|
724
|
+
children: V.deliveryDate ? n(V.deliveryDate) : D("healthybowl.marketplace.orders.tracking.steps.delivered.label", "Delivered")
|
|
592
725
|
})
|
|
593
726
|
]
|
|
594
727
|
}),
|
|
595
|
-
|
|
728
|
+
V.status !== "delivered" && V.status !== "cancelled" && /* @__PURE__ */ x("div", {
|
|
596
729
|
className: "relative",
|
|
597
730
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ b("div", { className: "absolute -left-[21px] top-1 h-3 w-3 rounded-full border-2 border-muted-foreground bg-bg-surface" }),
|
|
732
|
+
/* @__PURE__ */ b("p", {
|
|
600
733
|
className: "text-sm text-text-secondary",
|
|
601
|
-
children:
|
|
734
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.estimated.label", "Estimated Delivery")
|
|
602
735
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ b("p", {
|
|
604
737
|
className: "text-xs text-text-secondary",
|
|
605
|
-
children:
|
|
738
|
+
children: D("healthybowl.marketplace.orders.tracking.steps.estimated.detail", "3-5 business days")
|
|
606
739
|
})
|
|
607
740
|
]
|
|
608
741
|
})
|
|
609
742
|
]
|
|
610
743
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ x("div", {
|
|
612
745
|
className: "rounded-lg border border-border-subtle p-3",
|
|
613
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ b("p", {
|
|
614
747
|
className: "text-sm font-medium text-text-primary",
|
|
615
|
-
children:
|
|
616
|
-
}), /* @__PURE__ */
|
|
748
|
+
children: D("healthybowl.marketplace.orders.tracking.total", "Total: {{total}}", { total: t(V.total) })
|
|
749
|
+
}), /* @__PURE__ */ b("p", {
|
|
617
750
|
className: "text-xs text-text-secondary",
|
|
618
|
-
children:
|
|
751
|
+
children: D("healthybowl.marketplace.orders.itemCount", "{{count}} item(s)", { count: (V.items ?? []).length })
|
|
619
752
|
})]
|
|
620
753
|
})
|
|
621
754
|
]
|
|
622
755
|
})
|
|
623
756
|
}),
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
toasts:
|
|
626
|
-
onDismiss:
|
|
757
|
+
/* @__PURE__ */ b(c, {
|
|
758
|
+
toasts: Se,
|
|
759
|
+
onDismiss: Ce
|
|
627
760
|
})
|
|
628
761
|
]
|
|
629
762
|
});
|
|
630
763
|
};
|
|
631
764
|
//#endregion
|
|
632
|
-
export {
|
|
765
|
+
export { D as OrdersPage };
|
|
633
766
|
|
|
634
767
|
//# sourceMappingURL=OrdersPage.js.map
|