diff --git a/.changeset/crisp-toys-laugh.md b/.changeset/crisp-toys-laugh.md new file mode 100644 index 000000000..f6d2e118b --- /dev/null +++ b/.changeset/crisp-toys-laugh.md @@ -0,0 +1,5 @@ +--- +"@svenvw/fdm-calculator": minor +--- + +Exclude buffer strips from calculating farm balances and set field values to 0 diff --git a/.changeset/huge-cars-peel.md b/.changeset/huge-cars-peel.md new file mode 100644 index 000000000..8b42c7409 --- /dev/null +++ b/.changeset/huge-cars-peel.md @@ -0,0 +1,5 @@ +--- +"@svenvw/fdm-core": minor +--- + +Replace the derived field parameter `b_isproductive` with the stored parameter `b_bufferstrip` so users can set it explicitly. diff --git a/.changeset/loud-yaks-repeat.md b/.changeset/loud-yaks-repeat.md new file mode 100644 index 000000000..ddc04abc0 --- /dev/null +++ b/.changeset/loud-yaks-repeat.md @@ -0,0 +1,5 @@ +--- +"@svenvw/fdm-core": minor +--- + +Set for existing fields the b_bufferstrip based on the same logic as in determineIfFieldIsBuffer diff --git a/.changeset/mobile-ux-improvements.md b/.changeset/mobile-ux-improvements.md new file mode 100644 index 000000000..a2d4b98bc --- /dev/null +++ b/.changeset/mobile-ux-improvements.md @@ -0,0 +1,10 @@ +--- +"fdm-app": patch +--- + +Significant UI/UX and mobile responsiveness improvements across the application: +- Field Overview: Refactored to use a responsive Card layout and simplified labels for better mobile fit. +- Header: Optimized for small screens with flexible height, truncated labels, and streamlined breadcrumbs. +- Sidebar: Reduced width and internal spacing on medium screens to reclaim horizontal space for content. +- Fertilizer Dashboard: Redesigned with a stacked layout for better readability on laptops and added robust text truncation. +- Layout: Improved global padding and adjusted breakpoints (xl/2xl) to ensure a polished look across mobile, tablet, and desktop. diff --git a/.changeset/plenty-doors-design.md b/.changeset/plenty-doors-design.md new file mode 100644 index 000000000..f25b77d8a --- /dev/null +++ b/.changeset/plenty-doors-design.md @@ -0,0 +1,5 @@ +--- +"@svenvw/fdm-calculator": minor +--- + +Do not provide nutrient advice for buffer strips by setting the output to 0 diff --git a/.changeset/pretty-baboons-ask.md b/.changeset/pretty-baboons-ask.md new file mode 100644 index 000000000..b2c340ccd --- /dev/null +++ b/.changeset/pretty-baboons-ask.md @@ -0,0 +1,5 @@ +--- +"@svenvw/fdm-app": minor +--- + +Users can now indicate if a field is a buffer strip. Fields marked as buffer strips are excluded from nitrogen and organic matter balances at the farm level, and their nutrient advice and norms are automatically adjusted to zero. The UI now displays informative messages when calculations are skipped for these fields. diff --git a/.changeset/rich-rabbits-yell.md b/.changeset/rich-rabbits-yell.md new file mode 100644 index 000000000..79448d951 --- /dev/null +++ b/.changeset/rich-rabbits-yell.md @@ -0,0 +1,5 @@ +--- +"@svenvw/fdm-calculator": minor +--- + +For buffer strips set the norm values to 0 as they have no 'plaatsingsruimte' diff --git a/fdm-app/app/components/blocks/balance/buffer-strip-info.tsx b/fdm-app/app/components/blocks/balance/buffer-strip-info.tsx new file mode 100644 index 000000000..f7fd0bdc7 --- /dev/null +++ b/fdm-app/app/components/blocks/balance/buffer-strip-info.tsx @@ -0,0 +1,30 @@ +import { PanelsRightBottom } from "lucide-react" +import { Button } from "~/components/ui/button" +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "~/components/ui/tooltip" + +export function BufferStripInfo() { + return ( + + + + + + +

Bufferstroken zijn uitgesloten van de balansberekening

+
+
+
+ ) +} diff --git a/fdm-app/app/components/blocks/balance/buffer-strip-warning.tsx b/fdm-app/app/components/blocks/balance/buffer-strip-warning.tsx new file mode 100644 index 000000000..75bcd82e5 --- /dev/null +++ b/fdm-app/app/components/blocks/balance/buffer-strip-warning.tsx @@ -0,0 +1,37 @@ +import { NavLink } from "react-router" +import { useCalendarStore } from "~/store/calendar" +import { Button } from "~/components/ui/button" +import { + Card, + CardContent, + CardFooter, + CardHeader, + CardTitle, +} from "~/components/ui/card" + +export function BufferStripWarning({ b_id }: { b_id: string }) { + const calendar = useCalendarStore((state) => state.calendar) + + return ( +
+ + + Bufferstrook: uitgesloten van balans + + +
+

+ Dit perceel is gemarkeerd als bufferstrook en wordt + daarom niet meegenomen in de balansberekening. +

+
+
+ + + + + +
+
+ ) +} diff --git a/fdm-app/app/components/blocks/cultivation/list-plan.tsx b/fdm-app/app/components/blocks/cultivation/list-plan.tsx index 80bb99a9f..765104c3f 100644 --- a/fdm-app/app/components/blocks/cultivation/list-plan.tsx +++ b/fdm-app/app/components/blocks/cultivation/list-plan.tsx @@ -7,7 +7,7 @@ interface CultivationField { b_id: string b_name: string b_area: number - b_isproductive: boolean + b_bufferstrip: boolean } interface CultivationPlanItem { diff --git a/fdm-app/app/components/blocks/farm/farm-content.tsx b/fdm-app/app/components/blocks/farm/farm-content.tsx index 4efb2dde1..235073ea4 100644 --- a/fdm-app/app/components/blocks/farm/farm-content.tsx +++ b/fdm-app/app/components/blocks/farm/farm-content.tsx @@ -12,10 +12,10 @@ interface FarmContentProps { export function FarmContent({ sidebarItems, children }: FarmContentProps) { return ( -
-
+
+
{sidebarItems && ( -