Skip to content

Commit

Permalink
🐛 Tar hensyn til dagtype i "vurdering av arbeidstid"-koden
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Hasle <[email protected]>
Co-authored-by: Elias Andreassen Thøgersen <[email protected]>
  • Loading branch information
3 people committed Dec 16, 2024
1 parent e869a5f commit b0d19c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const harPeriodeDagerMedUnder20ProsentTotalGrad = (
return alleOverlappendePerioderPåSkjæringstidspunkt
.flatMap((it) => it.tidslinje)
.filter((it) => dayjs(it.dato, ISO_DATOFORMAT).isBetween(periode.fom, periode.tom, 'day', '[]'))
.filter((dag) => dag?.sykdomsdagtype === 'SYKEDAG')
.some((dag) => (dag?.utbetalingsinfo?.totalGrad ?? 100) < 20);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const useSkalViseUnder20SykdomsgradsvarselSomFeil = () => {
alleSammenfallendeDager.filter((dag) => (dag?.utbetalingsinfo?.totalGrad ?? 0) > 0).length > 0;

const harDagerMedUnder20ProsentTotalGrad =
alleSammenfallendeDager.filter((dag) => (dag?.utbetalingsinfo?.totalGrad ?? 100) < 20).length > 0;
alleSammenfallendeDager
.filter((dag) => dag?.sykdomsdagtype === 'SYKEDAG')
.filter((dag) => (dag?.utbetalingsinfo?.totalGrad ?? 100) < 20).length > 0;

return (
harDagerMedUnder20ProsentTotalGrad &&
Expand Down

0 comments on commit b0d19c2

Please sign in to comment.