@burdenoff/microfe-healthybowl 2026.1005.2 → 2026.1007.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/components/BedLayoutGrid.js +128 -115
- package/dist/healthybowl/components/BedLayoutGrid.js.map +1 -1
- package/dist/healthybowl/components/CropPicker.js +37 -0
- package/dist/healthybowl/components/CropPicker.js.map +1 -0
- package/dist/healthybowl/components/DataTable.js +125 -108
- package/dist/healthybowl/components/DataTable.js.map +1 -1
- package/dist/healthybowl/components/FilterBar.js +9 -6
- package/dist/healthybowl/components/FilterBar.js.map +1 -1
- package/dist/healthybowl/components/PlantCatalogPicker.js +32 -0
- package/dist/healthybowl/components/PlantCatalogPicker.js.map +1 -0
- package/dist/healthybowl/components/WorkspaceRecordPicker.js +164 -0
- package/dist/healthybowl/components/WorkspaceRecordPicker.js.map +1 -0
- package/dist/healthybowl/components/index.js +3 -1
- package/dist/healthybowl/hooks/useCropPage.js +71 -0
- package/dist/healthybowl/hooks/useCropPage.js.map +1 -0
- package/dist/healthybowl/hooks/usePlantCatalog.js +133 -44
- package/dist/healthybowl/hooks/usePlantCatalog.js.map +1 -1
- package/dist/healthybowl/hooks/usePlantingEstimate.js +6 -6
- package/dist/healthybowl/hooks/usePlantingEstimate.js.map +1 -1
- package/dist/healthybowl/hooks/useWorkspaceRead.js +46 -0
- package/dist/healthybowl/hooks/useWorkspaceRead.js.map +1 -0
- package/dist/healthybowl/pages/HomePage.js +143 -142
- package/dist/healthybowl/pages/HomePage.js.map +1 -1
- package/dist/healthybowl/pages/analytics/ReportsPage.js +8 -8
- package/dist/healthybowl/pages/catalog/PlantCatalogPage.js +266 -192
- package/dist/healthybowl/pages/catalog/PlantCatalogPage.js.map +1 -1
- package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js +58 -0
- package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js.map +1 -0
- package/dist/healthybowl/pages/catalog/browsePagination.js +24 -0
- package/dist/healthybowl/pages/catalog/browsePagination.js.map +1 -0
- package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +6 -6
- package/dist/healthybowl/pages/crops/CropDetailsPage.js +340 -348
- package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropPlanningPage.js +468 -434
- package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/CropsPage.js +633 -542
- package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js +875 -800
- package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +459 -448
- package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
- package/dist/healthybowl/pages/crops/SuccessionCropLabel.js +21 -0
- package/dist/healthybowl/pages/crops/SuccessionCropLabel.js.map +1 -0
- package/dist/healthybowl/pages/crops/planningEdit.js +30 -0
- package/dist/healthybowl/pages/crops/planningEdit.js.map +1 -0
- package/dist/healthybowl/pages/fields/FieldMapPage.js +989 -941
- package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/GeneralLedgerPage.js +6 -6
- package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +7 -7
- package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
- package/dist/healthybowl/pages/financial/TransactionsPage.js +541 -541
- package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +10 -10
- package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +207 -207
- package/dist/healthybowl/pages/government-schemes/CommunicationPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +38 -38
- package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js.map +1 -1
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +15 -15
- package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/AnimalRegistryPage.js +4 -4
- package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +4 -4
- package/dist/healthybowl/pages/livestock/FeedManagementPage.js +4 -4
- package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +16 -16
- package/dist/healthybowl/pages/livestock/HealthRecordsPage.js.map +1 -1
- package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +4 -4
- package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +4 -4
- package/dist/healthybowl/pages/market/MarketPricesPage.js +305 -305
- package/dist/healthybowl/pages/market/MarketPricesPage.js.map +1 -1
- package/dist/healthybowl/pages/network/CohortsPage.js +107 -107
- package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/CommunityPage.js +247 -247
- package/dist/healthybowl/pages/network/CommunityPage.js.map +1 -1
- package/dist/healthybowl/pages/network/EventsPage.js +16 -16
- package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/ExpertsPage.js +470 -470
- package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
- package/dist/healthybowl/pages/network/MentorsPage.js +6 -6
- package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +8 -8
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +7 -7
- package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
- package/dist/healthybowl/pages/production/ProductionBatchesPage.js +7 -7
- package/dist/healthybowl/pages/production/RecipeManagementPage.js +5 -5
- package/dist/healthybowl/pages/production/ValueAddedProductsPage.js +7 -7
- package/dist/healthybowl/pages/soil/SoilTestsPage.js +6 -6
- package/dist/healthybowl/pages/soil/SoilTestsPage.js.map +1 -1
- package/dist/healthybowl/pages/suppliers/SuppliersPage.js +10 -10
- package/dist/healthybowl/pages/sustainability/CarbonCreditLedgerPage.js +6 -6
- package/dist/healthybowl/pages/terrace/PlantingFormModal.js +151 -131
- package/dist/healthybowl/pages/terrace/PlantingFormModal.js.map +1 -1
- package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +6 -6
- package/dist/healthybowl/utils/cropComparison.js +1 -1
- package/dist/healthybowl/utils/cropComparison.js.map +1 -1
- package/dist/healthybowl/utils/cropPicker.js +35 -0
- package/dist/healthybowl/utils/cropPicker.js.map +1 -0
- package/dist/healthybowl/utils/plantingCapacity.js +2 -2
- package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
- package/dist/healthybowl/utils/quotaLabels.js +8 -0
- package/dist/healthybowl/utils/quotaLabels.js.map +1 -0
- package/dist/healthybowl/utils/seedRate.js +1 -8
- package/dist/healthybowl/utils/seedRate.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { cn as e, formatCurrency as t, formatDateOnly as n, todayLocalDate as r } from "../../utils/helpers.js";
|
|
2
2
|
import { PageLayout as i } from "../../components/PageLayout.js";
|
|
3
3
|
import { StatCard as a } from "../../components/StatCard.js";
|
|
4
|
+
import { FilterBar as ee } from "../../components/FilterBar.js";
|
|
4
5
|
import { StatusBadge as o } from "../../components/StatusBadge.js";
|
|
5
|
-
import { EmptyState as
|
|
6
|
-
import { ErrorState as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { useToast as ae } from "../../hooks/useToast.js";
|
|
6
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
7
|
+
import { ErrorState as ne } from "../../components/ErrorState.js";
|
|
8
|
+
import { ToastContainer as re } from "../../components/Toast.js";
|
|
9
|
+
import { PageLoader as ie } from "../../components/PageLoader.js";
|
|
10
|
+
import { Modal as ae } from "../../components/Modal.js";
|
|
11
|
+
import { useToast as oe } from "../../hooks/useToast.js";
|
|
12
12
|
import "../../components/index.js";
|
|
13
|
-
import { useHealthyBowlData as
|
|
14
|
-
import { useConsultationPayments as
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { useI18n as
|
|
17
|
-
import { ArrowUpDown as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { Button as
|
|
13
|
+
import { useHealthyBowlData as se } from "../../hooks/useHealthyBowlData.js";
|
|
14
|
+
import { useConsultationPayments as ce } from "../../hooks/useConsultationPayments.js";
|
|
15
|
+
import { useEffect as le, useRef as ue, useState as s } from "react";
|
|
16
|
+
import { useI18n as de } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
import { ArrowUpDown as fe, Award as pe, CalendarCheck as c, ChevronDown as me, Clock as he, Eye as ge, Globe as _e, MapPin as ve, Pencil as ye, Plus as l, Star as be, Trash2 as xe, User as Se, Wallet as Ce, Zap as we } from "lucide-react";
|
|
18
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
19
|
+
import { Button as p, Select as m, SelectContent as h, SelectItem as g, SelectTrigger as _, SelectValue as v } from "@burdenoff/fe-libs/ui";
|
|
20
20
|
//#region src/healthybowl/pages/network/ExpertsPage.tsx
|
|
21
|
-
var
|
|
21
|
+
var y = {
|
|
22
22
|
topic: "",
|
|
23
23
|
requestedDate: "",
|
|
24
24
|
mode: "phone",
|
|
25
25
|
notes: ""
|
|
26
|
-
},
|
|
26
|
+
}, b = {
|
|
27
27
|
name: "",
|
|
28
28
|
specialization: "",
|
|
29
29
|
experience: "",
|
|
@@ -32,36 +32,36 @@ var b = {
|
|
|
32
32
|
availability: "available",
|
|
33
33
|
hourlyRate: "",
|
|
34
34
|
languages: ""
|
|
35
|
-
},
|
|
35
|
+
}, Te = (e) => {
|
|
36
36
|
switch (e) {
|
|
37
37
|
case "CONFIRMED": return "success";
|
|
38
38
|
case "COMPLETED": return "info";
|
|
39
39
|
case "CANCELLED": return "muted";
|
|
40
40
|
default: return "warning";
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, Ee = (e) => {
|
|
43
43
|
switch (e) {
|
|
44
44
|
case "PAID": return "success";
|
|
45
45
|
case "REFUNDED": return "error";
|
|
46
46
|
default: return "warning";
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, De = [
|
|
49
49
|
"All",
|
|
50
50
|
"Organic Crop Science",
|
|
51
51
|
"Integrated Pest Management",
|
|
52
52
|
"Soil Science & Fertility",
|
|
53
53
|
"Livestock & Veterinary",
|
|
54
54
|
"Organic Certification"
|
|
55
|
-
],
|
|
55
|
+
], Oe = [
|
|
56
56
|
"All",
|
|
57
57
|
"Available",
|
|
58
58
|
"Busy"
|
|
59
|
-
],
|
|
59
|
+
], ke = [
|
|
60
60
|
"rating",
|
|
61
61
|
"experience",
|
|
62
62
|
"price-asc",
|
|
63
63
|
"price-desc"
|
|
64
|
-
],
|
|
64
|
+
], Ae = (e) => {
|
|
65
65
|
switch (e) {
|
|
66
66
|
case "available": return "success";
|
|
67
67
|
case "busy": return "warning";
|
|
@@ -69,78 +69,78 @@ var b = {
|
|
|
69
69
|
default: return "default";
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
function
|
|
73
|
-
return Array.from({ length: 5 }, (n, r) => /* @__PURE__ */
|
|
72
|
+
function je(t) {
|
|
73
|
+
return Array.from({ length: 5 }, (n, r) => /* @__PURE__ */ d(be, { className: e("h-3.5 w-3.5", r < Math.round(t) ? "fill-warning text-warning" : "text-muted") }, r));
|
|
74
74
|
}
|
|
75
|
-
var
|
|
76
|
-
let { t:
|
|
75
|
+
var x = () => {
|
|
76
|
+
let { t: x } = de(), { experts: S, consultations: Me, createConsultation: Ne, updateConsultationStatus: Pe, createExpert: Fe, updateExpert: Ie, deleteExpert: Le, errors: Re, loadings: ze, refetch: C } = se(), { checkoutConsultation: Be, syncConsultationPayment: Ve, loadRazorpay: He } = ce(), Ue = [{
|
|
77
77
|
value: "phone",
|
|
78
|
-
label:
|
|
78
|
+
label: x("healthybowl.network.experts.modes.phone", "Phone call")
|
|
79
79
|
}, {
|
|
80
80
|
value: "in_person",
|
|
81
|
-
label:
|
|
82
|
-
}],
|
|
83
|
-
rating:
|
|
84
|
-
experience:
|
|
85
|
-
"price-asc":
|
|
86
|
-
"price-desc":
|
|
87
|
-
}, Ue = {
|
|
88
|
-
All: S("healthybowl.common.all", "All"),
|
|
89
|
-
"Organic Crop Science": S("healthybowl.network.experts.specializations.organicCropScience", "Organic Crop Science"),
|
|
90
|
-
"Integrated Pest Management": S("healthybowl.network.experts.specializations.integratedPestManagement", "Integrated Pest Management"),
|
|
91
|
-
"Soil Science & Fertility": S("healthybowl.network.experts.specializations.soilScienceFertility", "Soil Science & Fertility"),
|
|
92
|
-
"Livestock & Veterinary": S("healthybowl.network.experts.specializations.livestockVeterinary", "Livestock & Veterinary"),
|
|
93
|
-
"Organic Certification": S("healthybowl.network.experts.specializations.organicCertification", "Organic Certification")
|
|
81
|
+
label: x("healthybowl.network.experts.modes.inPerson", "In person")
|
|
82
|
+
}], w = {
|
|
83
|
+
rating: x("healthybowl.network.experts.sort.rating", "Rating"),
|
|
84
|
+
experience: x("healthybowl.network.experts.sort.experience", "Experience"),
|
|
85
|
+
"price-asc": x("healthybowl.network.experts.sort.priceAsc", "Price: Low → High"),
|
|
86
|
+
"price-desc": x("healthybowl.network.experts.sort.priceDesc", "Price: High → Low")
|
|
94
87
|
}, We = {
|
|
95
|
-
All:
|
|
96
|
-
|
|
97
|
-
|
|
88
|
+
All: x("healthybowl.common.all", "All"),
|
|
89
|
+
"Organic Crop Science": x("healthybowl.network.experts.specializations.organicCropScience", "Organic Crop Science"),
|
|
90
|
+
"Integrated Pest Management": x("healthybowl.network.experts.specializations.integratedPestManagement", "Integrated Pest Management"),
|
|
91
|
+
"Soil Science & Fertility": x("healthybowl.network.experts.specializations.soilScienceFertility", "Soil Science & Fertility"),
|
|
92
|
+
"Livestock & Veterinary": x("healthybowl.network.experts.specializations.livestockVeterinary", "Livestock & Veterinary"),
|
|
93
|
+
"Organic Certification": x("healthybowl.network.experts.specializations.organicCertification", "Organic Certification")
|
|
98
94
|
}, Ge = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}, E = {
|
|
103
|
-
REQUESTED: S("healthybowl.network.experts.consultationStatus.requested", "REQUESTED"),
|
|
104
|
-
CONFIRMED: S("healthybowl.network.experts.consultationStatus.confirmed", "CONFIRMED"),
|
|
105
|
-
COMPLETED: S("healthybowl.network.experts.consultationStatus.completed", "COMPLETED"),
|
|
106
|
-
CANCELLED: S("healthybowl.network.experts.consultationStatus.cancelled", "CANCELLED")
|
|
95
|
+
All: x("healthybowl.common.all", "All"),
|
|
96
|
+
Available: x("healthybowl.network.experts.availabilityFilter.available", "Available"),
|
|
97
|
+
Busy: x("healthybowl.network.experts.availabilityFilter.busy", "Busy")
|
|
107
98
|
}, Ke = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
available: x("healthybowl.network.experts.availability.available", "available"),
|
|
100
|
+
busy: x("healthybowl.network.experts.availability.busy", "busy"),
|
|
101
|
+
offline: x("healthybowl.network.experts.availability.offline", "offline")
|
|
102
|
+
}, T = {
|
|
103
|
+
REQUESTED: x("healthybowl.network.experts.consultationStatus.requested", "REQUESTED"),
|
|
104
|
+
CONFIRMED: x("healthybowl.network.experts.consultationStatus.confirmed", "CONFIRMED"),
|
|
105
|
+
COMPLETED: x("healthybowl.network.experts.consultationStatus.completed", "COMPLETED"),
|
|
106
|
+
CANCELLED: x("healthybowl.network.experts.consultationStatus.cancelled", "CANCELLED")
|
|
111
107
|
}, qe = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
PENDING: x("healthybowl.network.experts.paymentStatus.pending", "Payment pending"),
|
|
109
|
+
PAID: x("healthybowl.network.experts.paymentStatus.paid", "Paid"),
|
|
110
|
+
REFUNDED: x("healthybowl.network.experts.paymentStatus.refunded", "Refunded")
|
|
111
|
+
}, Je = {
|
|
112
|
+
video: x("healthybowl.network.experts.modes.video", "Video call (coming soon)"),
|
|
113
|
+
phone: x("healthybowl.network.experts.modes.phone", "Phone call"),
|
|
114
|
+
in_person: x("healthybowl.network.experts.modes.inPerson", "In person")
|
|
115
|
+
}, [E, D] = s(""), [O, k] = s("All"), [A, j] = s("All"), [M, Ye] = s("rating"), [Xe, N] = s(!1), [Ze, Qe] = s(null), [P, F] = s(null), [I, L] = s(y), [R, $e] = s(!1), [et, z] = s(!1), [B, V] = s(null), [H, U] = s(b), [tt, nt] = s(!1), [rt, it] = s(null), [W, at] = s(null), [ot, st] = s(() => /* @__PURE__ */ new Set()), G = ue(/* @__PURE__ */ new Set()), ct = (e) => G.current.has(e) ? !1 : (G.current.add(e), st(new Set(G.current)), !0), lt = (e) => {
|
|
116
|
+
G.current.delete(e), st(new Set(G.current));
|
|
117
|
+
}, ut = [
|
|
118
118
|
{
|
|
119
119
|
value: "available",
|
|
120
|
-
label:
|
|
120
|
+
label: x("healthybowl.network.experts.availability.available", "available")
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
value: "busy",
|
|
124
|
-
label:
|
|
124
|
+
label: x("healthybowl.network.experts.availability.busy", "busy")
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
value: "offline",
|
|
128
|
-
label:
|
|
128
|
+
label: x("healthybowl.network.experts.availability.offline", "offline")
|
|
129
129
|
}
|
|
130
|
-
],
|
|
130
|
+
], K = ue(null), { toasts: dt, toast: q, dismiss: ft } = oe(), pt = Me.filter((e) => e.consultantType === "EXPERT"), J = (e, t) => L((n) => ({
|
|
131
131
|
...n,
|
|
132
132
|
[e]: t
|
|
133
|
-
})),
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
},
|
|
133
|
+
})), mt = (e) => {
|
|
134
|
+
L(y), F(e);
|
|
135
|
+
}, Y = () => {
|
|
136
|
+
F(null), L(y);
|
|
137
|
+
}, X = (e, t) => U((n) => ({
|
|
138
138
|
...n,
|
|
139
139
|
[e]: t
|
|
140
|
-
})),
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
|
|
140
|
+
})), ht = () => {
|
|
141
|
+
V(null), U(b), z(!0);
|
|
142
|
+
}, gt = (e) => {
|
|
143
|
+
V(e), U({
|
|
144
144
|
name: e.name,
|
|
145
145
|
specialization: e.specialization,
|
|
146
146
|
experience: String(e.experience),
|
|
@@ -149,172 +149,172 @@ var S = () => {
|
|
|
149
149
|
availability: e.availability,
|
|
150
150
|
hourlyRate: String(e.hourlyRate),
|
|
151
151
|
languages: (e.languages ?? []).join(", ")
|
|
152
|
-
}),
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
if (!
|
|
157
|
-
|
|
158
|
-
title:
|
|
159
|
-
description:
|
|
152
|
+
}), z(!0);
|
|
153
|
+
}, Z = () => {
|
|
154
|
+
z(!1), V(null), U(b);
|
|
155
|
+
}, _t = async () => {
|
|
156
|
+
if (!H.name.trim() || !H.specialization.trim() || !H.location.trim()) {
|
|
157
|
+
q({
|
|
158
|
+
title: x("healthybowl.network.experts.form.toast.missingFields.title", "Missing required fields"),
|
|
159
|
+
description: x("healthybowl.network.experts.form.toast.missingFields.description", "Name, specialization, and location are required."),
|
|
160
160
|
variant: "warning"
|
|
161
161
|
});
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
|
-
let e =
|
|
165
|
-
|
|
164
|
+
let e = H.languages.split(",").map((e) => e.trim()).filter((e) => e.length > 0);
|
|
165
|
+
nt(!0);
|
|
166
166
|
try {
|
|
167
|
-
|
|
168
|
-
id:
|
|
169
|
-
name:
|
|
170
|
-
specialization:
|
|
171
|
-
experience: Number(
|
|
172
|
-
rating: Number(
|
|
173
|
-
location:
|
|
174
|
-
availability:
|
|
175
|
-
hourlyRate: Number(
|
|
167
|
+
B ? (await Ie({
|
|
168
|
+
id: B.id,
|
|
169
|
+
name: H.name.trim(),
|
|
170
|
+
specialization: H.specialization.trim(),
|
|
171
|
+
experience: Number(H.experience) || 0,
|
|
172
|
+
rating: Number(H.rating) || 0,
|
|
173
|
+
location: H.location.trim(),
|
|
174
|
+
availability: H.availability,
|
|
175
|
+
hourlyRate: Number(H.hourlyRate) || 0,
|
|
176
176
|
languages: e
|
|
177
|
-
}),
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
177
|
+
}), q({
|
|
178
|
+
title: x("healthybowl.network.experts.form.toast.updated.title", "Expert updated"),
|
|
179
|
+
description: x("healthybowl.network.experts.form.toast.updated.description", "{{name}} has been updated.", { name: H.name.trim() }),
|
|
180
180
|
variant: "success"
|
|
181
|
-
})) : (await
|
|
182
|
-
name:
|
|
183
|
-
specialization:
|
|
184
|
-
experience: Number(
|
|
185
|
-
rating: Number(
|
|
186
|
-
location:
|
|
187
|
-
availability:
|
|
188
|
-
hourlyRate: Number(
|
|
181
|
+
})) : (await Fe({
|
|
182
|
+
name: H.name.trim(),
|
|
183
|
+
specialization: H.specialization.trim(),
|
|
184
|
+
experience: Number(H.experience) || 0,
|
|
185
|
+
rating: Number(H.rating) || 0,
|
|
186
|
+
location: H.location.trim(),
|
|
187
|
+
availability: H.availability,
|
|
188
|
+
hourlyRate: Number(H.hourlyRate) || 0,
|
|
189
189
|
languages: e
|
|
190
|
-
}),
|
|
191
|
-
title:
|
|
192
|
-
description:
|
|
190
|
+
}), q({
|
|
191
|
+
title: x("healthybowl.network.experts.form.toast.created.title", "Expert added"),
|
|
192
|
+
description: x("healthybowl.network.experts.form.toast.created.description", "{{name}} has been added.", { name: H.name.trim() }),
|
|
193
193
|
variant: "success"
|
|
194
|
-
})),
|
|
194
|
+
})), Z();
|
|
195
195
|
} catch (e) {
|
|
196
|
-
|
|
197
|
-
title:
|
|
198
|
-
description: e instanceof Error ? e.message :
|
|
196
|
+
q({
|
|
197
|
+
title: x("healthybowl.network.experts.form.toast.saveError.title", "Could not save expert"),
|
|
198
|
+
description: e instanceof Error ? e.message : x("healthybowl.network.experts.form.toast.saveError.description", "Failed to save expert"),
|
|
199
199
|
variant: "error"
|
|
200
200
|
});
|
|
201
201
|
} finally {
|
|
202
|
-
|
|
202
|
+
nt(!1);
|
|
203
203
|
}
|
|
204
|
-
},
|
|
205
|
-
|
|
204
|
+
}, vt = async (e) => {
|
|
205
|
+
it(e.id);
|
|
206
206
|
try {
|
|
207
|
-
await
|
|
208
|
-
title:
|
|
209
|
-
description:
|
|
207
|
+
await Le(e.id), q({
|
|
208
|
+
title: x("healthybowl.network.experts.form.toast.deleted.title", "Expert removed"),
|
|
209
|
+
description: x("healthybowl.network.experts.form.toast.deleted.description", "{{name}} has been removed.", { name: e.name }),
|
|
210
210
|
variant: "success"
|
|
211
211
|
});
|
|
212
212
|
} catch (e) {
|
|
213
|
-
|
|
214
|
-
title:
|
|
215
|
-
description: e instanceof Error ? e.message :
|
|
213
|
+
q({
|
|
214
|
+
title: x("healthybowl.network.experts.form.toast.deleteError.title", "Could not remove expert"),
|
|
215
|
+
description: e instanceof Error ? e.message : x("healthybowl.network.experts.form.toast.deleteError.description", "Failed to remove expert"),
|
|
216
216
|
variant: "error"
|
|
217
217
|
});
|
|
218
218
|
} finally {
|
|
219
|
-
|
|
219
|
+
it(null);
|
|
220
220
|
}
|
|
221
|
-
},
|
|
222
|
-
if (
|
|
223
|
-
if (!
|
|
224
|
-
|
|
225
|
-
title:
|
|
226
|
-
description:
|
|
221
|
+
}, yt = async () => {
|
|
222
|
+
if (P) {
|
|
223
|
+
if (!I.topic.trim() || !I.requestedDate) {
|
|
224
|
+
q({
|
|
225
|
+
title: x("healthybowl.network.experts.toast.missingFields.title", "Missing required fields"),
|
|
226
|
+
description: x("healthybowl.network.experts.toast.missingFields.description", "Topic and preferred date are required."),
|
|
227
227
|
variant: "warning"
|
|
228
228
|
});
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
$e(!0);
|
|
232
232
|
try {
|
|
233
|
-
await
|
|
233
|
+
await Ne({
|
|
234
234
|
consultantType: "EXPERT",
|
|
235
|
-
consultantId:
|
|
236
|
-
consultantName:
|
|
237
|
-
topic:
|
|
238
|
-
requestedDate:
|
|
239
|
-
mode:
|
|
240
|
-
notes:
|
|
241
|
-
fee:
|
|
242
|
-
}),
|
|
243
|
-
title:
|
|
244
|
-
description:
|
|
235
|
+
consultantId: P.id,
|
|
236
|
+
consultantName: P.name,
|
|
237
|
+
topic: I.topic.trim(),
|
|
238
|
+
requestedDate: I.requestedDate,
|
|
239
|
+
mode: I.mode,
|
|
240
|
+
notes: I.notes.trim() || void 0,
|
|
241
|
+
fee: P.hourlyRate
|
|
242
|
+
}), q({
|
|
243
|
+
title: x("healthybowl.network.experts.toast.requested.title", "Consultation requested"),
|
|
244
|
+
description: x("healthybowl.network.experts.toast.requested.description", "Your request to {{name}} has been sent.", { name: P.name }),
|
|
245
245
|
variant: "success"
|
|
246
|
-
}),
|
|
246
|
+
}), Y();
|
|
247
247
|
} catch (e) {
|
|
248
|
-
|
|
249
|
-
title:
|
|
250
|
-
description: e instanceof Error ? e.message :
|
|
248
|
+
q({
|
|
249
|
+
title: x("healthybowl.network.experts.toast.bookFailed.title", "Could not book consultation"),
|
|
250
|
+
description: e instanceof Error ? e.message : x("healthybowl.network.experts.toast.bookFailed.description", "Failed to book consultation"),
|
|
251
251
|
variant: "error"
|
|
252
252
|
});
|
|
253
253
|
} finally {
|
|
254
|
-
|
|
254
|
+
$e(!1);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
},
|
|
258
|
-
|
|
257
|
+
}, Q = async (e, t) => {
|
|
258
|
+
at(e);
|
|
259
259
|
try {
|
|
260
|
-
await
|
|
260
|
+
await Pe({
|
|
261
261
|
id: e,
|
|
262
262
|
status: t
|
|
263
|
-
}),
|
|
264
|
-
title:
|
|
265
|
-
description:
|
|
263
|
+
}), q({
|
|
264
|
+
title: x("healthybowl.network.experts.toast.statusUpdated.title", "Status updated"),
|
|
265
|
+
description: x("healthybowl.network.experts.toast.statusUpdated.description", "The consultation has been moved to {{status}}.", { status: T[t] ?? t }),
|
|
266
266
|
variant: "success"
|
|
267
267
|
});
|
|
268
268
|
} catch (e) {
|
|
269
|
-
|
|
270
|
-
title:
|
|
271
|
-
description: e instanceof Error ? e.message :
|
|
269
|
+
q({
|
|
270
|
+
title: x("healthybowl.network.experts.toast.statusUpdateError.title", "Could not update status"),
|
|
271
|
+
description: e instanceof Error ? e.message : x("healthybowl.network.experts.toast.statusUpdateError.description", "Failed to update status"),
|
|
272
272
|
variant: "error"
|
|
273
273
|
});
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
at(null);
|
|
276
276
|
}
|
|
277
|
-
},
|
|
277
|
+
}, bt = async (e) => {
|
|
278
278
|
try {
|
|
279
|
-
let t = await
|
|
280
|
-
await
|
|
281
|
-
title:
|
|
282
|
-
description: t.paymentReference ?
|
|
279
|
+
let t = await Ve(e.id);
|
|
280
|
+
await C().catch(() => void 0), t.paymentStatus === "PAID" ? q({
|
|
281
|
+
title: x("healthybowl.network.experts.payment.toast.paid.title", "Payment confirmed"),
|
|
282
|
+
description: t.paymentReference ? x("healthybowl.network.experts.payment.toast.paid.withReference", "Your consultation payment is confirmed — reference {{reference}}.", { reference: t.paymentReference }) : x("healthybowl.network.experts.payment.toast.paid.description", "Your consultation payment is confirmed."),
|
|
283
283
|
variant: "success"
|
|
284
|
-
}) :
|
|
285
|
-
title:
|
|
286
|
-
description:
|
|
284
|
+
}) : q({
|
|
285
|
+
title: x("healthybowl.network.experts.payment.toast.pending.title", "Payment not completed"),
|
|
286
|
+
description: x("healthybowl.network.experts.payment.toast.pending.description", "This consultation is still awaiting payment. Nothing was charged — you can pay again any time."),
|
|
287
287
|
variant: "info"
|
|
288
288
|
});
|
|
289
289
|
} finally {
|
|
290
|
-
|
|
290
|
+
lt(e.id);
|
|
291
291
|
}
|
|
292
|
-
},
|
|
293
|
-
if (!
|
|
292
|
+
}, xt = async (e) => {
|
|
293
|
+
if (!ct(e.id)) return;
|
|
294
294
|
let t = !1;
|
|
295
295
|
try {
|
|
296
|
-
let n = await
|
|
296
|
+
let n = await Be(e.id);
|
|
297
297
|
if (n.provider !== "RAZORPAY") {
|
|
298
|
-
|
|
299
|
-
title:
|
|
300
|
-
description:
|
|
298
|
+
q({
|
|
299
|
+
title: x("healthybowl.network.experts.payment.toast.unsupportedProvider.title", "Unsupported payment provider"),
|
|
300
|
+
description: x("healthybowl.network.experts.payment.toast.unsupportedProvider.description", "Billing routed this consultation to {{provider}}, which this checkout cannot open yet. Contact support for help.", { provider: n.provider }),
|
|
301
301
|
variant: "warning"
|
|
302
302
|
});
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
if (!n.providerOrderId || !n.razorpayKeyId) {
|
|
306
|
-
|
|
307
|
-
title:
|
|
308
|
-
description:
|
|
306
|
+
q({
|
|
307
|
+
title: x("healthybowl.network.experts.payment.toast.checkoutIncomplete.title", "Payment session incomplete"),
|
|
308
|
+
description: x("healthybowl.network.experts.payment.toast.checkoutIncomplete.description", "Billing did not return the details needed to open checkout. Please try again."),
|
|
309
309
|
variant: "error"
|
|
310
310
|
});
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
let r = await
|
|
314
|
-
i || (i = !0,
|
|
315
|
-
|
|
316
|
-
title:
|
|
317
|
-
description: e instanceof Error ? e.message :
|
|
313
|
+
let r = await He(), i = !1, a = () => {
|
|
314
|
+
i || (i = !0, bt(e).catch((e) => {
|
|
315
|
+
q({
|
|
316
|
+
title: x("healthybowl.network.experts.payment.toast.syncError.title", "Could not confirm the payment"),
|
|
317
|
+
description: e instanceof Error ? e.message : x("healthybowl.common.error", "Unknown error"),
|
|
318
318
|
variant: "error"
|
|
319
319
|
});
|
|
320
320
|
}));
|
|
@@ -325,285 +325,285 @@ var S = () => {
|
|
|
325
325
|
amount: Math.round(n.total * 100),
|
|
326
326
|
currency: n.currency,
|
|
327
327
|
name: "HealthyBowl",
|
|
328
|
-
description:
|
|
328
|
+
description: x("healthybowl.network.experts.payment.checkoutDescription", "Consultation: {{topic}}", { topic: e.topic }),
|
|
329
329
|
handler: a,
|
|
330
330
|
modal: { ondismiss: a }
|
|
331
331
|
}).open(), t = !0;
|
|
332
332
|
} catch (e) {
|
|
333
|
-
|
|
334
|
-
title:
|
|
335
|
-
description: e instanceof Error ? e.message :
|
|
333
|
+
q({
|
|
334
|
+
title: x("healthybowl.network.experts.payment.toast.checkoutError.title", "Could not start the payment"),
|
|
335
|
+
description: e instanceof Error ? e.message : x("healthybowl.common.error", "Unknown error"),
|
|
336
336
|
variant: "error"
|
|
337
337
|
});
|
|
338
338
|
} finally {
|
|
339
|
-
t ||
|
|
339
|
+
t || lt(e.id);
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
|
|
342
|
+
le(() => {
|
|
343
343
|
let e = (e) => {
|
|
344
|
-
|
|
344
|
+
K.current && !K.current.contains(e.target) && N(!1);
|
|
345
345
|
};
|
|
346
346
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
347
347
|
}, []);
|
|
348
|
-
let
|
|
349
|
-
let t = (e.name ?? "").toLowerCase().includes(
|
|
348
|
+
let $ = S.filter((e) => {
|
|
349
|
+
let t = (e.name ?? "").toLowerCase().includes(E.toLowerCase()) || e.specialization.toLowerCase().includes(E.toLowerCase()) || e.location.toLowerCase().includes(E.toLowerCase()), n = O === "All" || e.specialization === O, r = A === "All" || e.availability === A.toLowerCase();
|
|
350
350
|
return t && n && r;
|
|
351
351
|
}).sort((e, t) => {
|
|
352
|
-
switch (
|
|
352
|
+
switch (M) {
|
|
353
353
|
case "rating": return t.rating - e.rating;
|
|
354
354
|
case "experience": return t.experience - e.experience;
|
|
355
355
|
case "price-asc": return e.hourlyRate - t.hourlyRate;
|
|
356
356
|
case "price-desc": return t.hourlyRate - e.hourlyRate;
|
|
357
357
|
default: return 0;
|
|
358
358
|
}
|
|
359
|
-
}), St =
|
|
360
|
-
return /* @__PURE__ */
|
|
361
|
-
title:
|
|
362
|
-
description:
|
|
359
|
+
}), St = S.filter((e) => e.availability === "available").length, Ct = S.length > 0 ? (S.reduce((e, t) => e + t.rating, 0) / S.length).toFixed(1) : "0.0", wt = new Set(S.map((e) => e.specialization)).size;
|
|
360
|
+
return /* @__PURE__ */ f(i, {
|
|
361
|
+
title: x("healthybowl.network.experts.title", "Expert Directory"),
|
|
362
|
+
description: x("healthybowl.network.experts.description", "Find and connect with agricultural experts"),
|
|
363
363
|
purpose: "Find agricultural specialists — agronomists, vets, soil scientists — and reach out for help. When you hit a problem outside your experience, this directory connects you with someone who knows the answer.",
|
|
364
|
-
actions: /* @__PURE__ */ p
|
|
365
|
-
onClick:
|
|
364
|
+
actions: /* @__PURE__ */ f(p, {
|
|
365
|
+
onClick: ht,
|
|
366
366
|
size: "sm",
|
|
367
367
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ d(l, { className: "h-3.5 w-3.5" }),
|
|
369
369
|
" ",
|
|
370
|
-
|
|
370
|
+
x("healthybowl.network.experts.actions.addExpert", "Add Expert")
|
|
371
371
|
]
|
|
372
372
|
}),
|
|
373
373
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ f("div", {
|
|
375
375
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ d(a, {
|
|
378
378
|
hero: !0,
|
|
379
|
-
label:
|
|
380
|
-
value:
|
|
381
|
-
icon: /* @__PURE__ */
|
|
379
|
+
label: x("healthybowl.network.experts.stats.totalExperts", "Total Experts"),
|
|
380
|
+
value: S.length,
|
|
381
|
+
icon: /* @__PURE__ */ d(pe, { className: "h-4 w-4" })
|
|
382
382
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
label:
|
|
383
|
+
/* @__PURE__ */ d(a, {
|
|
384
|
+
label: x("healthybowl.network.experts.stats.availableNow", "Available Now"),
|
|
385
385
|
value: St,
|
|
386
|
-
icon: /* @__PURE__ */
|
|
386
|
+
icon: /* @__PURE__ */ d(we, { className: "h-4 w-4" })
|
|
387
387
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
label:
|
|
388
|
+
/* @__PURE__ */ d(a, {
|
|
389
|
+
label: x("healthybowl.network.experts.stats.avgRating", "Avg Rating"),
|
|
390
390
|
value: Ct,
|
|
391
|
-
icon: /* @__PURE__ */
|
|
391
|
+
icon: /* @__PURE__ */ d(be, { className: "h-4 w-4" })
|
|
392
392
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
label:
|
|
393
|
+
/* @__PURE__ */ d(a, {
|
|
394
|
+
label: x("healthybowl.network.experts.stats.specializations", "Specializations"),
|
|
395
395
|
value: wt,
|
|
396
|
-
icon: /* @__PURE__ */
|
|
396
|
+
icon: /* @__PURE__ */ d(Se, { className: "h-4 w-4" })
|
|
397
397
|
})
|
|
398
398
|
]
|
|
399
399
|
}),
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
searchValue:
|
|
402
|
-
onSearchChange:
|
|
403
|
-
searchPlaceholder:
|
|
404
|
-
filters: /* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ d(ee, {
|
|
401
|
+
searchValue: E,
|
|
402
|
+
onSearchChange: D,
|
|
403
|
+
searchPlaceholder: x("healthybowl.network.experts.searchPlaceholder", "Search experts by name, specialty, or location..."),
|
|
404
|
+
filters: /* @__PURE__ */ f("div", {
|
|
405
405
|
className: "flex flex-wrap items-center gap-2",
|
|
406
406
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
value:
|
|
409
|
-
onValueChange:
|
|
410
|
-
children: [/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ f(m, {
|
|
408
|
+
value: O,
|
|
409
|
+
onValueChange: k,
|
|
410
|
+
children: [/* @__PURE__ */ d(_, {
|
|
411
411
|
className: "h-8 w-auto text-xs",
|
|
412
|
-
children: /* @__PURE__ */
|
|
413
|
-
}), /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ d(v, {})
|
|
413
|
+
}), /* @__PURE__ */ d(h, { children: De.map((e) => /* @__PURE__ */ d(g, {
|
|
414
414
|
value: e,
|
|
415
|
-
children:
|
|
415
|
+
children: We[e] ?? e
|
|
416
416
|
}, e)) })]
|
|
417
417
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
value:
|
|
420
|
-
onValueChange:
|
|
421
|
-
children: [/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ f(m, {
|
|
419
|
+
value: A,
|
|
420
|
+
onValueChange: j,
|
|
421
|
+
children: [/* @__PURE__ */ d(_, {
|
|
422
422
|
className: "h-8 w-auto text-xs",
|
|
423
|
-
children: /* @__PURE__ */
|
|
424
|
-
}), /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ d(v, {})
|
|
424
|
+
}), /* @__PURE__ */ d(h, { children: Oe.map((e) => /* @__PURE__ */ d(g, {
|
|
425
425
|
value: e,
|
|
426
|
-
children:
|
|
426
|
+
children: Ge[e] ?? e
|
|
427
427
|
}, e)) })]
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
ref:
|
|
429
|
+
/* @__PURE__ */ f("div", {
|
|
430
|
+
ref: K,
|
|
431
431
|
className: "relative",
|
|
432
|
-
children: [/* @__PURE__ */ p
|
|
433
|
-
onClick: () =>
|
|
432
|
+
children: [/* @__PURE__ */ f(p, {
|
|
433
|
+
onClick: () => N((e) => !e),
|
|
434
434
|
variant: "outline",
|
|
435
435
|
size: "sm",
|
|
436
436
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
438
|
-
|
|
439
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ d(fe, { className: "h-3.5 w-3.5" }),
|
|
438
|
+
w[M],
|
|
439
|
+
/* @__PURE__ */ d(me, { className: "h-3 w-3" })
|
|
440
440
|
]
|
|
441
|
-
}),
|
|
441
|
+
}), Xe && /* @__PURE__ */ d("div", {
|
|
442
442
|
className: "absolute end-0 z-10 mt-1 w-44 rounded-md border border-border-subtle bg-bg-surface py-1 shadow-lg",
|
|
443
|
-
children:
|
|
443
|
+
children: ke.map((t) => /* @__PURE__ */ d("button", {
|
|
444
444
|
type: "button",
|
|
445
445
|
onClick: () => {
|
|
446
|
-
|
|
446
|
+
Ye(t), N(!1);
|
|
447
447
|
},
|
|
448
|
-
className: e("flex w-full items-center px-3 py-1.5 text-xs hover:bg-bg-sunken",
|
|
449
|
-
children:
|
|
448
|
+
className: e("flex w-full items-center px-3 py-1.5 text-xs hover:bg-bg-sunken", M === t ? "font-semibold text-primary" : "text-text-primary"),
|
|
449
|
+
children: w[t]
|
|
450
450
|
}, t))
|
|
451
451
|
})]
|
|
452
452
|
})
|
|
453
453
|
]
|
|
454
454
|
})
|
|
455
455
|
}),
|
|
456
|
-
|
|
456
|
+
$.length > 0 ? /* @__PURE__ */ d("div", {
|
|
457
457
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
458
|
-
children:
|
|
459
|
-
let n =
|
|
460
|
-
return /* @__PURE__ */
|
|
458
|
+
children: $.map((e) => {
|
|
459
|
+
let n = Ze === e.id;
|
|
460
|
+
return /* @__PURE__ */ f("div", {
|
|
461
461
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5 transition-colors hover:border-primary/20",
|
|
462
462
|
children: [
|
|
463
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ f("div", {
|
|
464
464
|
className: "flex items-start gap-3",
|
|
465
465
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ d("div", {
|
|
467
467
|
className: "flex h-12 w-12 items-center justify-center rounded-full bg-bg-sunken text-sm font-bold text-text-primary",
|
|
468
468
|
children: (e.name ?? "").split(" ").map((e) => e[0]).join("")
|
|
469
469
|
}),
|
|
470
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ f("div", {
|
|
471
471
|
className: "flex-1 min-w-0",
|
|
472
|
-
children: [/* @__PURE__ */
|
|
472
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
473
473
|
className: "text-sm font-semibold text-text-primary",
|
|
474
474
|
children: e.name
|
|
475
|
-
}), /* @__PURE__ */
|
|
475
|
+
}), /* @__PURE__ */ d("p", {
|
|
476
476
|
className: "text-xs text-text-secondary",
|
|
477
477
|
children: e.specialization
|
|
478
478
|
})]
|
|
479
479
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
label:
|
|
482
|
-
variant:
|
|
480
|
+
/* @__PURE__ */ d(o, {
|
|
481
|
+
label: Ke[e.availability] ?? e.availability,
|
|
482
|
+
variant: Ae(e.availability),
|
|
483
483
|
dot: !0
|
|
484
484
|
})
|
|
485
485
|
]
|
|
486
486
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ f("div", {
|
|
488
488
|
className: "mt-3 space-y-1.5 text-xs text-text-secondary",
|
|
489
489
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ f("p", {
|
|
491
491
|
className: "flex items-center gap-1.5",
|
|
492
492
|
children: [
|
|
493
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ d(he, { className: "h-3 w-3" }),
|
|
494
494
|
" ",
|
|
495
|
-
|
|
495
|
+
x("healthybowl.network.experts.card.yearsExperience", "{{count}} years experience", { count: e.experience })
|
|
496
496
|
]
|
|
497
497
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ f("p", {
|
|
499
499
|
className: "flex items-center gap-1.5",
|
|
500
500
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ d(ve, { className: "h-3 w-3" }),
|
|
502
502
|
" ",
|
|
503
503
|
e.location
|
|
504
504
|
]
|
|
505
505
|
}),
|
|
506
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ f("p", {
|
|
507
507
|
className: "flex items-center gap-1.5",
|
|
508
508
|
children: [
|
|
509
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ d(_e, { className: "h-3 w-3" }),
|
|
510
510
|
" ",
|
|
511
511
|
(e.languages ?? []).join(", ")
|
|
512
512
|
]
|
|
513
513
|
})
|
|
514
514
|
]
|
|
515
515
|
}),
|
|
516
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ f("div", {
|
|
517
517
|
className: "mt-3 flex items-center gap-1",
|
|
518
518
|
children: [
|
|
519
|
-
|
|
520
|
-
/* @__PURE__ */
|
|
519
|
+
je(e.rating),
|
|
520
|
+
/* @__PURE__ */ d("span", {
|
|
521
521
|
className: "ms-1 text-xs font-medium text-text-primary",
|
|
522
522
|
children: e.rating
|
|
523
523
|
}),
|
|
524
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ d("span", {
|
|
525
525
|
className: "text-xs text-text-secondary",
|
|
526
|
-
children:
|
|
526
|
+
children: x("healthybowl.network.experts.card.reviews", "({{count}} reviews)", { count: e.reviews })
|
|
527
527
|
})
|
|
528
528
|
]
|
|
529
529
|
}),
|
|
530
|
-
n && /* @__PURE__ */
|
|
530
|
+
n && /* @__PURE__ */ f("div", {
|
|
531
531
|
className: "mt-3 rounded-md border border-border-subtle bg-bg-sunken/50 p-3",
|
|
532
532
|
children: [
|
|
533
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ d("h4", {
|
|
534
534
|
className: "text-xs font-semibold text-text-primary",
|
|
535
|
-
children:
|
|
535
|
+
children: x("healthybowl.network.experts.card.about", "About")
|
|
536
536
|
}),
|
|
537
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ d("p", {
|
|
538
538
|
className: "mt-1 text-xs text-text-secondary",
|
|
539
|
-
children:
|
|
539
|
+
children: x("healthybowl.network.experts.card.aboutText", "{{name}} is a seasoned agricultural expert specializing in {{specialization}} with {{count}} years of field and research experience. Known for practical, evidence-based consulting that delivers measurable results.", {
|
|
540
540
|
name: e.name,
|
|
541
541
|
specialization: (e.specialization ?? "").toLowerCase(),
|
|
542
542
|
count: e.experience
|
|
543
543
|
})
|
|
544
544
|
}),
|
|
545
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ f("div", {
|
|
546
546
|
className: "mt-2 grid grid-cols-2 gap-2 text-xs",
|
|
547
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ f("div", {
|
|
548
548
|
className: "rounded bg-bg-surface p-2",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ d("p", {
|
|
550
550
|
className: "font-medium text-text-primary",
|
|
551
|
-
children:
|
|
552
|
-
}), /* @__PURE__ */
|
|
551
|
+
children: x("healthybowl.network.experts.card.pastConsultations", "Past Consultations")
|
|
552
|
+
}), /* @__PURE__ */ f("p", {
|
|
553
553
|
className: "text-text-secondary",
|
|
554
554
|
children: [e.reviews * 3, "+"]
|
|
555
555
|
})]
|
|
556
|
-
}), /* @__PURE__ */
|
|
556
|
+
}), /* @__PURE__ */ f("div", {
|
|
557
557
|
className: "rounded bg-bg-surface p-2",
|
|
558
|
-
children: [/* @__PURE__ */
|
|
558
|
+
children: [/* @__PURE__ */ d("p", {
|
|
559
559
|
className: "font-medium text-text-primary",
|
|
560
|
-
children:
|
|
561
|
-
}), /* @__PURE__ */
|
|
560
|
+
children: x("healthybowl.network.experts.card.avgResponse", "Avg Response")
|
|
561
|
+
}), /* @__PURE__ */ d("p", {
|
|
562
562
|
className: "text-text-secondary",
|
|
563
|
-
children:
|
|
563
|
+
children: x("healthybowl.network.experts.card.avgResponseValue", "< 2 hours")
|
|
564
564
|
})]
|
|
565
565
|
})]
|
|
566
566
|
})
|
|
567
567
|
]
|
|
568
568
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ f("div", {
|
|
570
570
|
className: "mt-3 flex items-center justify-between border-t border-border-subtle pt-3",
|
|
571
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ d("span", {
|
|
572
572
|
className: "text-sm font-medium text-text-primary",
|
|
573
|
-
children:
|
|
574
|
-
}), /* @__PURE__ */
|
|
573
|
+
children: x("healthybowl.network.experts.card.pricePerHour", "{{price}}/hr", { price: t(e.hourlyRate, "INR") })
|
|
574
|
+
}), /* @__PURE__ */ f("div", {
|
|
575
575
|
className: "flex items-center gap-2",
|
|
576
576
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
onClick: () =>
|
|
579
|
-
"aria-label":
|
|
577
|
+
/* @__PURE__ */ d(p, {
|
|
578
|
+
onClick: () => Qe(n ? null : e.id),
|
|
579
|
+
"aria-label": x("healthybowl.network.experts.actions.viewProfile", "View profile"),
|
|
580
580
|
variant: "outline",
|
|
581
581
|
size: "icon-sm",
|
|
582
|
-
children: /* @__PURE__ */
|
|
582
|
+
children: /* @__PURE__ */ d(ge, { className: "h-3.5 w-3.5" })
|
|
583
583
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
onClick: () =>
|
|
586
|
-
"aria-label":
|
|
584
|
+
/* @__PURE__ */ d(p, {
|
|
585
|
+
onClick: () => gt(e),
|
|
586
|
+
"aria-label": x("healthybowl.network.experts.actions.editExpert", "Edit expert"),
|
|
587
587
|
variant: "outline",
|
|
588
588
|
size: "icon-sm",
|
|
589
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ d(ye, { className: "h-3.5 w-3.5" })
|
|
590
590
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
onClick: () =>
|
|
593
|
-
disabled:
|
|
594
|
-
"aria-label":
|
|
591
|
+
/* @__PURE__ */ d(p, {
|
|
592
|
+
onClick: () => vt(e),
|
|
593
|
+
disabled: rt === e.id,
|
|
594
|
+
"aria-label": x("healthybowl.network.experts.actions.deleteExpert", "Delete expert"),
|
|
595
595
|
variant: "ghost",
|
|
596
596
|
size: "icon-sm",
|
|
597
597
|
className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
|
|
598
|
-
children: /* @__PURE__ */
|
|
598
|
+
children: /* @__PURE__ */ d(xe, { className: "h-3.5 w-3.5" })
|
|
599
599
|
}),
|
|
600
|
-
/* @__PURE__ */ p
|
|
601
|
-
onClick: () =>
|
|
600
|
+
/* @__PURE__ */ f(p, {
|
|
601
|
+
onClick: () => mt(e),
|
|
602
602
|
size: "sm",
|
|
603
603
|
children: [
|
|
604
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ d(c, { className: "h-3.5 w-3.5" }),
|
|
605
605
|
" ",
|
|
606
|
-
|
|
606
|
+
x("healthybowl.network.experts.actions.bookConsultation", "Book Consultation")
|
|
607
607
|
]
|
|
608
608
|
})
|
|
609
609
|
]
|
|
@@ -612,50 +612,50 @@ var S = () => {
|
|
|
612
612
|
]
|
|
613
613
|
}, e.id);
|
|
614
614
|
})
|
|
615
|
-
}) :
|
|
615
|
+
}) : S.length === 0 ? ze.network ? /* @__PURE__ */ d(ie, {}) : Re.network ? /* @__PURE__ */ d(ne, { onRetry: C }) : /* @__PURE__ */ d(te, {
|
|
616
616
|
illustration: "empty-people",
|
|
617
|
-
title:
|
|
618
|
-
description:
|
|
619
|
-
action: /* @__PURE__ */ p
|
|
620
|
-
onClick:
|
|
617
|
+
title: x("healthybowl.network.experts.emptyState.none.title", "No experts available yet"),
|
|
618
|
+
description: x("healthybowl.network.experts.emptyState.none.description", "There are no agricultural experts in your network yet. Add one to get started."),
|
|
619
|
+
action: /* @__PURE__ */ f(p, {
|
|
620
|
+
onClick: ht,
|
|
621
621
|
children: [
|
|
622
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ d(l, { className: "h-3.5 w-3.5" }),
|
|
623
623
|
" ",
|
|
624
|
-
|
|
624
|
+
x("healthybowl.network.experts.actions.addExpert", "Add Expert")
|
|
625
625
|
]
|
|
626
626
|
})
|
|
627
|
-
}) : /* @__PURE__ */
|
|
627
|
+
}) : /* @__PURE__ */ d(te, {
|
|
628
628
|
illustration: "empty-search",
|
|
629
|
-
title:
|
|
630
|
-
description:
|
|
631
|
-
action: /* @__PURE__ */
|
|
629
|
+
title: x("healthybowl.network.experts.emptyState.noMatch.title", "No experts found"),
|
|
630
|
+
description: x("healthybowl.network.experts.emptyState.noMatch.description", "No experts match your current filters. Try broadening your search."),
|
|
631
|
+
action: /* @__PURE__ */ d(p, {
|
|
632
632
|
onClick: () => {
|
|
633
|
-
|
|
633
|
+
D(""), k("All"), j("All");
|
|
634
634
|
},
|
|
635
|
-
children:
|
|
635
|
+
children: x("healthybowl.network.experts.actions.clearFilters", "Clear Filters")
|
|
636
636
|
})
|
|
637
637
|
}),
|
|
638
|
-
|
|
638
|
+
pt.length > 0 && /* @__PURE__ */ f("div", {
|
|
639
639
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
|
|
640
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
641
641
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
642
642
|
children: [
|
|
643
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ d(c, { className: "h-4 w-4" }),
|
|
644
644
|
" ",
|
|
645
|
-
|
|
645
|
+
x("healthybowl.network.experts.myConsultations.heading", "My Expert Consultations")
|
|
646
646
|
]
|
|
647
|
-
}), /* @__PURE__ */
|
|
647
|
+
}), /* @__PURE__ */ d("ul", {
|
|
648
648
|
className: "mt-3 divide-y divide-border",
|
|
649
|
-
children:
|
|
649
|
+
children: pt.map((e) => /* @__PURE__ */ f("li", {
|
|
650
650
|
className: "flex items-center justify-between gap-3 py-2.5",
|
|
651
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ f("div", {
|
|
652
652
|
className: "min-w-0",
|
|
653
653
|
children: [
|
|
654
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ d("p", {
|
|
655
655
|
className: "truncate text-sm font-medium text-text-primary",
|
|
656
656
|
children: e.topic
|
|
657
657
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ f("p", {
|
|
659
659
|
className: "text-xs text-text-secondary",
|
|
660
660
|
children: [
|
|
661
661
|
e.consultantName,
|
|
@@ -663,308 +663,308 @@ var S = () => {
|
|
|
663
663
|
n(e.requestedDate),
|
|
664
664
|
" ·",
|
|
665
665
|
" ",
|
|
666
|
-
|
|
666
|
+
Je[e.mode] ?? e.mode
|
|
667
667
|
]
|
|
668
668
|
}),
|
|
669
|
-
e.fee > 0 && e.paymentStatus === "PAID" && e.paymentReference && /* @__PURE__ */
|
|
669
|
+
e.fee > 0 && e.paymentStatus === "PAID" && e.paymentReference && /* @__PURE__ */ d("p", {
|
|
670
670
|
className: "truncate text-xs text-text-secondary",
|
|
671
|
-
children:
|
|
671
|
+
children: x("healthybowl.network.experts.payment.reference", "Payment reference: {{reference}}", { reference: e.paymentReference })
|
|
672
672
|
})
|
|
673
673
|
]
|
|
674
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ f("div", {
|
|
675
675
|
className: "flex flex-shrink-0 items-center gap-2",
|
|
676
676
|
children: [
|
|
677
|
-
e.fee > 0 && e.paymentStatus === "PENDING" && (e.status === "REQUESTED" || e.status === "CONFIRMED") && /* @__PURE__ */ p
|
|
677
|
+
e.fee > 0 && e.paymentStatus === "PENDING" && (e.status === "REQUESTED" || e.status === "CONFIRMED") && /* @__PURE__ */ f(p, {
|
|
678
678
|
size: "sm",
|
|
679
|
-
onClick: () => void
|
|
680
|
-
disabled:
|
|
679
|
+
onClick: () => void xt(e),
|
|
680
|
+
disabled: ot.has(e.id) || W === e.id,
|
|
681
681
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ d(Ce, { className: "h-3.5 w-3.5" }),
|
|
683
683
|
" ",
|
|
684
|
-
|
|
684
|
+
ot.has(e.id) ? x("healthybowl.network.experts.actions.paying", "Opening checkout…") : x("healthybowl.network.experts.actions.payNow", "Pay Now")
|
|
685
685
|
]
|
|
686
686
|
}),
|
|
687
|
-
e.status === "REQUESTED" && /* @__PURE__ */
|
|
687
|
+
e.status === "REQUESTED" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(p, {
|
|
688
688
|
size: "sm",
|
|
689
689
|
variant: "outline",
|
|
690
|
-
onClick: () =>
|
|
691
|
-
disabled:
|
|
692
|
-
children:
|
|
693
|
-
}), /* @__PURE__ */
|
|
690
|
+
onClick: () => Q(e.id, "CONFIRMED"),
|
|
691
|
+
disabled: W === e.id,
|
|
692
|
+
children: x("healthybowl.network.experts.actions.accept", "Accept")
|
|
693
|
+
}), /* @__PURE__ */ d(p, {
|
|
694
694
|
size: "sm",
|
|
695
695
|
variant: "ghost",
|
|
696
|
-
onClick: () =>
|
|
697
|
-
disabled:
|
|
698
|
-
children:
|
|
696
|
+
onClick: () => Q(e.id, "CANCELLED"),
|
|
697
|
+
disabled: W === e.id,
|
|
698
|
+
children: x("healthybowl.network.experts.actions.decline", "Decline")
|
|
699
699
|
})] }),
|
|
700
|
-
e.status === "CONFIRMED" && /* @__PURE__ */
|
|
700
|
+
e.status === "CONFIRMED" && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(p, {
|
|
701
701
|
size: "sm",
|
|
702
702
|
variant: "outline",
|
|
703
|
-
onClick: () =>
|
|
704
|
-
disabled:
|
|
705
|
-
children:
|
|
706
|
-
}), /* @__PURE__ */
|
|
703
|
+
onClick: () => Q(e.id, "COMPLETED"),
|
|
704
|
+
disabled: W === e.id,
|
|
705
|
+
children: x("healthybowl.network.experts.actions.complete", "Complete")
|
|
706
|
+
}), /* @__PURE__ */ d(p, {
|
|
707
707
|
size: "sm",
|
|
708
708
|
variant: "ghost",
|
|
709
|
-
onClick: () =>
|
|
710
|
-
disabled:
|
|
711
|
-
children:
|
|
709
|
+
onClick: () => Q(e.id, "CANCELLED"),
|
|
710
|
+
disabled: W === e.id,
|
|
711
|
+
children: x("healthybowl.network.experts.actions.cancel", "Cancel")
|
|
712
712
|
})] }),
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
label:
|
|
715
|
-
variant:
|
|
713
|
+
/* @__PURE__ */ d(o, {
|
|
714
|
+
label: T[e.status] ?? e.status,
|
|
715
|
+
variant: Te(e.status),
|
|
716
716
|
dot: !0
|
|
717
717
|
}),
|
|
718
|
-
e.fee > 0 && e.status !== "CANCELLED" && e.paymentStatus && /* @__PURE__ */
|
|
719
|
-
label:
|
|
720
|
-
variant:
|
|
718
|
+
e.fee > 0 && e.status !== "CANCELLED" && e.paymentStatus && /* @__PURE__ */ d(o, {
|
|
719
|
+
label: qe[e.paymentStatus] ?? e.paymentStatus,
|
|
720
|
+
variant: Ee(e.paymentStatus)
|
|
721
721
|
})
|
|
722
722
|
]
|
|
723
723
|
})]
|
|
724
724
|
}, e.id))
|
|
725
725
|
})]
|
|
726
726
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
open:
|
|
729
|
-
onClose:
|
|
730
|
-
title:
|
|
731
|
-
description:
|
|
732
|
-
footer: /* @__PURE__ */
|
|
733
|
-
onClick:
|
|
727
|
+
/* @__PURE__ */ d(ae, {
|
|
728
|
+
open: P !== null,
|
|
729
|
+
onClose: Y,
|
|
730
|
+
title: x("healthybowl.network.experts.bookingModal.title", "Book Consultation"),
|
|
731
|
+
description: P ? x("healthybowl.network.experts.bookingModal.description", "Request a session with {{name}}", { name: P.name }) : void 0,
|
|
732
|
+
footer: /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(p, {
|
|
733
|
+
onClick: Y,
|
|
734
734
|
variant: "outline",
|
|
735
|
-
children:
|
|
736
|
-
}), /* @__PURE__ */
|
|
737
|
-
onClick:
|
|
738
|
-
disabled:
|
|
739
|
-
children:
|
|
735
|
+
children: x("healthybowl.common.cancel", "Cancel")
|
|
736
|
+
}), /* @__PURE__ */ d(p, {
|
|
737
|
+
onClick: yt,
|
|
738
|
+
disabled: R,
|
|
739
|
+
children: R ? x("healthybowl.network.experts.bookingModal.booking", "Booking…") : x("healthybowl.network.experts.bookingModal.confirm", "Confirm Booking")
|
|
740
740
|
})] }),
|
|
741
|
-
children: /* @__PURE__ */
|
|
741
|
+
children: /* @__PURE__ */ f("div", {
|
|
742
742
|
className: "space-y-4",
|
|
743
743
|
children: [
|
|
744
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
745
745
|
htmlFor: "expert-booking-topic",
|
|
746
746
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
747
|
-
children:
|
|
748
|
-
}), /* @__PURE__ */
|
|
747
|
+
children: x("healthybowl.network.experts.bookingModal.fields.topic.label", "Topic")
|
|
748
|
+
}), /* @__PURE__ */ d("input", {
|
|
749
749
|
id: "expert-booking-topic",
|
|
750
750
|
type: "text",
|
|
751
|
-
value:
|
|
752
|
-
onChange: (e) =>
|
|
751
|
+
value: I.topic,
|
|
752
|
+
onChange: (e) => J("topic", e.target.value),
|
|
753
753
|
maxLength: 200,
|
|
754
|
-
placeholder:
|
|
754
|
+
placeholder: x("healthybowl.network.experts.bookingModal.fields.topic.placeholder", "What would you like help with?"),
|
|
755
755
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
756
756
|
})] }),
|
|
757
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ f("div", {
|
|
758
758
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
759
|
-
children: [/* @__PURE__ */
|
|
759
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
760
760
|
htmlFor: "expert-booking-date",
|
|
761
761
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
762
|
-
children:
|
|
763
|
-
}), /* @__PURE__ */
|
|
762
|
+
children: x("healthybowl.network.experts.bookingModal.fields.preferredDate.label", "Preferred date")
|
|
763
|
+
}), /* @__PURE__ */ d("input", {
|
|
764
764
|
id: "expert-booking-date",
|
|
765
765
|
type: "date",
|
|
766
|
-
value:
|
|
767
|
-
onChange: (e) =>
|
|
766
|
+
value: I.requestedDate,
|
|
767
|
+
onChange: (e) => J("requestedDate", e.target.value),
|
|
768
768
|
min: r(),
|
|
769
769
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
770
|
-
})] }), /* @__PURE__ */
|
|
770
|
+
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
771
771
|
htmlFor: "expert-booking-mode",
|
|
772
772
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
773
|
-
children:
|
|
774
|
-
}), /* @__PURE__ */
|
|
775
|
-
value:
|
|
776
|
-
onValueChange: (e) =>
|
|
777
|
-
children: [/* @__PURE__ */
|
|
773
|
+
children: x("healthybowl.network.experts.bookingModal.fields.mode.label", "Mode")
|
|
774
|
+
}), /* @__PURE__ */ f(m, {
|
|
775
|
+
value: I.mode,
|
|
776
|
+
onValueChange: (e) => J("mode", e),
|
|
777
|
+
children: [/* @__PURE__ */ d(_, {
|
|
778
778
|
id: "expert-booking-mode",
|
|
779
779
|
className: "w-full",
|
|
780
|
-
children: /* @__PURE__ */
|
|
781
|
-
}), /* @__PURE__ */
|
|
780
|
+
children: /* @__PURE__ */ d(v, {})
|
|
781
|
+
}), /* @__PURE__ */ d(h, { children: Ue.map((e) => /* @__PURE__ */ d(g, {
|
|
782
782
|
value: e.value,
|
|
783
783
|
children: e.label
|
|
784
784
|
}, e.value)) })]
|
|
785
785
|
})] })]
|
|
786
786
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
788
788
|
htmlFor: "expert-booking-notes",
|
|
789
789
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
790
|
-
children:
|
|
791
|
-
}), /* @__PURE__ */
|
|
790
|
+
children: x("healthybowl.network.experts.bookingModal.fields.notes.label", "Notes (optional)")
|
|
791
|
+
}), /* @__PURE__ */ d("textarea", {
|
|
792
792
|
id: "expert-booking-notes",
|
|
793
|
-
value:
|
|
794
|
-
onChange: (e) =>
|
|
793
|
+
value: I.notes,
|
|
794
|
+
onChange: (e) => J("notes", e.target.value),
|
|
795
795
|
rows: 3,
|
|
796
796
|
maxLength: 1e3,
|
|
797
|
-
placeholder:
|
|
797
|
+
placeholder: x("healthybowl.network.experts.bookingModal.fields.notes.placeholder", "Any additional context for the expert"),
|
|
798
798
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
799
799
|
})] }),
|
|
800
|
-
|
|
800
|
+
P && (P.hourlyRate > 0 ? /* @__PURE__ */ f("div", {
|
|
801
801
|
className: "space-y-1 text-xs text-text-secondary",
|
|
802
|
-
children: [/* @__PURE__ */
|
|
803
|
-
|
|
802
|
+
children: [/* @__PURE__ */ f("p", { children: [
|
|
803
|
+
x("healthybowl.network.experts.bookingModal.fee", "One-hour consultation fee, payable on booking:"),
|
|
804
804
|
" ",
|
|
805
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ d("span", {
|
|
806
806
|
className: "font-medium text-text-primary",
|
|
807
|
-
children: t(
|
|
807
|
+
children: t(P.hourlyRate, "INR")
|
|
808
808
|
})
|
|
809
|
-
] }), /* @__PURE__ */
|
|
810
|
-
}) : /* @__PURE__ */
|
|
809
|
+
] }), /* @__PURE__ */ d("p", { children: x("healthybowl.network.experts.bookingModal.payoutNote", "Your payment is collected by the farm. Settlement with the expert is arranged separately.") })]
|
|
810
|
+
}) : /* @__PURE__ */ d("p", {
|
|
811
811
|
className: "text-xs text-text-secondary",
|
|
812
|
-
children:
|
|
812
|
+
children: x("healthybowl.network.experts.bookingModal.noFee", "No fee for this consultation.")
|
|
813
813
|
}))
|
|
814
814
|
]
|
|
815
815
|
})
|
|
816
816
|
}),
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
open:
|
|
819
|
-
onClose:
|
|
820
|
-
title:
|
|
821
|
-
description:
|
|
817
|
+
/* @__PURE__ */ d(ae, {
|
|
818
|
+
open: et,
|
|
819
|
+
onClose: Z,
|
|
820
|
+
title: B ? x("healthybowl.network.experts.form.editTitle", "Edit Expert") : x("healthybowl.network.experts.form.addTitle", "Add Expert"),
|
|
821
|
+
description: x("healthybowl.network.experts.form.description", "Manage an expert in your network directory"),
|
|
822
822
|
size: "lg",
|
|
823
|
-
footer: /* @__PURE__ */
|
|
824
|
-
onClick:
|
|
823
|
+
footer: /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(p, {
|
|
824
|
+
onClick: Z,
|
|
825
825
|
variant: "outline",
|
|
826
|
-
children:
|
|
827
|
-
}), /* @__PURE__ */
|
|
828
|
-
onClick:
|
|
829
|
-
disabled:
|
|
830
|
-
children:
|
|
826
|
+
children: x("healthybowl.common.cancel", "Cancel")
|
|
827
|
+
}), /* @__PURE__ */ d(p, {
|
|
828
|
+
onClick: _t,
|
|
829
|
+
disabled: tt,
|
|
830
|
+
children: tt ? x("healthybowl.network.experts.form.saving", "Saving…") : x("healthybowl.network.experts.form.save", "Save Expert")
|
|
831
831
|
})] }),
|
|
832
|
-
children: /* @__PURE__ */
|
|
832
|
+
children: /* @__PURE__ */ f("div", {
|
|
833
833
|
className: "space-y-4",
|
|
834
834
|
children: [
|
|
835
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ f("div", {
|
|
836
836
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
837
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
838
838
|
htmlFor: "expert-form-name",
|
|
839
839
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
840
|
-
children:
|
|
841
|
-
}), /* @__PURE__ */
|
|
840
|
+
children: x("healthybowl.network.experts.form.fields.name.label", "Name")
|
|
841
|
+
}), /* @__PURE__ */ d("input", {
|
|
842
842
|
id: "expert-form-name",
|
|
843
843
|
type: "text",
|
|
844
|
-
value:
|
|
845
|
-
onChange: (e) =>
|
|
844
|
+
value: H.name,
|
|
845
|
+
onChange: (e) => X("name", e.target.value),
|
|
846
846
|
maxLength: 120,
|
|
847
|
-
placeholder:
|
|
847
|
+
placeholder: x("healthybowl.network.experts.form.fields.name.placeholder", "Full name"),
|
|
848
848
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
849
|
-
})] }), /* @__PURE__ */
|
|
849
|
+
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
850
850
|
htmlFor: "expert-form-specialization",
|
|
851
851
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
852
|
-
children:
|
|
853
|
-
}), /* @__PURE__ */
|
|
852
|
+
children: x("healthybowl.network.experts.form.fields.specialization.label", "Specialization")
|
|
853
|
+
}), /* @__PURE__ */ d("input", {
|
|
854
854
|
id: "expert-form-specialization",
|
|
855
855
|
type: "text",
|
|
856
|
-
value:
|
|
857
|
-
onChange: (e) =>
|
|
856
|
+
value: H.specialization,
|
|
857
|
+
onChange: (e) => X("specialization", e.target.value),
|
|
858
858
|
maxLength: 120,
|
|
859
|
-
placeholder:
|
|
859
|
+
placeholder: x("healthybowl.network.experts.form.fields.specialization.placeholder", "e.g. Soil Science & Fertility"),
|
|
860
860
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
861
861
|
})] })]
|
|
862
862
|
}),
|
|
863
|
-
/* @__PURE__ */
|
|
863
|
+
/* @__PURE__ */ f("div", {
|
|
864
864
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
865
865
|
children: [
|
|
866
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
867
867
|
htmlFor: "expert-form-experience",
|
|
868
868
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
869
|
-
children:
|
|
870
|
-
}), /* @__PURE__ */
|
|
869
|
+
children: x("healthybowl.network.experts.form.fields.experience.label", "Experience (years)")
|
|
870
|
+
}), /* @__PURE__ */ d("input", {
|
|
871
871
|
id: "expert-form-experience",
|
|
872
872
|
type: "number",
|
|
873
873
|
min: 0,
|
|
874
|
-
value:
|
|
875
|
-
onChange: (e) =>
|
|
874
|
+
value: H.experience,
|
|
875
|
+
onChange: (e) => X("experience", e.target.value),
|
|
876
876
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
877
877
|
})] }),
|
|
878
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
879
879
|
htmlFor: "expert-form-rating",
|
|
880
880
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
881
|
-
children:
|
|
882
|
-
}), /* @__PURE__ */
|
|
881
|
+
children: x("healthybowl.network.experts.form.fields.rating.label", "Rating")
|
|
882
|
+
}), /* @__PURE__ */ d("input", {
|
|
883
883
|
id: "expert-form-rating",
|
|
884
884
|
type: "number",
|
|
885
885
|
min: 0,
|
|
886
886
|
max: 5,
|
|
887
887
|
step: .1,
|
|
888
|
-
value:
|
|
889
|
-
onChange: (e) =>
|
|
888
|
+
value: H.rating,
|
|
889
|
+
onChange: (e) => X("rating", e.target.value),
|
|
890
890
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
891
891
|
})] }),
|
|
892
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
893
893
|
htmlFor: "expert-form-rate",
|
|
894
894
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
895
|
-
children:
|
|
896
|
-
}), /* @__PURE__ */
|
|
895
|
+
children: x("healthybowl.network.experts.form.fields.hourlyRate.label", "Hourly rate")
|
|
896
|
+
}), /* @__PURE__ */ d("input", {
|
|
897
897
|
id: "expert-form-rate",
|
|
898
898
|
type: "number",
|
|
899
899
|
min: 0,
|
|
900
900
|
step: .01,
|
|
901
|
-
value:
|
|
902
|
-
onChange: (e) =>
|
|
901
|
+
value: H.hourlyRate,
|
|
902
|
+
onChange: (e) => X("hourlyRate", e.target.value),
|
|
903
903
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
904
904
|
})] })
|
|
905
905
|
]
|
|
906
906
|
}),
|
|
907
|
-
/* @__PURE__ */
|
|
907
|
+
/* @__PURE__ */ f("div", {
|
|
908
908
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
909
|
-
children: [/* @__PURE__ */
|
|
909
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
910
910
|
htmlFor: "expert-form-location",
|
|
911
911
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
912
|
-
children:
|
|
913
|
-
}), /* @__PURE__ */
|
|
912
|
+
children: x("healthybowl.network.experts.form.fields.location.label", "Location")
|
|
913
|
+
}), /* @__PURE__ */ d("input", {
|
|
914
914
|
id: "expert-form-location",
|
|
915
915
|
type: "text",
|
|
916
|
-
value:
|
|
917
|
-
onChange: (e) =>
|
|
916
|
+
value: H.location,
|
|
917
|
+
onChange: (e) => X("location", e.target.value),
|
|
918
918
|
maxLength: 120,
|
|
919
|
-
placeholder:
|
|
919
|
+
placeholder: x("healthybowl.network.experts.form.fields.location.placeholder", "City, Region"),
|
|
920
920
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
921
|
-
})] }), /* @__PURE__ */
|
|
921
|
+
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
922
922
|
htmlFor: "expert-form-availability",
|
|
923
923
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
924
|
-
children:
|
|
925
|
-
}), /* @__PURE__ */
|
|
926
|
-
value:
|
|
927
|
-
onValueChange: (e) =>
|
|
928
|
-
children: [/* @__PURE__ */
|
|
924
|
+
children: x("healthybowl.network.experts.form.fields.availability.label", "Availability")
|
|
925
|
+
}), /* @__PURE__ */ f(m, {
|
|
926
|
+
value: H.availability,
|
|
927
|
+
onValueChange: (e) => X("availability", e),
|
|
928
|
+
children: [/* @__PURE__ */ d(_, {
|
|
929
929
|
id: "expert-form-availability",
|
|
930
930
|
className: "w-full",
|
|
931
|
-
children: /* @__PURE__ */
|
|
932
|
-
}), /* @__PURE__ */
|
|
931
|
+
children: /* @__PURE__ */ d(v, {})
|
|
932
|
+
}), /* @__PURE__ */ d(h, { children: ut.map((e) => /* @__PURE__ */ d(g, {
|
|
933
933
|
value: e.value,
|
|
934
934
|
children: e.label
|
|
935
935
|
}, e.value)) })]
|
|
936
936
|
})] })]
|
|
937
937
|
}),
|
|
938
|
-
/* @__PURE__ */
|
|
939
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ f("div", { children: [
|
|
939
|
+
/* @__PURE__ */ d("label", {
|
|
940
940
|
htmlFor: "expert-form-languages",
|
|
941
941
|
className: "mb-1 block text-xs font-medium text-text-primary",
|
|
942
|
-
children:
|
|
942
|
+
children: x("healthybowl.network.experts.form.fields.languages.label", "Languages")
|
|
943
943
|
}),
|
|
944
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ d("input", {
|
|
945
945
|
id: "expert-form-languages",
|
|
946
946
|
type: "text",
|
|
947
|
-
value:
|
|
948
|
-
onChange: (e) =>
|
|
949
|
-
placeholder:
|
|
947
|
+
value: H.languages,
|
|
948
|
+
onChange: (e) => X("languages", e.target.value),
|
|
949
|
+
placeholder: x("healthybowl.network.experts.form.fields.languages.placeholder", "English, Hindi, Tamil"),
|
|
950
950
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
951
951
|
}),
|
|
952
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ d("p", {
|
|
953
953
|
className: "mt-1 text-xs text-text-secondary",
|
|
954
|
-
children:
|
|
954
|
+
children: x("healthybowl.network.experts.form.fields.languages.hint", "Separate multiple languages with commas")
|
|
955
955
|
})
|
|
956
956
|
] })
|
|
957
957
|
]
|
|
958
958
|
})
|
|
959
959
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
toasts:
|
|
962
|
-
onDismiss:
|
|
960
|
+
/* @__PURE__ */ d(re, {
|
|
961
|
+
toasts: dt,
|
|
962
|
+
onDismiss: ft
|
|
963
963
|
})
|
|
964
964
|
]
|
|
965
965
|
});
|
|
966
966
|
};
|
|
967
967
|
//#endregion
|
|
968
|
-
export {
|
|
968
|
+
export { x as ExpertsPage };
|
|
969
969
|
|
|
970
970
|
//# sourceMappingURL=ExpertsPage.js.map
|