Skip to content

Commit

Permalink
vis beregningsbegrunnelse i vedtakene
Browse files Browse the repository at this point in the history
  • Loading branch information
ramnav990 committed Nov 24, 2022
1 parent 6e8f3c3 commit 23096e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ import { Utbetalingssimulering } from './simulering/simulering';
const BeregningOgSimulering = (props: {
beregning: Nullable<Beregning>;
simulering: Nullable<Simulering>;
tittel?: string;
childrenOverBeregning?: React.ReactNode;
childrenUnderBeregning?: React.ReactNode;
}) => {
const { formatMessage } = useI18n({ messages: bosSimulering });
return (
<Oppsummeringspanel
tittel={formatMessage('heading')}
tittel={props.tittel ?? formatMessage('heading')}
farge={Oppsummeringsfarge.Grønn}
ikon={Oppsummeringsikon.Kalkulator}
>
Expand Down
41 changes: 7 additions & 34 deletions src/components/oppsummeringAvVedtak/OppsummeringAvVedtak.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import * as RemoteData from '@devexperts/remote-data-ts';
import { BodyShort, Button, Heading, Loader, Panel } from '@navikt/ds-react';
import { BodyShort, Button, Heading, Loader } from '@navikt/ds-react';
import React, { useEffect } from 'react';
import { useOutletContext } from 'react-router-dom';

import * as DokumentApi from '~src/api/dokumentApi';
import { hentTidligereGrunnlagsdataForVedtak } from '~src/api/revurderingApi';
import ApiErrorAlert from '~src/components/apiErrorAlert/ApiErrorAlert';
import VisBeregning from '~src/components/beregningOgSimulering/beregning/VisBeregning';
import { Utbetalingssimulering } from '~src/components/beregningOgSimulering/simulering/simulering';
import { FormkravInfo } from '~src/components/oppsummeringAvKlage/OppsummeringAvKlage';
import { OppsummeringPar, OppsummeringsParSortering } from '~src/components/oppsummeringspar/Oppsummeringsverdi';
import Oppsummeringspanel, {
Expand Down Expand Up @@ -40,6 +38,8 @@ import {
import { søknadMottatt } from '~src/utils/søknad/søknadUtils';
import { getVedtaketsbehandling, getVedtakstype, harVedtaketBrevSomSendesUt } from '~src/utils/VedtakUtils';

import BeregningOgSimulering from '../beregningOgSimulering/BeregningOgSimulering';

import messages from './OppsummeringAvVedtak-nb';
import * as styles from './OppsummeringAvVedtak.module.less';

Expand Down Expand Up @@ -152,38 +152,11 @@ const OppsummeringAvVedtak = (props: { vedtakId?: string; vedtak?: Vedtak }) =>
)}
</Oppsummeringspanel>

<Oppsummeringspanel
ikon={Oppsummeringsikon.Kalkulator}
farge={Oppsummeringsfarge.Grønn}
<BeregningOgSimulering
tittel={formatMessage('oppsummeringspanel.vedtak.beregningOgSimulering')}
>
<div className={styles.beregningOgSimuleringsContainer}>
<div className={styles.column}>
<Heading level="3" size="small" spacing>
{formatMessage('vedtak.beregning')}
</Heading>
<Panel border>
{vedtak.beregning ? (
<VisBeregning beregning={vedtak.beregning} utenTittel />
) : (
formatMessage('vedtak.beregning.ingen')
)}
</Panel>
</div>
<div className={styles.column}>
<Heading level="3" size="small" spacing>
{formatMessage('vedtak.simulering')}
</Heading>
<Panel border>
{vedtak.simulering ? (
<Utbetalingssimulering simulering={vedtak.simulering} utenTittel />
) : (
formatMessage('vedtak.simulering.ingen')
)}
</Panel>
</div>
</div>
</Oppsummeringspanel>
beregning={vedtak.beregning}
simulering={vedtak.simulering}
/>
</div>
);
};
Expand Down

0 comments on commit 23096e0

Please sign in to comment.