Skip to content

Commit

Permalink
Fix for udistub SecurityConfig og endret funksjonalitet på PensjonForm
Browse files Browse the repository at this point in the history
  • Loading branch information
stigus committed Oct 27, 2023
1 parent 64a7e5a commit 0e073e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export const PensjonForm = ({ formikBag }) => {
function kalkulerIdentFyltSyttenAar(values: FormikProps<any>) {
const curDate = new Date()
const alder =
_.has(values, 'pdldata.opprettNyPerson.foedtEtter') &&
_.get(values, 'pdldata.opprettNyPerson.foedtEtter') !== null
_.has(values, 'pdldata.opprettNyPerson.foedtFoer') &&
_.get(values, 'pdldata.opprettNyPerson.foedtFoer') !== null
? curDate.getFullYear() -
// @ts-ignore
new Date(_.get(values, 'pdldata.opprettNyPerson.foedtEtter')).getFullYear()
new Date(_.get(values, 'pdldata.opprettNyPerson.foedtFoer')).getFullYear()
: _.get(values, 'pdldata.opprettNyPerson.alder')
return alder && curDate.getFullYear() - alder + 17
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti

return httpSecurity.build();
}
}
}

0 comments on commit 0e073e8

Please sign in to comment.