Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
da3e50a
refactor: Replace at field the derived parameter `b_isproductive` wit…
SvenVw Jan 15, 2026
4687738
feat: take buffer strips into account in calculations
SvenVw Jan 15, 2026
39cca64
refactor: rename b_buffer to b_bufferstrip
SvenVw Jan 15, 2026
3bc1020
refactor: remove not used code
SvenVw Jan 15, 2026
bcd3a32
feat: Set for existing fields the b_bufferstrip bases on the same log…
SvenVw Jan 15, 2026
64b1d9c
fix: forgotten names
SvenVw Jan 15, 2026
6839005
feat: enable to set if field is a bufferstrip and adjust calculated o…
SvenVw Jan 15, 2026
35e799e
fix: error checking for balance
SvenVw Jan 15, 2026
8006efc
refactor: improve form of field overvied and improve mobile and small…
SvenVw Jan 15, 2026
ccb279c
refactor: rearrange field delete button for more space of the map
SvenVw Jan 16, 2026
f788781
refactor: improve header on smaller screens
SvenVw Jan 16, 2026
3169f0e
tests: fix missing b_bufferstrip
SvenVw Jan 16, 2026
df4f0df
docs: typo
SvenVw Jan 16, 2026
67ca99a
fix: use width of parent
SvenVw Jan 16, 2026
3f17ad2
refactor: Add a visible focus-visible ring to the dropdown trigger
SvenVw Jan 16, 2026
130b2b2
refactor: remove not used console.log
SvenVw Jan 16, 2026
4256066
refactor: prevent potential null with b_area
SvenVw Jan 16, 2026
4dffe82
refactor: handle zero case
SvenVw Jan 16, 2026
050afc1
nitpicks
SvenVw Jan 16, 2026
16a1923
refactor: avoid nesting a button in a link
SvenVw Jan 16, 2026
621f6c3
refactor: Guard against null/zero values in buffer heuristic
SvenVw Jan 16, 2026
2b9611f
refactor: Guard nutrient advice progress when requirements are 0
SvenVw Jan 16, 2026
3b6cf5f
nitpicks
SvenVw Jan 16, 2026
441a1bb
fix: type error
SvenVw Jan 16, 2026
5dbdd9c
test: fix
SvenVw Jan 16, 2026
b7e8dad
Merge branch 'development' into FDM419
SvenVw Jan 19, 2026
d1bdc24
Merge branch 'development' into FDM419
SvenVw Jan 19, 2026
13a8a8f
fix: forgotten renaming
SvenVw Jan 19, 2026
c7a38e6
Update fdm-app/app/routes/farm.$b_id_farm.$calendar.rotation._index.tsx
SvenVw Jan 19, 2026
e01ccdb
fix: type
SvenVw Jan 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/crisp-toys-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@svenvw/fdm-calculator": minor
---

Exclude buffer strips from calculating farm balances and set field values to 0
5 changes: 5 additions & 0 deletions .changeset/huge-cars-peel.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/loud-yaks-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@svenvw/fdm-core": minor
---

Set for existing fields the b_bufferstrip based on the same logic as in determineIfFieldIsBuffer
10 changes: 10 additions & 0 deletions .changeset/mobile-ux-improvements.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/plenty-doors-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@svenvw/fdm-calculator": minor
---

Do not provide nutrient advice for buffer strips by setting the output to 0
5 changes: 5 additions & 0 deletions .changeset/pretty-baboons-ask.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/rich-rabbits-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@svenvw/fdm-calculator": minor
---

For buffer strips set the norm values to 0 as they have no 'plaatsingsruimte'
30 changes: 30 additions & 0 deletions fdm-app/app/components/blocks/balance/buffer-strip-info.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<Button
variant="outline"
size="icon"
className="border cursor-default hover:bg-background"
aria-label="Bufferstroken info"
>
<PanelsRightBottom className="h-4 w-4 text-muted-foreground" />
</Button>
</TooltipTrigger>
<TooltipContent>
<p>Bufferstroken zijn uitgesloten van de balansberekening</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
)
}
37 changes: 37 additions & 0 deletions fdm-app/app/components/blocks/balance/buffer-strip-warning.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="flex items-center justify-center">
<Card className="w-[350px]">
<CardHeader>
<CardTitle>Bufferstrook: uitgesloten van balans</CardTitle>
</CardHeader>
<CardContent>
<div className="text-muted-foreground">
<p>
Dit perceel is gemarkeerd als bufferstrook en wordt
daarom niet meegenomen in de balansberekening.
</p>
</div>
</CardContent>
<CardFooter>
<NavLink to={`../../${calendar}/field/${b_id}/overview`}>
<Button>Naar perceelsinstelling</Button>
</NavLink>
</CardFooter>
</Card>
</div>
)
}
2 changes: 1 addition & 1 deletion fdm-app/app/components/blocks/cultivation/list-plan.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface CultivationField {
b_id: string
b_name: string
b_area: number
b_isproductive: boolean
b_bufferstrip: boolean
}

interface CultivationPlanItem {
Expand Down
6 changes: 3 additions & 3 deletions fdm-app/app/components/blocks/farm/farm-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ interface FarmContentProps {

export function FarmContent({ sidebarItems, children }: FarmContentProps) {
return (
<div className="space-y-6 px-8 pb-0">
<div className="flex flex-col space-y-0 lg:flex-row lg:space-x-4 lg:space-y-0">
<div className="space-y-6 px-2 md:px-4 lg:px-6 pb-0">
<div className="flex flex-col space-y-6 lg:flex-row lg:space-x-4 xl:space-x-8 lg:space-y-0">
{sidebarItems && (
<aside className="lg:w-1/5">
<aside className="lg:w-40 xl:w-48 shrink-0">
<SidebarPage items={sidebarItems} />
</aside>
)}
Expand Down
28 changes: 15 additions & 13 deletions fdm-app/app/components/blocks/farm/farm-title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ interface FarmTitleProps {

export function FarmTitle({ title, description, action }: FarmTitleProps) {
return (
<div className="space-y-6 p-10 pb-0">
<div className="flex items-center gap-4">
<div className="space-y-0.5 ">
<h2 className="text-2xl font-bold tracking-tight">
<div className="space-y-6 p-4 md:px-6 md:py-8 pb-0">
<div className="flex flex-col xl:flex-row xl:items-center gap-4">
<div className="space-y-0.5 min-w-0 flex-1">
<h2 className="text-2xl font-bold tracking-tight truncate xl:whitespace-normal">
{title}
</h2>
<p className="text-muted-foreground">{description}</p>
<p className="text-muted-foreground wrap-break-word">
{description}
</p>
Comment thread
SvenVw marked this conversation as resolved.
</div>
{action && (
<div className="ml-auto">
<NavLink to={action.to} className="ml-auto">
<Button>{action.label}</Button>
</NavLink>
<Button asChild>
<NavLink to={action.to}>{action.label}</NavLink>
</Button>
</div>
)}
</div>
Expand All @@ -37,11 +39,11 @@ export function FarmTitle({ title, description, action }: FarmTitleProps) {

export function FarmTitleSkeleton() {
return (
<div className="space-y-6 p-10 pb-0">
<div className="flex items-center gap-4">
<div className="space-y-0.5 ">
<Skeleton className="h-8 w-64" />
<Skeleton className="h-5 w-96" />
<div className="space-y-6 p-4 md:px-6 md:py-8 pb-0">
<div className="flex flex-col xl:flex-row xl:items-center gap-4">
<div className="space-y-0.5 min-w-0 flex-1">
<Skeleton className="h-8 w-50 md:w-64" />
<Skeleton className="h-5 w-62.5 md:w-96" />
</div>
<div className="ml-auto">
<Skeleton className="h-10 w-24" />
Expand Down
38 changes: 20 additions & 18 deletions fdm-app/app/components/blocks/fertilizer-applications/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,24 @@ export function FertilizerApplicationForm({
method="post"
>
<fieldset disabled={isSubmitting}>
<div className="grid md:grid-cols-2 items-end gap-x-8 gap-y-4 justify-between">
{/* <Label htmlFor="b_name_farm">Meststof</Label> */}
<div className="flex flex-row items-baseline [&>*]:grow">
<Combobox
options={options}
form={form}
name="p_id"
label={
<span>
Meststof
<span className="text-red-500">*</span>
</span>
}
/>
<div className="py-2 [&.py-2]:grow-0">
<div className="grid grid-cols-1 md:grid-cols-2 items-end gap-x-8 gap-y-4">
<div className="flex flex-row items-baseline min-w-0">
<div className="min-w-0 flex-1">
<Combobox
options={options}
form={form}
name="p_id"
label={
<span>
Meststof
<span className="text-red-500">
*
</span>
</span>
}
/>
</div>
<div className="py-2 shrink-0 grow-0">
<p className="invisible">&nbsp;</p>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
<Tooltip>
<TooltipTrigger asChild>
Expand All @@ -190,12 +193,11 @@ export function FertilizerApplicationForm({
className="ml-2"
onClick={handleManageFertilizers}
>
<Plus />
<Plus className="size-4" />
</Button>
</TooltipTrigger>
<TooltipContent>
Voeg een nieuwe meststof toe aan de
keuzelijst
Voeg een nieuwe meststof toe
</TooltipContent>
</Tooltip>
</div>
Expand Down
Loading