@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":"PlanningDetailsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/crops/PlanningDetailsPage.tsx"],"sourcesContent":["import { useState, useEffect, type FC } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport {\n ArrowLeft,\n Calendar,\n MapPin,\n Edit,\n Trash2,\n Sprout,\n Target,\n AlertTriangle,\n CloudRain,\n Beaker,\n ClipboardList,\n TrendingUp,\n Leaf,\n Clock,\n} from 'lucide-react';\nimport {\n PageLayout,\n StatusBadge,\n EmptyState,\n ErrorState,\n PageLoader,\n Breadcrumbs,\n Modal,\n useConfirm,\n} from '../../components';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { PlanExecutionPanel } from '../../components/PlanExecutionPanel';\nimport { formatDate, formatNumber } from '../../utils/helpers';\nimport { useToast } from '../../hooks/useToast';\nimport { ToastContainer } from '../../components/Toast';\nimport type { PlantingPlan, CropSeason } from '../../types';\nimport { isNative, nativeNotify, nativeToast } from '../../../utils/nativeBridge';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n GlassCard,\n Button,\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@burdenoff/fe-libs/ui';\n\nconst statusVariant = (s: string) => {\n switch (s) {\n case 'active':\n return 'success' as const;\n case 'approved':\n return 'info' as const;\n case 'draft':\n return 'muted' as const;\n case 'completed':\n return 'default' as const;\n default:\n return 'muted' as const;\n }\n};\n\nconst priorityVariant = (p: string) => {\n switch (p) {\n case 'high':\n return 'error' as const;\n case 'medium':\n return 'warning' as const;\n default:\n return 'success' as const;\n }\n};\n\nconst riskVariant = (r: string) => {\n switch (r) {\n case 'high':\n return 'error' as const;\n case 'medium':\n return 'warning' as const;\n default:\n return 'success' as const;\n }\n};\n\nconst normalizedName = (value?: string | null) => (value ?? '').trim().toLowerCase();\n\nexport const PlanningDetailsPage: FC = () => {\n const { t } = useI18n();\n const confirm = useConfirm();\n\n const seasonLabel = (s: CropSeason) => {\n switch (s) {\n case 'kharif':\n return t('healthybowl.crops.planningDetail.season.kharif', 'Kharif');\n case 'rabi':\n return t('healthybowl.crops.planningDetail.season.rabi', 'Rabi');\n case 'zaid':\n return t('healthybowl.crops.planningDetail.season.zaid', 'Zaid');\n case 'perennial':\n return t('healthybowl.crops.planningDetail.season.perennial', 'Perennial');\n default:\n return s;\n }\n };\n\n const { plantingPlans, fields, crops, errors, loadings, updatePlantingPlan, deletePlantingPlan, refetch } =\n useHealthyBowlData();\n\n const { planId } = useParams<{ planId: 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 [localPlan, setLocalPlan] = useState<PlantingPlan | undefined>(() =>\n plantingPlans.find((p) => p.id === planId)\n );\n\n useEffect(() => {\n const found = plantingPlans.find((p) => p.id === planId);\n if (found) setLocalPlan(found);\n }, [plantingPlans, planId]);\n\n // Controlled edit form state\n const [editCropId, setEditCropId] = useState('');\n const [editFieldId, setEditFieldId] = useState('');\n const [editStartDate, setEditStartDate] = useState('');\n const [editEndDate, setEditEndDate] = useState('');\n const [editExpectedYield, setEditExpectedYield] = useState('');\n const [editSeedRequired, setEditSeedRequired] = useState('');\n const [editPriority, setEditPriority] = useState<'low' | 'medium' | 'high'>('low');\n const [editStatus, setEditStatus] = useState<'draft' | 'approved' | 'active' | 'completed'>('draft');\n\n const openEditModal = () => {\n if (!localPlan) return;\n const selectedCrop =\n crops.find((crop) => crop.id === localPlan.cropId) ??\n crops.find((crop) => normalizedName(crop.name) === normalizedName(localPlan.cropName));\n const selectedField =\n fields.find((field) => field.id === localPlan.fieldId) ??\n fields.find((field) => normalizedName(field.name) === normalizedName(localPlan.fieldName));\n setEditCropId(selectedCrop?.id ?? '');\n setEditFieldId(selectedField?.id ?? '');\n setEditStartDate(localPlan.startDate);\n setEditEndDate(localPlan.endDate);\n setEditExpectedYield(String(localPlan.expectedYield));\n setEditSeedRequired(String(localPlan.seedRequired));\n setEditPriority(localPlan.priority);\n setEditStatus(localPlan.status);\n setShowEditModal(true);\n };\n\n if (!localPlan) {\n return (\n <PageLayout title={t('healthybowl.crops.planningDetail.notFound.title', 'Plan Not Found')}>\n {loadings.crops ? (\n <PageLoader />\n ) : errors.crops ? (\n <ErrorState onRetry={refetch} />\n ) : (\n <EmptyState\n title={t('healthybowl.crops.planningDetail.notFound.emptyTitle', 'Plan not found')}\n description={t(\n 'healthybowl.crops.planningDetail.notFound.description',\n 'The planting plan you are looking for does not exist.'\n )}\n action={\n <Button onClick={() => navigate(buildPath('crops/planning'))}>\n {t('healthybowl.crops.planningDetail.actions.backToPlans', 'Back to Plans')}\n </Button>\n }\n />\n )}\n </PageLayout>\n );\n }\n\n const field =\n fields.find((f) => f.id === localPlan.fieldId) ??\n fields.find((f) => normalizedName(f.name) === normalizedName(localPlan.fieldName));\n\n // Compute timeline progress\n const now = new Date();\n const start = new Date(localPlan.startDate);\n const end = new Date(localPlan.endDate);\n const totalDuration = end.getTime() - start.getTime();\n const elapsed = now.getTime() - start.getTime();\n const progress = totalDuration > 0 ? Math.max(0, Math.min(100, Math.round((elapsed / totalDuration) * 100))) : 0;\n const totalDays = Math.ceil(totalDuration / (1000 * 60 * 60 * 24));\n const elapsedDays = Math.max(0, Math.ceil(elapsed / (1000 * 60 * 60 * 24)));\n const remainingDays = Math.max(0, totalDays - elapsedDays);\n\n const handleDelete = async () => {\n if (!localPlan) return;\n const confirmed = await confirm({\n title: t('healthybowl.crops.planningDetail.deleteConfirm.title', 'Delete planting plan?'),\n message: t(\n 'healthybowl.crops.planningDetail.deleteConfirm.message',\n '{{crop}} plan for {{field}} will be permanently removed.',\n { crop: localPlan.cropName, field: localPlan.fieldName }\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 deletePlantingPlan(localPlan.id);\n toast({\n title: t('healthybowl.crops.planningDetail.toast.deleted.title', 'Plan deleted'),\n description: t(\n 'healthybowl.crops.planningDetail.toast.deleted.description',\n '{{crop}} plan has been removed.',\n {\n crop: localPlan.cropName,\n }\n ),\n variant: 'success',\n });\n if (isNative()) {\n void nativeToast(t('healthybowl.crops.planningDetail.toast.deleted.title', 'Plan deleted'));\n void nativeNotify('success');\n }\n navigate(buildPath('crops/planning'));\n } catch (err) {\n toast({\n title: t('healthybowl.crops.planningDetail.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 (!localPlan) return;\n if (!editCropId) {\n toast({\n title: t('healthybowl.crops.planningDetail.toast.missingFields.title', 'Missing required fields'),\n description: t('healthybowl.crops.planningDetail.toast.missingFields.description', 'Crop is required.'),\n variant: 'warning',\n });\n return;\n }\n const selectedCrop = crops.find((crop) => crop.id === editCropId);\n setSubmitting(true);\n try {\n await updatePlantingPlan({\n id: localPlan.id,\n cropId: editCropId,\n fieldId: editFieldId || undefined,\n startDate: editStartDate || undefined,\n endDate: editEndDate || undefined,\n expectedYield: editExpectedYield ? Number(editExpectedYield) : undefined,\n seedRequired: editSeedRequired ? Number(editSeedRequired) : undefined,\n priority: editPriority,\n status: editStatus,\n });\n toast({\n title: t('healthybowl.crops.planningDetail.toast.updated.title', 'Plan updated'),\n description: t('healthybowl.crops.planningDetail.toast.updated.description', '{{crop}} plan has been saved.', {\n crop: selectedCrop?.name ?? localPlan.cropName,\n }),\n variant: 'success',\n });\n setShowEditModal(false);\n } catch (err) {\n toast({\n title: t('healthybowl.crops.planningDetail.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={`${localPlan.cropName} - ${localPlan.fieldName}`}\n description={t('healthybowl.crops.planningDetail.subtitle', 'Planting plan for {{season}} season', {\n season: seasonLabel(localPlan.season),\n })}\n actions={\n <div className=\"flex items-center gap-2\">\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\" size=\"sm\" onClick={() => navigate(buildPath('crops/planning'))}>\n <ArrowLeft className=\"h-4 w-4\" /> {t('healthybowl.common.back', 'Back')}\n </Button>\n </div>\n }\n purpose=\"One planting plan in detail — what crop goes in which field, for which season, and the timeline and risks around it. Use this to refine the plan before planting and turn it into a real crop when you sow.\"\n nextSteps={[\n {\n id: 'edit',\n label: t('healthybowl.crops.planningDetail.nextSteps.edit.label', 'Refine this plan'),\n description: t(\n 'healthybowl.crops.planningDetail.nextSteps.edit.desc',\n 'Adjust timing, field or priority before you commit to it.'\n ),\n onClick: openEditModal,\n },\n {\n id: 'weather',\n label: t('healthybowl.crops.planningDetail.nextSteps.weather.label', 'Check the weather outlook'),\n description: t(\n 'healthybowl.crops.planningDetail.nextSteps.weather.desc',\n 'Make sure conditions suit your planned planting window.'\n ),\n href: buildPath('weather'),\n },\n {\n id: 'crops',\n label: t('healthybowl.crops.planningDetail.nextSteps.crops.label', 'See your active crops'),\n description: t(\n 'healthybowl.crops.planningDetail.nextSteps.crops.desc',\n 'Once planted, track this plan as a living crop.'\n ),\n href: buildPath('crops'),\n },\n ]}\n nextStepsKey=\"healthybowl-plan-detail\"\n >\n <Breadcrumbs\n items={[\n { label: t('healthybowl.crops.planningDetail.breadcrumbs.crops', 'Crops'), href: buildPath('crops') },\n {\n label: t('healthybowl.crops.planningDetail.breadcrumbs.planning', 'Planning'),\n href: buildPath('crops/planning'),\n },\n { label: localPlan.cropName },\n ]}\n />\n\n {/* Status Badges */}\n <div className=\"flex flex-wrap items-center gap-3\">\n <StatusBadge label={localPlan.status} variant={statusVariant(localPlan.status ?? 'unknown')} dot />\n <StatusBadge\n label={t('healthybowl.crops.planningDetail.badges.priority', 'Priority: {{priority}}', {\n priority: localPlan.priority,\n })}\n variant={priorityVariant(localPlan.priority)}\n />\n <StatusBadge\n label={t('healthybowl.crops.planningDetail.badges.weatherRisk', 'Weather Risk: {{risk}}', {\n risk: localPlan.weatherRisk,\n })}\n variant={riskVariant(localPlan.weatherRisk)}\n />\n <StatusBadge label={seasonLabel(localPlan.season)} variant=\"muted\" />\n </div>\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 {/* Plan 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 <ClipboardList className=\"h-4 w-4 text-info\" />{' '}\n {t('healthybowl.crops.planningDetail.overview.title', 'Plan Overview')}\n </h3>\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <Sprout className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{t('healthybowl.crops.planningDetail.overview.crop', 'Crop')}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">{localPlan.cropName}</p>\n </div>\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{t('healthybowl.crops.planningDetail.overview.field', 'Field')}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">{localPlan.fieldName}</p>\n </div>\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <Leaf className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{t('healthybowl.crops.planningDetail.overview.season', 'Season')}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold capitalize text-text-primary\">\n {seasonLabel(localPlan.season)}\n </p>\n </div>\n {field && (\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">\n {t('healthybowl.crops.planningDetail.overview.fieldArea', 'Field Area')}\n </span>\n </div>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">\n {field.area} {field.unit}\n </p>\n </div>\n )}\n </div>\n </GlassCard>\n\n {/* Timeline & Progress */}\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\" />{' '}\n {t('healthybowl.crops.planningDetail.timeline.title', 'Timeline')}\n </h3>\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.timeline.startDate', 'Start Date')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localPlan.startDate)}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.timeline.endDate', 'End Date')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localPlan.endDate)}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.timeline.duration', 'Duration')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.planningDetail.timeline.days', '{{count}} days', { count: totalDays })}\n </p>\n </div>\n </div>\n\n {/* Progress Bar */}\n <div className=\"mt-5\">\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span>{t('healthybowl.crops.planningDetail.timeline.progress', 'Timeline Progress')}</span>\n <span>{progress}%</span>\n </div>\n <div className=\"mt-2 h-3 rounded-full bg-bg-sunken\">\n <div\n className=\"h-3 rounded-full bg-action-primary-bg transition-all\"\n style={{ width: `${progress}%` }}\n />\n </div>\n <div className=\"mt-2 flex items-center justify-between text-xs text-text-secondary\">\n <span>{formatDate(localPlan.startDate)}</span>\n <span>{formatDate(localPlan.endDate)}</span>\n </div>\n </div>\n\n {/* Days info */}\n <div className=\"mt-4 grid grid-cols-2 gap-4\">\n <div className=\"rounded-lg bg-info/10 p-3\">\n <div className=\"flex items-center gap-1.5\">\n <Clock className=\"h-3.5 w-3.5 text-info\" />\n <span className=\"text-xs font-medium text-info\">\n {t('healthybowl.crops.planningDetail.timeline.elapsed', 'Elapsed')}\n </span>\n </div>\n <p className=\"mt-1 text-lg font-bold text-info\">\n {t('healthybowl.crops.planningDetail.timeline.days', '{{count}} days', { count: elapsedDays })}\n </p>\n </div>\n <div className=\"rounded-lg bg-warning/10 p-3\">\n <div className=\"flex items-center gap-1.5\">\n <Clock className=\"h-3.5 w-3.5 text-warning\" />\n <span className=\"text-xs font-medium text-warning\">\n {t('healthybowl.crops.planningDetail.timeline.remaining', 'Remaining')}\n </span>\n </div>\n <p className=\"mt-1 text-lg font-bold text-warning\">\n {t('healthybowl.crops.planningDetail.timeline.days', '{{count}} days', { count: remainingDays })}\n </p>\n </div>\n </div>\n </div>\n\n {/* Yield & Seeds */}\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 <Target className=\"h-4 w-4 text-success\" />{' '}\n {t('healthybowl.crops.planningDetail.production.title', 'Production Details')}\n </h3>\n <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2\">\n <div className=\"rounded-lg border border-border-subtle p-4\">\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-lg bg-success-subtle\">\n <TrendingUp className=\"h-5 w-5 text-success\" />\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.expectedYield', 'Expected Yield')}\n </span>\n <p className=\"text-xl font-bold text-text-primary\">{formatNumber(localPlan.expectedYield)} kg</p>\n </div>\n </div>\n {field && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.yieldPerUnit', '~{{amount}} kg per {{unit}}', {\n amount: Math.round(localPlan.expectedYield / field.area),\n unit: (field.unit ?? '').replace(/s$/, ''),\n })}\n </p>\n )}\n </div>\n <div className=\"rounded-lg border border-border-subtle p-4\">\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-lg bg-info/10\">\n <Sprout className=\"h-5 w-5 text-info\" />\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedRequired', 'Seed Required')}\n </span>\n <p className=\"text-xl font-bold text-text-primary\">{formatNumber(localPlan.seedRequired)} kg</p>\n </div>\n </div>\n {field && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedPerUnit', '~{{amount}} kg per {{unit}}', {\n amount: (localPlan.seedRequired / field.area).toFixed(1),\n unit: (field.unit ?? '').replace(/s$/, ''),\n })}\n </p>\n )}\n </div>\n\n {/* BOFF-6098 — the figures computed when the plan was created, read back from the\n server. Rendered only when at least one is present: a plan created before this\n shipped, or on a field no estimator describes, has none, and three \"—\" tiles\n would imply a calculation was attempted and failed. */}\n {(localPlan.plantsNeeded != null ||\n localPlan.seedGrams != null ||\n localPlan.seedlingsToRaise != null) && (\n <div\n className=\"rounded-lg border border-border-subtle p-4 sm:col-span-2\"\n data-testid=\"planning-detail-seed-rate\"\n >\n <p className=\"text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.computedHeading', 'Computed at planning')}\n </p>\n <div className=\"mt-3 grid grid-cols-3 gap-3\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.plantsNeeded', 'Plants needed')}\n </span>\n <p className=\"text-lg font-bold text-text-primary\">\n {localPlan.plantsNeeded != null ? formatNumber(localPlan.plantsNeeded) : '—'}\n </p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedGrams', 'Seed (g)')}\n </span>\n <p className=\"text-lg font-bold text-text-primary\">\n {localPlan.seedGrams != null ? localPlan.seedGrams.toFixed(2) : '—'}\n </p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedlingsToRaise', 'Seedlings to raise')}\n </span>\n <p className=\"text-lg font-bold text-text-primary\">\n {localPlan.seedlingsToRaise != null ? formatNumber(localPlan.seedlingsToRaise) : '—'}\n </p>\n </div>\n </div>\n <p className=\"mt-3 text-xs text-text-secondary\">\n {t(\n 'healthybowl.crops.planningDetail.production.computedNote',\n 'Recorded when the plan was created. Editing the plan does not recalculate these.'\n )}\n </p>\n </div>\n )}\n </div>\n </div>\n\n {/* Fertilizers */}\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 <Beaker className=\"h-4 w-4 text-primary\" />{' '}\n {t('healthybowl.crops.planningDetail.fertilizers.title', 'Fertilizers')}\n </h3>\n {localPlan.fertilizers.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {localPlan.fertilizers.map((f) => (\n <span\n key={f}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-subtle bg-bg-sunken/50 px-3 py-2 text-sm font-medium text-text-primary\"\n >\n <Beaker className=\"h-3.5 w-3.5 text-primary\" />\n {f}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fertilizers.empty', 'No fertilizers specified.')}\n </p>\n )}\n </div>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* 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.planningDetail.statusCard.title', 'Plan 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.planningDetail.statusCard.status', 'Status')}\n </span>\n <StatusBadge label={localPlan.status} variant={statusVariant(localPlan.status ?? 'unknown')} />\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.statusCard.priority', 'Priority')}\n </span>\n <StatusBadge label={localPlan.priority} variant={priorityVariant(localPlan.priority)} />\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.statusCard.weatherRisk', 'Weather Risk')}\n </span>\n <StatusBadge label={localPlan.weatherRisk} variant={riskVariant(localPlan.weatherRisk)} />\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.statusCard.season', 'Season')}\n </span>\n <span className=\"text-xs font-medium capitalize text-text-primary\">\n {seasonLabel(localPlan.season)}\n </span>\n </div>\n </div>\n\n {localPlan.priority === 'high' && (\n <div className=\"mt-4 rounded-lg bg-status-error-bg/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-status-error-text\" />\n <p className=\"text-xs text-status-error-text\">\n {t(\n 'healthybowl.crops.planningDetail.alerts.highPriority',\n 'High priority plan. Ensure resources are allocated promptly.'\n )}\n </p>\n </div>\n </div>\n )}\n\n {localPlan.weatherRisk === 'high' && (\n <div className=\"mt-3 rounded-lg bg-warning/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <CloudRain 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.planningDetail.alerts.highWeatherRisk',\n 'High weather risk. Monitor forecasts closely and prepare contingency plans.'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Field Details Card */}\n {field && (\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.planningDetail.fieldCard.title', 'Field Details')}\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.planningDetail.fieldCard.name', 'Name')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{field.name}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.area', 'Area')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">\n {field.area} {field.unit}\n </span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.soilType', 'Soil Type')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{field.soilType}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.irrigation', 'Irrigation')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{field.irrigationType}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.status', 'Status')}\n </span>\n <StatusBadge label={field.status} variant={field.status === 'active' ? 'success' : 'muted'} />\n </div>\n </div>\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath(`crops/fields/${field.id}`))}\n className=\"mt-4 w-full\"\n >\n <MapPin className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.planningDetail.fieldCard.viewField', 'View Field')}\n </Button>\n </div>\n )}\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.planningDetail.quickActions.title', 'Quick Actions')}\n </h3>\n <div className=\"space-y-2\">\n <Button variant=\"outline\" onClick={() => navigate(buildPath('weather'))} className=\"w-full justify-start\">\n <CloudRain className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.planningDetail.quickActions.checkWeather', 'Check Weather')}\n </Button>\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.planningDetail.quickActions.allCrops', 'All Crops')}\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath('crops/planning'))}\n className=\"w-full justify-start\"\n >\n <ClipboardList className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.planningDetail.quickActions.allPlans', 'All Plans')}\n </Button>\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.planningDetail.quickActions.analytics', 'Analytics')}\n </Button>\n </div>\n </div>\n </div>\n </div>\n\n {/* I-7 / I-8 — transplant, activity log, harvest → inventory, planned-vs-actual */}\n {/* onCropChanged: a TRANSPLANT advances the linked crop server-side, and the crop lives in\n this page's data rather than the panel's plan rollup (BOFF-6099). */}\n <PlanExecutionPanel plan={localPlan} crops={crops} onCropChanged={refetch} />\n\n {/* Edit Modal */}\n <Modal\n open={showEditModal}\n onClose={() => setShowEditModal(false)}\n title={t('healthybowl.crops.planningDetail.editModal.title', 'Edit Plan - {{crop}}', {\n crop: localPlan.cropName,\n })}\n description={t('healthybowl.crops.planningDetail.editModal.description', 'Update planting plan 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.planningDetail.editModal.saving', 'Saving...')\n : t('healthybowl.crops.planningDetail.editModal.save', '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.planningDetail.form.cropName', 'Crop Name')}\n </label>\n <Select value={editCropId} onValueChange={setEditCropId}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {crops.map((crop) => (\n <SelectItem key={crop.id} value={crop.id}>\n {crop.variety ? `${crop.name} - ${crop.variety}` : crop.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.field', 'Field')}\n </label>\n <Select value={editFieldId} onValueChange={setEditFieldId}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {fields.map((f) => (\n <SelectItem key={f.id} value={f.id}>\n {f.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.startDate', 'Start Date')}\n </label>\n <input\n type=\"date\"\n value={editStartDate}\n onChange={(e) => setEditStartDate(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.planningDetail.form.endDate', 'End Date')}\n </label>\n <input\n type=\"date\"\n value={editEndDate}\n onChange={(e) => setEditEndDate(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.planningDetail.form.expectedYield', 'Expected Yield (kg)')}\n </label>\n <input\n type=\"number\"\n value={editExpectedYield}\n onChange={(e) => setEditExpectedYield(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.planningDetail.form.seedRequired', 'Seed Required (kg)')}\n </label>\n <input\n type=\"number\"\n value={editSeedRequired}\n onChange={(e) => setEditSeedRequired(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.planningDetail.form.priority', 'Priority')}\n </label>\n <Select value={editPriority} onValueChange={(value) => setEditPriority(value as 'low' | 'medium' | 'high')}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"low\">{t('healthybowl.crops.planningDetail.priorityOptions.low', 'Low')}</SelectItem>\n <SelectItem value=\"medium\">\n {t('healthybowl.crops.planningDetail.priorityOptions.medium', 'Medium')}\n </SelectItem>\n <SelectItem value=\"high\">\n {t('healthybowl.crops.planningDetail.priorityOptions.high', 'High')}\n </SelectItem>\n </SelectContent>\n </Select>\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.status', 'Status')}\n </label>\n <Select\n value={editStatus}\n onValueChange={(value) => setEditStatus(value as 'draft' | 'approved' | 'active' | 'completed')}\n >\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"draft\">\n {t('healthybowl.crops.planningDetail.statusOptions.draft', 'Draft')}\n </SelectItem>\n <SelectItem value=\"approved\">\n {t('healthybowl.crops.planningDetail.statusOptions.approved', 'Approved')}\n </SelectItem>\n <SelectItem value=\"active\">\n {t('healthybowl.crops.planningDetail.statusOptions.active', 'Active')}\n </SelectItem>\n <SelectItem value=\"completed\">\n {t('healthybowl.crops.planningDetail.statusOptions.completed', 'Completed')}\n </SelectItem>\n </SelectContent>\n </Select>\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,UACH,OAAO;EACT,KAAK,YACH,OAAO;EACT,KAAK,SACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAmB,MAAc;CACrC,QAAQ,GAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAe,MAAc;CACjC,QAAQ,GAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAkB,OAA2B,KAAS,IAAI,KAAK,EAAE,YAA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AAY,OAAM;mBACf,EAAE,wDAAwD,OAAO;QACxD,CAAA;QACZ,kBAAC,GAAD;SAAY,OAAM;mBACf,EAAE,2DAA2D,UAAU;QAC9D,CAAA;QACZ,kBAAC,GAAD;SAAY,OAAM;mBACf,EAAE,yDAAyD,QAAQ;QAC1D,CAAA;QACZ,kBAAC,GAAD;SAAY,OAAM;mBACf,EAAE,4DAA4D,WAAW;QAChE,CAAA;OACC,EAAA,CAAA,CACT;QACL,EAAA,CAAA;KACF;;GACA,CAAA;GAEP,kBAAC,IAAD;IAAwB;IAAQ,WAAW;GAAU,CAAA;EAC3C;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"PlanningDetailsPage.js","names":[],"sources":["../../../../src/healthybowl/pages/crops/PlanningDetailsPage.tsx"],"sourcesContent":["import { useState, type FC } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport {\n ArrowLeft,\n Calendar,\n MapPin,\n Edit,\n Trash2,\n Sprout,\n Target,\n AlertTriangle,\n CloudRain,\n Beaker,\n ClipboardList,\n TrendingUp,\n Leaf,\n Clock,\n} from 'lucide-react';\nimport {\n PageLayout,\n StatusBadge,\n EmptyState,\n ErrorState,\n PageLoader,\n Breadcrumbs,\n Modal,\n useConfirm,\n} from '../../components';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { useCropDetail } from '../../hooks/useCropPage';\nimport { useHealthyBowl } from '../../context/HealthyBowlContext';\nimport { CropPicker } from '../../components/CropPicker';\nimport { initialPlanAssociations, buildPlanningEditInput, type PlanAssociations } from './planningEdit';\nimport { PlanExecutionPanel } from '../../components/PlanExecutionPanel';\nimport { formatDate, formatNumber } from '../../utils/helpers';\nimport { useToast } from '../../hooks/useToast';\nimport { ToastContainer } from '../../components/Toast';\nimport type { CropSeason } from '../../types';\nimport { isNative, nativeNotify, nativeToast } from '../../../utils/nativeBridge';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n GlassCard,\n Button,\n Select,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectItem,\n} from '@burdenoff/fe-libs/ui';\n\nconst statusVariant = (s: string) => {\n switch (s) {\n case 'active':\n return 'success' as const;\n case 'approved':\n return 'info' as const;\n case 'draft':\n return 'muted' as const;\n case 'completed':\n return 'default' as const;\n default:\n return 'muted' as const;\n }\n};\n\nconst priorityVariant = (p: string) => {\n switch (p) {\n case 'high':\n return 'error' as const;\n case 'medium':\n return 'warning' as const;\n default:\n return 'success' as const;\n }\n};\n\nconst riskVariant = (r: string) => {\n switch (r) {\n case 'high':\n return 'error' as const;\n case 'medium':\n return 'warning' as const;\n default:\n return 'success' as const;\n }\n};\n\nconst normalizedName = (value?: string | null) => (value ?? '').trim().toLowerCase();\n\nexport const PlanningDetailsPage: FC = () => {\n const { workspaceId } = useHealthyBowl();\n const { planId } = useParams<{ planId: string }>();\n if (!workspaceId) {\n return (\n <PageLayout title=\"Planting plan details\">\n <p className=\"text-sm text-text-secondary\">Choose a workspace to view its planting plans.</p>\n </PageLayout>\n );\n }\n return <WorkspacePlanningDetailsPage key={`${workspaceId}:${planId ?? ''}`} />;\n};\n\nconst WorkspacePlanningDetailsPage: FC = () => {\n const { t } = useI18n();\n const confirm = useConfirm();\n\n const seasonLabel = (s: CropSeason) => {\n switch (s) {\n case 'kharif':\n return t('healthybowl.crops.planningDetail.season.kharif', 'Kharif');\n case 'rabi':\n return t('healthybowl.crops.planningDetail.season.rabi', 'Rabi');\n case 'zaid':\n return t('healthybowl.crops.planningDetail.season.zaid', 'Zaid');\n case 'perennial':\n return t('healthybowl.crops.planningDetail.season.perennial', 'Perennial');\n default:\n return s;\n }\n };\n\n const { plantingPlans, fields, crops, errors, loadings, updatePlantingPlan, deletePlantingPlan, refetch } =\n useHealthyBowlData();\n\n const { planId } = useParams<{ planId: 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 localPlan = plantingPlans.find((plan) => plan.id === planId);\n\n // Controlled edit form state\n const [editCropId, setEditCropId] = useState('');\n const [editFieldId, setEditFieldId] = useState('');\n const [openedWith, setOpenedWith] = useState<PlanAssociations>({ cropId: '', fieldId: '' });\n const { crop: selectedEditCrop } = useCropDetail(editCropId, { skip: !showEditModal });\n const [editStartDate, setEditStartDate] = useState('');\n const [editEndDate, setEditEndDate] = useState('');\n const [editExpectedYield, setEditExpectedYield] = useState('');\n const [editSeedRequired, setEditSeedRequired] = useState('');\n const [editPriority, setEditPriority] = useState<'low' | 'medium' | 'high'>('low');\n const [editStatus, setEditStatus] = useState<'draft' | 'approved' | 'active' | 'completed'>('draft');\n\n const openEditModal = () => {\n if (!localPlan) return;\n const associations = initialPlanAssociations(localPlan, crops, fields);\n setOpenedWith(associations);\n setEditCropId(associations.cropId);\n setEditFieldId(associations.fieldId);\n setEditStartDate(localPlan.startDate);\n setEditEndDate(localPlan.endDate);\n setEditExpectedYield(String(localPlan.expectedYield));\n setEditSeedRequired(String(localPlan.seedRequired));\n setEditPriority(localPlan.priority);\n setEditStatus(localPlan.status);\n setShowEditModal(true);\n };\n\n if (!localPlan) {\n return (\n <PageLayout title={t('healthybowl.crops.planningDetail.notFound.title', 'Plan Not Found')}>\n {loadings.crops ? (\n <PageLoader />\n ) : errors.crops ? (\n <ErrorState onRetry={refetch} />\n ) : (\n <EmptyState\n title={t('healthybowl.crops.planningDetail.notFound.emptyTitle', 'Plan not found')}\n description={t(\n 'healthybowl.crops.planningDetail.notFound.description',\n 'The planting plan you are looking for does not exist.'\n )}\n action={\n <Button onClick={() => navigate(buildPath('crops/planning'))}>\n {t('healthybowl.crops.planningDetail.actions.backToPlans', 'Back to Plans')}\n </Button>\n }\n />\n )}\n </PageLayout>\n );\n }\n\n const field = fields.find((candidate) =>\n localPlan.fieldId\n ? candidate.id === localPlan.fieldId\n : normalizedName(candidate.name) === normalizedName(localPlan.fieldName)\n );\n\n // Compute timeline progress\n const now = new Date();\n const start = new Date(localPlan.startDate);\n const end = new Date(localPlan.endDate);\n const totalDuration = end.getTime() - start.getTime();\n const elapsed = now.getTime() - start.getTime();\n const progress = totalDuration > 0 ? Math.max(0, Math.min(100, Math.round((elapsed / totalDuration) * 100))) : 0;\n const totalDays = Math.ceil(totalDuration / (1000 * 60 * 60 * 24));\n const elapsedDays = Math.max(0, Math.ceil(elapsed / (1000 * 60 * 60 * 24)));\n const remainingDays = Math.max(0, totalDays - elapsedDays);\n\n const handleDelete = async () => {\n if (!localPlan) return;\n const confirmed = await confirm({\n title: t('healthybowl.crops.planningDetail.deleteConfirm.title', 'Delete planting plan?'),\n message: t(\n 'healthybowl.crops.planningDetail.deleteConfirm.message',\n '{{crop}} plan for {{field}} will be permanently removed.',\n { crop: localPlan.cropName, field: localPlan.fieldName }\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 deletePlantingPlan(localPlan.id);\n toast({\n title: t('healthybowl.crops.planningDetail.toast.deleted.title', 'Plan deleted'),\n description: t(\n 'healthybowl.crops.planningDetail.toast.deleted.description',\n '{{crop}} plan has been removed.',\n {\n crop: localPlan.cropName,\n }\n ),\n variant: 'success',\n });\n if (isNative()) {\n void nativeToast(t('healthybowl.crops.planningDetail.toast.deleted.title', 'Plan deleted'));\n void nativeNotify('success');\n }\n navigate(buildPath('crops/planning'));\n } catch (err) {\n toast({\n title: t('healthybowl.crops.planningDetail.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 (!localPlan) return;\n setSubmitting(true);\n try {\n await updatePlantingPlan(\n buildPlanningEditInput(localPlan, openedWith, {\n cropId: editCropId,\n fieldId: editFieldId,\n startDate: editStartDate,\n endDate: editEndDate,\n expectedYield: editExpectedYield,\n seedRequired: editSeedRequired,\n priority: editPriority,\n status: editStatus,\n })\n );\n toast({\n title: t('healthybowl.crops.planningDetail.toast.updated.title', 'Plan updated'),\n description: t('healthybowl.crops.planningDetail.toast.updated.description', '{{crop}} plan has been saved.', {\n crop: selectedEditCrop?.name ?? localPlan.cropName,\n }),\n variant: 'success',\n });\n setShowEditModal(false);\n } catch (err) {\n toast({\n title: t('healthybowl.crops.planningDetail.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={`${localPlan.cropName} - ${localPlan.fieldName}`}\n description={t('healthybowl.crops.planningDetail.subtitle', 'Planting plan for {{season}} season', {\n season: seasonLabel(localPlan.season),\n })}\n actions={\n <div className=\"flex items-center gap-2\">\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\" size=\"sm\" onClick={() => navigate(buildPath('crops/planning'))}>\n <ArrowLeft className=\"h-4 w-4\" /> {t('healthybowl.common.back', 'Back')}\n </Button>\n </div>\n }\n purpose=\"One planting plan in detail — what crop goes in which field, for which season, and the timeline and risks around it. Use this to refine the plan before planting and turn it into a real crop when you sow.\"\n nextSteps={[\n {\n id: 'edit',\n label: t('healthybowl.crops.planningDetail.nextSteps.edit.label', 'Refine this plan'),\n description: t(\n 'healthybowl.crops.planningDetail.nextSteps.edit.desc',\n 'Adjust timing, field or priority before you commit to it.'\n ),\n onClick: openEditModal,\n },\n {\n id: 'weather',\n label: t('healthybowl.crops.planningDetail.nextSteps.weather.label', 'Check the weather outlook'),\n description: t(\n 'healthybowl.crops.planningDetail.nextSteps.weather.desc',\n 'Make sure conditions suit your planned planting window.'\n ),\n href: buildPath('weather'),\n },\n {\n id: 'crops',\n label: t('healthybowl.crops.planningDetail.nextSteps.crops.label', 'See your active crops'),\n description: t(\n 'healthybowl.crops.planningDetail.nextSteps.crops.desc',\n 'Once planted, track this plan as a living crop.'\n ),\n href: buildPath('crops'),\n },\n ]}\n nextStepsKey=\"healthybowl-plan-detail\"\n >\n <Breadcrumbs\n items={[\n { label: t('healthybowl.crops.planningDetail.breadcrumbs.crops', 'Crops'), href: buildPath('crops') },\n {\n label: t('healthybowl.crops.planningDetail.breadcrumbs.planning', 'Planning'),\n href: buildPath('crops/planning'),\n },\n { label: localPlan.cropName },\n ]}\n />\n\n {/* Status Badges */}\n <div className=\"flex flex-wrap items-center gap-3\">\n <StatusBadge label={localPlan.status} variant={statusVariant(localPlan.status ?? 'unknown')} dot />\n <StatusBadge\n label={t('healthybowl.crops.planningDetail.badges.priority', 'Priority: {{priority}}', {\n priority: localPlan.priority,\n })}\n variant={priorityVariant(localPlan.priority)}\n />\n <StatusBadge\n label={t('healthybowl.crops.planningDetail.badges.weatherRisk', 'Weather Risk: {{risk}}', {\n risk: localPlan.weatherRisk,\n })}\n variant={riskVariant(localPlan.weatherRisk)}\n />\n <StatusBadge label={seasonLabel(localPlan.season)} variant=\"muted\" />\n </div>\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 {/* Plan 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 <ClipboardList className=\"h-4 w-4 text-info\" />{' '}\n {t('healthybowl.crops.planningDetail.overview.title', 'Plan Overview')}\n </h3>\n <div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <Sprout className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{t('healthybowl.crops.planningDetail.overview.crop', 'Crop')}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">{localPlan.cropName}</p>\n </div>\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{t('healthybowl.crops.planningDetail.overview.field', 'Field')}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">{localPlan.fieldName}</p>\n </div>\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <Leaf className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">{t('healthybowl.crops.planningDetail.overview.season', 'Season')}</span>\n </div>\n <p className=\"mt-1 text-sm font-semibold capitalize text-text-primary\">\n {seasonLabel(localPlan.season)}\n </p>\n </div>\n {field && (\n <div>\n <div className=\"flex items-center gap-1 text-text-secondary\">\n <MapPin className=\"h-3.5 w-3.5\" />\n <span className=\"text-xs\">\n {t('healthybowl.crops.planningDetail.overview.fieldArea', 'Field Area')}\n </span>\n </div>\n <p className=\"mt-1 text-sm font-semibold text-text-primary\">\n {field.area} {field.unit}\n </p>\n </div>\n )}\n </div>\n </GlassCard>\n\n {/* Timeline & Progress */}\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\" />{' '}\n {t('healthybowl.crops.planningDetail.timeline.title', 'Timeline')}\n </h3>\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.timeline.startDate', 'Start Date')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localPlan.startDate)}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.timeline.endDate', 'End Date')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">{formatDate(localPlan.endDate)}</p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.timeline.duration', 'Duration')}\n </span>\n <p className=\"text-sm font-semibold text-text-primary\">\n {t('healthybowl.crops.planningDetail.timeline.days', '{{count}} days', { count: totalDays })}\n </p>\n </div>\n </div>\n\n {/* Progress Bar */}\n <div className=\"mt-5\">\n <div className=\"flex items-center justify-between text-xs text-text-secondary\">\n <span>{t('healthybowl.crops.planningDetail.timeline.progress', 'Timeline Progress')}</span>\n <span>{progress}%</span>\n </div>\n <div className=\"mt-2 h-3 rounded-full bg-bg-sunken\">\n <div\n className=\"h-3 rounded-full bg-action-primary-bg transition-all\"\n style={{ width: `${progress}%` }}\n />\n </div>\n <div className=\"mt-2 flex items-center justify-between text-xs text-text-secondary\">\n <span>{formatDate(localPlan.startDate)}</span>\n <span>{formatDate(localPlan.endDate)}</span>\n </div>\n </div>\n\n {/* Days info */}\n <div className=\"mt-4 grid grid-cols-2 gap-4\">\n <div className=\"rounded-lg bg-info/10 p-3\">\n <div className=\"flex items-center gap-1.5\">\n <Clock className=\"h-3.5 w-3.5 text-info\" />\n <span className=\"text-xs font-medium text-info\">\n {t('healthybowl.crops.planningDetail.timeline.elapsed', 'Elapsed')}\n </span>\n </div>\n <p className=\"mt-1 text-lg font-bold text-info\">\n {t('healthybowl.crops.planningDetail.timeline.days', '{{count}} days', { count: elapsedDays })}\n </p>\n </div>\n <div className=\"rounded-lg bg-warning/10 p-3\">\n <div className=\"flex items-center gap-1.5\">\n <Clock className=\"h-3.5 w-3.5 text-warning\" />\n <span className=\"text-xs font-medium text-warning\">\n {t('healthybowl.crops.planningDetail.timeline.remaining', 'Remaining')}\n </span>\n </div>\n <p className=\"mt-1 text-lg font-bold text-warning\">\n {t('healthybowl.crops.planningDetail.timeline.days', '{{count}} days', { count: remainingDays })}\n </p>\n </div>\n </div>\n </div>\n\n {/* Yield & Seeds */}\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 <Target className=\"h-4 w-4 text-success\" />{' '}\n {t('healthybowl.crops.planningDetail.production.title', 'Production Details')}\n </h3>\n <div className=\"grid grid-cols-1 gap-6 sm:grid-cols-2\">\n <div className=\"rounded-lg border border-border-subtle p-4\">\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-lg bg-success-subtle\">\n <TrendingUp className=\"h-5 w-5 text-success\" />\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.expectedYield', 'Expected Yield')}\n </span>\n <p className=\"text-xl font-bold text-text-primary\">{formatNumber(localPlan.expectedYield)} kg</p>\n </div>\n </div>\n {field && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.yieldPerUnit', '~{{amount}} kg per {{unit}}', {\n amount: Math.round(localPlan.expectedYield / field.area),\n unit: (field.unit ?? '').replace(/s$/, ''),\n })}\n </p>\n )}\n </div>\n <div className=\"rounded-lg border border-border-subtle p-4\">\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-10 w-10 items-center justify-center rounded-lg bg-info/10\">\n <Sprout className=\"h-5 w-5 text-info\" />\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedRequired', 'Seed Required')}\n </span>\n <p className=\"text-xl font-bold text-text-primary\">{formatNumber(localPlan.seedRequired)} kg</p>\n </div>\n </div>\n {field && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedPerUnit', '~{{amount}} kg per {{unit}}', {\n amount: (localPlan.seedRequired / field.area).toFixed(1),\n unit: (field.unit ?? '').replace(/s$/, ''),\n })}\n </p>\n )}\n </div>\n\n {/* BOFF-6098 — the figures computed when the plan was created, read back from the\n server. Rendered only when at least one is present: a plan created before this\n shipped, or on a field no estimator describes, has none, and three \"—\" tiles\n would imply a calculation was attempted and failed. */}\n {(localPlan.plantsNeeded != null ||\n localPlan.seedGrams != null ||\n localPlan.seedlingsToRaise != null) && (\n <div\n className=\"rounded-lg border border-border-subtle p-4 sm:col-span-2\"\n data-testid=\"planning-detail-seed-rate\"\n >\n <p className=\"text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.computedHeading', 'Computed at planning')}\n </p>\n <div className=\"mt-3 grid grid-cols-3 gap-3\">\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.plantsNeeded', 'Plants needed')}\n </span>\n <p className=\"text-lg font-bold text-text-primary\">\n {localPlan.plantsNeeded != null ? formatNumber(localPlan.plantsNeeded) : '—'}\n </p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedGrams', 'Seed (g)')}\n </span>\n <p className=\"text-lg font-bold text-text-primary\">\n {localPlan.seedGrams != null ? localPlan.seedGrams.toFixed(2) : '—'}\n </p>\n </div>\n <div>\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.production.seedlingsToRaise', 'Seedlings to raise')}\n </span>\n <p className=\"text-lg font-bold text-text-primary\">\n {localPlan.seedlingsToRaise != null ? formatNumber(localPlan.seedlingsToRaise) : '—'}\n </p>\n </div>\n </div>\n <p className=\"mt-3 text-xs text-text-secondary\">\n {t(\n 'healthybowl.crops.planningDetail.production.identitySnapshotNote',\n 'Recorded at planning. Date or priority edits retain these figures; changing the crop or field may recalculate them.'\n )}\n </p>\n </div>\n )}\n </div>\n </div>\n\n {/* Fertilizers */}\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 <Beaker className=\"h-4 w-4 text-primary\" />{' '}\n {t('healthybowl.crops.planningDetail.fertilizers.title', 'Fertilizers')}\n </h3>\n {localPlan.fertilizers.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {localPlan.fertilizers.map((f) => (\n <span\n key={f}\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-subtle bg-bg-sunken/50 px-3 py-2 text-sm font-medium text-text-primary\"\n >\n <Beaker className=\"h-3.5 w-3.5 text-primary\" />\n {f}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fertilizers.empty', 'No fertilizers specified.')}\n </p>\n )}\n </div>\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* 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.planningDetail.statusCard.title', 'Plan 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.planningDetail.statusCard.status', 'Status')}\n </span>\n <StatusBadge label={localPlan.status} variant={statusVariant(localPlan.status ?? 'unknown')} />\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.statusCard.priority', 'Priority')}\n </span>\n <StatusBadge label={localPlan.priority} variant={priorityVariant(localPlan.priority)} />\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.statusCard.weatherRisk', 'Weather Risk')}\n </span>\n <StatusBadge label={localPlan.weatherRisk} variant={riskVariant(localPlan.weatherRisk)} />\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.statusCard.season', 'Season')}\n </span>\n <span className=\"text-xs font-medium capitalize text-text-primary\">\n {seasonLabel(localPlan.season)}\n </span>\n </div>\n </div>\n\n {localPlan.priority === 'high' && (\n <div className=\"mt-4 rounded-lg bg-status-error-bg/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-status-error-text\" />\n <p className=\"text-xs text-status-error-text\">\n {t(\n 'healthybowl.crops.planningDetail.alerts.highPriority',\n 'High priority plan. Ensure resources are allocated promptly.'\n )}\n </p>\n </div>\n </div>\n )}\n\n {localPlan.weatherRisk === 'high' && (\n <div className=\"mt-3 rounded-lg bg-warning/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <CloudRain 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.planningDetail.alerts.highWeatherRisk',\n 'High weather risk. Monitor forecasts closely and prepare contingency plans.'\n )}\n </p>\n </div>\n </div>\n )}\n </div>\n\n {/* Field Details Card */}\n {field && (\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.planningDetail.fieldCard.title', 'Field Details')}\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.planningDetail.fieldCard.name', 'Name')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{field.name}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.area', 'Area')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">\n {field.area} {field.unit}\n </span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.soilType', 'Soil Type')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{field.soilType}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.irrigation', 'Irrigation')}\n </span>\n <span className=\"text-xs font-medium text-text-primary\">{field.irrigationType}</span>\n </div>\n <div className=\"flex items-center justify-between\">\n <span className=\"text-xs text-text-secondary\">\n {t('healthybowl.crops.planningDetail.fieldCard.status', 'Status')}\n </span>\n <StatusBadge label={field.status} variant={field.status === 'active' ? 'success' : 'muted'} />\n </div>\n </div>\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath(`crops/fields/${field.id}`))}\n className=\"mt-4 w-full\"\n >\n <MapPin className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.planningDetail.fieldCard.viewField', 'View Field')}\n </Button>\n </div>\n )}\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.planningDetail.quickActions.title', 'Quick Actions')}\n </h3>\n <div className=\"space-y-2\">\n <Button variant=\"outline\" onClick={() => navigate(buildPath('weather'))} className=\"w-full justify-start\">\n <CloudRain className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.planningDetail.quickActions.checkWeather', 'Check Weather')}\n </Button>\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.planningDetail.quickActions.allCrops', 'All Crops')}\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => navigate(buildPath('crops/planning'))}\n className=\"w-full justify-start\"\n >\n <ClipboardList className=\"h-4 w-4 text-text-secondary\" />{' '}\n {t('healthybowl.crops.planningDetail.quickActions.allPlans', 'All Plans')}\n </Button>\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.planningDetail.quickActions.analytics', 'Analytics')}\n </Button>\n </div>\n </div>\n </div>\n </div>\n\n {/* I-7 / I-8 — transplant, activity log, harvest → inventory, planned-vs-actual */}\n {/* onCropChanged: a TRANSPLANT advances the linked crop server-side, and the crop lives in\n this page's data rather than the panel's plan rollup (BOFF-6099). */}\n <PlanExecutionPanel plan={localPlan} crops={crops} onCropChanged={refetch} />\n\n {/* Edit Modal */}\n <Modal\n open={showEditModal}\n onClose={() => setShowEditModal(false)}\n title={t('healthybowl.crops.planningDetail.editModal.title', 'Edit Plan - {{crop}}', {\n crop: localPlan.cropName,\n })}\n description={t('healthybowl.crops.planningDetail.editModal.description', 'Update planting plan 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.planningDetail.editModal.saving', 'Saving...')\n : t('healthybowl.crops.planningDetail.editModal.save', 'Save Changes')}\n </Button>\n </>\n }\n >\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <div>\n <label htmlFor=\"plan-edit-crop\" className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.cropName', 'Crop Name')}\n </label>\n <CropPicker\n id=\"plan-edit-crop\"\n value={editCropId}\n onValueChange={setEditCropId}\n options={crops}\n recordedLabel={\n editCropId === localPlan.cropId ? `${localPlan.cropName} — recorded crop ID ${editCropId}` : undefined\n }\n skip={!showEditModal}\n disabled={submitting}\n className=\"mt-1\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.field', 'Field')}\n </label>\n <Select value={editFieldId} onValueChange={setEditFieldId}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {editFieldId && !fields.some((candidate) => candidate.id === editFieldId) && (\n <SelectItem value={editFieldId} disabled>\n {localPlan.fieldName} — recorded field ID {editFieldId} (unavailable)\n </SelectItem>\n )}\n {fields.map((f) => (\n <SelectItem key={f.id} value={f.id}>\n {f.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.startDate', 'Start Date')}\n </label>\n <input\n type=\"date\"\n value={editStartDate}\n onChange={(e) => setEditStartDate(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.planningDetail.form.endDate', 'End Date')}\n </label>\n <input\n type=\"date\"\n value={editEndDate}\n onChange={(e) => setEditEndDate(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.planningDetail.form.expectedYield', 'Expected Yield (kg)')}\n </label>\n <input\n type=\"number\"\n value={editExpectedYield}\n onChange={(e) => setEditExpectedYield(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.planningDetail.form.seedRequired', 'Seed Required (kg)')}\n </label>\n <input\n type=\"number\"\n value={editSeedRequired}\n onChange={(e) => setEditSeedRequired(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.planningDetail.form.priority', 'Priority')}\n </label>\n <Select value={editPriority} onValueChange={(value) => setEditPriority(value as 'low' | 'medium' | 'high')}>\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"low\">{t('healthybowl.crops.planningDetail.priorityOptions.low', 'Low')}</SelectItem>\n <SelectItem value=\"medium\">\n {t('healthybowl.crops.planningDetail.priorityOptions.medium', 'Medium')}\n </SelectItem>\n <SelectItem value=\"high\">\n {t('healthybowl.crops.planningDetail.priorityOptions.high', 'High')}\n </SelectItem>\n </SelectContent>\n </Select>\n </div>\n <div>\n <label className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.crops.planningDetail.form.status', 'Status')}\n </label>\n <Select\n value={editStatus}\n onValueChange={(value) => setEditStatus(value as 'draft' | 'approved' | 'active' | 'completed')}\n >\n <SelectTrigger className=\"mt-1 w-full\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"draft\">\n {t('healthybowl.crops.planningDetail.statusOptions.draft', 'Draft')}\n </SelectItem>\n <SelectItem value=\"approved\">\n {t('healthybowl.crops.planningDetail.statusOptions.approved', 'Approved')}\n </SelectItem>\n <SelectItem value=\"active\">\n {t('healthybowl.crops.planningDetail.statusOptions.active', 'Active')}\n </SelectItem>\n <SelectItem value=\"completed\">\n {t('healthybowl.crops.planningDetail.statusOptions.completed', 'Completed')}\n </SelectItem>\n </SelectContent>\n </Select>\n </div>\n </div>\n </Modal>\n\n <ToastContainer toasts={toasts} onDismiss={dismiss} />\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAM,KAAiB,MAAc;CACnC,QAAQ,GAAR;EACE,KAAK,UACH,OAAO;EACT,KAAK,YACH,OAAO;EACT,KAAK,SACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAmB,MAAc;CACrC,QAAQ,GAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAe,MAAc;CACjC,QAAQ,GAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAEM,KAAkB,OAA2B,KAAS,IAAI,KAAK,EA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QAChE,CAAA;OACC,EAAA,CAAA,CACT;QACL,EAAA,CAAA;KACF;;GACA,CAAA;GAEP,kBAAC,IAAD;IAAwB;IAAQ,WAAW;GAAU,CAAA;EAC3C;;AAEhB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useCropDetail as e } from "../../hooks/useCropPage.js";
|
|
2
|
+
import { pickerRecordLabel as t } from "../../utils/cropPicker.js";
|
|
3
|
+
import { usePlantCatalogEntry as n } from "../../hooks/usePlantCatalog.js";
|
|
4
|
+
import { useI18n as r } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
5
|
+
//#region src/healthybowl/pages/crops/SuccessionCropLabel.tsx
|
|
6
|
+
function i({ plan: i, crops: a, legacyCrop: o }) {
|
|
7
|
+
let { t: s } = r(), c = e(i.cropId), l = n(i.plantCatalogId), u = c.crop ?? a.find((e) => e.id === i.cropId);
|
|
8
|
+
if (u) return t(u);
|
|
9
|
+
if (l.entry) return t(l.entry);
|
|
10
|
+
let d = i.cropName?.trim();
|
|
11
|
+
if (d && !/^unknown(\s+crop)?$/i.test(d)) return d;
|
|
12
|
+
if (i.cropId || i.plantCatalogId) {
|
|
13
|
+
let e = i.cropId ? c : l, t = { id: i.cropId || i.plantCatalogId || "" };
|
|
14
|
+
return i.cropId ? e.loading && !e.error ? s("healthybowl.crops.fieldDetail.succession.recordedCropLoading", "Recorded crop ({{id}}) — loading…", t) : s("healthybowl.crops.fieldDetail.succession.recordedCropUnavailable", "Recorded crop ({{id}}) — unavailable", t) : e.loading && !e.error ? s("healthybowl.crops.fieldDetail.succession.recordedCatalogLoading", "Recorded catalog entry ({{id}}) — loading…", t) : s("healthybowl.crops.fieldDetail.succession.recordedCatalogUnavailable", "Recorded catalog entry ({{id}}) — unavailable", t);
|
|
15
|
+
}
|
|
16
|
+
return o ? t(o) : "—";
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { i as SuccessionCropLabel };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=SuccessionCropLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuccessionCropLabel.js","names":[],"sources":["../../../../src/healthybowl/pages/crops/SuccessionCropLabel.tsx"],"sourcesContent":["import { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useCropDetail } from '../../hooks/useCropPage';\nimport { usePlantCatalogEntry } from '../../hooks/usePlantCatalog';\nimport type { SuccessionPlan } from '../../hooks/useSuccessionPlanning';\nimport type { Crop } from '../../types';\nimport { pickerRecordLabel } from '../../utils/cropPicker';\n\ninterface SuccessionCropLabelProps {\n plan: SuccessionPlan;\n crops: readonly Crop[];\n legacyCrop?: Crop;\n}\n\n/** A saved series owns its identity reads, never the calculator's browse slice. */\nexport function SuccessionCropLabel({ plan, crops, legacyCrop }: SuccessionCropLabelProps) {\n const { t } = useI18n();\n const cropRead = useCropDetail(plan.cropId);\n const catalogRead = usePlantCatalogEntry(plan.plantCatalogId);\n const crop = cropRead.crop ?? crops.find((entry) => entry.id === plan.cropId);\n if (crop) return pickerRecordLabel(crop);\n if (catalogRead.entry) return pickerRecordLabel(catalogRead.entry);\n\n const stored = plan.cropName?.trim();\n if (stored && !/^unknown(\\s+crop)?$/i.test(stored)) return stored;\n\n if (plan.cropId || plan.plantCatalogId) {\n const read = plan.cropId ? cropRead : catalogRead;\n const values = { id: plan.cropId || plan.plantCatalogId || '' };\n if (plan.cropId) {\n return read.loading && !read.error\n ? t('healthybowl.crops.fieldDetail.succession.recordedCropLoading', 'Recorded crop ({{id}}) — loading…', values)\n : t(\n 'healthybowl.crops.fieldDetail.succession.recordedCropUnavailable',\n 'Recorded crop ({{id}}) — unavailable',\n values\n );\n }\n return read.loading && !read.error\n ? t(\n 'healthybowl.crops.fieldDetail.succession.recordedCatalogLoading',\n 'Recorded catalog entry ({{id}}) — loading…',\n values\n )\n : t(\n 'healthybowl.crops.fieldDetail.succession.recordedCatalogUnavailable',\n 'Recorded catalog entry ({{id}}) — unavailable',\n values\n );\n }\n\n // Only genuinely unassociated legacy plans retain the old field-crop fallback.\n return legacyCrop ? pickerRecordLabel(legacyCrop) : '—';\n}\n"],"mappings":";;;;;AAcA,SAAgB,EAAoB,EAAE,SAAM,UAAO,iBAAwC;CACzF,IAAM,EAAE,SAAM,EAAQ,GAChB,IAAW,EAAc,EAAK,MAAM,GACpC,IAAc,EAAqB,EAAK,cAAc,GACtD,IAAO,EAAS,QAAQ,EAAM,MAAM,MAAU,EAAM,OAAO,EAAK,MAAM;CAC5E,IAAI,GAAM,OAAO,EAAkB,CAAI;CACvC,IAAI,EAAY,OAAO,OAAO,EAAkB,EAAY,KAAK;CAEjE,IAAM,IAAS,EAAK,UAAU,KAAK;CACnC,IAAI,KAAU,CAAC,uBAAuB,KAAK,CAAM,GAAG,OAAO;CAE3D,IAAI,EAAK,UAAU,EAAK,gBAAgB;EACtC,IAAM,IAAO,EAAK,SAAS,IAAW,GAChC,IAAS,EAAE,IAAI,EAAK,UAAU,EAAK,kBAAkB,GAAG;EAU9D,OATI,EAAK,SACA,EAAK,WAAW,CAAC,EAAK,QACzB,EAAE,gEAAgE,qCAAqC,CAAM,IAC7G,EACE,oEACA,wCACA,CACF,IAEC,EAAK,WAAW,CAAC,EAAK,QACzB,EACE,mEACA,8CACA,CACF,IACA,EACE,uEACA,iDACA,CACF;CACN;CAGA,OAAO,IAAa,EAAkB,CAAU,IAAI;AACtD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/healthybowl/pages/crops/planningEdit.ts
|
|
2
|
+
var e = (e) => e.trim().toLowerCase();
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
if (t.field) return t.field === n.id;
|
|
5
|
+
let r = e(t.fieldName);
|
|
6
|
+
return !!r && r === e(n.name);
|
|
7
|
+
}
|
|
8
|
+
function n(t, n, r) {
|
|
9
|
+
return {
|
|
10
|
+
cropId: t.cropId || (t.cropName.trim() ? n.find((n) => e(n.name) === e(t.cropName))?.id ?? "" : ""),
|
|
11
|
+
fieldId: t.fieldId || (t.fieldName.trim() ? r.find((n) => e(n.name) === e(t.fieldName))?.id ?? "" : "")
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function r(e, t, n) {
|
|
15
|
+
return {
|
|
16
|
+
id: e.id,
|
|
17
|
+
...n.cropId && n.cropId !== t.cropId ? { cropId: n.cropId } : {},
|
|
18
|
+
...n.fieldId && n.fieldId !== t.fieldId ? { fieldId: n.fieldId } : {},
|
|
19
|
+
startDate: n.startDate || void 0,
|
|
20
|
+
endDate: n.endDate || void 0,
|
|
21
|
+
expectedYield: n.expectedYield ? Number(n.expectedYield) : void 0,
|
|
22
|
+
seedRequired: n.seedRequired ? Number(n.seedRequired) : void 0,
|
|
23
|
+
priority: n.priority,
|
|
24
|
+
status: n.status
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { r as buildPlanningEditInput, t as cropMatchesField, n as initialPlanAssociations };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=planningEdit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planningEdit.js","names":[],"sources":["../../../../src/healthybowl/pages/crops/planningEdit.ts"],"sourcesContent":["import type { Crop, Field, PlantingPlan } from '../../types';\nimport type { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\n\nexport interface PlanAssociations {\n cropId: string;\n fieldId: string;\n}\n\nexport interface PlanningEditForm extends PlanAssociations {\n startDate: string;\n endDate: string;\n expectedYield: string;\n seedRequired: string;\n priority: PlantingPlan['priority'];\n status: PlantingPlan['status'];\n}\n\ntype PlanEditInput = Parameters<ReturnType<typeof useHealthyBowlData>['updatePlantingPlan']>[0];\nconst normalizedName = (value: string) => value.trim().toLowerCase();\n\n/** Page defaults and labels follow recorded field identity, not a same-name replacement. */\nexport function cropMatchesField(crop: Pick<Crop, 'field' | 'fieldName'>, field: Pick<Field, 'id' | 'name'>): boolean {\n if (crop.field) return crop.field === field.id;\n const legacyName = normalizedName(crop.fieldName);\n return Boolean(legacyName) && legacyName === normalizedName(field.name);\n}\n\n/** Stored identity wins even when archived or outside a loaded page. Only legacy no-ID records use names. */\nexport function initialPlanAssociations(\n plan: PlantingPlan,\n crops: readonly Pick<Crop, 'id' | 'name'>[],\n fields: readonly Pick<Field, 'id' | 'name'>[]\n): PlanAssociations {\n return {\n cropId:\n plan.cropId ||\n (plan.cropName.trim()\n ? (crops.find((crop) => normalizedName(crop.name) === normalizedName(plan.cropName))?.id ?? '')\n : ''),\n fieldId:\n plan.fieldId ||\n (plan.fieldName.trim()\n ? (fields.find((field) => normalizedName(field.name) === normalizedName(plan.fieldName))?.id ?? '')\n : ''),\n };\n}\n\n/** The actual mutation input: unrelated edits omit identity and preserve server-authoritative capacity snapshots. */\nexport function buildPlanningEditInput(\n plan: PlantingPlan,\n openedWith: PlanAssociations,\n form: PlanningEditForm\n): PlanEditInput {\n return {\n id: plan.id,\n ...(form.cropId && form.cropId !== openedWith.cropId ? { cropId: form.cropId } : {}),\n ...(form.fieldId && form.fieldId !== openedWith.fieldId ? { fieldId: form.fieldId } : {}),\n startDate: form.startDate || undefined,\n endDate: form.endDate || undefined,\n expectedYield: form.expectedYield ? Number(form.expectedYield) : undefined,\n seedRequired: form.seedRequired ? Number(form.seedRequired) : undefined,\n priority: form.priority,\n status: form.status,\n };\n}\n"],"mappings":";AAkBA,IAAM,KAAkB,MAAkB,EAAM,KAAK,EAAE,YAAY;AAGnE,SAAgB,EAAiB,GAAyC,GAA4C;CACpH,IAAI,EAAK,OAAO,OAAO,EAAK,UAAU,EAAM;CAC5C,IAAM,IAAa,EAAe,EAAK,SAAS;CAChD,OAAO,EAAQ,KAAe,MAAe,EAAe,EAAM,IAAI;AACxE;AAGA,SAAgB,EACd,GACA,GACA,GACkB;CAClB,OAAO;EACL,QACE,EAAK,WACJ,EAAK,SAAS,KAAK,IACf,EAAM,MAAM,MAAS,EAAe,EAAK,IAAI,MAAM,EAAe,EAAK,QAAQ,CAAC,GAAG,MAAM,KAC1F;EACN,SACE,EAAK,YACJ,EAAK,UAAU,KAAK,IAChB,EAAO,MAAM,MAAU,EAAe,EAAM,IAAI,MAAM,EAAe,EAAK,SAAS,CAAC,GAAG,MAAM,KAC9F;CACR;AACF;AAGA,SAAgB,EACd,GACA,GACA,GACe;CACf,OAAO;EACL,IAAI,EAAK;EACT,GAAI,EAAK,UAAU,EAAK,WAAW,EAAW,SAAS,EAAE,QAAQ,EAAK,OAAO,IAAI,CAAC;EAClF,GAAI,EAAK,WAAW,EAAK,YAAY,EAAW,UAAU,EAAE,SAAS,EAAK,QAAQ,IAAI,CAAC;EACvF,WAAW,EAAK,aAAa,KAAA;EAC7B,SAAS,EAAK,WAAW,KAAA;EACzB,eAAe,EAAK,gBAAgB,OAAO,EAAK,aAAa,IAAI,KAAA;EACjE,cAAc,EAAK,eAAe,OAAO,EAAK,YAAY,IAAI,KAAA;EAC9D,UAAU,EAAK;EACf,QAAQ,EAAK;CACf;AACF"}
|