Skip to content

Commit

Permalink
Merge branch 'master' into journalføring-2.0-journalpostinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorGSolberg committed Oct 16, 2023
2 parents f8ac7df + 1e05dd7 commit ba73400
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions build_n_deploy/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const common = {
template: path.join(process.cwd(), 'src/frontend/index.html'),
inject: 'body',
alwaysWriteToDisk: true,
favicon: path.join(process.cwd(), '/src/frontend/favicon.ico'),
}),
new ForkTsCheckerWebpackPlugin({
async: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ import {
} from '../../../App/typer/vedtak';
import { nåværendeÅrOgMånedFormatert } from '../Sanksjon/utils';
import { BodyShortSmall } from '../../../Felles/Visningskomponenter/Tekster';
import { Heading } from '@navikt/ds-react';
import { Heading, Alert } from '@navikt/ds-react';

const SimuleringsContainer = styled.div`
margin: 2rem;
display: flex;
flex-direction: column;
gap: 1rem;
width: fit-content;
`;

const Seksjon = styled.div`
Expand All @@ -27,6 +31,10 @@ const TekstMedMargin = styled(BodyShortSmall)`
margin-top: 1rem;
`;

const StyledAlert = styled(Alert)`
max-width: 60rem;
`;

const mapSimuleringstabellRader = (
simuleringsresultat: ISimulering,
år: number
Expand Down Expand Up @@ -68,9 +76,23 @@ const SimuleringTabellWrapper: React.FC<{
return simuleringsresultat.feilutbetaling > 0;
}

function positivSumAvManuellePosteringer(simuleringsresultat: ISimulering) {
return (
simuleringsresultat.sumManuellePosteringer !== null &&
simuleringsresultat.sumManuellePosteringer !== undefined &&
simuleringsresultat.sumManuellePosteringer > 0
);
}

return (
<SimuleringsContainer>
<SimuleringOversikt simulering={simuleringsresultat} />
{positivSumAvManuellePosteringer(simuleringsresultat) && (
<StyledAlert variant={'warning'}>
Det finnes manuelle posteringer tilknyttet tidligere behandling.
Simuleringsbildet kan derfor være ufullstendig.
</StyledAlert>
)}
<SimuleringTabell
perioder={simuleringTabellRader}
årsvelger={{ valgtÅr: år, settÅr: settÅr, muligeÅr: muligeÅr }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface ISimulering {
forfallsdatoNestePeriode: string;
tidSimuleringHentet: string;
tomSisteUtbetaling: string;
sumManuellePosteringer?: number;
}

export interface ISimuleringPeriode {
Expand Down
Binary file added src/frontend/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions src/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" href="favicon.ico" type="image/png/ico" />
<style>
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');
</style>
Expand Down

0 comments on commit ba73400

Please sign in to comment.