From 41ff9cdd9c442714c05248539ca13f8f20920ec8 Mon Sep 17 00:00:00 2001 From: Betsy Carina Traran Date: Fri, 16 Feb 2024 12:11:49 +0100 Subject: [PATCH] Vis antall verdier i request + smaafix --- .../main/js/src/pages/tenorSoek/SoekForm.tsx | 93 +++++++++++++++++-- .../FolkeregisteretAdresse.tsx | 2 +- .../FolkeregisteretRelasjoner.tsx | 8 +- .../soekFormPartials/InntektAordningen.tsx | 2 +- 4 files changed, 91 insertions(+), 14 deletions(-) diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/SoekForm.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/SoekForm.tsx index 650457d5ef4..1c8d597daab 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/SoekForm.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/SoekForm.tsx @@ -77,7 +77,9 @@ export const SoekForm = ({ request, setRequest, mutate }) => { let antall = 0 liste.forEach((item) => { const attr = _.get(formikBag.values, item) - if (attr || attr === false) { + if (Array.isArray(attr)) { + antall += attr.length + } else if (attr || attr === false) { antall++ } }) @@ -94,7 +96,25 @@ export const SoekForm = ({ request, setRequest, mutate }) => { -
+
{ -
+
{ -
+
{ -
+
{ -
+
{ -
+
{ -
+
@@ -51,7 +51,7 @@ export const FolkeregisteretRelasjoner = ({ formikBag, handleChange, getValue }: handleChange(val?.target?.value || null, 'relasjoner.relasjonMedFoedselsaar.fraOgMed') } visHvisAvhuket={false} - fastfield={false} + // fastfield={false} />
diff --git a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx index 9c992f1e019..c426971482d 100644 --- a/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx +++ b/apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/InntektAordningen.tsx @@ -44,7 +44,7 @@ export const InntektAordningen = ({ formikBag, handleChange, handleChangeList, g handleChange(val?.target?.value || null, 'inntekt.opplysningspliktig') } visHvisAvhuket={false} - fastfield={false} + // fastfield={false} />