@burdenoff/microfe-healthybowl 2026.703.1 → 2026.704.1

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.
Files changed (173) hide show
  1. package/dist/healthybowl/components/CreateFarmTaskButton.js +104 -0
  2. package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -0
  3. package/dist/healthybowl/components/index.js +1 -0
  4. package/dist/healthybowl/pages/GettingStartedPage.js +3 -3
  5. package/dist/healthybowl/pages/analytics/ExportPage.js +1 -1
  6. package/dist/healthybowl/pages/analytics/ReportsPage.js +3 -3
  7. package/dist/healthybowl/pages/compliance/ComplianceAuditsPage.js +4 -4
  8. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +3 -3
  9. package/dist/healthybowl/pages/compliance/OrganicCertificationPage.js +3 -3
  10. package/dist/healthybowl/pages/consultant/ConsultantDiagnosisPage.js +1 -1
  11. package/dist/healthybowl/pages/consultant/FarmerAdvisorsPage.js +1 -1
  12. package/dist/healthybowl/pages/crops/CropDetailsPage.js +137 -131
  13. package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
  14. package/dist/healthybowl/pages/crops/CropFieldsPage.js +3 -3
  15. package/dist/healthybowl/pages/crops/CropHarvestPage.js +3 -3
  16. package/dist/healthybowl/pages/crops/CropPlanningPage.js +3 -3
  17. package/dist/healthybowl/pages/crops/CropsPage.js +3 -3
  18. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +275 -269
  19. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  20. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +3 -3
  21. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +3 -3
  22. package/dist/healthybowl/pages/farm/FarmProfilePage.js +3 -3
  23. package/dist/healthybowl/pages/financial/BudgetManagementPage.js +3 -3
  24. package/dist/healthybowl/pages/financial/FinancialDashboardPage.js +3 -3
  25. package/dist/healthybowl/pages/financial/FinancialReportsPage.js +4 -4
  26. package/dist/healthybowl/pages/financial/FinancierAccessPage.js +1 -1
  27. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +3 -3
  28. package/dist/healthybowl/pages/financial/TransactionsPage.js +3 -3
  29. package/dist/healthybowl/pages/government-schemes/AccessibilitySettingsPage.js +1 -1
  30. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +4 -4
  31. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +3 -3
  32. package/dist/healthybowl/pages/government-schemes/GovernmentDashboardPage.js +3 -3
  33. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +3 -3
  34. package/dist/healthybowl/pages/government-schemes/SchemeDiscoveryPage.js +4 -4
  35. package/dist/healthybowl/pages/government-schemes/SchemesOverviewPage.js +3 -3
  36. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +3 -3
  37. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
  38. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js +64 -58
  39. package/dist/healthybowl/pages/livestock/AnimalDetailsPage.js.map +1 -1
  40. package/dist/healthybowl/pages/livestock/AnimalRegistryPage.js +3 -3
  41. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +3 -3
  42. package/dist/healthybowl/pages/livestock/FeedManagementPage.js +3 -3
  43. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +3 -3
  44. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +3 -3
  45. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +4 -4
  46. package/dist/healthybowl/pages/marketplace/CartPage.js +4 -4
  47. package/dist/healthybowl/pages/marketplace/MarketplacePage.js +5 -5
  48. package/dist/healthybowl/pages/marketplace/OrdersPage.js +5 -5
  49. package/dist/healthybowl/pages/marketplace/ProductDetailPage.js +4 -4
  50. package/dist/healthybowl/pages/marketplace/ProductDetailPage.js.map +1 -1
  51. package/dist/healthybowl/pages/marketplace/WishlistPage.js +4 -4
  52. package/dist/healthybowl/pages/network/CohortsPage.js +1 -1
  53. package/dist/healthybowl/pages/network/CommunityPage.js +1 -1
  54. package/dist/healthybowl/pages/network/EventsPage.js +4 -4
  55. package/dist/healthybowl/pages/network/ExpertsPage.js +4 -4
  56. package/dist/healthybowl/pages/network/MentorsPage.js +4 -4
  57. package/dist/healthybowl/pages/network/NetworkOverviewPage.js +3 -3
  58. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +207 -193
  59. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js.map +1 -1
  60. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +3 -3
  61. package/dist/healthybowl/pages/production/RecipeManagementPage.js +3 -3
  62. package/dist/healthybowl/pages/products/BatchesPage.js +3 -3
  63. package/dist/healthybowl/pages/products/InventoryPage.js +3 -3
  64. package/dist/healthybowl/pages/products/ProductsOverviewPage.js +3 -3
  65. package/dist/healthybowl/pages/soil/SoilTestsPage.js +3 -3
  66. package/dist/healthybowl/pages/tasks/TasksPage.js +43 -21
  67. package/dist/healthybowl/pages/tasks/TasksPage.js.map +1 -1
  68. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +3 -3
  69. package/dist/healthybowl/pages/traceability/QRCodesPage.js +3 -3
  70. package/dist/healthybowl/pages/weather/WeatherAlertsPage.js +3 -3
  71. package/dist/healthybowl/pages/weather/WeatherHistoryPage.js +3 -3
  72. package/dist/healthybowl/pages/weather/WeatherOverviewPage.js +4 -4
  73. package/dist/node_modules/@burdenoff/planmagnet-fe-sdk/dist/index.js +1467 -555
  74. package/dist/node_modules/@burdenoff/planmagnet-fe-sdk/dist/index.js.map +1 -1
  75. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +8 -0
  76. package/dist/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -0
  77. package/dist/node_modules/date-fns/_lib/defaultOptions.js +9 -0
  78. package/dist/node_modules/date-fns/_lib/defaultOptions.js.map +1 -0
  79. package/dist/node_modules/date-fns/_lib/format/formatters.js +384 -0
  80. package/dist/node_modules/date-fns/_lib/format/formatters.js.map +1 -0
  81. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +45 -0
  82. package/dist/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -0
  83. package/dist/node_modules/date-fns/_lib/format/longFormatters.js +42 -0
  84. package/dist/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -0
  85. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +10 -0
  86. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -0
  87. package/dist/node_modules/date-fns/_lib/normalizeDates.js +10 -0
  88. package/dist/node_modules/date-fns/_lib/normalizeDates.js.map +1 -0
  89. package/dist/node_modules/date-fns/_lib/normalizeInterval.js +13 -0
  90. package/dist/node_modules/date-fns/_lib/normalizeInterval.js.map +1 -0
  91. package/dist/node_modules/date-fns/_lib/protectedTokens.js +25 -0
  92. package/dist/node_modules/date-fns/_lib/protectedTokens.js.map +1 -0
  93. package/dist/node_modules/date-fns/addDays.js +11 -0
  94. package/dist/node_modules/date-fns/addDays.js.map +1 -0
  95. package/dist/node_modules/date-fns/addMonths.js +14 -0
  96. package/dist/node_modules/date-fns/addMonths.js.map +1 -0
  97. package/dist/node_modules/date-fns/addWeeks.js +9 -0
  98. package/dist/node_modules/date-fns/addWeeks.js.map +1 -0
  99. package/dist/node_modules/date-fns/constants.js +8 -0
  100. package/dist/node_modules/date-fns/constants.js.map +1 -0
  101. package/dist/node_modules/date-fns/constructFrom.js +9 -0
  102. package/dist/node_modules/date-fns/constructFrom.js.map +1 -0
  103. package/dist/node_modules/date-fns/constructNow.js +9 -0
  104. package/dist/node_modules/date-fns/constructNow.js.map +1 -0
  105. package/dist/node_modules/date-fns/differenceInCalendarDays.js +13 -0
  106. package/dist/node_modules/date-fns/differenceInCalendarDays.js.map +1 -0
  107. package/dist/node_modules/date-fns/eachDayOfInterval.js +17 -0
  108. package/dist/node_modules/date-fns/eachDayOfInterval.js.map +1 -0
  109. package/dist/node_modules/date-fns/endOfMonth.js +10 -0
  110. package/dist/node_modules/date-fns/endOfMonth.js.map +1 -0
  111. package/dist/node_modules/date-fns/endOfWeek.js +11 -0
  112. package/dist/node_modules/date-fns/endOfWeek.js.map +1 -0
  113. package/dist/node_modules/date-fns/format.js +61 -0
  114. package/dist/node_modules/date-fns/format.js.map +1 -0
  115. package/dist/node_modules/date-fns/getDayOfYear.js +12 -0
  116. package/dist/node_modules/date-fns/getDayOfYear.js.map +1 -0
  117. package/dist/node_modules/date-fns/getISOWeek.js +13 -0
  118. package/dist/node_modules/date-fns/getISOWeek.js.map +1 -0
  119. package/dist/node_modules/date-fns/getISOWeekYear.js +16 -0
  120. package/dist/node_modules/date-fns/getISOWeekYear.js.map +1 -0
  121. package/dist/node_modules/date-fns/getWeek.js +13 -0
  122. package/dist/node_modules/date-fns/getWeek.js.map +1 -0
  123. package/dist/node_modules/date-fns/getWeekYear.js +17 -0
  124. package/dist/node_modules/date-fns/getWeekYear.js.map +1 -0
  125. package/dist/node_modules/date-fns/isDate.js +8 -0
  126. package/dist/node_modules/date-fns/isDate.js.map +1 -0
  127. package/dist/node_modules/date-fns/isSameDay.js +11 -0
  128. package/dist/node_modules/date-fns/isSameDay.js.map +1 -0
  129. package/dist/node_modules/date-fns/isSameMonth.js +10 -0
  130. package/dist/node_modules/date-fns/isSameMonth.js.map +1 -0
  131. package/dist/node_modules/date-fns/isToday.js +11 -0
  132. package/dist/node_modules/date-fns/isToday.js.map +1 -0
  133. package/dist/node_modules/date-fns/isValid.js +10 -0
  134. package/dist/node_modules/date-fns/isValid.js.map +1 -0
  135. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +11 -0
  136. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
  137. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +19 -0
  138. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
  139. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +24 -0
  140. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
  141. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +20 -0
  142. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
  143. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +71 -0
  144. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
  145. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +34 -0
  146. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
  147. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +13 -0
  148. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
  149. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +204 -0
  150. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
  151. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +126 -0
  152. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
  153. package/dist/node_modules/date-fns/locale/en-US.js +22 -0
  154. package/dist/node_modules/date-fns/locale/en-US.js.map +1 -0
  155. package/dist/node_modules/date-fns/parseISO.js +119 -0
  156. package/dist/node_modules/date-fns/parseISO.js.map +1 -0
  157. package/dist/node_modules/date-fns/startOfDay.js +10 -0
  158. package/dist/node_modules/date-fns/startOfDay.js.map +1 -0
  159. package/dist/node_modules/date-fns/startOfISOWeek.js +12 -0
  160. package/dist/node_modules/date-fns/startOfISOWeek.js.map +1 -0
  161. package/dist/node_modules/date-fns/startOfISOWeekYear.js +12 -0
  162. package/dist/node_modules/date-fns/startOfISOWeekYear.js.map +1 -0
  163. package/dist/node_modules/date-fns/startOfMonth.js +10 -0
  164. package/dist/node_modules/date-fns/startOfMonth.js.map +1 -0
  165. package/dist/node_modules/date-fns/startOfWeek.js +11 -0
  166. package/dist/node_modules/date-fns/startOfWeek.js.map +1 -0
  167. package/dist/node_modules/date-fns/startOfWeekYear.js +13 -0
  168. package/dist/node_modules/date-fns/startOfWeekYear.js.map +1 -0
  169. package/dist/node_modules/date-fns/startOfYear.js +10 -0
  170. package/dist/node_modules/date-fns/startOfYear.js.map +1 -0
  171. package/dist/node_modules/date-fns/toDate.js +9 -0
  172. package/dist/node_modules/date-fns/toDate.js.map +1 -0
  173. package/package.json +2 -2
@@ -0,0 +1,104 @@
1
+ import { useHealthyBowl as e } from "../context/HealthyBowlContext.js";
2
+ import { Modal as t } from "./Modal.js";
3
+ import { CreateTaskCore as n } from "../../node_modules/@burdenoff/planmagnet-fe-sdk/dist/index.js";
4
+ import { useDefaultTaskProject as r } from "../pages/tasks/useDefaultTaskProject.js";
5
+ import { useToast as i } from "../hooks/useToast.js";
6
+ import { useCallback as a, useState as o } from "react";
7
+ import { ClipboardList as s } from "lucide-react";
8
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
9
+ import { Button as d } from "@burdenoff/fe-libs/ui";
10
+ import { gql as f } from "@apollo/client";
11
+ import { ApolloProvider as p, useMutation as m } from "@apollo/client/react";
12
+ import { useSafeGatewayClient as h } from "@burdenoff/fe-libs/shared/graphql";
13
+ //#region src/healthybowl/components/CreateFarmTaskButton.tsx
14
+ var g = f`
15
+ mutation HealthyBowlLinkWorkItem($input: PlanmagnetCreateWorkItemLinkInput!) {
16
+ planmagnetLinkWorkItem(input: $input) {
17
+ id
18
+ }
19
+ }
20
+ `, _ = ({ entityType: e, entityId: n, entityLabel: r, label: i = "Create Task", variant: a = "outline", size: f, iconOnly: m, title: g, className: _, icon: y }) => {
21
+ let b = h("workspace"), [x, S] = o(!1);
22
+ return b ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u(d, {
23
+ variant: a,
24
+ size: f,
25
+ onClick: () => S(!0),
26
+ className: _,
27
+ title: g ?? (m ? i : void 0),
28
+ "aria-label": m ? g ?? i : void 0,
29
+ children: [y ?? /* @__PURE__ */ l(s, {
30
+ className: "size-4",
31
+ "aria-hidden": "true"
32
+ }), !m && i]
33
+ }), /* @__PURE__ */ l(t, {
34
+ open: x,
35
+ onClose: () => S(!1),
36
+ title: "Create Farm Task",
37
+ description: `Create a task linked to ${r}.`,
38
+ children: /* @__PURE__ */ l(p, {
39
+ client: b,
40
+ children: /* @__PURE__ */ l(v, {
41
+ client: b,
42
+ entityType: e,
43
+ entityId: n,
44
+ entityLabel: r,
45
+ onDone: () => S(!1)
46
+ })
47
+ })
48
+ })] }) : null;
49
+ }, v = ({ client: t, entityType: o, entityId: s, entityLabel: c, onDone: d }) => {
50
+ let { workspaceId: f, currentUser: p } = e(), { projectId: h, loading: _, error: v } = r(t, f, p?.id), [y] = m(g), { toast: b } = i(), x = a(async (e) => {
51
+ try {
52
+ await y({ variables: { input: {
53
+ workItemId: e.id,
54
+ sourceProduct: "healthybowl",
55
+ entityType: o,
56
+ entityId: s,
57
+ displayNameSnapshot: c,
58
+ deepLinkSnapshot: window.location.pathname + window.location.search
59
+ } } }), b({
60
+ title: "Task created",
61
+ description: `Linked to ${c}.`,
62
+ variant: "success"
63
+ });
64
+ } catch {
65
+ b({
66
+ title: "Task created",
67
+ description: "Saved, but it could not be linked to this record.",
68
+ variant: "warning"
69
+ });
70
+ }
71
+ d();
72
+ }, [
73
+ y,
74
+ o,
75
+ s,
76
+ c,
77
+ b,
78
+ d
79
+ ]);
80
+ return v ? /* @__PURE__ */ u("p", {
81
+ className: "text-sm text-destructive",
82
+ children: ["Couldn't prepare the task project: ", v.message]
83
+ }) : _ || !h ? /* @__PURE__ */ l("p", {
84
+ className: "text-sm text-muted-foreground",
85
+ children: "Preparing…"
86
+ }) : /* @__PURE__ */ l(n, {
87
+ workspaceId: f,
88
+ projectId: h,
89
+ hideHeader: !0,
90
+ defaultValues: { title: `${c}: ` },
91
+ hiddenFields: [
92
+ "type",
93
+ "storyPoints",
94
+ "labels"
95
+ ],
96
+ submitLabel: "Create & link",
97
+ onCreated: x,
98
+ onCancel: d
99
+ });
100
+ };
101
+ //#endregion
102
+ export { _ as CreateFarmTaskButton };
103
+
104
+ //# sourceMappingURL=CreateFarmTaskButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateFarmTaskButton.js","names":[],"sources":["../../../src/healthybowl/components/CreateFarmTaskButton.tsx"],"sourcesContent":["/**\n * CreateFarmTaskButton — a \"Create Task\" action for a HealthyBowl entity detail\n * page (Field / Crop / Animal / Pest).\n *\n * Opens the shared PlanMagnet create form (`CreateTaskCore` from\n * `@burdenoff/planmagnet-fe-sdk`) pre-filled with the entity's name, and on save\n * pins the new task to this record via a `WorkItemLink`\n * (`sourceProduct: \"healthybowl\"`, `entityType`, `entityId`, snapshotted label +\n * deep link) — so the task shows a green linked-record chip on the Farm Tasks\n * board and the \"Linked Record\" list column. This is the TM-06 / AC-03 flow.\n *\n * BYO-Apollo: binds the create form + link mutation to the workspace gateway\n * client (the same one Farm Tasks uses). The project is get-or-created lazily\n * (only when the modal is open) via the shared `useDefaultTaskProject` hook.\n *\n * @module healthybowl\n */\n\nimport { useCallback, useState, type ComponentProps, type FC, type ReactNode } from 'react';\nimport { ApolloProvider, useMutation } from '@apollo/client/react';\nimport { gql, type ApolloClient } from '@apollo/client';\nimport { useSafeGatewayClient } from '@burdenoff/fe-libs/shared/graphql';\nimport { CreateTaskCore, type WorkItemDetail } from '@burdenoff/planmagnet-fe-sdk';\nimport { ClipboardList } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\n\n// Defined locally (with the host's own `gql`) rather than imported from the SDK\n// to avoid a cross-instance `graphql` DocumentNode type mismatch — same pattern\n// as useDefaultTaskProject. Uses the exact Planmagnet-prefixed input type name.\nconst CREATE_WORK_ITEM_LINK = gql`\n mutation HealthyBowlLinkWorkItem($input: PlanmagnetCreateWorkItemLinkInput!) {\n planmagnetLinkWorkItem(input: $input) {\n id\n }\n }\n`;\nimport { Modal } from './Modal';\nimport { useHealthyBowl } from '../context/HealthyBowlContext';\nimport { useDefaultTaskProject } from '../pages/tasks/useDefaultTaskProject';\nimport { useToast } from '../hooks/useToast';\n\n/** HealthyBowl entity kinds a task can be pinned to (WorkItemLink.entityType). */\nexport type FarmEntityType = 'FIELD' | 'CROP' | 'ANIMAL' | 'PEST';\n\nexport interface CreateFarmTaskButtonProps {\n entityType: FarmEntityType;\n entityId: string;\n /** Human label snapshotted onto the link + used to pre-fill the task title. */\n entityLabel: string;\n /** Button label. Defaults to \"Create Task\". */\n label?: string;\n variant?: ComponentProps<typeof Button>['variant'];\n size?: ComponentProps<typeof Button>['size'];\n /** Render only the icon (compact, e.g. in a table row). Uses `title` for a11y. */\n iconOnly?: boolean;\n /** Tooltip / accessible label (required for a good iconOnly experience). */\n title?: string;\n className?: string;\n icon?: ReactNode;\n}\n\nexport const CreateFarmTaskButton: FC<CreateFarmTaskButtonProps> = ({\n entityType,\n entityId,\n entityLabel,\n label = 'Create Task',\n variant = 'outline',\n size,\n iconOnly,\n title,\n className,\n icon,\n}) => {\n const workspaceClient = useSafeGatewayClient('workspace');\n const [open, setOpen] = useState(false);\n\n // No workspace connection → the whole flow is unavailable; hide the action.\n if (!workspaceClient) return null;\n\n return (\n <>\n <Button\n variant={variant}\n size={size}\n onClick={() => setOpen(true)}\n className={className}\n title={title ?? (iconOnly ? label : undefined)}\n aria-label={iconOnly ? (title ?? label) : undefined}\n >\n {icon ?? <ClipboardList className=\"size-4\" aria-hidden=\"true\" />}\n {!iconOnly && label}\n </Button>\n <Modal\n open={open}\n onClose={() => setOpen(false)}\n title=\"Create Farm Task\"\n description={`Create a task linked to ${entityLabel}.`}\n >\n <ApolloProvider client={workspaceClient}>\n <FarmTaskForm\n client={workspaceClient}\n entityType={entityType}\n entityId={entityId}\n entityLabel={entityLabel}\n onDone={() => setOpen(false)}\n />\n </ApolloProvider>\n </Modal>\n </>\n );\n};\n\nconst FarmTaskForm: FC<{\n client: ApolloClient;\n entityType: FarmEntityType;\n entityId: string;\n entityLabel: string;\n onDone: () => void;\n}> = ({ client, entityType, entityId, entityLabel, onDone }) => {\n const { workspaceId, currentUser } = useHealthyBowl();\n const { projectId, loading, error } = useDefaultTaskProject(client, workspaceId, currentUser?.id);\n const [linkWorkItem] = useMutation(CREATE_WORK_ITEM_LINK);\n const { toast } = useToast();\n\n const handleCreated = useCallback(\n async (workItem: WorkItemDetail) => {\n try {\n await linkWorkItem({\n variables: {\n input: {\n workItemId: workItem.id,\n sourceProduct: 'healthybowl',\n entityType,\n entityId,\n displayNameSnapshot: entityLabel,\n deepLinkSnapshot: window.location.pathname + window.location.search,\n },\n },\n });\n toast({\n title: 'Task created',\n description: `Linked to ${entityLabel}.`,\n variant: 'success',\n });\n } catch {\n // The task WAS created; only the link failed — never lose the task.\n toast({\n title: 'Task created',\n description: 'Saved, but it could not be linked to this record.',\n variant: 'warning',\n });\n }\n onDone();\n },\n [linkWorkItem, entityType, entityId, entityLabel, toast, onDone]\n );\n\n if (error) {\n return <p className=\"text-sm text-destructive\">Couldn&apos;t prepare the task project: {error.message}</p>;\n }\n if (loading || !projectId) {\n return <p className=\"text-sm text-muted-foreground\">Preparing…</p>;\n }\n\n return (\n <CreateTaskCore\n workspaceId={workspaceId}\n projectId={projectId}\n hideHeader\n defaultValues={{ title: `${entityLabel}: ` }}\n hiddenFields={['type', 'storyPoints', 'labels']}\n submitLabel=\"Create & link\"\n onCreated={handleCreated}\n onCancel={onDone}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;AA6BA,IAAM,IAAwB,CAAG;;;;;;GAgCpB,KAAuD,EAClE,eACA,aACA,gBACA,WAAQ,eACR,aAAU,WACV,SACA,aACA,UACA,cACA,cACI;CACJ,IAAM,IAAkB,EAAqB,YAAY,EACnD,CAAC,GAAM,KAAW,EAAS,GAAM;AAKvC,QAFK,IAGH,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACW;EACH;EACN,eAAe,EAAQ,GAAK;EACjB;EACX,OAAO,MAAU,IAAW,IAAQ,KAAA;EACpC,cAAY,IAAY,KAAS,IAAS,KAAA;YAN5C,CAQG,KAAQ,kBAAC,GAAD;GAAe,WAAU;GAAS,eAAY;GAAS,CAAA,EAC/D,CAAC,KAAY,EACP;KACT,kBAAC,GAAD;EACQ;EACN,eAAe,EAAQ,GAAM;EAC7B,OAAM;EACN,aAAa,2BAA2B,EAAY;YAEpD,kBAAC,GAAD;GAAgB,QAAQ;aACtB,kBAAC,GAAD;IACE,QAAQ;IACI;IACF;IACG;IACb,cAAc,EAAQ,GAAM;IAC5B,CAAA;GACa,CAAA;EACX,CAAA,CACP,EAAA,CAAA,GA/BwB;GAmCzB,KAMA,EAAE,WAAQ,eAAY,aAAU,gBAAa,gBAAa;CAC9D,IAAM,EAAE,gBAAa,mBAAgB,GAAgB,EAC/C,EAAE,cAAW,YAAS,aAAU,EAAsB,GAAQ,GAAa,GAAa,GAAG,EAC3F,CAAC,KAAgB,EAAY,EAAsB,EACnD,EAAE,aAAU,GAAU,EAEtB,IAAgB,EACpB,OAAO,MAA6B;AAClC,MAAI;AAaF,GAZA,MAAM,EAAa,EACjB,WAAW,EACT,OAAO;IACL,YAAY,EAAS;IACrB,eAAe;IACf;IACA;IACA,qBAAqB;IACrB,kBAAkB,OAAO,SAAS,WAAW,OAAO,SAAS;IAC9D,EACF,EACF,CAAC,EACF,EAAM;IACJ,OAAO;IACP,aAAa,aAAa,EAAY;IACtC,SAAS;IACV,CAAC;UACI;AAEN,KAAM;IACJ,OAAO;IACP,aAAa;IACb,SAAS;IACV,CAAC;;AAEJ,KAAQ;IAEV;EAAC;EAAc;EAAY;EAAU;EAAa;EAAO;EAAO,CACjE;AASD,QAPI,IACK,kBAAC,KAAD;EAAG,WAAU;YAAb,CAAwC,uCAAyC,EAAM,QAAY;MAExG,KAAW,CAAC,IACP,kBAAC,KAAD;EAAG,WAAU;YAAgC;EAAc,CAAA,GAIlE,kBAAC,GAAD;EACe;EACF;EACX,YAAA;EACA,eAAe,EAAE,OAAO,GAAG,EAAY,KAAK;EAC5C,cAAc;GAAC;GAAQ;GAAe;GAAS;EAC/C,aAAY;EACZ,WAAW;EACX,UAAU;EACV,CAAA"}
@@ -18,3 +18,4 @@ import "./HBEntityTags.js";
18
18
  import "./HBEntityImages.js";
19
19
  import "./PlatformActivityLog.js";
20
20
  import "./WeatherMap.js";
21
+ import "./CreateFarmTaskButton.js";
@@ -3,9 +3,9 @@ import { PageLayout as t } from "../components/PageLayout.js";
3
3
  import { ErrorState as n } from "../components/ErrorState.js";
4
4
  import { ToastContainer as r } from "../components/Toast.js";
5
5
  import { PageLoader as i } from "../components/PageLoader.js";
6
+ import { useToast as a } from "../hooks/useToast.js";
6
7
  import "../components/index.js";
7
- import { useHealthyBowlData as a } from "../hooks/useHealthyBowlData.js";
8
- import { useToast as o } from "../hooks/useToast.js";
8
+ import { useHealthyBowlData as o } from "../hooks/useHealthyBowlData.js";
9
9
  import { useState as s } from "react";
10
10
  import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
11
  import { ArrowRight as l, CheckCircle2 as u, Sprout as d } from "lucide-react";
@@ -21,7 +21,7 @@ var _ = {
21
21
  areaUnit: "acres",
22
22
  organicCertified: !1
23
23
  }, v = "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", y = () => {
24
- let { t: y } = c(), { farm: b, createFarm: x, loadings: S, errors: C, refetch: w } = a(), T = f(), { buildPath: E } = e(), { toasts: D, toast: O, dismiss: k } = o(), [A, j] = s(_), [M, N] = s(!1), P = !!b?.id, F = async () => {
24
+ let { t: y } = c(), { farm: b, createFarm: x, loadings: S, errors: C, refetch: w } = o(), T = f(), { buildPath: E } = e(), { toasts: D, toast: O, dismiss: k } = a(), [A, j] = s(_), [M, N] = s(!1), P = !!b?.id, F = async () => {
25
25
  if (!S.dashboard) {
26
26
  if (!A.name.trim() || !A.owner.trim() || !A.location.trim()) {
27
27
  O({
@@ -5,8 +5,8 @@ import { DataTable as r } from "../../components/DataTable.js";
5
5
  import { StatusBadge as i } from "../../components/StatusBadge.js";
6
6
  import { EmptyState as a } from "../../components/EmptyState.js";
7
7
  import { ToastContainer as o } from "../../components/Toast.js";
8
- import "../../components/index.js";
9
8
  import { useToast as s } from "../../hooks/useToast.js";
9
+ import "../../components/index.js";
10
10
  import { useHealthyBowlExport as c } from "../../hooks/useHealthyBowlExport.js";
11
11
  import { useState as l } from "react";
12
12
  import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
@@ -8,9 +8,9 @@ import { FilterBar as o } from "../../components/FilterBar.js";
8
8
  import { ToastContainer as s } from "../../components/Toast.js";
9
9
  import { LoadingSkeleton as c } from "../../components/LoadingSkeleton.js";
10
10
  import { Modal as l } from "../../components/Modal.js";
11
+ import { useToast as u } from "../../hooks/useToast.js";
11
12
  import "../../components/index.js";
12
- import { useHealthyBowlData as u } from "../../hooks/useHealthyBowlData.js";
13
- import { useToast as d } from "../../hooks/useToast.js";
13
+ import { useHealthyBowlData as d } from "../../hooks/useHealthyBowlData.js";
14
14
  import { useState as f } from "react";
15
15
  import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
16
  import { FileText as m, Plus as h } from "lucide-react";
@@ -29,7 +29,7 @@ var T = {
29
29
  scheduled: "info"
30
30
  };
31
31
  function D() {
32
- let { t: D } = p(), { analyticsReports: O, loading: k, errors: A } = u(), [j, M] = f(""), [N, P] = f(!1), [F, I] = f(""), [L, R] = f("crop"), { toasts: z, toast: B, dismiss: V } = d(), H = () => {
32
+ let { t: D } = p(), { analyticsReports: O, loading: k, errors: A } = d(), [j, M] = f(""), [N, P] = f(!1), [F, I] = f(""), [L, R] = f("crop"), { toasts: z, toast: B, dismiss: V } = u(), H = () => {
33
33
  if (!F.trim()) {
34
34
  B({
35
35
  title: D("healthybowl.analytics.reports.toast.missingTitle.title", "Missing Title"),
@@ -8,9 +8,9 @@ import { useConfirm as o } from "../../components/ConfirmDialog.js";
8
8
  import { PageLoader as s } from "../../components/PageLoader.js";
9
9
  import { Modal as c } from "../../components/Modal.js";
10
10
  import { PlatformActivityLog as l } from "../../components/PlatformActivityLog.js";
11
+ import { useToast as u } from "../../hooks/useToast.js";
11
12
  import "../../components/index.js";
12
- import { useHealthyBowlData as u } from "../../hooks/useHealthyBowlData.js";
13
- import { useToast as d } from "../../hooks/useToast.js";
13
+ import { useHealthyBowlData as d } from "../../hooks/useHealthyBowlData.js";
14
14
  import { useState as f } from "react";
15
15
  import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
16
  import { ClipboardCheck as ee, Plus as m, Trash2 as h } from "lucide-react";
@@ -38,13 +38,13 @@ var T = (e) => {
38
38
  auditor: "",
39
39
  scheduledDate: ""
40
40
  }, O = () => {
41
- let { t: O } = p(), k = o(), { audits: A, createAudit: j, updateAudit: te, deleteAudit: M, errors: N, loadings: P, refetch: F } = u(), [I, L] = f(null), [R, z] = f(null), [B, V] = f(!1), [H, U] = f(D), [W, G] = f(!1), [K, q] = f({
41
+ let { t: O } = p(), k = o(), { audits: A, createAudit: j, updateAudit: te, deleteAudit: M, errors: N, loadings: P, refetch: F } = d(), [I, L] = f(null), [R, z] = f(null), [B, V] = f(!1), [H, U] = f(D), [W, G] = f(!1), [K, q] = f({
42
42
  status: "completed",
43
43
  score: "",
44
44
  findings: "",
45
45
  criticalFindings: "",
46
46
  completedDate: ""
47
- }), [J, Y] = f(!1), { toasts: X, toast: Z, dismiss: ne } = d(), Q = A.find((e) => e.id === I), re = async (e, t) => {
47
+ }), [J, Y] = f(!1), { toasts: X, toast: Z, dismiss: ne } = u(), Q = A.find((e) => e.id === I), re = async (e, t) => {
48
48
  if (await k({ message: O("healthybowl.compliance.audits.confirm.delete", "Delete the audit \"{{title}}\"? This cannot be undone.", { title: t }) })) {
49
49
  z(e);
50
50
  try {
@@ -7,9 +7,9 @@ import { ToastContainer as ee } from "../../components/Toast.js";
7
7
  import { useConfirm as te } from "../../components/ConfirmDialog.js";
8
8
  import { PageLoader as ne } from "../../components/PageLoader.js";
9
9
  import { Modal as re } from "../../components/Modal.js";
10
+ import { useToast as ie } from "../../hooks/useToast.js";
10
11
  import "../../components/index.js";
11
- import { useHealthyBowlData as ie } from "../../hooks/useHealthyBowlData.js";
12
- import { useToast as ae } from "../../hooks/useToast.js";
12
+ import { useHealthyBowlData as ae } from "../../hooks/useHealthyBowlData.js";
13
13
  import { useMemo as oe, useRef as se, useState as a } from "react";
14
14
  import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
15
  import { Download as s, FileText as c, Paperclip as l, Pencil as u, Plus as d, Trash2 as ce, Upload as f, X as p } from "lucide-react";
@@ -46,7 +46,7 @@ var T = S`
46
46
  fileName: "",
47
47
  certificationId: ""
48
48
  }, k = () => {
49
- let { t: S } = o(), k = te(), { complianceDocuments: A, certifications: j, createComplianceDocument: M, updateComplianceDocument: N, deleteComplianceDocument: P, loadings: F, errors: I, refetch: L } = ie(), [R, z] = a(""), [B, V] = a(!1), [H, U] = a(null), [W, G] = a(!1), [K, q] = a(O), { toasts: ue, toast: J, dismiss: de } = ae(), fe = oe(() => D.map((e) => ({
49
+ let { t: S } = o(), k = te(), { complianceDocuments: A, certifications: j, createComplianceDocument: M, updateComplianceDocument: N, deleteComplianceDocument: P, loadings: F, errors: I, refetch: L } = ae(), [R, z] = a(""), [B, V] = a(!1), [H, U] = a(null), [W, G] = a(!1), [K, q] = a(O), { toasts: ue, toast: J, dismiss: de } = ie(), fe = oe(() => D.map((e) => ({
50
50
  value: e,
51
51
  label: S(`healthybowl.compliance.documents.form.fields.type.options.${e.toLowerCase()}`, e)
52
52
  })), [S]), { save: pe, isPending: Y } = w(), X = se(null), me = C(), Z = (e, t) => q((n) => ({
@@ -8,9 +8,9 @@ import { ToastContainer as te } from "../../components/Toast.js";
8
8
  import { useConfirm as ne } from "../../components/ConfirmDialog.js";
9
9
  import { PageLoader as a } from "../../components/PageLoader.js";
10
10
  import { Modal as o } from "../../components/Modal.js";
11
+ import { useToast as s } from "../../hooks/useToast.js";
11
12
  import "../../components/index.js";
12
- import { useHealthyBowlData as s } from "../../hooks/useHealthyBowlData.js";
13
- import { useToast as c } from "../../hooks/useToast.js";
13
+ import { useHealthyBowlData as c } from "../../hooks/useHealthyBowlData.js";
14
14
  import { useState as l } from "react";
15
15
  import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
16
  import { ArrowRight as u, Calendar as d, ClipboardCheck as f, FileText as p, Pencil as m, Plus as h, ShieldCheck as g, Trash2 as _ } from "lucide-react";
@@ -35,7 +35,7 @@ var D = (e) => {
35
35
  status: "active",
36
36
  scope: ""
37
37
  }, k = () => {
38
- let { t: k } = re(), { certifications: A, createCertification: j, updateCertification: M, deleteCertification: N, loadings: P, errors: F, refetch: I } = s(), L = v(), { buildPath: R } = t(), z = ne(), [B, V] = l(null), H = A.find((e) => e.id === B), [U, W] = l(!1), [G, K] = l(null), [q, J] = l(!1), [Y, X] = l(O), { toasts: ae, toast: Z, dismiss: oe } = c(), Q = (e, t) => X((n) => ({
38
+ let { t: k } = re(), { certifications: A, createCertification: j, updateCertification: M, deleteCertification: N, loadings: P, errors: F, refetch: I } = c(), L = v(), { buildPath: R } = t(), z = ne(), [B, V] = l(null), H = A.find((e) => e.id === B), [U, W] = l(!1), [G, K] = l(null), [q, J] = l(!1), [Y, X] = l(O), { toasts: ae, toast: Z, dismiss: oe } = s(), Q = (e, t) => X((n) => ({
39
39
  ...n,
40
40
  [e]: t
41
41
  })), se = async () => {
@@ -6,8 +6,8 @@ import { ToastContainer as ee } from "../../components/Toast.js";
6
6
  import { Breadcrumbs as te } from "../../components/Breadcrumbs.js";
7
7
  import { Modal as i } from "../../components/Modal.js";
8
8
  import { useCreateHealthyBowlAdvisoryTaskMutation as a, useCreateHealthyBowlFarmRecommendationMutation as ne, useGetHealthyBowlConsultantClientDiagnosisQuery as re, useGetHealthyBowlConsultantClientRecommendationsQuery as ie, useGetHealthyBowlConsultantClientTasksQuery as o, useUpdateHealthyBowlAdvisoryTaskStatusMutation as s } from "../../../generated/wspace-operations.js";
9
- import "../../components/index.js";
10
9
  import { useToast as c } from "../../hooks/useToast.js";
10
+ import "../../components/index.js";
11
11
  import { useState as l } from "react";
12
12
  import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
13
  import { AlertCircle as d, AlertTriangle as f, CheckCircle2 as p, ClipboardList as ae, Plus as m, Stethoscope as oe } from "lucide-react";
@@ -6,8 +6,8 @@ import { ToastContainer as i } from "../../components/Toast.js";
6
6
  import { useConfirm as a } from "../../components/ConfirmDialog.js";
7
7
  import { Modal as o } from "../../components/Modal.js";
8
8
  import { useAssignHealthyBowlConsultantMutation as s, useGetHealthyBowlConsultantAssignmentsQuery as c, useGetHealthyBowlMyAdvisoryTasksQuery as l, useGetHealthyBowlMyFarmRecommendationsQuery as u, useRevokeHealthyBowlConsultantAssignmentMutation as d } from "../../../generated/wspace-operations.js";
9
- import "../../components/index.js";
10
9
  import { useToast as f } from "../../hooks/useToast.js";
10
+ import "../../components/index.js";
11
11
  import { useState as p } from "react";
12
12
  import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
13
  import { AlertCircle as h, CheckCircle2 as g, ClipboardList as _, Plus as v, Trash2 as ee } from "lucide-react";