From b6e32aaae6732d297d016f71c769f91e35907511 Mon Sep 17 00:00:00 2001 From: Mattsson <111893710+mattssonn@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:45:10 +0200 Subject: [PATCH] Fix/supportarende input (#261) * fix: update amount input handling to use Controller for better value management * fix: replace Input with Controller for description field in expense items * Update app/(dashboard)/expenses/new/page.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update app/(dashboard)/expenses/new/page.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix: restore broken Controller render wrappers in expense items The previous two web-UI commits stripped the `render={({ field }) => (` wrapper from the description Controller and the `` wrapper from the amount Controller, causing a Turbopack parse error and failed Vercel build. Co-Authored-By: Claude Opus 4.7 (1M context) --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) --- app/(dashboard)/expenses/new/page.tsx | 64 ++++++++++++++++++++------- 1 file changed, 48 insertions(+), 16 deletions(-) diff --git a/app/(dashboard)/expenses/new/page.tsx b/app/(dashboard)/expenses/new/page.tsx index e121d953..dd8ff5c2 100644 --- a/app/(dashboard)/expenses/new/page.tsx +++ b/app/(dashboard)/expenses/new/page.tsx @@ -470,17 +470,35 @@ export default function NewExpensePage() { /> - ( + + )} /> - ( + { + const parsed = parseFloat(e.target.value) + field.onChange(e.target.value === '' || isNaN(parsed) ? 0 : parsed) + }} + /> + )} /> @@ -560,19 +578,33 @@ export default function NewExpensePage() {
- ( + + )} />
- ( + field.onChange(e.target.value === '' ? 0 : parseFloat(e.target.value) || 0)} + /> + )} />