Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Millad committed Mar 8, 2024
2 parents 78f14fc + a068237 commit 102c6fc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/AvtaleSide/steg/VarighetSteg/InfoArenaOppryddingAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import moment from 'moment/moment';
import { Alert, BodyShort } from '@navikt/ds-react';
import { TiltaksType } from '@/types/avtale';
import BEMHelper from '@/utils/bem';
import { Alert, BodyShort } from '@navikt/ds-react';
import moment from 'moment';
import React from 'react';

interface Props {
tiltakstype: TiltaksType;
Expand Down
10 changes: 5 additions & 5 deletions src/AvtaleSide/steg/VarighetSteg/VarighetInputfelt.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useContext } from 'react';
import { AvtaleContext } from '@/AvtaleProvider';
import InfoBoks from '@/AvtaleSide/steg/VarighetSteg/InfoBoks/InfoBoks';
import StillingsprosentInput from '@/AvtaleSide/steg/VarighetSteg/StillingsprosentInput/StillingsprosentInput';
import { Column, Row } from '@/komponenter/NavGrid/Grid';
import PakrevdInput from '@/komponenter/PakrevdInput/PakrevdInput';
import InfoBoks from '@/AvtaleSide/steg/VarighetSteg/InfoBoks/InfoBoks';
import BEMHelper from '@/utils/bem';
import { AvtaleContext } from '@/AvtaleProvider';
import moment from 'moment/moment';
import { accurateHumanize } from '@/utils/datoUtils';
import { Column, Row } from '@/komponenter/NavGrid/Grid';
import moment from 'moment';
import React, { useContext } from 'react';

interface Props {
className: string;
Expand Down
20 changes: 10 additions & 10 deletions src/AvtaleSide/steg/VarighetSteg/VarighetSteg.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { AvtaleContext } from '@/AvtaleProvider';
import InfoArenaOppryddingAlert from '@/AvtaleSide/steg/VarighetSteg/InfoArenaOppryddingAlert';
import VarighetInfoVeileder from '@/AvtaleSide/steg/VarighetSteg/VarighetInfoVeileder';
import VarighetIngress from '@/AvtaleSide/steg/VarighetSteg/VarighetIngress';
import VarighetInputfelt from '@/AvtaleSide/steg/VarighetSteg/VarighetInputfelt';
import VarighetTilbakeTidAlert from '@/AvtaleSide/steg/VarighetSteg/VarighetTilbakeTidAlert';
import { InnloggetBrukerContext } from '@/InnloggingBoundary/InnloggingBoundary';
import SkjemaTittel from '@/komponenter/form/SkjemaTittel';
import Innholdsboks from '@/komponenter/Innholdsboks/Innholdsboks';
import LagreKnapp from '@/komponenter/LagreKnapp/LagreKnapp';
import { Column, Container, Row } from '@/komponenter/NavGrid/Grid';
import { genererFnrdatostringFraFnr, VellykketGenerertIsoDatoString } from '@/utils/fnrUtils';
import moment from 'moment';
import 'moment/locale/nb';
import { FunctionComponent, useContext, useEffect, useState } from 'react';
import Datovelger from '@/komponenter/datovelger/Datovelger';
import SkjemaTittel from '@/komponenter/form/SkjemaTittel';
import BEMHelper from '@/utils/bem';
import VarighetIngress from '@/AvtaleSide/steg/VarighetSteg/VarighetIngress';
import VarighetInfoVeileder from '@/AvtaleSide/steg/VarighetSteg/VarighetInfoVeileder';
import InfoArenaOppryddingAlert from '@/AvtaleSide/steg/VarighetSteg/InfoArenaOppryddingAlert';
import VarighetTilbakeTidAlert from '@/AvtaleSide/steg/VarighetSteg/VarighetTilbakeTidAlert';
import VarighetInputfelt from '@/AvtaleSide/steg/VarighetSteg/VarighetInputfelt';
import { VellykketGenerertIsoDatoString, genererFnrdatostringFraFnr } from '@/utils/fnrUtils';
import moment from 'moment';
import 'moment/dist/locale/nb';
import { FunctionComponent, useContext, useEffect, useState } from 'react';
import './varighetSteg.less';

const VarighetSteg: FunctionComponent = () => {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/datoUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import moment from 'moment';
import 'moment/dist/locale/nb';
moment.locale('nb');

export const datoIkkeTilbakeITid = (dato: Date) => {
return moment().isSameOrBefore(dato, 'date');
Expand Down
4 changes: 2 additions & 2 deletions src/utils/fnrUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import moment from 'moment';
import { ChangeEvent, Dispatch, SetStateAction } from 'react';
import moment from 'moment/moment';

/** Beregner gyldighet av fødselsnr med utgangspunkt i mod11.
* @link https://no.wikipedia.org/wiki/F%C3%B8dselsnummer
Expand Down Expand Up @@ -122,4 +122,4 @@ export const erUnder18 = (fnr: string): boolean => {
return idag.diff(bursdagDatoMoment, 'years') < 18;
};

export { validerFnr, genererFnrdatostringFraFnr };
export { genererFnrdatostringFraFnr, validerFnr };

0 comments on commit 102c6fc

Please sign in to comment.