@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CropDetailsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/crops/CropDetailsPage.tsx"],"sourcesContent":["import { useState, useEffect, type FC } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport {\n ArrowLeft,\n Calendar,\n MapPin,\n Sprout,\n Edit,\n Trash2,\n Droplets,\n Sun,\n AlertTriangle,\n TrendingUp,\n Leaf,\n ScanSearch,\n} from 'lucide-react';\nimport {\n PageLayout,\n StatusBadge,\n EmptyState,\n ErrorState,\n PageLoader,\n Breadcrumbs,\n Modal,\n HBEntityTags,\n HBEntityImages,\n CreateFarmTaskButton,\n useConfirm,\n} from '../../components';\nimport {\n GlassCard,\n Button,\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@burdenoff/fe-libs/ui';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { formatDate } from '../../utils/helpers';\nimport { useToast } from '../../hooks/useToast';\nimport { ToastContainer } from '../../components/Toast';\nimport type { Crop, HealthStatus } from '../../types';\nimport { isNative, nativeNotify, nativeToast } from '../../../utils/nativeBridge';\n\nconst healthVariant = (s: string) => {\n switch (s) {\n case 'excellent':\n return 'success' as const;\n case 'good':\n return 'info' as const;\n case 'fair':\n return 'warning' as const;\n default:\n return 'error' as const;\n }\n};\n\nconst statusVariant = (s: string) => {\n switch (s) {\n case 'harvest_ready':\n return 'success' as const;\n case 'growing':\n case 'fruiting':\n return 'info' as const;\n case 'planted':\n return 'muted' as const;\n default:\n return 'default' as const;\n }\n};\n\nconst stages = ['Seedling', 'Vegetative', 'Flowering', 'Fruiting', 'Mature'];\n\nexport const CropDetailsPage: FC = () => {\n const { t } = useI18n();\n const confirm = useConfirm();\n const { crops, fields, errors, loadings, updateCrop, deleteCrop, refetch } = useHealthyBowlData();\n\n const stageLabels: Record<string, string> = {\n Seedling: t('healthybowl.crops.detail.stages.seedling', 'Seedling'),\n Vegetative: t('healthybowl.crops.detail.stages.vegetative', 'Vegetative'),\n Flowering: t('healthybowl.crops.detail.stages.flowering', 'Flowering'),\n Fruiting: t('healthybowl.crops.detail.stages.fruiting', 'Fruiting'),\n Mature: t('healthybowl.crops.detail.stages.mature', 'Mature'),\n };\n\n const { cropId } = useParams<{ cropId: string }>();\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n const { toasts, toast, dismiss } = useToast();\n const [showEditModal, setShowEditModal] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n\n const [localCrop, setLocalCrop] = useState<Crop | undefined>(() => crops.find((c) => c.id === cropId));\n\n useEffect(() => {\n const found = crops.find((c) => c.id === cropId);\n if (found) setLocalCrop(found);\n }, [crops, cropId]);\n\n // Edit form controlled state\n const [editName, setEditName] = useState('');\n const [editVariety, setEditVariety] = useState('');\n const [editCategory, setEditCategory] = useState('');\n const [editYieldEstimate, setEditYieldEstimate] = useState('');\n const [editExpectedHarvestDate, setEditExpectedHarvestDate] = useState('');\n const [editHealthStatus, setEditHealthStatus] = useState<HealthStatus>('good');\n const [editImageIds, setEditImageIds] = useState<string[]>([]);\n\n const openEditModal = () => {\n if (!localCrop) return;\n setEditName(localCrop.name);\n setEditVariety(localCrop.variety);\n setEditCategory(localCrop.category);\n setEditYieldEstimate(String(localCrop.yieldEstimate));\n setEditExpectedHarvestDate(localCrop.expectedHarvestDate);\n setEditHealthStatus(localCrop.healthStatus);\n setEditImageIds(localCrop.imageIds ?? []);\n setShowEditModal(true);\n };\n\n if (!localCrop) {\n return (\n <PageLayout title={t('healthybowl.crops.detail.notFound.pageTitle', 'Crop Not Found')}>\n {loadings.crops ? (\n <PageLoader />\n ) : errors.crops ? (\n <ErrorState onRetry={refetch} />\n ) : (\n <EmptyState\n title={t('healthybowl.crops.detail.notFound.title', 'Crop not found')}\n description={t(\n 'healthybowl.crops.detail.notFound.description',\n 'The crop you are looking for does not exist.'\n )}\n action={\n <Button onClick={() => navigate(buildPath('crops'))}>\n {t('healthybowl.crops.detail.actions.backToCrops', 'Back to Crops')}\n </Button>\n }\n />\n )}\n </PageLayout>\n );\n }\n\n const field = fields.find((f) => f.id === localCrop.field || f.name === localCrop.fieldName);\n const diagnosePath = (() => {\n const params = new URLSearchParams({ cropId: localCrop.id });\n if (field?.id) params.set('fieldId', field.id);\n return `${buildPath('pest-management/ai-detection')}?${params.toString()}`;\n })();\n const stageIndex = stages.indexOf(localCrop.growthStage);\n const daysUntilHarvest = localCrop.daysToHarvest;\n const yieldPerAcre = field ? Math.round(localCrop.yieldEstimate / field.area) : localCrop.yieldEstimate;\n\n const handleDelete = async () => {\n if (!localCrop) return;\n const confirmed = await confirm({\n title: t('healthybowl.crops.detail.delete.confirmTitle', 'Delete crop?'),\n message: t('healthybowl.crops.detail.delete.confirmMessage', '{{name}} will be permanently removed.', {\n name: localCrop.name,\n }),\n okButtonTitle: t('healthybowl.common.delete', 'Delete'),\n cancelButtonTitle: t('healthybowl.common.cancel', 'Cancel'),\n });\n if (confirmed === false) return;\n setSubmitting(true);\n try {\n await deleteCrop(localCrop.id);\n toast({\n title: t('healthybowl.crops.detail.toast.deleted.title', 'Crop deleted'),\n description: t('healthybowl.crops.detail.toast.deleted.description', '{{name}} has been removed.', {\n name: localCrop.name,\n }),\n variant: 'success',\n });\n if (isNative()) {\n void nativeToast(t('healthybowl.crops.detail.toast.deleted.title', 'Crop deleted'));\n void nativeNotify('success');\n }\n navigate(buildPath('crops'));\n } catch (err) {\n toast({\n title: t('healthybowl.crops.detail.toast.deleteFailed.title', 'Delete failed'),\n description: String(err),\n variant: 'error',\n });\n setSubmitting(false);\n }\n };\n\n const handleSaveEdit = async () => {\n if (!localCrop) return;\n if (!editName.trim()) {\n toast({\n title: t('healthybowl.crops.detail.toast.missingFields.title', 'Missing required fields'),\n description: t('healthybowl.crops.detail.toast.missingFields.description', 'Crop name is required.'),\n variant: 'warning',\n });\n return;\n }\n setSubmitting(true);\n try {\n await updateCrop({\n id: localCrop.id,\n name: editName.trim(),\n variety: editVariety,\n category: editCategory,\n yieldEstimate: editYieldEstimate ? Number(editYieldEstimate) : undefined,\n expectedHarvestDate: editExpectedHarvestDate || undefined,\n healthStatus: editHealthStatus,\n imageIds: editImageIds,\n });\n toast({\n title: t('healthybowl.crops.detail.toast.updated.title', 'Crop updated'),\n description: t('healthybowl.crops.detail.toast.updated.description', '{{name}} details have been saved.', {\n name: editName.trim(),\n }),\n variant: 'success',\n });\n setShowEditModal(false);\n } catch (err) {\n toast({\n title: t('healthybowl.crops.detail.toast.updateFailed.title', 'Update failed'),\n description: String(err),\n variant: 'error',\n });\n } finally {\n setSubmitting(false);\n }\n };\n\n if (!localCrop) {\n return (\n <PageLayout\n title={t('healthybowl.crops.detail.notFound.pageTitle', 'Crop Not Found')}\n description={t('healthybowl.crops.detail.notFound.altDescription', 'The requested crop could not be found.')}\n >\n <div className=\"flex flex-col items-center justify-center py-12 text-center\">\n <p className=\"text-text-secondary\">\n {t('healthybowl.crops.detail.notFound.altHint', 'This crop may have been removed or the ID is invalid.')}\n </p>\n <Button onClick={() => navigate(buildPath('crops'))} className=\"mt-4\">\n {t('healthybowl.crops.detail.actions.backToCrops', 'Back to Crops')}\n </Button>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n title={localCrop.name}\n description={t('healthybowl.crops.detail.headerSubtitle', '{{variety}} - {{category}}', {\n variety: localCrop.variety,\n category: localCrop.category,\n })}\n actions={\n <div className=\"flex items-center gap-2\">\n <CreateFarmTaskButton entityType=\"CROP\" entityId={localCrop.id} entityLabel={localCrop.name} />\n <Button variant=\"outline\" onClick={() => navigate(diagnosePath)}>\n <ScanSearch className=\"h-4 w-4\" /> {t('healthybowl.crops.detail.actions.diagnose', 'Diagnose')}\n </Button>\n <Button variant=\"outline\" onClick={openEditModal}>\n <Edit className=\"h-4 w-4\" /> {t('healthybowl.common.edit', 'Edit')}\n </Button>\n <Button variant=\"destructive\" onClick={handleDelete} disabled={submitting}>\n <Trash2 className=\"h-4 w-4\" /> {t('healthybowl.common.delete', 'Delete')}\n </Button>\n <Button variant=\"outline\" onClick={() => navigate(buildPath('crops'))}>\n <ArrowLeft className=\"h-4 w-4\" /> {t('healthybowl.common.back', 'Back')}\n </Button>\n </div>\n }\n purpose=\"Everything about one crop in your fields — its variety, health, growth progress and the field it's planted in. Use this page to keep its details current and record what happens as it grows toward harvest.\"\n nextSteps={[\n {\n id: 'diagnose',\n label: t('healthybowl.crops.detail.nextSteps.diagnose.label', 'Diagnose this crop'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.diagnose.desc',\n 'Upload a plant photo and check for pest or disease symptoms.'\n ),\n href: diagnosePath,\n },\n {\n id: 'edit',\n label: t('healthybowl.crops.detail.nextSteps.edit.label', 'Update this crop'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.edit.desc',\n 'Keep its status, health and details accurate as it grows.'\n ),\n onClick: openEditModal,\n },\n {\n id: 'fields',\n label: t('healthybowl.crops.detail.nextSteps.fields.label', 'Check the field it grows in'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.fields.desc',\n 'Review soil, irrigation and conditions for this crop’s field.'\n ),\n href: buildPath('crops/fields'),\n },\n {\n id: 'harvest',\n label: t('healthybowl.crops.detail.nextSteps.harvest.label', 'Record a harvest'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.harvest.desc',\n 'Log yield and quality once this crop is ready to pick.'\n ),\n href: buildPath('crops/harvest'),\n },\n ]}\n nextStepsKey=\"healthybowl-crop-detail\"\n >\n <Breadcrumbs\n items={[\n { label: t('healthybowl.crops.detail.breadcrumb.crops', 'Crops'), href: buildPath('crops') },\n { label: localCrop.name },\n ]}\n />\n\n {/* Status Row */}\n <div className=\"flex flex-wrap items-center gap-3\">\n <StatusBadge\n label={(localCrop.status ?? 'unknown').replace('_', ' ')}\n variant={statusVariant(localCrop.status ?? 'unknown')}\n dot\n />\n <StatusBadge label={localCrop.healthStatus} variant={healthVariant(localCrop.healthStatus)} dot />\n {localCrop.organicCertified && (\n <StatusBadge\n label={t('healthybowl.crops.detail.badge.organicCertified', 'Organic Certified')}\n variant=\"success\"\n />\n )}\n <StatusBadge label={localCrop.season} variant=\"muted\" />\n </div>\n\n {/* Structured tags — entity-owned, persists to the crop's tagsV2 via setHealthyBowlEntityTags.\n Editable here so the crop View/Edit surfaces what the backend already stores. */}\n <HBEntityTags entityType=\"CROP\" entityId={localCrop.id} tags={localCrop.entityTags ?? []} className=\"mt-1\" />\n\n {(localCrop.imageIds ?? []).length > 0 && (\n <HBEntityImages\n entity=\"Crop\"\n imageIds={localCrop.imageIds ?? []}\n onChange={() => {}}\n readOnly\n className=\"mt-1\"\n />\n )}\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main Content */}\n <div className=\"space-y-6 lg:col-span-2\">\n {/* Overview */}\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Sun className=\"h-4 w-4 text-warning\" /> {t('healthybowl.crops.detail.overview.title', 'Crop Overview')}\n </h3>\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n {[\n {\n key: 'category',\n icon: Sprout,\n label: t('healthybowl.crops.detail.overview.category', 'Category'),\n value: localCrop.category,\n },\n {\n key: 'season',\n icon: Calendar,\n label: t('healthybowl.crops.detail.overview.season', 'Season'),\n value: localCrop.season,\n },\n {\n key: 'growthStage',\n icon: Leaf,\n label: t('healthybowl.crops.detail.overview.growthStage', 'Growth Stage'),\n value: localCrop.growthStage,\n },\n {\n key: 'field',\n icon: MapPin,\n label: t('healthybowl.crops.detail.overview.field', 'Field'),\n value: localCrop.fieldName,\n },\n ].map(({ key, icon: Icon, label, value }) => (\n <div key={key}>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <Icon className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{label}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold capitalize text-text-primary\">{value}</p>\n </div>\n ))}\n </div>\n </GlassCard>\n\n {/* Field Info */}\n {field && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <MapPin className=\"h-4 w-4 text-success\" />{' '}\n {t('healthybowl.crops.detail.fieldDetails.title', 'Field Details')}\n </h3>\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.field', 'Field')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{field.name}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.area', 'Area')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">\n {field.area} {field.unit}\n </p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.soilType', 'Soil Type')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{field.soilType}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.irrigation', 'Irrigation')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{field.irrigationType}</p>\n </div>\n </div>\n </div>\n )}\n\n {/* Timeline */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Calendar className=\"h-4 w-4 text-info\" /> {t('healthybowl.crops.detail.timeline.title', 'Timeline')}\n </h3>\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.timeline.plantedOn', 'Planted On')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localCrop.plantingDate)}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.timeline.expectedHarvest', 'Expected Harvest')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localCrop.expectedHarvestDate)}</p>\n </div>\n </div>\n <div className=\"mt-4\">\n {daysUntilHarvest > 0 ? (\n <div className=\"rounded-lg bg-info/10 p-3\">\n <p className=\"text-sm text-info\">\n <span className=\"font-bold\">\n {t('healthybowl.crops.detail.timeline.daysCount', '{{count}} days', {\n count: daysUntilHarvest,\n })}\n </span>{' '}\n {t('healthybowl.crops.detail.timeline.untilHarvest', 'until expected harvest')}\n </p>\n </div>\n ) : (\n <div className=\"rounded-lg bg-success-subtle p-3\">\n <p className=\"text-sm font-bold text-success\">\n {t('healthybowl.crops.detail.timeline.readyForHarvest', 'Ready for harvest!')}\n </p>\n </div>\n )}\n </div>\n </div>\n\n {/* Growth Progress */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.detail.growthProgress.title', 'Growth Progress')}\n </h3>\n <span className=\"text-lg font-bold text-text-primary\">{localCrop.progress}%</span>\n </div>\n <div className=\"mt-3 h-4 rounded-full bg-bg-sunken\">\n <div\n className=\"h-4 rounded-full bg-action-primary-bg transition-all\"\n style={{ width: `${localCrop.progress}%` }}\n />\n </div>\n\n {/* Growth Stage Timeline */}\n <div className=\"mt-6\">\n <h4 className=\"mb-3 text-xs font-medium text-text-secondary\">\n {t('healthybowl.crops.detail.growthProgress.stageLabel', 'Growth Stage')}\n </h4>\n <div className=\"flex items-center\">\n {stages.map((stage, i) => (\n <div key={stage} className=\"flex flex-1 flex-col items-center gap-1.5\">\n <div className=\"flex w-full items-center\">\n <div\n className={`h-0.5 flex-1 ${i === 0 ? 'bg-transparent' : i <= stageIndex ? 'bg-action-primary-bg' : 'bg-bg-sunken'}`}\n />\n <div\n className={`h-4 w-4 shrink-0 rounded-full border-2 ${i <= stageIndex ? 'border-primary bg-action-primary-bg' : 'border-muted bg-bg-surface'}`}\n >\n {i <= stageIndex && (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"h-1.5 w-1.5 rounded-full bg-primary-foreground\" />\n </div>\n )}\n </div>\n <div\n className={`h-0.5 flex-1 ${i === stages.length - 1 ? 'bg-transparent' : i < stageIndex ? 'bg-action-primary-bg' : 'bg-bg-sunken'}`}\n />\n </div>\n <span\n className={`text-center text-xs ${i <= stageIndex ? 'font-medium text-text-primary' : 'text-text-secondary'}`}\n >\n {stageLabels[stage] ?? stage}\n </span>\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Health Status Card */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.detail.currentStatus.title', 'Current Status')}\n </h3>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.health', 'Health')}\n </span>\n <StatusBadge label={localCrop.healthStatus} variant={healthVariant(localCrop.healthStatus)} />\n </div>\n {/* BOFF-6084: NDVI-derived crop health score with explicit provenance (\"NDVI · <reading date>\"); \"—\" when unscored, never 0 */}\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.healthScore', 'Health Score')}\n </span>\n {typeof localCrop.healthScore === 'number' ? (\n <span className=\"text-xs font-medium tabular-nums text-text-primary\">\n {t('healthybowl.crops.detail.currentStatus.healthScoreValue', '{{score}}/100', {\n score: localCrop.healthScore,\n })}\n <span className=\"ml-1.5 font-normal text-text-secondary\">\n {localCrop.healthScoreSource ?? 'NDVI'}\n {localCrop.healthScoreAt ? ` · ${formatDate(localCrop.healthScoreAt)}` : ''}\n </span>\n </span>\n ) : (\n <span className=\"text-xs text-text-secondary\">—</span>\n )}\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.growthStage', 'Growth Stage')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{localCrop.growthStage}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.organic', 'Organic')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">\n {localCrop.organicCertified ? t('healthybowl.common.yes', 'Yes') : t('healthybowl.common.no', 'No')}\n </span>\n </div>\n </div>\n {localCrop.healthStatus === 'fair' && (\n <div className=\"mt-3 rounded-lg bg-warning/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <AlertTriangle className=\"mt-0.5 h-3.5 w-3.5 shrink-0 text-warning\" />\n <p className=\"text-xs text-warning\">\n {t(\n 'healthybowl.crops.detail.currentStatus.attentionWarning',\n 'This crop needs attention. Check for potential issues.'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Yield Estimation */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <TrendingUp className=\"h-4 w-4 text-success\" />{' '}\n {t('healthybowl.crops.detail.yield.title', 'Yield Estimation')}\n </h3>\n <div className=\"text-center\">\n <p className=\"text-3xl font-bold text-success\">{(localCrop.yieldEstimate ?? 0).toLocaleString()}</p>\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.yield.expected', '{{unit}} expected', {\n unit: localCrop.yieldUnit ?? t('healthybowl.crops.detail.yield.unitsFallback', 'units'),\n })}\n </p>\n {/* BOFF-6084: honest provenance — NDVI-derived forecast vs farmer-entered (legacy null = farmer) */}\n <p className=\"mt-1 text-xs text-text-secondary\">\n {localCrop.yieldEstimateSource === 'NDVI_FORECAST'\n ? t('healthybowl.crops.detail.yield.sourceNdvi', 'NDVI forecast{{date}}', {\n date: localCrop.yieldEstimateAt ? ` · ${formatDate(localCrop.yieldEstimateAt)}` : '',\n })\n : t('healthybowl.crops.detail.yield.sourceFarmer', 'Farmer-entered')}\n </p>\n {field && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.yield.perUnit', '~{{amount}} {{unit}} per {{denominator}}', {\n amount: yieldPerAcre,\n unit: localCrop.yieldUnit,\n denominator: (field.unit ?? '').replace(/s$/, ''),\n })}\n </p>\n )}\n </div>\n </div>\n\n {/* Quick Actions */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.detail.quickActions.title', 'Quick Actions')}\n </h3>\n <div className=\"space-y-2\">\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath('analytics'))}\n className=\"w-full justify-start\"\n >\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.viewAnalytics', 'View Analytics')}\n </Button>\n <Button variant=\"outline\" onClick={() => navigate(buildPath('weather'))} className=\"w-full justify-start\">\n <Droplets className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.checkWeather', 'Check Weather')}\n </Button>\n {field && (\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath(`crops/fields/${field.id}`))}\n className=\"w-full justify-start\"\n >\n <MapPin className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.viewField', 'View Field')}\n </Button>\n )}\n <Button variant=\"outline\" onClick={() => navigate(buildPath('crops'))} className=\"w-full justify-start\">\n <Sprout className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.allCrops', 'All Crops')}\n </Button>\n </div>\n </div>\n </div>\n </div>\n\n {/* Edit Modal */}\n <Modal\n open={showEditModal}\n onClose={() => setShowEditModal(false)}\n title={t('healthybowl.crops.detail.editModal.title', 'Edit {{name}}', { name: localCrop.name })}\n description={t('healthybowl.crops.detail.editModal.description', 'Update crop details')}\n size=\"lg\"\n footer={\n <>\n <Button variant=\"outline\" onClick={() => setShowEditModal(false)}>\n {t('healthybowl.common.cancel', 'Cancel')}\n </Button>\n <Button onClick={handleSaveEdit} disabled={submitting}>\n {submitting\n ? t('healthybowl.crops.detail.editModal.saving', 'Saving...')\n : t('healthybowl.crops.detail.editModal.saveChanges', 'Save Changes')}\n </Button>\n </>\n }\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.cropName', 'Crop Name')}\n </label>\n <input\n value={editName}\n onChange={(e) => setEditName(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.variety', 'Variety')}\n </label>\n <input\n value={editVariety}\n onChange={(e) => setEditVariety(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.category', 'Category')}\n </label>\n <input\n value={editCategory}\n onChange={(e) => setEditCategory(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.yieldEstimate', 'Yield Estimate ({{unit}})', {\n unit: localCrop.yieldUnit,\n })}\n </label>\n <input\n type=\"number\"\n value={editYieldEstimate}\n onChange={(e) => setEditYieldEstimate(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.expectedHarvest', 'Expected Harvest')}\n </label>\n <input\n type=\"date\"\n value={editExpectedHarvestDate}\n onChange={(e) => setEditExpectedHarvestDate(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.healthStatus', 'Health Status')}\n </label>\n <Select value={editHealthStatus} onValueChange={(value) => setEditHealthStatus(value as HealthStatus)}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"excellent\">\n {t('healthybowl.crops.detail.form.healthOptions.excellent', 'Excellent')}\n </SelectItem>\n <SelectItem value=\"good\">{t('healthybowl.crops.detail.form.healthOptions.good', 'Good')}</SelectItem>\n <SelectItem value=\"fair\">{t('healthybowl.crops.detail.form.healthOptions.fair', 'Fair')}</SelectItem>\n <SelectItem value=\"poor\">{t('healthybowl.crops.detail.form.healthOptions.poor', 'Poor')}</SelectItem>\n <SelectItem value=\"critical\">\n {t('healthybowl.crops.detail.form.healthOptions.critical', 'Critical')}\n </SelectItem>\n </SelectContent>\n </Select>\n </div>\n <div className=\"sm:col-span-2\">\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.photos', 'Photos')}\n </label>\n <div className=\"mt-1\">\n <HBEntityImages entity=\"Crop\" imageIds={editImageIds} onChange={setEditImageIds} />\n </div>\n </div>\n </div>\n </Modal>\n\n <ToastContainer toasts={toasts} onDismiss={dismiss} />\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,IAAM,KAAiB,MAAc;CACnC,QAAQ,GAAR;EACE,KAAK,aACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAiB,MAAc;CACnC,QAAQ,GAAR;EACE,KAAK,iBACH,OAAO;EACT,KAAK;EACL,KAAK,YACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,IAAS;CAAC;CAAY;CAAc;CAAa;CAAY;AAAQ,GAE9D,UAA4B;CACvC,IAAM,EAAE,SAAM,GAAQ,GAChB,IAAU,GAAW,GACrB,EAAE,UAAO,WAAQ,WAAQ,aAAU,gBAAY,gBAAY,gBAAY,GAAmB,GAE1F,KAAsC;EAC1C,UAAU,EAAE,4CAA4C,UAAU;EAClE,YAAY,EAAE,8CAA8C,YAAY;EACxE,WAAW,EAAE,6CAA6C,WAAW;EACrE,UAAU,EAAE,4CAA4C,UAAU;EAClE,QAAQ,EAAE,0CAA0C,QAAQ;CAC9D,GAEM,EAAE,cAAW,GAA8B,GAC3C,IAAW,GAAY,GACvB,EAAE,iBAAc,EAAY,GAC5B,EAA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;EACxE,aAAa,EAAE,oDAAoD,wCAAwC;YAE3G,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cACV,EAAE,6CAA6C,uDAAuD;GACtG,CAAA,GACH,kBAAC,GAAD;IAAQ,eAAe,EAAS,EAAU,OAAO,CAAC;IAAG,WAAU;cAC5D,EAAE,gDAAgD,eAAe;GAC5D,CAAA,CACL;;CACK,CAAA;AA+gBlB"}
|
|
1
|
+
{"version":3,"file":"CropDetailsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/crops/CropDetailsPage.tsx"],"sourcesContent":["import { useState, type FC } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport {\n ArrowLeft,\n Calendar,\n MapPin,\n Sprout,\n Edit,\n Trash2,\n Droplets,\n Sun,\n AlertTriangle,\n TrendingUp,\n Leaf,\n ScanSearch,\n} from 'lucide-react';\nimport {\n PageLayout,\n StatusBadge,\n EmptyState,\n ErrorState,\n PageLoader,\n Breadcrumbs,\n Modal,\n HBEntityTags,\n HBEntityImages,\n CreateFarmTaskButton,\n useConfirm,\n} from '../../components';\nimport {\n GlassCard,\n Button,\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@burdenoff/fe-libs/ui';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { useCropDetail } from '../../hooks/useCropPage';\nimport { useHealthyBowl } from '../../context/HealthyBowlContext';\nimport { formatDate } from '../../utils/helpers';\nimport { useToast } from '../../hooks/useToast';\nimport { ToastContainer } from '../../components/Toast';\nimport type { HealthStatus } from '../../types';\nimport { isNative, nativeNotify, nativeToast } from '../../../utils/nativeBridge';\n\nconst healthVariant = (s: string) => {\n switch (s) {\n case 'excellent':\n return 'success' as const;\n case 'good':\n return 'info' as const;\n case 'fair':\n return 'warning' as const;\n default:\n return 'error' as const;\n }\n};\n\nconst statusVariant = (s: string) => {\n switch (s) {\n case 'harvest_ready':\n return 'success' as const;\n case 'growing':\n case 'fruiting':\n return 'info' as const;\n case 'planted':\n return 'muted' as const;\n default:\n return 'default' as const;\n }\n};\n\nconst stages = ['Seedling', 'Vegetative', 'Flowering', 'Fruiting', 'Mature'];\n\nexport const CropDetailsPage: FC = () => {\n const { workspaceId } = useHealthyBowl();\n const { cropId } = useParams<{ cropId: string }>();\n if (!workspaceId) {\n return (\n <PageLayout title=\"Crop details\">\n <p className=\"text-sm text-text-secondary\">Choose a workspace to view its crop records.</p>\n </PageLayout>\n );\n }\n return <WorkspaceCropDetailsPage key={`${workspaceId}:${cropId ?? ''}`} />;\n};\n\nconst WorkspaceCropDetailsPage: FC = () => {\n const { t } = useI18n();\n const confirm = useConfirm();\n const { fields, updateCrop, deleteCrop } = useHealthyBowlData();\n\n const stageLabels: Record<string, string> = {\n Seedling: t('healthybowl.crops.detail.stages.seedling', 'Seedling'),\n Vegetative: t('healthybowl.crops.detail.stages.vegetative', 'Vegetative'),\n Flowering: t('healthybowl.crops.detail.stages.flowering', 'Flowering'),\n Fruiting: t('healthybowl.crops.detail.stages.fruiting', 'Fruiting'),\n Mature: t('healthybowl.crops.detail.stages.mature', 'Mature'),\n };\n\n const { cropId } = useParams<{ cropId: string }>();\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n const { toasts, toast, dismiss } = useToast();\n const [showEditModal, setShowEditModal] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n\n // Cold navigation resolves the actual owned ID, never the capped aggregate's active slice.\n const { crop: localCrop, loading, error, refetch } = useCropDetail(cropId);\n\n // Edit form controlled state\n const [editName, setEditName] = useState('');\n const [editVariety, setEditVariety] = useState('');\n const [editCategory, setEditCategory] = useState('');\n const [editYieldEstimate, setEditYieldEstimate] = useState('');\n const [editExpectedHarvestDate, setEditExpectedHarvestDate] = useState('');\n const [editHealthStatus, setEditHealthStatus] = useState<HealthStatus>('good');\n const [editImageIds, setEditImageIds] = useState<string[]>([]);\n\n const openEditModal = () => {\n if (!localCrop) return;\n setEditName(localCrop.name);\n setEditVariety(localCrop.variety);\n setEditCategory(localCrop.category);\n setEditYieldEstimate(String(localCrop.yieldEstimate));\n setEditExpectedHarvestDate(localCrop.expectedHarvestDate);\n setEditHealthStatus(localCrop.healthStatus);\n setEditImageIds(localCrop.imageIds ?? []);\n setShowEditModal(true);\n };\n\n if (!localCrop) {\n return (\n <PageLayout title={t('healthybowl.crops.detail.notFound.pageTitle', 'Crop Not Found')}>\n {loading ? (\n <PageLoader />\n ) : error ? (\n <ErrorState onRetry={() => void refetch().catch(() => undefined)} />\n ) : (\n <EmptyState\n title={t('healthybowl.crops.detail.notFound.title', 'Crop not found')}\n description={t(\n 'healthybowl.crops.detail.notFound.description',\n 'The crop you are looking for does not exist.'\n )}\n action={\n <Button onClick={() => navigate(buildPath('crops'))}>\n {t('healthybowl.crops.detail.actions.backToCrops', 'Back to Crops')}\n </Button>\n }\n />\n )}\n </PageLayout>\n );\n }\n\n const field = fields.find((f) => f.id === localCrop.field || f.name === localCrop.fieldName);\n const diagnosePath = (() => {\n const params = new URLSearchParams({ cropId: localCrop.id });\n if (field?.id) params.set('fieldId', field.id);\n return `${buildPath('pest-management/ai-detection')}?${params.toString()}`;\n })();\n const stageIndex = stages.indexOf(localCrop.growthStage);\n const daysUntilHarvest = localCrop.daysToHarvest;\n const yieldPerAcre = field ? Math.round(localCrop.yieldEstimate / field.area) : localCrop.yieldEstimate;\n\n const handleDelete = async () => {\n if (!localCrop) return;\n const confirmed = await confirm({\n title: t('healthybowl.crops.detail.delete.confirmTitle', 'Delete crop?'),\n message: t('healthybowl.crops.detail.delete.confirmMessage', '{{name}} will be permanently removed.', {\n name: localCrop.name,\n }),\n okButtonTitle: t('healthybowl.common.delete', 'Delete'),\n cancelButtonTitle: t('healthybowl.common.cancel', 'Cancel'),\n });\n if (confirmed === false) return;\n setSubmitting(true);\n try {\n await deleteCrop(localCrop.id);\n toast({\n title: t('healthybowl.crops.detail.toast.deleted.title', 'Crop deleted'),\n description: t('healthybowl.crops.detail.toast.deleted.description', '{{name}} has been removed.', {\n name: localCrop.name,\n }),\n variant: 'success',\n });\n if (isNative()) {\n void nativeToast(t('healthybowl.crops.detail.toast.deleted.title', 'Crop deleted'));\n void nativeNotify('success');\n }\n navigate(buildPath('crops'));\n } catch (err) {\n toast({\n title: t('healthybowl.crops.detail.toast.deleteFailed.title', 'Delete failed'),\n description: String(err),\n variant: 'error',\n });\n setSubmitting(false);\n }\n };\n\n const handleSaveEdit = async () => {\n if (!localCrop) return;\n if (!editName.trim()) {\n toast({\n title: t('healthybowl.crops.detail.toast.missingFields.title', 'Missing required fields'),\n description: t('healthybowl.crops.detail.toast.missingFields.description', 'Crop name is required.'),\n variant: 'warning',\n });\n return;\n }\n setSubmitting(true);\n try {\n await updateCrop({\n id: localCrop.id,\n name: editName.trim(),\n variety: editVariety,\n category: editCategory,\n yieldEstimate: editYieldEstimate ? Number(editYieldEstimate) : undefined,\n expectedHarvestDate: editExpectedHarvestDate || undefined,\n healthStatus: editHealthStatus,\n imageIds: editImageIds,\n });\n await refetch();\n toast({\n title: t('healthybowl.crops.detail.toast.updated.title', 'Crop updated'),\n description: t('healthybowl.crops.detail.toast.updated.description', '{{name}} details have been saved.', {\n name: editName.trim(),\n }),\n variant: 'success',\n });\n setShowEditModal(false);\n } catch (err) {\n toast({\n title: t('healthybowl.crops.detail.toast.updateFailed.title', 'Update failed'),\n description: String(err),\n variant: 'error',\n });\n } finally {\n setSubmitting(false);\n }\n };\n\n return (\n <PageLayout\n title={localCrop.name}\n description={t('healthybowl.crops.detail.headerSubtitle', '{{variety}} - {{category}}', {\n variety: localCrop.variety,\n category: localCrop.category,\n })}\n actions={\n <div className=\"flex items-center gap-2\">\n <CreateFarmTaskButton entityType=\"CROP\" entityId={localCrop.id} entityLabel={localCrop.name} />\n <Button variant=\"outline\" onClick={() => navigate(diagnosePath)}>\n <ScanSearch className=\"h-4 w-4\" /> {t('healthybowl.crops.detail.actions.diagnose', 'Diagnose')}\n </Button>\n <Button variant=\"outline\" onClick={openEditModal}>\n <Edit className=\"h-4 w-4\" /> {t('healthybowl.common.edit', 'Edit')}\n </Button>\n <Button variant=\"destructive\" onClick={handleDelete} disabled={submitting}>\n <Trash2 className=\"h-4 w-4\" /> {t('healthybowl.common.delete', 'Delete')}\n </Button>\n <Button variant=\"outline\" onClick={() => navigate(buildPath('crops'))}>\n <ArrowLeft className=\"h-4 w-4\" /> {t('healthybowl.common.back', 'Back')}\n </Button>\n </div>\n }\n purpose=\"Everything about one crop in your fields — its variety, health, growth progress and the field it's planted in. Use this page to keep its details current and record what happens as it grows toward harvest.\"\n nextSteps={[\n {\n id: 'diagnose',\n label: t('healthybowl.crops.detail.nextSteps.diagnose.label', 'Diagnose this crop'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.diagnose.desc',\n 'Upload a plant photo and check for pest or disease symptoms.'\n ),\n href: diagnosePath,\n },\n {\n id: 'edit',\n label: t('healthybowl.crops.detail.nextSteps.edit.label', 'Update this crop'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.edit.desc',\n 'Keep its status, health and details accurate as it grows.'\n ),\n onClick: openEditModal,\n },\n {\n id: 'fields',\n label: t('healthybowl.crops.detail.nextSteps.fields.label', 'Check the field it grows in'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.fields.desc',\n 'Review soil, irrigation and conditions for this crop’s field.'\n ),\n href: buildPath('crops/fields'),\n },\n {\n id: 'harvest',\n label: t('healthybowl.crops.detail.nextSteps.harvest.label', 'Record a harvest'),\n description: t(\n 'healthybowl.crops.detail.nextSteps.harvest.desc',\n 'Log yield and quality once this crop is ready to pick.'\n ),\n href: buildPath('crops/harvest'),\n },\n ]}\n nextStepsKey=\"healthybowl-crop-detail\"\n >\n <Breadcrumbs\n items={[\n { label: t('healthybowl.crops.detail.breadcrumb.crops', 'Crops'), href: buildPath('crops') },\n { label: localCrop.name },\n ]}\n />\n\n {/* Status Row */}\n <div className=\"flex flex-wrap items-center gap-3\">\n <StatusBadge\n label={(localCrop.status ?? 'unknown').replace('_', ' ')}\n variant={statusVariant(localCrop.status ?? 'unknown')}\n dot\n />\n <StatusBadge label={localCrop.healthStatus} variant={healthVariant(localCrop.healthStatus)} dot />\n {localCrop.organicCertified && (\n <StatusBadge\n label={t('healthybowl.crops.detail.badge.organicCertified', 'Organic Certified')}\n variant=\"success\"\n />\n )}\n <StatusBadge label={localCrop.season} variant=\"muted\" />\n </div>\n\n {/* Structured tags — entity-owned, persists to the crop's tagsV2 via setHealthyBowlEntityTags.\n Editable here so the crop View/Edit surfaces what the backend already stores. */}\n <HBEntityTags entityType=\"CROP\" entityId={localCrop.id} tags={localCrop.entityTags ?? []} className=\"mt-1\" />\n\n {(localCrop.imageIds ?? []).length > 0 && (\n <HBEntityImages\n entity=\"Crop\"\n imageIds={localCrop.imageIds ?? []}\n onChange={() => {}}\n readOnly\n className=\"mt-1\"\n />\n )}\n\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Main Content */}\n <div className=\"space-y-6 lg:col-span-2\">\n {/* Overview */}\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Sun className=\"h-4 w-4 text-warning\" /> {t('healthybowl.crops.detail.overview.title', 'Crop Overview')}\n </h3>\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n {[\n {\n key: 'category',\n icon: Sprout,\n label: t('healthybowl.crops.detail.overview.category', 'Category'),\n value: localCrop.category,\n },\n {\n key: 'season',\n icon: Calendar,\n label: t('healthybowl.crops.detail.overview.season', 'Season'),\n value: localCrop.season,\n },\n {\n key: 'growthStage',\n icon: Leaf,\n label: t('healthybowl.crops.detail.overview.growthStage', 'Growth Stage'),\n value: localCrop.growthStage,\n },\n {\n key: 'field',\n icon: MapPin,\n label: t('healthybowl.crops.detail.overview.field', 'Field'),\n value: localCrop.fieldName,\n },\n ].map(({ key, icon: Icon, label, value }) => (\n <div key={key}>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <Icon className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{label}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold capitalize text-text-primary\">{value}</p>\n </div>\n ))}\n </div>\n </GlassCard>\n\n {/* Field Info */}\n {field && (\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <MapPin className=\"h-4 w-4 text-success\" />{' '}\n {t('healthybowl.crops.detail.fieldDetails.title', 'Field Details')}\n </h3>\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.field', 'Field')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{field.name}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.area', 'Area')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">\n {field.area} {field.unit}\n </p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.soilType', 'Soil Type')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{field.soilType}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.fieldDetails.irrigation', 'Irrigation')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{field.irrigationType}</p>\n </div>\n </div>\n </div>\n )}\n\n {/* Timeline */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Calendar className=\"h-4 w-4 text-info\" /> {t('healthybowl.crops.detail.timeline.title', 'Timeline')}\n </h3>\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.timeline.plantedOn', 'Planted On')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localCrop.plantingDate)}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.timeline.expectedHarvest', 'Expected Harvest')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localCrop.expectedHarvestDate)}</p>\n </div>\n </div>\n <div className=\"mt-4\">\n {daysUntilHarvest > 0 ? (\n <div className=\"rounded-lg bg-info/10 p-3\">\n <p className=\"text-sm text-info\">\n <span className=\"font-bold\">\n {t('healthybowl.crops.detail.timeline.daysCount', '{{count}} days', {\n count: daysUntilHarvest,\n })}\n </span>{' '}\n {t('healthybowl.crops.detail.timeline.untilHarvest', 'until expected harvest')}\n </p>\n </div>\n ) : (\n <div className=\"rounded-lg bg-success-subtle p-3\">\n <p className=\"text-sm font-bold text-success\">\n {t('healthybowl.crops.detail.timeline.readyForHarvest', 'Ready for harvest!')}\n </p>\n </div>\n )}\n </div>\n </div>\n\n {/* Growth Progress */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.detail.growthProgress.title', 'Growth Progress')}\n </h3>\n <span className=\"text-lg font-bold text-text-primary\">{localCrop.progress}%</span>\n </div>\n <div className=\"mt-3 h-4 rounded-full bg-bg-sunken\">\n <div\n className=\"h-4 rounded-full bg-action-primary-bg transition-all\"\n style={{ width: `${localCrop.progress}%` }}\n />\n </div>\n\n {/* Growth Stage Timeline */}\n <div className=\"mt-6\">\n <h4 className=\"mb-3 text-xs font-medium text-text-secondary\">\n {t('healthybowl.crops.detail.growthProgress.stageLabel', 'Growth Stage')}\n </h4>\n <div className=\"flex items-center\">\n {stages.map((stage, i) => (\n <div key={stage} className=\"flex flex-1 flex-col items-center gap-1.5\">\n <div className=\"flex w-full items-center\">\n <div\n className={`h-0.5 flex-1 ${i === 0 ? 'bg-transparent' : i <= stageIndex ? 'bg-action-primary-bg' : 'bg-bg-sunken'}`}\n />\n <div\n className={`h-4 w-4 shrink-0 rounded-full border-2 ${i <= stageIndex ? 'border-primary bg-action-primary-bg' : 'border-muted bg-bg-surface'}`}\n >\n {i <= stageIndex && (\n <div className=\"flex h-full items-center justify-center\">\n <div className=\"h-1.5 w-1.5 rounded-full bg-primary-foreground\" />\n </div>\n )}\n </div>\n <div\n className={`h-0.5 flex-1 ${i === stages.length - 1 ? 'bg-transparent' : i < stageIndex ? 'bg-action-primary-bg' : 'bg-bg-sunken'}`}\n />\n </div>\n <span\n className={`text-center text-xs ${i <= stageIndex ? 'font-medium text-text-primary' : 'text-text-secondary'}`}\n >\n {stageLabels[stage] ?? stage}\n </span>\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Health Status Card */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.detail.currentStatus.title', 'Current Status')}\n </h3>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.health', 'Health')}\n </span>\n <StatusBadge label={localCrop.healthStatus} variant={healthVariant(localCrop.healthStatus)} />\n </div>\n {/* BOFF-6084: NDVI-derived crop health score with explicit provenance (\"NDVI · <reading date>\"); \"—\" when unscored, never 0 */}\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.healthScore', 'Health Score')}\n </span>\n {typeof localCrop.healthScore === 'number' ? (\n <span className=\"text-xs font-medium tabular-nums text-text-primary\">\n {t('healthybowl.crops.detail.currentStatus.healthScoreValue', '{{score}}/100', {\n score: localCrop.healthScore,\n })}\n <span className=\"ml-1.5 font-normal text-text-secondary\">\n {localCrop.healthScoreSource ?? 'NDVI'}\n {localCrop.healthScoreAt ? ` · ${formatDate(localCrop.healthScoreAt)}` : ''}\n </span>\n </span>\n ) : (\n <span className=\"text-xs text-text-secondary\">—</span>\n )}\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.growthStage', 'Growth Stage')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{localCrop.growthStage}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.currentStatus.organic', 'Organic')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">\n {localCrop.organicCertified ? t('healthybowl.common.yes', 'Yes') : t('healthybowl.common.no', 'No')}\n </span>\n </div>\n </div>\n {localCrop.healthStatus === 'fair' && (\n <div className=\"mt-3 rounded-lg bg-warning/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <AlertTriangle className=\"mt-0.5 h-3.5 w-3.5 shrink-0 text-warning\" />\n <p className=\"text-xs text-warning\">\n {t(\n 'healthybowl.crops.detail.currentStatus.attentionWarning',\n 'This crop needs attention. Check for potential issues.'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Yield Estimation */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <TrendingUp className=\"h-4 w-4 text-success\" />{' '}\n {t('healthybowl.crops.detail.yield.title', 'Yield Estimation')}\n </h3>\n <div className=\"text-center\">\n <p className=\"text-3xl font-bold text-success\">{(localCrop.yieldEstimate ?? 0).toLocaleString()}</p>\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.yield.expected', '{{unit}} expected', {\n unit: localCrop.yieldUnit ?? t('healthybowl.crops.detail.yield.unitsFallback', 'units'),\n })}\n </p>\n {/* BOFF-6084: honest provenance — NDVI-derived forecast vs farmer-entered (legacy null = farmer) */}\n <p className=\"mt-1 text-xs text-text-secondary\">\n {localCrop.yieldEstimateSource === 'NDVI_FORECAST'\n ? t('healthybowl.crops.detail.yield.sourceNdvi', 'NDVI forecast{{date}}', {\n date: localCrop.yieldEstimateAt ? ` · ${formatDate(localCrop.yieldEstimateAt)}` : '',\n })\n : t('healthybowl.crops.detail.yield.sourceFarmer', 'Farmer-entered')}\n </p>\n {field && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t('healthybowl.crops.detail.yield.perUnit', '~{{amount}} {{unit}} per {{denominator}}', {\n amount: yieldPerAcre,\n unit: localCrop.yieldUnit,\n denominator: (field.unit ?? '').replace(/s$/, ''),\n })}\n </p>\n )}\n </div>\n </div>\n\n {/* Quick Actions */}\n <div className=\"rounded-lg border border-border-subtle bg-bg-surface p-6\">\n <h3 className=\"mb-4 text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.detail.quickActions.title', 'Quick Actions')}\n </h3>\n <div className=\"space-y-2\">\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath('analytics'))}\n className=\"w-full justify-start\"\n >\n <TrendingUp className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.viewAnalytics', 'View Analytics')}\n </Button>\n <Button variant=\"outline\" onClick={() => navigate(buildPath('weather'))} className=\"w-full justify-start\">\n <Droplets className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.checkWeather', 'Check Weather')}\n </Button>\n {field && (\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath(`crops/fields/${field.id}`))}\n className=\"w-full justify-start\"\n >\n <MapPin className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.viewField', 'View Field')}\n </Button>\n )}\n <Button variant=\"outline\" onClick={() => navigate(buildPath('crops'))} className=\"w-full justify-start\">\n <Sprout className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.detail.quickActions.allCrops', 'All Crops')}\n </Button>\n </div>\n </div>\n </div>\n </div>\n\n {/* Edit Modal */}\n <Modal\n open={showEditModal}\n onClose={() => setShowEditModal(false)}\n title={t('healthybowl.crops.detail.editModal.title', 'Edit {{name}}', { name: localCrop.name })}\n description={t('healthybowl.crops.detail.editModal.description', 'Update crop details')}\n size=\"lg\"\n footer={\n <>\n <Button variant=\"outline\" onClick={() => setShowEditModal(false)}>\n {t('healthybowl.common.cancel', 'Cancel')}\n </Button>\n <Button onClick={handleSaveEdit} disabled={submitting}>\n {submitting\n ? t('healthybowl.crops.detail.editModal.saving', 'Saving...')\n : t('healthybowl.crops.detail.editModal.saveChanges', 'Save Changes')}\n </Button>\n </>\n }\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.cropName', 'Crop Name')}\n </label>\n <input\n value={editName}\n onChange={(e) => setEditName(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.variety', 'Variety')}\n </label>\n <input\n value={editVariety}\n onChange={(e) => setEditVariety(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.category', 'Category')}\n </label>\n <input\n value={editCategory}\n onChange={(e) => setEditCategory(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.yieldEstimate', 'Yield Estimate ({{unit}})', {\n unit: localCrop.yieldUnit,\n })}\n </label>\n <input\n type=\"number\"\n value={editYieldEstimate}\n onChange={(e) => setEditYieldEstimate(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.expectedHarvest', 'Expected Harvest')}\n </label>\n <input\n type=\"date\"\n value={editExpectedHarvestDate}\n onChange={(e) => setEditExpectedHarvestDate(e.target.value)}\n className=\"mt-1 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)]\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.healthStatus', 'Health Status')}\n </label>\n <Select value={editHealthStatus} onValueChange={(value) => setEditHealthStatus(value as HealthStatus)}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"excellent\">\n {t('healthybowl.crops.detail.form.healthOptions.excellent', 'Excellent')}\n </SelectItem>\n <SelectItem value=\"good\">{t('healthybowl.crops.detail.form.healthOptions.good', 'Good')}</SelectItem>\n <SelectItem value=\"fair\">{t('healthybowl.crops.detail.form.healthOptions.fair', 'Fair')}</SelectItem>\n <SelectItem value=\"poor\">{t('healthybowl.crops.detail.form.healthOptions.poor', 'Poor')}</SelectItem>\n <SelectItem value=\"critical\">\n {t('healthybowl.crops.detail.form.healthOptions.critical', 'Critical')}\n </SelectItem>\n </SelectContent>\n </Select>\n </div>\n <div className=\"sm:col-span-2\">\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.detail.form.photos', 'Photos')}\n </label>\n <div className=\"mt-1\">\n <HBEntityImages entity=\"Crop\" imageIds={editImageIds} onChange={setEdit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