Skip to content

Commit

Permalink
behøver ikke å sjekke at revurdering er valgt når man står i OpprettR…
Browse files Browse the repository at this point in the history
…evurdering-komponenten. Dette blir sjekket lenger opp i komponenthierarkiet
  • Loading branch information
ViktorGSolberg committed Oct 3, 2024
1 parent 33a8097 commit af48107
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const BehandlingstypeSwitch: React.FC<Props> = ({
return (
<OpprettRevurdering
fagsak={fagsak}
valgtBehandlingstype={valgtBehandlingstype}
opprettRevurdering={opprettRevurdering}
settVisModal={settVisModal}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
behandlingsårsakerForRevurdering,
behandlingsårsakTilTekst,
} from '../../../App/typer/Behandlingsårsak';
import { Behandlingstype } from '../../../App/typer/behandlingstype';
import DataViewer from '../../../Felles/DataViewer/DataViewer';
import styled from 'styled-components';
import {
Expand Down Expand Up @@ -61,14 +60,12 @@ const inneholderBarnSomErUgyldige = (barnSomSkalFødes: BarnSomSkalFødes[]) =>

interface Props {
fagsak: Fagsak;
valgtBehandlingstype: Behandlingstype;
opprettRevurdering: (revurderingInnhold: RevurderingInnhold) => void;
settVisModal: (bool: boolean) => void;
}

export const OpprettRevurdering: React.FunctionComponent<Props> = ({
fagsak,
valgtBehandlingstype,
opprettRevurdering,
settVisModal,
}) => {
Expand Down Expand Up @@ -173,14 +170,13 @@ export const OpprettRevurdering: React.FunctionComponent<Props> = ({
}}
>
<option value="">Velg</option>
{valgtBehandlingstype === Behandlingstype.REVURDERING &&
behandlingsårsakerForRevurdering
.filter(skalViseÅrsak)
.map((behandlingsårsak: Behandlingsårsak, index: number) => (
<option key={index} value={behandlingsårsak}>
{behandlingsårsakTilTekst[behandlingsårsak]}
</option>
))}
{behandlingsårsakerForRevurdering
.filter(skalViseÅrsak)
.map((behandlingsårsak: Behandlingsårsak, index: number) => (
<option key={index} value={behandlingsårsak}>
{behandlingsårsakTilTekst[behandlingsårsak]}
</option>
))}
</Select>
<DatoContainer>
<Datovelger
Expand Down

0 comments on commit af48107

Please sign in to comment.