Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROD][KAIZEN-0] vis siste endret dato og kilde av kontonummer (#2082) #2084

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ function onDatoChange(props: Props, dato: Partial<Periode>) {
});
}

const tidligsteDato = dayjs().subtract(3, 'years').startOf('year');
const senesteDato: Dayjs = dayjs();

const isoTidligsteDato = tidligsteDato.format(ISO_DATE_STRING_FORMAT);
const isoSenesteDato = senesteDato.format(ISO_DATE_STRING_FORMAT);

const periodeValidering = [
Expand All @@ -55,12 +53,6 @@ const periodeValidering = [
return til.isAfter(senesteDato);
},
feilmelding: `Du kan ikke velge dato etter ${senesteDato.format(INPUT_DATE_STRING_FORMAT)}`
},
{
erUgyldig(fra: Dayjs, til: Dayjs) {
return fra.isBefore(tidligsteDato);
},
feilmelding: `Du kan ikke velge en dato før ${tidligsteDato.format(INPUT_DATE_STRING_FORMAT)}`
}
];

Expand All @@ -81,7 +73,6 @@ function EgendefinertDatoInputs(props: Props) {
const til = props.filter.periode.egendefinertPeriode.til;
const periodeFeilmelding = getDatoFeilmelding(fra, til);
const avgrensninger: DatepickerLimitations = {
minDate: isoTidligsteDato,
maxDate: isoSenesteDato
};

Expand Down
13 changes: 1 addition & 12 deletions src/app/personside/infotabs/utbetalinger/filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import dayjs from 'dayjs';
import { ISO_DATE_STRING_FORMAT } from 'nav-datovelger/lib/utils/dateFormatUtils';
import MediaQueryAwareRenderer from '../../../../../components/MediaQueryAwareRenderer';
import utbetalingerResource from '../../../../../rest/resources/utbetalingerResource';
import IfFeatureToggleOn from '../../../../../components/featureToggle/IfFeatureToggleOn';
import { FeatureToggles } from '../../../../../components/featureToggle/toggleIDs';
import IfFeatureToggleOff from '../../../../../components/featureToggle/IfFeatureToggleOff';
import NyEgendefinertDatoInputs from './NyEgendefinertDatoInputs';

const FiltreringsPanel = styled(Panel)`
padding: ${pxToRem(15)};
Expand Down Expand Up @@ -155,14 +151,7 @@ function Filtrering() {
{radios}
</FieldSet>
{filter.periode.radioValg === PeriodeValg.EGENDEFINERT && (
<>
<IfFeatureToggleOn toggleID={FeatureToggles.BrukUtvidetUtbetalingsSporring}>
<NyEgendefinertDatoInputs filter={filter} updateFilter={updateFilter} />
</IfFeatureToggleOn>
<IfFeatureToggleOff toggleID={FeatureToggles.BrukUtvidetUtbetalingsSporring}>
<EgendefinertDatoInputs filter={filter} updateFilter={updateFilter} />
</IfFeatureToggleOff>
</>
<EgendefinertDatoInputs filter={filter} updateFilter={updateFilter} />
)}
<KnappWrapper>
<Knapp onClick={reloadUtbetalinger} spinner={visSpinner} htmlType="button">
Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions src/app/personside/visittkort-v2/PersondataDomain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ export interface OrganisasjonSomAdressat {
export interface Bankkonto {
kontonummer: string;
banknavn: string | null;
kilde: string | null;
sistEndret: SistEndret | null;
bankkode: string | null;
swift: string | null;
landkode: KodeBeskrivelse<string> | null;
adresse: Adresse | null;
valuta: KodeBeskrivelse<string> | null;
opprettetAv: string | null;
}

export interface TilrettelagtKommunikasjon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ exports[`viser info om bruker i visittkortbody 1`] = `
Endret
15.03.2006

av bruker
</p>
</div>
</div>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CoinsIkon from '../../../../../../svg/Coins';
import { Feilmelding, Normaltekst } from 'nav-frontend-typografi';
import { FormatertKontonummer } from '../../../../../../utils/FormatertKontonummer';
import { Bankkonto as BankkontoInterface } from '../../../PersondataDomain';
import EndringstekstTPS from '../../endringsTekstTPS/EndringstekstTPS';
import KontoEndringsTekst from './KontoEndringstekst';

interface Props {
harFeilendeSystem: boolean;
Expand Down Expand Up @@ -38,7 +38,7 @@ function Bankkonto({ harFeilendeSystem, bankkonto }: Props) {
<Normaltekst>
<FormatertKontonummer kontonummer={bankkonto.kontonummer} />
</Normaltekst>
<EndringstekstTPS sistEndret={bankkonto.sistEndret} />
<KontoEndringsTekst sistEndret={bankkonto.sistEndret} />
</VisittkortElement>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
import * as React from 'react';
import EtikettGraa from '../../../../../components/EtikettGraa';
import { formaterDato } from '../../../../../utils/string-utils';
import { SistEndret } from '../../PersondataDomain';
import EtikettGraa from '../../../../../../components/EtikettGraa';
import { formaterDato } from '../../../../../../utils/string-utils';
import { SistEndret } from '../../../PersondataDomain';

interface Props {
sistEndret: SistEndret | null;
}
function EndringstekstTPS({ sistEndret }: Props) {
function KontoEndringsTekst({ sistEndret }: Props) {
if (!sistEndret) {
return null;
}

const formatertdato = formaterDato(new Date(sistEndret.tidspunkt));
const endretAv = endretAvTekst(sistEndret.ident);

return (
<EtikettGraa>
Endret {formatertdato} {endretAv}
</EtikettGraa>
);
return <EtikettGraa>Endret {formatertdato} </EtikettGraa>;
}
export default EndringstekstTPS;
export default KontoEndringsTekst;

const FOLKEREGISTERET = 'SKD';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as React from 'react';
import EtikettGraa from '../../../../../../components/EtikettGraa';

interface Props {
kilde: string | null;
}
function KontoKildeekst({ kilde }: Props) {
if (!kilde) {
return null;
}

return <EtikettGraa>Kilde {kilde}</EtikettGraa>;
}
export default KontoKildeekst;
1 change: 0 additions & 1 deletion src/components/featureToggle/toggleIDs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export enum FeatureToggles {
BrukSoknadsstatus = 'modiapersonoversikt.soknadsstatus-api',
BrukUtvidetUtbetalingsSporring = 'modiapersonoversikt.utvidet-utbetalings-sporring',
BrukWebworkerPaaInnLogging = 'modiapersonoversikt.web-worker-paa-innlogging',
DebugMeldingsFunksjonalitet = 'modiapersonoversikt.ny-send-melding-container'
}
4 changes: 3 additions & 1 deletion src/mock/persondata/aremark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ export const aremark: Person = {
bankkonto: {
kontonummer: '12345678900',
banknavn: 'DNB ASA',
kilde: 'Kontoregister',
sistEndret: {
ident: '1010800 BD03',
tidspunkt: '2006-03-15T00:00:00' as LocalDateTime,
Expand All @@ -475,7 +476,8 @@ export const aremark: Person = {
valuta: {
kode: 'NOK',
beskrivelse: 'Norske kroner'
}
},
opprettetAv: '1010800 BD03'
},
forelderBarnRelasjon: hentBarnAremark()
};
Loading
Loading