@burdenoff/microfe-healthybowl 2026.714.1 → 2026.714.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/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/package.json +1 -1
|
@@ -5,25 +5,27 @@ import { StatCard as a } from "../../components/StatCard.js";
|
|
|
5
5
|
import { StatusBadge as o } from "../../components/StatusBadge.js";
|
|
6
6
|
import { EmptyState as ee } from "../../components/EmptyState.js";
|
|
7
7
|
import { ErrorState as s } from "../../components/ErrorState.js";
|
|
8
|
-
import { ToastContainer as
|
|
9
|
-
import { useConfirm as
|
|
10
|
-
import { Breadcrumbs as
|
|
11
|
-
import { Modal as
|
|
12
|
-
import { HBEntityTags as
|
|
13
|
-
import { useToast as
|
|
8
|
+
import { ToastContainer as c } from "../../components/Toast.js";
|
|
9
|
+
import { useConfirm as te } from "../../components/ConfirmDialog.js";
|
|
10
|
+
import { Breadcrumbs as ne } from "../../components/Breadcrumbs.js";
|
|
11
|
+
import { Modal as re } from "../../components/Modal.js";
|
|
12
|
+
import { HBEntityTags as ie } from "../../components/HBEntityTags.js";
|
|
13
|
+
import { useToast as ae } from "../../hooks/useToast.js";
|
|
14
14
|
import "../../components/index.js";
|
|
15
|
-
import { useHealthyBowlData as
|
|
16
|
-
import { useHealthyBowlStore as
|
|
17
|
-
import { isNative as
|
|
15
|
+
import { useHealthyBowlData as oe } from "../../hooks/useHealthyBowlData.js";
|
|
16
|
+
import { useHealthyBowlStore as se } from "../../store/healthybowlStore.js";
|
|
17
|
+
import { isNative as l, nativeNotify as u, nativeToast as d } from "../../../utils/nativeBridge.js";
|
|
18
18
|
import { AuctionsView as ce } from "./AuctionsView.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
19
|
+
import { useSetListingShared as le, useSharedMarketListings as ue } from "../../hooks/useSharedMarket.js";
|
|
20
|
+
import { SharedMarketView as de } from "./SharedMarketView.js";
|
|
21
|
+
import { useCallback as f, useEffect as fe, useMemo as pe, useRef as me, useState as p } from "react";
|
|
22
|
+
import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
|
+
import { ArrowUpDown as ge, Award as _e, Check as ve, ChevronDown as ye, Eye as be, Gavel as xe, Globe as m, Heart as Se, Info as Ce, Leaf as we, Minus as Te, Package as Ee, Pencil as De, Plus as Oe, Search as ke, ShoppingCart as h, Star as g, Store as _, Tags as Ae, Trash2 as je, X as Me } from "lucide-react";
|
|
24
|
+
import { useNavigate as Ne } from "react-router-dom";
|
|
25
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
26
|
+
import { Button as x, Select as Pe, SelectContent as Fe, SelectItem as Ie, SelectTrigger as Le, SelectValue as Re } from "@burdenoff/fe-libs/ui";
|
|
25
27
|
//#region src/healthybowl/pages/marketplace/MarketplacePage.tsx
|
|
26
|
-
var
|
|
28
|
+
var ze = [
|
|
27
29
|
"Vegetables",
|
|
28
30
|
"Fruits",
|
|
29
31
|
"Herbs",
|
|
@@ -31,7 +33,7 @@ var Le = [
|
|
|
31
33
|
"Seeds",
|
|
32
34
|
"Supplies",
|
|
33
35
|
"Pest Control"
|
|
34
|
-
],
|
|
36
|
+
], S = {
|
|
35
37
|
name: "",
|
|
36
38
|
category: "Vegetables",
|
|
37
39
|
price: "",
|
|
@@ -41,7 +43,7 @@ var Le = [
|
|
|
41
43
|
location: "",
|
|
42
44
|
description: "",
|
|
43
45
|
organicCertified: !1
|
|
44
|
-
},
|
|
46
|
+
}, Be = [
|
|
45
47
|
"All",
|
|
46
48
|
"Vegetables",
|
|
47
49
|
"Fruits",
|
|
@@ -51,36 +53,36 @@ var Le = [
|
|
|
51
53
|
"Supplies",
|
|
52
54
|
"Pest Control"
|
|
53
55
|
];
|
|
54
|
-
function
|
|
55
|
-
return Array.from({ length: 5 }, (n, r) => /* @__PURE__ */
|
|
56
|
+
function Ve(t) {
|
|
57
|
+
return Array.from({ length: 5 }, (n, r) => /* @__PURE__ */ y(g, { className: e("h-3 w-3", r < Math.round(t) ? "fill-warning text-warning" : "text-text-secondary") }, r));
|
|
56
58
|
}
|
|
57
|
-
var
|
|
58
|
-
let { marketplaceProducts:
|
|
59
|
-
let r =
|
|
59
|
+
var C = () => {
|
|
60
|
+
let { marketplaceProducts: C, loading: He, errors: Ue, createMarketplaceProduct: We, updateMarketplaceProduct: Ge, deleteMarketplaceProduct: Ke } = oe(), { t: qe } = he(), Je = te(), w = f((e, t, n) => {
|
|
61
|
+
let r = qe(e, t, n);
|
|
60
62
|
return r === e ? t : r;
|
|
61
|
-
}, [
|
|
62
|
-
"price-asc":
|
|
63
|
-
"price-desc":
|
|
64
|
-
rating:
|
|
65
|
-
reviews:
|
|
66
|
-
}), [
|
|
67
|
-
All:
|
|
68
|
-
Vegetables:
|
|
69
|
-
Fruits:
|
|
70
|
-
Herbs:
|
|
71
|
-
"Dairy & Eggs":
|
|
72
|
-
Seeds:
|
|
73
|
-
Supplies:
|
|
74
|
-
"Pest Control":
|
|
75
|
-
}), [
|
|
76
|
-
|
|
63
|
+
}, [qe]), Ye = pe(() => ({
|
|
64
|
+
"price-asc": w("healthybowl.marketplace.overview.sort.priceAsc", "Price: Low → High"),
|
|
65
|
+
"price-desc": w("healthybowl.marketplace.overview.sort.priceDesc", "Price: High → Low"),
|
|
66
|
+
rating: w("healthybowl.marketplace.overview.sort.rating", "Highest Rated"),
|
|
67
|
+
reviews: w("healthybowl.marketplace.overview.sort.reviews", "Most Reviewed")
|
|
68
|
+
}), [w]), Xe = pe(() => ({
|
|
69
|
+
All: w("healthybowl.common.all", "All"),
|
|
70
|
+
Vegetables: w("healthybowl.marketplace.overview.categories.vegetables", "Vegetables"),
|
|
71
|
+
Fruits: w("healthybowl.marketplace.overview.categories.fruits", "Fruits"),
|
|
72
|
+
Herbs: w("healthybowl.marketplace.overview.categories.herbs", "Herbs"),
|
|
73
|
+
"Dairy & Eggs": w("healthybowl.marketplace.overview.categories.dairyEggs", "Dairy & Eggs"),
|
|
74
|
+
Seeds: w("healthybowl.marketplace.overview.categories.seeds", "Seeds"),
|
|
75
|
+
Supplies: w("healthybowl.marketplace.overview.categories.supplies", "Supplies"),
|
|
76
|
+
"Pest Control": w("healthybowl.marketplace.overview.categories.pestControl", "Pest Control")
|
|
77
|
+
}), [w]), T = f((e) => Xe[e] ?? e, [Xe]), [E, D] = p("fixed"), [O, k] = p(""), [A, j] = p("All"), [M, Ze] = p(null), [N, Qe] = p("rating"), [$e, P] = p(!1), [et, tt] = p(/* @__PURE__ */ new Set()), [nt, rt] = p({}), [F, I] = p(null), [it, L] = p(!1), [R, z] = p(null), [B, V] = p(S), [H, U] = p(!1), W = (e, t) => {
|
|
78
|
+
V((n) => ({
|
|
77
79
|
...n,
|
|
78
80
|
[e]: t
|
|
79
81
|
}));
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
82
|
+
}, at = () => {
|
|
83
|
+
z(null), V(S), L(!0);
|
|
84
|
+
}, ot = (e) => {
|
|
85
|
+
z(e), V({
|
|
84
86
|
name: e.name ?? "",
|
|
85
87
|
category: e.category ?? "Vegetables",
|
|
86
88
|
price: String(e.price ?? ""),
|
|
@@ -90,666 +92,716 @@ var S = () => {
|
|
|
90
92
|
location: e.location ?? "",
|
|
91
93
|
description: e.description ?? "",
|
|
92
94
|
organicCertified: !!e.organicCertified
|
|
93
|
-
}),
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
let e = Number(
|
|
98
|
-
if (!
|
|
95
|
+
}), L(!0);
|
|
96
|
+
}, G = () => {
|
|
97
|
+
L(!1), z(null), V(S);
|
|
98
|
+
}, st = async () => {
|
|
99
|
+
let e = Number(B.price), t = Number(B.stock);
|
|
100
|
+
if (!B.name.trim() || !B.seller.trim() || !B.price || !B.stock) {
|
|
99
101
|
X({
|
|
100
|
-
title:
|
|
101
|
-
description:
|
|
102
|
+
title: w("healthybowl.marketplace.overview.toast.missingFields.title", "Missing required fields"),
|
|
103
|
+
description: w("healthybowl.marketplace.overview.toast.missingFields.description", "Product name, seller, price, and quantity available are required."),
|
|
102
104
|
variant: "warning"
|
|
103
105
|
});
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
108
|
if (Number.isNaN(e) || e < 0 || Number.isNaN(t) || t < 0) {
|
|
107
109
|
X({
|
|
108
|
-
title:
|
|
109
|
-
description:
|
|
110
|
+
title: w("healthybowl.marketplace.overview.toast.invalidValues.title", "Invalid values"),
|
|
111
|
+
description: w("healthybowl.marketplace.overview.toast.invalidValues.description", "Price and quantity must be positive numbers."),
|
|
110
112
|
variant: "warning"
|
|
111
113
|
});
|
|
112
114
|
return;
|
|
113
115
|
}
|
|
114
|
-
|
|
116
|
+
U(!0);
|
|
115
117
|
try {
|
|
116
|
-
|
|
117
|
-
id:
|
|
118
|
-
name:
|
|
119
|
-
category:
|
|
118
|
+
R ? (await Ge({
|
|
119
|
+
id: R.id,
|
|
120
|
+
name: B.name.trim(),
|
|
121
|
+
category: B.category,
|
|
120
122
|
price: e,
|
|
121
|
-
unit:
|
|
123
|
+
unit: B.unit.trim() || "unit",
|
|
122
124
|
stock: t,
|
|
123
|
-
seller:
|
|
124
|
-
location:
|
|
125
|
-
description:
|
|
126
|
-
organicCertified:
|
|
125
|
+
seller: B.seller.trim(),
|
|
126
|
+
location: B.location.trim() || void 0,
|
|
127
|
+
description: B.description.trim() || void 0,
|
|
128
|
+
organicCertified: B.organicCertified
|
|
127
129
|
}), X({
|
|
128
|
-
title:
|
|
129
|
-
description:
|
|
130
|
+
title: w("healthybowl.marketplace.overview.toast.listingUpdated.title", "Listing updated"),
|
|
131
|
+
description: w("healthybowl.marketplace.overview.toast.listingUpdated.description", "{{name}} has been updated.", { name: B.name.trim() }),
|
|
130
132
|
variant: "success"
|
|
131
|
-
})) : (await
|
|
132
|
-
name:
|
|
133
|
-
category:
|
|
133
|
+
})) : (await We({
|
|
134
|
+
name: B.name.trim(),
|
|
135
|
+
category: B.category,
|
|
134
136
|
price: e,
|
|
135
|
-
unit:
|
|
137
|
+
unit: B.unit.trim() || "unit",
|
|
136
138
|
stock: t,
|
|
137
|
-
seller:
|
|
138
|
-
location:
|
|
139
|
-
description:
|
|
140
|
-
organicCertified:
|
|
139
|
+
seller: B.seller.trim(),
|
|
140
|
+
location: B.location.trim() || void 0,
|
|
141
|
+
description: B.description.trim() || "",
|
|
142
|
+
organicCertified: B.organicCertified,
|
|
141
143
|
rating: 0,
|
|
142
144
|
reviews: 0,
|
|
143
145
|
sellerRating: 0
|
|
144
146
|
}), X({
|
|
145
|
-
title:
|
|
146
|
-
description:
|
|
147
|
+
title: w("healthybowl.marketplace.overview.toast.listingPublished.title", "Listing published"),
|
|
148
|
+
description: w("healthybowl.marketplace.overview.toast.listingPublished.description", "{{name}} is now live in the marketplace.", { name: B.name.trim() }),
|
|
147
149
|
variant: "success"
|
|
148
|
-
})),
|
|
150
|
+
})), G();
|
|
149
151
|
} catch (e) {
|
|
150
152
|
X({
|
|
151
|
-
title:
|
|
153
|
+
title: R ? w("healthybowl.marketplace.overview.toast.updateFailed.title", "Update failed") : w("healthybowl.marketplace.overview.toast.publishFailed.title", "Publish failed"),
|
|
152
154
|
description: String(e),
|
|
153
155
|
variant: "error"
|
|
154
156
|
});
|
|
155
157
|
} finally {
|
|
156
|
-
|
|
158
|
+
U(!1);
|
|
157
159
|
}
|
|
158
|
-
},
|
|
159
|
-
if (await
|
|
160
|
-
title:
|
|
161
|
-
message:
|
|
162
|
-
okButtonTitle:
|
|
163
|
-
cancelButtonTitle:
|
|
160
|
+
}, ct = async (e) => {
|
|
161
|
+
if (await Je({
|
|
162
|
+
title: w("healthybowl.marketplace.overview.delete.confirm.title", "Delete listing?"),
|
|
163
|
+
message: w("healthybowl.marketplace.overview.delete.confirm.message", "{{name}} will be permanently removed from the marketplace.", { name: e.name ?? w("healthybowl.marketplace.overview.delete.confirm.fallbackName", "This listing") }),
|
|
164
|
+
okButtonTitle: w("healthybowl.common.delete", "Delete"),
|
|
165
|
+
cancelButtonTitle: w("healthybowl.common.cancel", "Cancel")
|
|
164
166
|
}) !== !1) {
|
|
165
|
-
|
|
167
|
+
U(!0);
|
|
166
168
|
try {
|
|
167
|
-
await
|
|
168
|
-
title:
|
|
169
|
-
description:
|
|
169
|
+
await Ke(e.id), X({
|
|
170
|
+
title: w("healthybowl.marketplace.overview.toast.listingDeleted.title", "Listing deleted"),
|
|
171
|
+
description: w("healthybowl.marketplace.overview.toast.listingDeleted.description", "{{name}} has been removed.", { name: e.name ?? w("healthybowl.marketplace.overview.toast.listingDeleted.fallbackName", "Listing") }),
|
|
170
172
|
variant: "success"
|
|
171
|
-
}),
|
|
173
|
+
}), l() && (d(w("healthybowl.marketplace.overview.toast.listingDeleted.title", "Listing deleted")), u("success"));
|
|
172
174
|
} catch (e) {
|
|
173
175
|
X({
|
|
174
|
-
title:
|
|
176
|
+
title: w("healthybowl.marketplace.overview.toast.deleteFailed.title", "Delete failed"),
|
|
175
177
|
description: String(e),
|
|
176
178
|
variant: "error"
|
|
177
|
-
}),
|
|
179
|
+
}), l() && (d(w("healthybowl.marketplace.overview.toast.deleteFailed.title", "Delete failed")), u("error"));
|
|
178
180
|
} finally {
|
|
179
|
-
|
|
181
|
+
U(!1);
|
|
180
182
|
}
|
|
181
183
|
}
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
+
}, { sharedListingIds: lt, refetch: ut } = ue(), { setListingShared: dt } = le(), [ft, pt] = p({}), [mt, ht] = p(null), gt = f((e) => ft[e.id] ?? lt.has(e.id), [ft, lt]), _t = async (e) => {
|
|
185
|
+
let t = !gt(e);
|
|
186
|
+
ht(e.id);
|
|
187
|
+
try {
|
|
188
|
+
await dt(e.id, t), pt((n) => ({
|
|
189
|
+
...n,
|
|
190
|
+
[e.id]: t
|
|
191
|
+
})), await ut(), X({
|
|
192
|
+
title: t ? w("healthybowl.marketplace.shared.toast.published.title", "Published to the shared market") : w("healthybowl.marketplace.shared.toast.unpublished.title", "Removed from the shared market"),
|
|
193
|
+
description: t ? w("healthybowl.marketplace.shared.toast.published.description", "{{name}} is now visible to buyers on every farm.", { name: e.name }) : w("healthybowl.marketplace.shared.toast.unpublished.description", "{{name}} is back to being visible only on your farm.", { name: e.name }),
|
|
194
|
+
variant: "success"
|
|
195
|
+
});
|
|
196
|
+
} catch (e) {
|
|
197
|
+
X({
|
|
198
|
+
title: w("healthybowl.marketplace.shared.toast.failed.title", "Could not update sharing"),
|
|
199
|
+
description: e instanceof Error ? e.message : String(e),
|
|
200
|
+
variant: "error"
|
|
201
|
+
});
|
|
202
|
+
} finally {
|
|
203
|
+
ht(null);
|
|
204
|
+
}
|
|
205
|
+
}, K = me(null), q = Ne(), { buildPath: J } = r(), { addToCart: vt, cart: yt, wishlist: Y, toggleWishlist: bt } = se(), { toasts: xt, toast: X, dismiss: St } = ae(), Ct = yt.reduce((e, t) => e + t.quantity, 0);
|
|
206
|
+
fe(() => {
|
|
184
207
|
let e = (e) => {
|
|
185
|
-
|
|
208
|
+
K.current && !K.current.contains(e.target) && P(!1);
|
|
186
209
|
};
|
|
187
210
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
188
211
|
}, []);
|
|
189
|
-
let
|
|
212
|
+
let wt = Array.from(C.flatMap((e) => e.entityTags ?? []).reduce((e, t) => e.has(t.key) ? e : e.set(t.key, t.label), /* @__PURE__ */ new Map()).entries()).map(([e, t]) => ({
|
|
190
213
|
key: e,
|
|
191
214
|
label: t
|
|
192
|
-
})), Z =
|
|
193
|
-
let t = (e.name ?? "").toLowerCase().includes(O.toLowerCase()) || (e.seller ?? "").toLowerCase().includes(O.toLowerCase()) || (e.description ?? "").toLowerCase().includes(O.toLowerCase()), n = A === "All" || e.category === A, r = !
|
|
215
|
+
})), Z = C.filter((e) => {
|
|
216
|
+
let t = (e.name ?? "").toLowerCase().includes(O.toLowerCase()) || (e.seller ?? "").toLowerCase().includes(O.toLowerCase()) || (e.description ?? "").toLowerCase().includes(O.toLowerCase()), n = A === "All" || e.category === A, r = !M || (e.entityTags ?? []).some((e) => e.key === M);
|
|
194
217
|
return t && n && r;
|
|
195
218
|
}).sort((e, t) => {
|
|
196
|
-
switch (
|
|
219
|
+
switch (N) {
|
|
197
220
|
case "price-asc": return e.price - t.price;
|
|
198
221
|
case "price-desc": return t.price - e.price;
|
|
199
222
|
case "rating": return t.rating - e.rating;
|
|
200
223
|
case "reviews": return t.reviews - e.reviews;
|
|
201
224
|
default: return 0;
|
|
202
225
|
}
|
|
203
|
-
}), Q =
|
|
204
|
-
|
|
226
|
+
}), Q = C.length, Tt = new Set(C.map((e) => e.category)).size, Et = Q > 0 ? C.reduce((e, t) => e + t.rating, 0) / Q : 0, Dt = C.filter((e) => e.organicCertified).length, Ot = (e) => nt[e] ?? 1, kt = (e, t) => {
|
|
227
|
+
rt((n) => ({
|
|
205
228
|
...n,
|
|
206
229
|
[e]: Math.max(1, t)
|
|
207
230
|
}));
|
|
208
231
|
}, $ = (e) => {
|
|
209
|
-
let t =
|
|
210
|
-
for (let n = 0; n < t; n++)
|
|
232
|
+
let t = Ot(e.id);
|
|
233
|
+
for (let n = 0; n < t; n++) vt({
|
|
211
234
|
productId: e.id,
|
|
212
235
|
name: e.name,
|
|
213
236
|
price: e.price,
|
|
214
237
|
unit: e.unit,
|
|
215
238
|
seller: e.seller
|
|
216
239
|
});
|
|
217
|
-
|
|
218
|
-
title:
|
|
219
|
-
description:
|
|
240
|
+
tt((t) => new Set(t).add(e.id)), X({
|
|
241
|
+
title: w("healthybowl.marketplace.overview.toast.addedToCart.title", "Added to cart (this session)"),
|
|
242
|
+
description: w("healthybowl.marketplace.overview.toast.addedToCart.description", "{{qty}}× {{name}}. Cart isn't saved yet — it resets on refresh.", {
|
|
220
243
|
qty: t,
|
|
221
244
|
name: e.name
|
|
222
245
|
}),
|
|
223
246
|
variant: "info"
|
|
224
247
|
}), setTimeout(() => {
|
|
225
|
-
|
|
248
|
+
tt((t) => {
|
|
226
249
|
let n = new Set(t);
|
|
227
250
|
return n.delete(e.id), n;
|
|
228
251
|
});
|
|
229
252
|
}, 1500);
|
|
230
|
-
},
|
|
253
|
+
}, At = (e) => {
|
|
231
254
|
let t = Y.has(e.id);
|
|
232
|
-
|
|
233
|
-
title:
|
|
255
|
+
bt(e.id), X(t ? {
|
|
256
|
+
title: w("healthybowl.marketplace.overview.toast.removedFromWishlist.title", "Removed from wishlist"),
|
|
234
257
|
description: e.name,
|
|
235
258
|
variant: "info"
|
|
236
259
|
} : {
|
|
237
|
-
title:
|
|
238
|
-
description:
|
|
260
|
+
title: w("healthybowl.marketplace.overview.toast.addedToWishlist.title", "Added to wishlist (this session)"),
|
|
261
|
+
description: w("healthybowl.marketplace.overview.toast.addedToWishlist.description", "{{name}}. Wishlist isn't saved yet — it resets on refresh.", { name: e.name }),
|
|
239
262
|
variant: "info"
|
|
240
263
|
});
|
|
241
264
|
};
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
title:
|
|
244
|
-
description:
|
|
265
|
+
return /* @__PURE__ */ b(i, {
|
|
266
|
+
title: w("healthybowl.marketplace.title", "Marketplace"),
|
|
267
|
+
description: w("healthybowl.marketplace.description", "Browse organic products from verified sellers"),
|
|
245
268
|
purpose: "Buy organic inputs and produce from verified sellers — seeds, supplies and goods from other farms. Browse, compare and order what your farm needs, with sellers vetted so you can buy with confidence.",
|
|
246
|
-
actions: /* @__PURE__ */
|
|
269
|
+
actions: /* @__PURE__ */ b("div", {
|
|
247
270
|
className: "flex items-center gap-2",
|
|
248
271
|
children: [
|
|
249
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ b(x, {
|
|
250
273
|
variant: "outline",
|
|
251
|
-
onClick:
|
|
252
|
-
children: [/* @__PURE__ */ _
|
|
274
|
+
onClick: at,
|
|
275
|
+
children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), w("healthybowl.marketplace.actions.listProduct", "List a Product")]
|
|
253
276
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ b(x, {
|
|
255
278
|
variant: "outline",
|
|
256
|
-
onClick: () =>
|
|
279
|
+
onClick: () => q(J("marketplace/wishlist")),
|
|
257
280
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
|
|
260
|
-
Y.size > 0 && /* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ y(Se, { className: "h-4 w-4" }),
|
|
282
|
+
w("healthybowl.marketplace.actions.wishlist", "Wishlist"),
|
|
283
|
+
Y.size > 0 && /* @__PURE__ */ y("span", {
|
|
261
284
|
className: "ml-0.5 rounded-full bg-bg-sunken px-1.5 text-xs font-bold text-text-primary",
|
|
262
285
|
children: Y.size
|
|
263
286
|
})
|
|
264
287
|
]
|
|
265
288
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ b(x, {
|
|
267
290
|
className: "relative",
|
|
268
|
-
onClick: () =>
|
|
291
|
+
onClick: () => q(J("marketplace/cart")),
|
|
269
292
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
|
|
272
|
-
|
|
293
|
+
/* @__PURE__ */ y(h, { className: "h-4 w-4" }),
|
|
294
|
+
w("healthybowl.marketplace.actions.cart", "Cart"),
|
|
295
|
+
Ct > 0 && /* @__PURE__ */ y("span", {
|
|
273
296
|
className: "absolute -right-1.5 -top-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-[10px] font-bold text-background",
|
|
274
|
-
children:
|
|
297
|
+
children: Ct
|
|
275
298
|
})
|
|
276
299
|
]
|
|
277
300
|
})
|
|
278
301
|
]
|
|
279
302
|
}),
|
|
280
303
|
children: [
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ y(ne, { items: [{ label: w("healthybowl.marketplace.breadcrumb", "Marketplace") }] }),
|
|
305
|
+
/* @__PURE__ */ b("div", {
|
|
283
306
|
className: "flex items-center gap-1 border-b border-border-subtle",
|
|
284
|
-
children: [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
307
|
+
children: [
|
|
308
|
+
/* @__PURE__ */ b("button", {
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: () => D("fixed"),
|
|
311
|
+
className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", E === "fixed" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
312
|
+
children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), w("healthybowl.marketplace.tabs.fixed", "Fixed-Price Listings")]
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ b("button", {
|
|
315
|
+
type: "button",
|
|
316
|
+
onClick: () => D("auctions"),
|
|
317
|
+
className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", E === "auctions" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
318
|
+
children: [/* @__PURE__ */ y(xe, { className: "h-4 w-4" }), w("healthybowl.marketplace.tabs.auctions", "Live Auctions")]
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ b("button", {
|
|
321
|
+
type: "button",
|
|
322
|
+
onClick: () => D("shared"),
|
|
323
|
+
className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", E === "shared" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
324
|
+
children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), w("healthybowl.marketplace.tabs.shared", "Shared Market (All Farms)")]
|
|
325
|
+
})
|
|
326
|
+
]
|
|
295
327
|
}),
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
328
|
+
E === "auctions" && /* @__PURE__ */ y(ce, { products: C }),
|
|
329
|
+
E === "shared" && /* @__PURE__ */ y(de, {}),
|
|
330
|
+
E === "fixed" && /* @__PURE__ */ b(v, { children: [
|
|
331
|
+
/* @__PURE__ */ b("div", {
|
|
299
332
|
className: "flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-xs text-text-secondary",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ y(Ce, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ y("p", { children: w("healthybowl.marketplace.overview.scopeNotice", "Product listings are saved, and checking out from the cart places a real order you can pay for from the Orders page. Publish a listing to the Shared Market to make it visible to buyers on other farms. Cart and wishlist are kept only for this browser session (not saved yet) and reset on refresh.") })]
|
|
301
334
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ b("div", {
|
|
303
336
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
304
337
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ y(a, {
|
|
306
339
|
hero: !0,
|
|
307
|
-
label:
|
|
340
|
+
label: w("healthybowl.marketplace.stats.totalProducts", "Total Products"),
|
|
308
341
|
value: Q,
|
|
309
|
-
icon: /* @__PURE__ */
|
|
342
|
+
icon: /* @__PURE__ */ y(Ee, { className: "h-5 w-5" })
|
|
310
343
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
label:
|
|
313
|
-
value:
|
|
314
|
-
icon: /* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ y(a, {
|
|
345
|
+
label: w("healthybowl.marketplace.stats.categories", "Categories"),
|
|
346
|
+
value: Tt,
|
|
347
|
+
icon: /* @__PURE__ */ y(Ae, { className: "h-5 w-5" })
|
|
315
348
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
label:
|
|
318
|
-
value:
|
|
319
|
-
icon: /* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ y(a, {
|
|
350
|
+
label: w("healthybowl.marketplace.stats.avgRating", "Avg Rating"),
|
|
351
|
+
value: Et.toFixed(1),
|
|
352
|
+
icon: /* @__PURE__ */ y(g, { className: "h-5 w-5" })
|
|
320
353
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
label:
|
|
323
|
-
value:
|
|
324
|
-
icon: /* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ y(a, {
|
|
355
|
+
label: w("healthybowl.marketplace.stats.organicCertified", "Organic Certified"),
|
|
356
|
+
value: Dt,
|
|
357
|
+
icon: /* @__PURE__ */ y(_e, { className: "h-5 w-5" })
|
|
325
358
|
})
|
|
326
359
|
]
|
|
327
360
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ b("div", {
|
|
329
362
|
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",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ b("div", {
|
|
331
364
|
className: "flex flex-1 flex-wrap items-center gap-3",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ b("div", {
|
|
333
366
|
className: "relative",
|
|
334
367
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ y(ke, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }),
|
|
369
|
+
/* @__PURE__ */ y("input", {
|
|
337
370
|
type: "text",
|
|
338
|
-
placeholder:
|
|
371
|
+
placeholder: w("healthybowl.marketplace.search.placeholder", "Search products or sellers..."),
|
|
339
372
|
value: O,
|
|
340
373
|
onChange: (e) => k(e.target.value),
|
|
341
374
|
className: "w-64 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)]"
|
|
342
375
|
}),
|
|
343
|
-
O && /* @__PURE__ */
|
|
376
|
+
O && /* @__PURE__ */ y(x, {
|
|
344
377
|
variant: "ghost",
|
|
345
378
|
size: "icon-sm",
|
|
346
379
|
onClick: () => k(""),
|
|
347
|
-
"aria-label":
|
|
380
|
+
"aria-label": w("healthybowl.marketplace.search.clearAria", "Clear search"),
|
|
348
381
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
|
|
349
|
-
children: /* @__PURE__ */
|
|
382
|
+
children: /* @__PURE__ */ y(Me, { className: "h-3.5 w-3.5" })
|
|
350
383
|
})
|
|
351
384
|
]
|
|
352
|
-
}), /* @__PURE__ */
|
|
385
|
+
}), /* @__PURE__ */ b("div", {
|
|
353
386
|
className: "relative",
|
|
354
|
-
ref:
|
|
355
|
-
children: [/* @__PURE__ */
|
|
387
|
+
ref: K,
|
|
388
|
+
children: [/* @__PURE__ */ b(x, {
|
|
356
389
|
variant: "outline",
|
|
357
|
-
onClick: () =>
|
|
390
|
+
onClick: () => P(!$e),
|
|
358
391
|
children: [
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
|
|
361
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ y(ge, { className: "h-3.5 w-3.5 text-text-secondary" }),
|
|
393
|
+
Ye[N],
|
|
394
|
+
/* @__PURE__ */ y(ye, { className: "h-3.5 w-3.5 text-text-secondary" })
|
|
362
395
|
]
|
|
363
|
-
}),
|
|
396
|
+
}), $e && /* @__PURE__ */ y("div", {
|
|
364
397
|
className: "absolute left-0 z-20 mt-1 w-48 rounded-md border border-border-subtle bg-bg-surface shadow-lg",
|
|
365
|
-
children: Object.entries(
|
|
398
|
+
children: Object.entries(Ye).map(([t, n]) => /* @__PURE__ */ y("button", {
|
|
366
399
|
type: "button",
|
|
367
400
|
onClick: () => {
|
|
368
|
-
|
|
401
|
+
Qe(t), P(!1);
|
|
369
402
|
},
|
|
370
|
-
className: e("flex w-full items-center px-3 py-2 text-sm hover:bg-bg-sunken/50",
|
|
403
|
+
className: e("flex w-full items-center px-3 py-2 text-sm hover:bg-bg-sunken/50", N === t ? "font-medium text-primary" : "text-text-primary"),
|
|
371
404
|
children: n
|
|
372
405
|
}, t))
|
|
373
406
|
})]
|
|
374
407
|
})]
|
|
375
|
-
}), /* @__PURE__ */
|
|
408
|
+
}), /* @__PURE__ */ y("span", {
|
|
376
409
|
className: "text-xs text-text-secondary",
|
|
377
|
-
children:
|
|
410
|
+
children: w("healthybowl.marketplace.overview.resultCount", "Showing {{shown}} of {{total}} products", {
|
|
378
411
|
shown: Z.length,
|
|
379
412
|
total: Q
|
|
380
413
|
})
|
|
381
414
|
})]
|
|
382
415
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ y("div", {
|
|
384
417
|
className: "flex flex-wrap gap-1.5",
|
|
385
|
-
children:
|
|
418
|
+
children: Be.map((t) => /* @__PURE__ */ y("button", {
|
|
386
419
|
type: "button",
|
|
387
|
-
onClick: () =>
|
|
420
|
+
onClick: () => j(t),
|
|
388
421
|
className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors", A === 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"),
|
|
389
|
-
children:
|
|
422
|
+
children: T(t)
|
|
390
423
|
}, t))
|
|
391
424
|
}),
|
|
392
|
-
|
|
425
|
+
wt.length > 0 && /* @__PURE__ */ b("div", {
|
|
393
426
|
className: "flex flex-wrap items-center gap-1.5",
|
|
394
427
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ b("span", {
|
|
396
429
|
className: "flex items-center gap-1 text-xs font-medium text-text-secondary",
|
|
397
430
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ y(Ae, { className: "h-3.5 w-3.5" }),
|
|
399
432
|
" ",
|
|
400
|
-
|
|
433
|
+
w("healthybowl.marketplace.overview.tagFilter.label", "Tags:")
|
|
401
434
|
]
|
|
402
435
|
}),
|
|
403
|
-
|
|
436
|
+
wt.map((t) => /* @__PURE__ */ y("button", {
|
|
404
437
|
type: "button",
|
|
405
|
-
onClick: () =>
|
|
406
|
-
className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors",
|
|
438
|
+
onClick: () => Ze((e) => e === t.key ? null : t.key),
|
|
439
|
+
className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors", M === t.key ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
|
|
407
440
|
children: t.label
|
|
408
441
|
}, t.key)),
|
|
409
|
-
|
|
442
|
+
M && /* @__PURE__ */ b(x, {
|
|
410
443
|
variant: "ghost",
|
|
411
444
|
size: "sm",
|
|
412
|
-
onClick: () =>
|
|
445
|
+
onClick: () => Ze(null),
|
|
413
446
|
className: "gap-0.5 text-text-secondary hover:text-text-primary",
|
|
414
447
|
children: [
|
|
415
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ y(Me, { className: "h-3 w-3" }),
|
|
416
449
|
" ",
|
|
417
|
-
|
|
450
|
+
w("healthybowl.marketplace.overview.tagFilter.clear", "Clear")
|
|
418
451
|
]
|
|
419
452
|
})
|
|
420
453
|
]
|
|
421
454
|
}),
|
|
422
|
-
Z.length > 0 ? /* @__PURE__ */
|
|
455
|
+
Z.length > 0 ? /* @__PURE__ */ y("div", {
|
|
423
456
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
424
457
|
children: Z.map((r) => {
|
|
425
|
-
let i =
|
|
426
|
-
return /* @__PURE__ */
|
|
458
|
+
let i = et.has(r.id), a = yt.some((e) => e.productId === r.id), ee = Y.has(r.id), s = Ot(r.id), c = gt(r);
|
|
459
|
+
return /* @__PURE__ */ b("div", {
|
|
427
460
|
className: "flex flex-col rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm transition-shadow hover:shadow-md",
|
|
428
461
|
children: [
|
|
429
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ b("div", {
|
|
430
463
|
className: "flex items-start justify-between",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ y(x, {
|
|
432
465
|
variant: "ghost",
|
|
433
466
|
size: "sm",
|
|
434
|
-
onClick: () =>
|
|
467
|
+
onClick: () => I(r),
|
|
435
468
|
className: "h-auto justify-start px-0 py-0 text-left text-sm font-semibold text-text-primary hover:bg-transparent hover:underline",
|
|
436
469
|
children: r.name
|
|
437
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ b("div", {
|
|
438
471
|
className: "flex items-center gap-1.5",
|
|
439
|
-
children: [
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
472
|
+
children: [
|
|
473
|
+
c && /* @__PURE__ */ b("span", {
|
|
474
|
+
className: "flex items-center gap-0.5 rounded-full bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium text-text-primary",
|
|
475
|
+
children: [
|
|
476
|
+
/* @__PURE__ */ y(m, { className: "h-2.5 w-2.5" }),
|
|
477
|
+
" ",
|
|
478
|
+
w("healthybowl.marketplace.shared.badge.shared", "Shared")
|
|
479
|
+
]
|
|
480
|
+
}),
|
|
481
|
+
r.organicCertified && /* @__PURE__ */ b("span", {
|
|
482
|
+
className: "flex items-center gap-0.5 rounded-full bg-success-subtle px-1.5 py-0.5 text-[10px] font-medium text-success",
|
|
483
|
+
children: [
|
|
484
|
+
/* @__PURE__ */ y(we, { className: "h-2.5 w-2.5" }),
|
|
485
|
+
" ",
|
|
486
|
+
w("healthybowl.marketplace.overview.badge.organic", "Organic")
|
|
487
|
+
]
|
|
488
|
+
}),
|
|
489
|
+
/* @__PURE__ */ y(x, {
|
|
490
|
+
variant: "ghost",
|
|
491
|
+
size: "icon-sm",
|
|
492
|
+
onClick: () => At(r),
|
|
493
|
+
"aria-label": w("healthybowl.marketplace.overview.card.wishlistAria", "Toggle wishlist"),
|
|
494
|
+
className: "text-text-secondary hover:text-text-primary",
|
|
495
|
+
children: /* @__PURE__ */ y(Se, { className: e("h-4 w-4 transition-colors", ee && "fill-destructive text-status-error-text") })
|
|
496
|
+
})
|
|
497
|
+
]
|
|
454
498
|
})]
|
|
455
499
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ y("div", {
|
|
457
501
|
className: "mt-1.5",
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
label:
|
|
502
|
+
children: /* @__PURE__ */ y(o, {
|
|
503
|
+
label: T(r.category),
|
|
460
504
|
variant: "muted"
|
|
461
505
|
})
|
|
462
506
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ y(ie, {
|
|
464
508
|
readOnly: !0,
|
|
465
509
|
entityType: "MARKETPLACE_PRODUCT",
|
|
466
510
|
entityId: r.id,
|
|
467
511
|
tags: r.entityTags ?? [],
|
|
468
512
|
className: "mt-1.5"
|
|
469
513
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ b("div", {
|
|
471
515
|
className: "mt-2 flex items-center justify-between",
|
|
472
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ y("p", {
|
|
473
517
|
className: "text-xs text-text-secondary",
|
|
474
518
|
children: r.seller
|
|
475
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ y("div", {
|
|
476
520
|
className: "flex items-center gap-0.5",
|
|
477
|
-
children:
|
|
521
|
+
children: Ve(r.sellerRating)
|
|
478
522
|
})]
|
|
479
523
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ b("p", {
|
|
481
525
|
className: "mt-2 text-lg font-bold text-text-primary",
|
|
482
|
-
children: [t(r.price), /* @__PURE__ */
|
|
526
|
+
children: [t(r.price), /* @__PURE__ */ b("span", {
|
|
483
527
|
className: "text-xs font-normal text-text-secondary",
|
|
484
528
|
children: ["/", r.unit]
|
|
485
529
|
})]
|
|
486
530
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ b("div", {
|
|
488
532
|
className: "mt-1.5 flex items-center gap-2",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ b("div", {
|
|
490
534
|
className: "flex items-center gap-1",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
535
|
+
children: [/* @__PURE__ */ y(g, { className: "h-3 w-3 fill-warning text-warning" }), /* @__PURE__ */ y("span", {
|
|
492
536
|
className: "text-xs font-medium text-text-primary",
|
|
493
537
|
children: r.rating
|
|
494
538
|
})]
|
|
495
|
-
}), /* @__PURE__ */
|
|
539
|
+
}), /* @__PURE__ */ y("span", {
|
|
496
540
|
className: "text-xs text-text-secondary",
|
|
497
|
-
children:
|
|
541
|
+
children: w("healthybowl.marketplace.overview.reviewsCount", "({{count}} reviews)", { count: n(r.reviews) })
|
|
498
542
|
})]
|
|
499
543
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ y("div", {
|
|
501
545
|
className: "mt-2",
|
|
502
|
-
children: /* @__PURE__ */
|
|
503
|
-
label: r.stock === 0 ?
|
|
546
|
+
children: /* @__PURE__ */ y(o, {
|
|
547
|
+
label: r.stock === 0 ? w("healthybowl.marketplace.overview.stock.outOfStock", "Out of Stock") : r.stock < 50 ? w("healthybowl.marketplace.overview.stock.lowStock", "Low Stock ({{count}})", { count: r.stock }) : w("healthybowl.marketplace.overview.stock.inStock", "In Stock"),
|
|
504
548
|
variant: r.stock === 0 ? "error" : r.stock < 50 ? "warning" : "success",
|
|
505
549
|
dot: !0
|
|
506
550
|
})
|
|
507
551
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
552
|
+
/* @__PURE__ */ b("div", {
|
|
509
553
|
className: "mt-3 flex items-center gap-2",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
554
|
+
children: [/* @__PURE__ */ y("span", {
|
|
511
555
|
className: "text-xs text-text-secondary",
|
|
512
|
-
children:
|
|
513
|
-
}), /* @__PURE__ */
|
|
556
|
+
children: w("healthybowl.marketplace.overview.card.qty", "Qty:")
|
|
557
|
+
}), /* @__PURE__ */ b("div", {
|
|
514
558
|
className: "flex items-center rounded-md border border-border-subtle",
|
|
515
559
|
children: [
|
|
516
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ y(x, {
|
|
517
561
|
variant: "ghost",
|
|
518
562
|
size: "icon-sm",
|
|
519
|
-
onClick: () =>
|
|
563
|
+
onClick: () => kt(r.id, s - 1),
|
|
520
564
|
disabled: s <= 1,
|
|
521
|
-
"aria-label":
|
|
565
|
+
"aria-label": w("healthybowl.marketplace.overview.card.decreaseQtyAria", "Decrease quantity"),
|
|
522
566
|
className: "rounded-l-md rounded-r-none text-text-secondary",
|
|
523
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ y(Te, { className: "h-3 w-3" })
|
|
524
568
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ y("span", {
|
|
526
570
|
className: "min-w-[2rem] text-center text-xs font-medium text-text-primary",
|
|
527
571
|
children: s
|
|
528
572
|
}),
|
|
529
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ y(x, {
|
|
530
574
|
variant: "ghost",
|
|
531
575
|
size: "icon-sm",
|
|
532
|
-
onClick: () =>
|
|
576
|
+
onClick: () => kt(r.id, s + 1),
|
|
533
577
|
disabled: s >= r.stock,
|
|
534
|
-
"aria-label":
|
|
578
|
+
"aria-label": w("healthybowl.marketplace.overview.card.increaseQtyAria", "Increase quantity"),
|
|
535
579
|
className: "rounded-l-none rounded-r-md text-text-secondary",
|
|
536
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ y(Oe, { className: "h-3 w-3" })
|
|
537
581
|
})
|
|
538
582
|
]
|
|
539
583
|
})]
|
|
540
584
|
}),
|
|
541
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ b("div", {
|
|
542
586
|
className: "mt-3 flex items-center gap-2",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ y(x, {
|
|
544
588
|
onClick: () => $(r),
|
|
545
589
|
disabled: r.stock === 0,
|
|
546
590
|
className: e("flex-1", i ? "bg-success text-white hover:bg-success" : a ? "border border-border-subtle bg-bg-sunken text-text-primary hover:bg-bg-sunken/80" : ""),
|
|
547
|
-
children: i ? /* @__PURE__ */ v
|
|
548
|
-
/* @__PURE__ */
|
|
591
|
+
children: i ? /* @__PURE__ */ b(v, { children: [
|
|
592
|
+
/* @__PURE__ */ y(ve, { className: "h-3 w-3" }),
|
|
549
593
|
" ",
|
|
550
|
-
|
|
551
|
-
] }) : a ? /* @__PURE__ */ v
|
|
552
|
-
/* @__PURE__ */
|
|
594
|
+
w("healthybowl.marketplace.overview.card.added", "Added")
|
|
595
|
+
] }) : a ? /* @__PURE__ */ b(v, { children: [
|
|
596
|
+
/* @__PURE__ */ y(h, { className: "h-3 w-3" }),
|
|
553
597
|
" ",
|
|
554
|
-
|
|
555
|
-
] }) : /* @__PURE__ */ v
|
|
556
|
-
/* @__PURE__ */
|
|
598
|
+
w("healthybowl.marketplace.overview.card.addMore", "Add More")
|
|
599
|
+
] }) : /* @__PURE__ */ b(v, { children: [
|
|
600
|
+
/* @__PURE__ */ y(h, { className: "h-3 w-3" }),
|
|
557
601
|
" ",
|
|
558
|
-
|
|
602
|
+
w("healthybowl.marketplace.overview.card.addToCart", "Add to Cart")
|
|
559
603
|
] })
|
|
560
|
-
}), /* @__PURE__ */
|
|
604
|
+
}), /* @__PURE__ */ y(x, {
|
|
561
605
|
variant: "outline",
|
|
562
606
|
size: "icon-sm",
|
|
563
|
-
onClick: () =>
|
|
607
|
+
onClick: () => I(r),
|
|
564
608
|
className: "text-text-secondary hover:text-text-primary",
|
|
565
|
-
"aria-label":
|
|
566
|
-
children: /* @__PURE__ */
|
|
609
|
+
"aria-label": w("healthybowl.marketplace.overview.card.quickViewAria", "Quick view"),
|
|
610
|
+
children: /* @__PURE__ */ y(be, { className: "h-3.5 w-3.5" })
|
|
567
611
|
})]
|
|
568
612
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ b(x, {
|
|
614
|
+
variant: "outline",
|
|
615
|
+
size: "sm",
|
|
616
|
+
onClick: () => void _t(r),
|
|
617
|
+
disabled: mt === r.id,
|
|
618
|
+
className: e("mt-2 w-full", c && "border-success text-success hover:text-success"),
|
|
619
|
+
children: [/* @__PURE__ */ y(m, { className: "h-3 w-3" }), mt === r.id ? w("healthybowl.marketplace.shared.card.saving", "Saving...") : c ? w("healthybowl.marketplace.shared.card.unpublish", "Remove from Shared Market") : w("healthybowl.marketplace.shared.card.publish", "Publish to Shared Market")]
|
|
620
|
+
}),
|
|
621
|
+
/* @__PURE__ */ b("div", {
|
|
570
622
|
className: "mt-2 flex items-center gap-2 border-t border-border-subtle pt-2",
|
|
571
|
-
children: [/* @__PURE__ */
|
|
623
|
+
children: [/* @__PURE__ */ b(x, {
|
|
572
624
|
variant: "outline",
|
|
573
625
|
size: "sm",
|
|
574
|
-
onClick: () =>
|
|
575
|
-
disabled:
|
|
626
|
+
onClick: () => ot(r),
|
|
627
|
+
disabled: H,
|
|
576
628
|
className: "flex-1 text-text-secondary hover:text-text-primary",
|
|
577
629
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ y(De, { className: "h-3 w-3" }),
|
|
579
631
|
" ",
|
|
580
|
-
|
|
632
|
+
w("healthybowl.marketplace.overview.card.editListing", "Edit Listing")
|
|
581
633
|
]
|
|
582
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ y(x, {
|
|
583
635
|
variant: "ghost",
|
|
584
636
|
size: "icon-sm",
|
|
585
|
-
onClick: () =>
|
|
586
|
-
disabled:
|
|
637
|
+
onClick: () => ct(r),
|
|
638
|
+
disabled: H,
|
|
587
639
|
className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
|
|
588
|
-
"aria-label":
|
|
589
|
-
children: /* @__PURE__ */
|
|
640
|
+
"aria-label": w("healthybowl.marketplace.overview.card.deleteListingAria", "Delete listing"),
|
|
641
|
+
children: /* @__PURE__ */ y(je, { className: "h-3 w-3" })
|
|
590
642
|
})]
|
|
591
643
|
})
|
|
592
644
|
]
|
|
593
645
|
}, r.id);
|
|
594
646
|
})
|
|
595
|
-
}) :
|
|
647
|
+
}) : Ue.marketplace ? /* @__PURE__ */ y(s, {}) : /* @__PURE__ */ y(ee, {
|
|
596
648
|
illustration: "empty-files",
|
|
597
|
-
title: O || A !== "All" ?
|
|
598
|
-
description: O || A !== "All" ?
|
|
599
|
-
action: O || A !== "All" ? /* @__PURE__ */
|
|
649
|
+
title: O || A !== "All" ? w("healthybowl.marketplace.overview.emptyState.noResults.title", "No products found") : w("healthybowl.marketplace.overview.emptyState.noListings.title", "No listings yet"),
|
|
650
|
+
description: O || A !== "All" ? w("healthybowl.marketplace.overview.emptyState.noResults.description", "Try adjusting your search or category filters.") : He ? w("healthybowl.marketplace.overview.emptyState.loading", "Loading marketplace products...") : w("healthybowl.marketplace.overview.emptyState.noListings.description", "No products have been listed yet. Be the first to list your farm produce for buyers to discover."),
|
|
651
|
+
action: O || A !== "All" ? /* @__PURE__ */ y(x, {
|
|
600
652
|
onClick: () => {
|
|
601
|
-
k(""),
|
|
653
|
+
k(""), j("All");
|
|
602
654
|
},
|
|
603
|
-
children:
|
|
604
|
-
}) :
|
|
605
|
-
onClick:
|
|
655
|
+
children: w("healthybowl.marketplace.overview.emptyState.clearFilters", "Clear Filters")
|
|
656
|
+
}) : He ? void 0 : /* @__PURE__ */ b(x, {
|
|
657
|
+
onClick: at,
|
|
606
658
|
children: [
|
|
607
|
-
/* @__PURE__ */ _
|
|
659
|
+
/* @__PURE__ */ y(_, { className: "h-4 w-4" }),
|
|
608
660
|
" ",
|
|
609
|
-
|
|
661
|
+
w("healthybowl.marketplace.overview.actions.listProduct", "List a Product")
|
|
610
662
|
]
|
|
611
663
|
})
|
|
612
664
|
})
|
|
613
665
|
] }),
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
open: !!
|
|
616
|
-
onClose: () =>
|
|
617
|
-
title:
|
|
618
|
-
description:
|
|
666
|
+
/* @__PURE__ */ y(re, {
|
|
667
|
+
open: !!F,
|
|
668
|
+
onClose: () => I(null),
|
|
669
|
+
title: F?.name ?? "",
|
|
670
|
+
description: F ? T(F.category) : void 0,
|
|
619
671
|
size: "lg",
|
|
620
|
-
footer:
|
|
621
|
-
/* @__PURE__ */
|
|
672
|
+
footer: F ? /* @__PURE__ */ b(v, { children: [
|
|
673
|
+
/* @__PURE__ */ y(x, {
|
|
622
674
|
variant: "outline",
|
|
623
|
-
onClick: () =>
|
|
675
|
+
onClick: () => I(null),
|
|
624
676
|
className: "text-text-secondary hover:text-text-primary",
|
|
625
|
-
children:
|
|
677
|
+
children: w("healthybowl.common.close", "Close")
|
|
626
678
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ y(x, {
|
|
628
680
|
variant: "outline",
|
|
629
681
|
onClick: () => {
|
|
630
|
-
|
|
682
|
+
q(J(`marketplace/${F.id}`)), I(null);
|
|
631
683
|
},
|
|
632
|
-
children:
|
|
684
|
+
children: w("healthybowl.marketplace.overview.quickView.viewFullDetails", "View Full Details")
|
|
633
685
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ b(x, {
|
|
635
687
|
onClick: () => {
|
|
636
|
-
$(
|
|
688
|
+
$(F), I(null);
|
|
637
689
|
},
|
|
638
|
-
disabled:
|
|
690
|
+
disabled: F.stock === 0,
|
|
639
691
|
children: [
|
|
640
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ y(h, { className: "h-4 w-4" }),
|
|
641
693
|
" ",
|
|
642
|
-
|
|
694
|
+
w("healthybowl.marketplace.overview.card.addToCart", "Add to Cart")
|
|
643
695
|
]
|
|
644
696
|
})
|
|
645
697
|
] }) : void 0,
|
|
646
|
-
children:
|
|
698
|
+
children: F && /* @__PURE__ */ b("div", {
|
|
647
699
|
className: "space-y-4",
|
|
648
700
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ b("div", {
|
|
650
702
|
className: "flex flex-wrap items-center gap-2",
|
|
651
703
|
children: [
|
|
652
|
-
|
|
704
|
+
F.organicCertified && /* @__PURE__ */ b("span", {
|
|
653
705
|
className: "flex items-center gap-1 rounded-full bg-success-subtle px-2.5 py-0.5 text-xs font-medium text-success",
|
|
654
706
|
children: [
|
|
655
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ y(we, { className: "h-3 w-3" }),
|
|
656
708
|
" ",
|
|
657
|
-
|
|
709
|
+
w("healthybowl.marketplace.overview.badge.organicCertified", "Organic Certified")
|
|
658
710
|
]
|
|
659
711
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
label:
|
|
712
|
+
/* @__PURE__ */ y(o, {
|
|
713
|
+
label: T(F.category),
|
|
662
714
|
variant: "muted"
|
|
663
715
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
label:
|
|
666
|
-
variant:
|
|
716
|
+
/* @__PURE__ */ y(o, {
|
|
717
|
+
label: F.stock > 0 ? w("healthybowl.marketplace.overview.quickView.inStockCount", "{{count}} in stock", { count: F.stock }) : w("healthybowl.marketplace.overview.stock.outOfStock", "Out of Stock"),
|
|
718
|
+
variant: F.stock > 0 ? "success" : "error",
|
|
667
719
|
dot: !0
|
|
668
720
|
})
|
|
669
721
|
]
|
|
670
722
|
}),
|
|
671
|
-
/* @__PURE__ */
|
|
723
|
+
/* @__PURE__ */ b("div", {
|
|
672
724
|
className: "flex items-baseline gap-3",
|
|
673
|
-
children: [/* @__PURE__ */
|
|
725
|
+
children: [/* @__PURE__ */ y("span", {
|
|
674
726
|
className: "text-2xl font-bold text-text-primary",
|
|
675
|
-
children: t(
|
|
676
|
-
}), /* @__PURE__ */
|
|
727
|
+
children: t(F.price)
|
|
728
|
+
}), /* @__PURE__ */ b("span", {
|
|
677
729
|
className: "text-sm text-text-secondary",
|
|
678
|
-
children: ["/ ",
|
|
730
|
+
children: ["/ ", F.unit]
|
|
679
731
|
})]
|
|
680
732
|
}),
|
|
681
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ b("div", {
|
|
682
734
|
className: "flex items-center gap-2",
|
|
683
735
|
children: [
|
|
684
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ y("div", {
|
|
685
737
|
className: "flex",
|
|
686
|
-
children:
|
|
738
|
+
children: Ve(F.rating)
|
|
687
739
|
}),
|
|
688
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ y("span", {
|
|
689
741
|
className: "text-sm font-medium text-text-primary",
|
|
690
|
-
children:
|
|
742
|
+
children: F.rating
|
|
691
743
|
}),
|
|
692
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ y("span", {
|
|
693
745
|
className: "text-sm text-text-secondary",
|
|
694
|
-
children:
|
|
746
|
+
children: w("healthybowl.marketplace.overview.reviewsCount", "({{count}} reviews)", { count: n(F.reviews) })
|
|
695
747
|
})
|
|
696
748
|
]
|
|
697
749
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
|
|
699
751
|
className: "text-sm font-medium text-text-primary",
|
|
700
|
-
children:
|
|
701
|
-
}), /* @__PURE__ */
|
|
752
|
+
children: w("healthybowl.marketplace.overview.quickView.description", "Description")
|
|
753
|
+
}), /* @__PURE__ */ y("p", {
|
|
702
754
|
className: "mt-1 text-sm text-text-secondary",
|
|
703
|
-
children:
|
|
755
|
+
children: F.description
|
|
704
756
|
})] }),
|
|
705
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
|
|
706
758
|
className: "text-sm font-medium text-text-primary",
|
|
707
|
-
children:
|
|
708
|
-
}), /* @__PURE__ */
|
|
759
|
+
children: w("healthybowl.marketplace.overview.quickView.tags", "Tags")
|
|
760
|
+
}), /* @__PURE__ */ y(ie, {
|
|
709
761
|
entityType: "MARKETPLACE_PRODUCT",
|
|
710
|
-
entityId:
|
|
711
|
-
tags:
|
|
762
|
+
entityId: F.id,
|
|
763
|
+
tags: F.entityTags ?? [],
|
|
712
764
|
className: "mt-1.5"
|
|
713
765
|
})] }),
|
|
714
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ b("div", {
|
|
715
767
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3",
|
|
716
|
-
children: [/* @__PURE__ */
|
|
768
|
+
children: [/* @__PURE__ */ y("h4", {
|
|
717
769
|
className: "text-sm font-medium text-text-primary",
|
|
718
|
-
children:
|
|
719
|
-
}), /* @__PURE__ */
|
|
770
|
+
children: w("healthybowl.marketplace.overview.quickView.sellerInfo", "Seller Information")
|
|
771
|
+
}), /* @__PURE__ */ b("div", {
|
|
720
772
|
className: "mt-2 space-y-1 text-sm",
|
|
721
773
|
children: [
|
|
722
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ b("div", {
|
|
723
775
|
className: "flex items-center justify-between",
|
|
724
|
-
children: [/* @__PURE__ */
|
|
776
|
+
children: [/* @__PURE__ */ y("span", {
|
|
725
777
|
className: "text-text-secondary",
|
|
726
|
-
children:
|
|
727
|
-
}), /* @__PURE__ */
|
|
778
|
+
children: w("healthybowl.marketplace.overview.quickView.seller", "Seller")
|
|
779
|
+
}), /* @__PURE__ */ y("span", {
|
|
728
780
|
className: "font-medium text-text-primary",
|
|
729
|
-
children:
|
|
781
|
+
children: F.seller
|
|
730
782
|
})]
|
|
731
783
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ b("div", {
|
|
733
785
|
className: "flex items-center justify-between",
|
|
734
|
-
children: [/* @__PURE__ */
|
|
786
|
+
children: [/* @__PURE__ */ y("span", {
|
|
735
787
|
className: "text-text-secondary",
|
|
736
|
-
children:
|
|
737
|
-
}), /* @__PURE__ */
|
|
788
|
+
children: w("healthybowl.marketplace.overview.quickView.sellerRating", "Seller Rating")
|
|
789
|
+
}), /* @__PURE__ */ b("div", {
|
|
738
790
|
className: "flex items-center gap-1",
|
|
739
|
-
children: [/* @__PURE__ */
|
|
791
|
+
children: [/* @__PURE__ */ y(g, { className: "h-3 w-3 fill-warning text-warning" }), /* @__PURE__ */ y("span", {
|
|
740
792
|
className: "font-medium text-text-primary",
|
|
741
|
-
children:
|
|
793
|
+
children: F.sellerRating
|
|
742
794
|
})]
|
|
743
795
|
})]
|
|
744
796
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ b("div", {
|
|
746
798
|
className: "flex items-center justify-between",
|
|
747
|
-
children: [/* @__PURE__ */
|
|
799
|
+
children: [/* @__PURE__ */ y("span", {
|
|
748
800
|
className: "text-text-secondary",
|
|
749
|
-
children:
|
|
750
|
-
}), /* @__PURE__ */
|
|
801
|
+
children: w("healthybowl.marketplace.overview.quickView.location", "Location")
|
|
802
|
+
}), /* @__PURE__ */ y("span", {
|
|
751
803
|
className: "text-text-primary",
|
|
752
|
-
children:
|
|
804
|
+
children: F.location
|
|
753
805
|
})]
|
|
754
806
|
})
|
|
755
807
|
]
|
|
@@ -758,123 +810,123 @@ var S = () => {
|
|
|
758
810
|
]
|
|
759
811
|
})
|
|
760
812
|
}),
|
|
761
|
-
/* @__PURE__ */
|
|
762
|
-
open:
|
|
763
|
-
onClose:
|
|
764
|
-
title:
|
|
765
|
-
description:
|
|
813
|
+
/* @__PURE__ */ y(re, {
|
|
814
|
+
open: it,
|
|
815
|
+
onClose: G,
|
|
816
|
+
title: R ? w("healthybowl.marketplace.overview.sellerModal.editTitle", "Edit {{name}}", { name: R.name }) : w("healthybowl.marketplace.overview.actions.listProduct", "List a Product"),
|
|
817
|
+
description: R ? w("healthybowl.marketplace.overview.sellerModal.editDescription", "Update this marketplace listing. Changes are saved and persist after refresh.") : w("healthybowl.marketplace.overview.sellerModal.createDescription", "Publish your farm produce to the marketplace. Listings are saved and persist after refresh."),
|
|
766
818
|
size: "xl",
|
|
767
|
-
footer: /* @__PURE__ */ v
|
|
819
|
+
footer: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(x, {
|
|
768
820
|
variant: "outline",
|
|
769
|
-
onClick:
|
|
821
|
+
onClick: G,
|
|
770
822
|
className: "text-text-secondary hover:text-text-primary",
|
|
771
|
-
children:
|
|
772
|
-
}), /* @__PURE__ */
|
|
773
|
-
onClick:
|
|
774
|
-
disabled:
|
|
775
|
-
children:
|
|
823
|
+
children: w("healthybowl.common.cancel", "Cancel")
|
|
824
|
+
}), /* @__PURE__ */ y(x, {
|
|
825
|
+
onClick: st,
|
|
826
|
+
disabled: H,
|
|
827
|
+
children: H ? w("healthybowl.marketplace.overview.sellerModal.saving", "Saving...") : R ? w("healthybowl.marketplace.overview.sellerModal.saveChanges", "Save Changes") : w("healthybowl.marketplace.overview.sellerModal.publishListing", "Publish Listing")
|
|
776
828
|
})] }),
|
|
777
|
-
children: /* @__PURE__ */
|
|
829
|
+
children: /* @__PURE__ */ b("div", {
|
|
778
830
|
className: "grid gap-4 sm:grid-cols-2",
|
|
779
831
|
children: [
|
|
780
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
781
833
|
className: "text-sm font-medium text-text-primary",
|
|
782
|
-
children:
|
|
783
|
-
}), /* @__PURE__ */
|
|
834
|
+
children: w("healthybowl.marketplace.overview.form.name.label", "Product Name *")
|
|
835
|
+
}), /* @__PURE__ */ y("input", {
|
|
784
836
|
type: "text",
|
|
785
|
-
value:
|
|
786
|
-
onChange: (e) =>
|
|
787
|
-
placeholder:
|
|
837
|
+
value: B.name,
|
|
838
|
+
onChange: (e) => W("name", e.target.value),
|
|
839
|
+
placeholder: w("healthybowl.marketplace.overview.form.name.placeholder", "e.g., Organic Tomato"),
|
|
788
840
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
789
841
|
})] }),
|
|
790
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
791
843
|
className: "text-sm font-medium text-text-primary",
|
|
792
|
-
children:
|
|
793
|
-
}), /* @__PURE__ */
|
|
794
|
-
value:
|
|
795
|
-
onValueChange: (e) =>
|
|
796
|
-
children: [/* @__PURE__ */
|
|
844
|
+
children: w("healthybowl.marketplace.overview.form.category.label", "Category")
|
|
845
|
+
}), /* @__PURE__ */ b(Pe, {
|
|
846
|
+
value: B.category,
|
|
847
|
+
onValueChange: (e) => W("category", e),
|
|
848
|
+
children: [/* @__PURE__ */ y(Le, {
|
|
797
849
|
className: "mt-1 w-full",
|
|
798
|
-
children: /* @__PURE__ */
|
|
799
|
-
}), /* @__PURE__ */
|
|
850
|
+
children: /* @__PURE__ */ y(Re, { placeholder: w("healthybowl.marketplace.overview.form.category.label", "Category") })
|
|
851
|
+
}), /* @__PURE__ */ y(Fe, { children: ze.map((e) => /* @__PURE__ */ y(Ie, {
|
|
800
852
|
value: e,
|
|
801
|
-
children:
|
|
853
|
+
children: T(e)
|
|
802
854
|
}, e)) })]
|
|
803
855
|
})] }),
|
|
804
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
805
857
|
className: "text-sm font-medium text-text-primary",
|
|
806
|
-
children:
|
|
807
|
-
}), /* @__PURE__ */
|
|
858
|
+
children: w("healthybowl.marketplace.overview.form.price.label", "Price *")
|
|
859
|
+
}), /* @__PURE__ */ y("input", {
|
|
808
860
|
type: "number",
|
|
809
861
|
min: 0,
|
|
810
862
|
step: "0.01",
|
|
811
|
-
value:
|
|
812
|
-
onChange: (e) =>
|
|
813
|
-
placeholder:
|
|
863
|
+
value: B.price,
|
|
864
|
+
onChange: (e) => W("price", e.target.value),
|
|
865
|
+
placeholder: w("healthybowl.marketplace.overview.form.price.placeholder", "e.g., 75"),
|
|
814
866
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
815
867
|
})] }),
|
|
816
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
817
869
|
className: "text-sm font-medium text-text-primary",
|
|
818
|
-
children:
|
|
819
|
-
}), /* @__PURE__ */
|
|
870
|
+
children: w("healthybowl.marketplace.overview.form.unit.label", "Unit")
|
|
871
|
+
}), /* @__PURE__ */ y("input", {
|
|
820
872
|
type: "text",
|
|
821
|
-
value:
|
|
822
|
-
onChange: (e) =>
|
|
823
|
-
placeholder:
|
|
873
|
+
value: B.unit,
|
|
874
|
+
onChange: (e) => W("unit", e.target.value),
|
|
875
|
+
placeholder: w("healthybowl.marketplace.overview.form.unit.placeholder", "e.g., kg"),
|
|
824
876
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
825
877
|
})] }),
|
|
826
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
827
879
|
className: "text-sm font-medium text-text-primary",
|
|
828
|
-
children:
|
|
829
|
-
}), /* @__PURE__ */
|
|
880
|
+
children: w("healthybowl.marketplace.overview.form.stock.label", "Quantity Available *")
|
|
881
|
+
}), /* @__PURE__ */ y("input", {
|
|
830
882
|
type: "number",
|
|
831
883
|
min: 0,
|
|
832
|
-
value:
|
|
833
|
-
onChange: (e) =>
|
|
834
|
-
placeholder:
|
|
884
|
+
value: B.stock,
|
|
885
|
+
onChange: (e) => W("stock", e.target.value),
|
|
886
|
+
placeholder: w("healthybowl.marketplace.overview.form.stock.placeholder", "e.g., 1000"),
|
|
835
887
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
836
888
|
})] }),
|
|
837
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
838
890
|
className: "text-sm font-medium text-text-primary",
|
|
839
|
-
children:
|
|
840
|
-
}), /* @__PURE__ */
|
|
891
|
+
children: w("healthybowl.marketplace.overview.form.seller.label", "Seller / Farm *")
|
|
892
|
+
}), /* @__PURE__ */ y("input", {
|
|
841
893
|
type: "text",
|
|
842
|
-
value:
|
|
843
|
-
onChange: (e) =>
|
|
844
|
-
placeholder:
|
|
894
|
+
value: B.seller,
|
|
895
|
+
onChange: (e) => W("seller", e.target.value),
|
|
896
|
+
placeholder: w("healthybowl.marketplace.overview.form.seller.placeholder", "e.g., Green Valley Farm"),
|
|
845
897
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
846
898
|
})] }),
|
|
847
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
848
900
|
className: "text-sm font-medium text-text-primary",
|
|
849
|
-
children:
|
|
850
|
-
}), /* @__PURE__ */
|
|
901
|
+
children: w("healthybowl.marketplace.overview.form.location.label", "Location")
|
|
902
|
+
}), /* @__PURE__ */ y("input", {
|
|
851
903
|
type: "text",
|
|
852
|
-
value:
|
|
853
|
-
onChange: (e) =>
|
|
854
|
-
placeholder:
|
|
904
|
+
value: B.location,
|
|
905
|
+
onChange: (e) => W("location", e.target.value),
|
|
906
|
+
placeholder: w("healthybowl.marketplace.overview.form.location.placeholder", "e.g., Pune, Maharashtra"),
|
|
855
907
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
856
908
|
})] }),
|
|
857
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ y("div", {
|
|
858
910
|
className: "flex items-end",
|
|
859
|
-
children: /* @__PURE__ */
|
|
911
|
+
children: /* @__PURE__ */ b("label", {
|
|
860
912
|
className: "flex items-center gap-2 text-sm font-medium text-text-primary",
|
|
861
|
-
children: [/* @__PURE__ */
|
|
913
|
+
children: [/* @__PURE__ */ y("input", {
|
|
862
914
|
type: "checkbox",
|
|
863
|
-
checked:
|
|
864
|
-
onChange: (e) =>
|
|
915
|
+
checked: B.organicCertified,
|
|
916
|
+
onChange: (e) => W("organicCertified", e.target.checked),
|
|
865
917
|
className: "h-4 w-4 rounded border-border-subtle text-primary focus:ring-[var(--color-focus-ring)]"
|
|
866
|
-
}),
|
|
918
|
+
}), w("healthybowl.marketplace.overview.form.organicCertified.label", "Organic certified")]
|
|
867
919
|
})
|
|
868
920
|
}),
|
|
869
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ b("div", {
|
|
870
922
|
className: "sm:col-span-2",
|
|
871
|
-
children: [/* @__PURE__ */
|
|
923
|
+
children: [/* @__PURE__ */ y("label", {
|
|
872
924
|
className: "text-sm font-medium text-text-primary",
|
|
873
|
-
children:
|
|
874
|
-
}), /* @__PURE__ */
|
|
875
|
-
value:
|
|
876
|
-
onChange: (e) =>
|
|
877
|
-
placeholder:
|
|
925
|
+
children: w("healthybowl.marketplace.overview.form.description.label", "Description")
|
|
926
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
927
|
+
value: B.description,
|
|
928
|
+
onChange: (e) => W("description", e.target.value),
|
|
929
|
+
placeholder: w("healthybowl.marketplace.overview.form.description.placeholder", "Describe your produce, quality, and any certifications..."),
|
|
878
930
|
rows: 3,
|
|
879
931
|
className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
880
932
|
})]
|
|
@@ -882,14 +934,14 @@ var S = () => {
|
|
|
882
934
|
]
|
|
883
935
|
})
|
|
884
936
|
}),
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
-
toasts:
|
|
887
|
-
onDismiss:
|
|
937
|
+
/* @__PURE__ */ y(c, {
|
|
938
|
+
toasts: xt,
|
|
939
|
+
onDismiss: St
|
|
888
940
|
})
|
|
889
941
|
]
|
|
890
942
|
});
|
|
891
943
|
};
|
|
892
944
|
//#endregion
|
|
893
|
-
export {
|
|
945
|
+
export { C as MarketplacePage };
|
|
894
946
|
|
|
895
947
|
//# sourceMappingURL=MarketplacePage.js.map
|