Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Informasjonsboks (#487)
Browse files Browse the repository at this point in the history
* Informasjonsboks

* Viser kalge info kun for DP
  • Loading branch information
igorweber authored Oct 25, 2023
1 parent a4c1a36 commit b1ab4ea
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/app/sider/innsending/4-kvitteringsside/kvittering.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { Innholdstittel } from 'nav-frontend-typografi';
import Sprakvelger from '../../../components/sprakvelger/sprakvelger';
import { FormattedMessage } from 'react-intl';
import { FormattedHTMLMessage, FormattedMessage } from 'react-intl';
import NavKnapp, { KnappTyper } from '../../../components/knapp/navKnapp';
import { RouteComponentProps } from 'react-router-dom';
import { RootState } from '../../../store/configureStore';
Expand Down Expand Up @@ -40,6 +40,7 @@ import NavFrontendSpinner from 'nav-frontend-spinner';
import { loggAktivitet } from '../../../utils/amplitudeUtils';
import { finnTypeYtelsePostfix, TypeYtelse } from '../../../utils/teksterUtil';
import { Location } from 'history';
import Panel from "nav-frontend-paneler";

interface MapStateToProps {
router: Router;
Expand Down Expand Up @@ -242,14 +243,20 @@ class Kvittering extends React.Component<KvitteringsProps, {}> {

innhold = (nesteInnsendingstype?: Innsendingstyper) => {
const { innsendingstype, innsending, aktivtMeldekort } = this.props;
const typeYtelse = finnTypeYtelsePostfix(aktivtMeldekort.meldegruppe);
const typeYtelsePostfix = finnTypeYtelsePostfix(aktivtMeldekort.meldegruppe);

return (
<>
<AlertStripe type={'suksess'} className="alertSendt noPrint">
<FormattedMessage id={'overskrift.meldekort.sendt'} />
</AlertStripe>

{typeYtelsePostfix === TypeYtelse.DAGPENGER &&
<Panel border={true} className={"alertSendt"}>
<FormattedHTMLMessage id={"sendt.klagerettigheterInfo" + typeYtelsePostfix} />
</Panel>
}

<section className="seksjon flex-innhold tittel-sprakvelger noPrint">
<Innholdstittel tag="h2">
<FormattedMessage id="overskrift.steg4" />
Expand All @@ -261,7 +268,7 @@ class Kvittering extends React.Component<KvitteringsProps, {}> {
<Meldekortdetaljer
aktivtMeldekort={this.props.aktivtMeldekort}
meldekortdetaljer={innsending.meldekortdetaljer}
typeYtelsePostfix={typeYtelse}
typeYtelsePostfix={typeYtelsePostfix}
/>
</section>
{innsendingstype === Innsendingstyper.INNSENDING &&
Expand All @@ -283,7 +290,7 @@ class Kvittering extends React.Component<KvitteringsProps, {}> {
} = this.returnerPropsVerdier();

const { personInfo, person, loading, aktivtMeldekort } = this.props;
const typeYtelse = finnTypeYtelsePostfix(aktivtMeldekort.meldegruppe);
const typeYtelsePostfix = finnTypeYtelsePostfix(aktivtMeldekort.meldegruppe);

if (loading) {
return (
Expand All @@ -294,13 +301,13 @@ class Kvittering extends React.Component<KvitteringsProps, {}> {
}

if (
typeYtelse === TypeYtelse.AAP &&
typeYtelsePostfix === TypeYtelse.AAP &&
nesteAktivtMeldekort == undefined &&
window['hj']
) {
// @ts-ignore
window.hj('trigger', 'meldekortAAP');
} else if (typeYtelse === TypeYtelse.TILTAKSPENGER && window['hj']) {
} else if (typeYtelsePostfix === TypeYtelse.TILTAKSPENGER && window['hj']) {
// @ts-ignore
window.hj('trigger', 'meldekortTP');
}
Expand Down

0 comments on commit b1ab4ea

Please sign in to comment.