From 9a846611618ef718c982ed851656f5b7f425c5bb Mon Sep 17 00:00:00 2001 From: abrha Date: Wed, 13 Nov 2024 16:02:47 +0100 Subject: [PATCH] [KAIZEN-0] fjern komponenter som er ikke i bruk --- package.json | 2 +- src/app/brukerprofil/BrukeprofilSide.test.tsx | 15 --- src/app/brukerprofil/BrukerprofilSide.tsx | 32 ----- .../BrukeprofilSide.test.tsx.snap | 71 ---------- .../modal/InstillingerModalFormLabels.tsx | 3 - .../decoratorprops.ts | 11 -- .../personside/dialogpanel/RollerUtils.tsx | 3 - .../fortsettDialog/BrukerKanSvare.tsx | 46 ------- .../dialogpanel/nyFellesStyling.tsx | 21 +-- .../dialogpanel/sendMelding/FeilMeldinger.ts | 3 - .../sendMelding/standardTekster/domain.ts | 3 - ...ykefraversoppfolgingEkspanderbartPanel.tsx | 4 +- .../bankkonto/KontoEndringstekst.tsx | 62 --------- .../bankkonto/KontoKildeTekst.tsx | 14 -- .../Tilbakemelding/TilbakemeldingFab.tsx | 97 -------------- .../Tilbakemelding/TilbakemeldingIkoner.ts | 17 --- .../Tilbakemelding/TilbakemeldingPopup.tsx | 121 ------------------ .../Tilbakemelding/TilbakemeldingValg.tsx | 70 ---------- src/components/popup-boxes/popup-boxes.tsx | 79 +----------- src/mock/meldinger/merk-mock.ts | 5 - .../oppdateringslogg/oppdateringslogg-mock.ts | 47 ------- src/mock/oppgave-mock.ts | 36 ------ .../saksoversikt/behandlingskjeder-mock.ts | 28 ---- src/mock/veilderRoller-mock.ts | 15 --- src/models/kontaktinformasjon.ts | 11 -- src/models/personadresse.ts | 54 -------- src/models/saksoversikt/sakstema.ts | 5 - src/models/sikkerhetstiltak.ts | 7 - src/models/temagrupper.ts | 29 ----- src/models/tid.ts | 7 - src/models/veilederRoller.ts | 3 - src/redux/gjeldendeBruker/selectors.ts | 5 - src/rest/resources/innkrevingsKravResource.ts | 22 ---- src/rest/utils/utils.ts | 10 -- src/svg/PrinterSVG.jsx | 2 +- src/svg/Utropstegn.jsx | 2 +- src/utils/hooks/use-interval.ts | 12 -- src/utils/hooks/use-toggle.ts | 9 -- src/utils/hooks/useTimer.ts | 13 -- src/utils/hotjar.ts | 50 -------- src/utils/mapEnumToTabProps.ts | 13 -- 41 files changed, 7 insertions(+), 1052 deletions(-) delete mode 100644 src/app/brukerprofil/BrukeprofilSide.test.tsx delete mode 100644 src/app/brukerprofil/BrukerprofilSide.tsx delete mode 100644 src/app/brukerprofil/__snapshots__/BrukeprofilSide.test.tsx.snap delete mode 100644 src/app/personside/dialogpanel/RollerUtils.tsx delete mode 100644 src/app/personside/dialogpanel/fortsettDialog/BrukerKanSvare.tsx delete mode 100644 src/app/personside/dialogpanel/sendMelding/FeilMeldinger.ts delete mode 100644 src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoKildeTekst.tsx delete mode 100644 src/components/Tilbakemelding/TilbakemeldingFab.tsx delete mode 100644 src/components/Tilbakemelding/TilbakemeldingIkoner.ts delete mode 100644 src/components/Tilbakemelding/TilbakemeldingPopup.tsx delete mode 100644 src/components/Tilbakemelding/TilbakemeldingValg.tsx delete mode 100644 src/mock/meldinger/merk-mock.ts delete mode 100644 src/mock/oppdateringslogg/oppdateringslogg-mock.ts delete mode 100644 src/mock/oppgave-mock.ts delete mode 100644 src/mock/saksoversikt/behandlingskjeder-mock.ts delete mode 100644 src/mock/veilderRoller-mock.ts delete mode 100644 src/models/kontaktinformasjon.ts delete mode 100644 src/models/personadresse.ts delete mode 100644 src/models/veilederRoller.ts delete mode 100644 src/redux/gjeldendeBruker/selectors.ts delete mode 100644 src/rest/resources/innkrevingsKravResource.ts delete mode 100644 src/rest/utils/utils.ts delete mode 100644 src/utils/hooks/use-interval.ts delete mode 100644 src/utils/hooks/use-toggle.ts delete mode 100644 src/utils/hooks/useTimer.ts delete mode 100644 src/utils/hotjar.ts delete mode 100644 src/utils/mapEnumToTabProps.ts diff --git a/package.json b/package.json index 30aae6159..9a38e9e15 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "start:dev": "VITE_MOCK_ENABLED=false vite", "build": "vite build", "test": "vitest", - "lint": "eslint . && prettier --check src/**/*.{ts,js,tsx}", + "lint": "eslint . --fix && prettier --check src/**/*.{ts,js,tsx}", "lint-staged": "lint-staged", "format": "prettier --write src/**/*.{ts,js,tsx}", "generate": "openapi-typescript https://modiapersonoversikt-api.intern.dev.nav.no/modiapersonoversikt-api/v3/api-docs -o src/generated/modiapersonoversikt-api.d.ts", diff --git a/src/app/brukerprofil/BrukeprofilSide.test.tsx b/src/app/brukerprofil/BrukeprofilSide.test.tsx deleted file mode 100644 index 42ff40574..000000000 --- a/src/app/brukerprofil/BrukeprofilSide.test.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import * as React from 'react'; -import { render } from '@testing-library/react'; - -import BrukerprofilSide from './BrukerprofilSide'; -import TestProvider from '../../test/Testprovider'; - -test('Smoketeste brukerprofil', () => { - const { container } = render( - - - - ); - - expect(container).toMatchSnapshot(); -}); diff --git a/src/app/brukerprofil/BrukerprofilSide.tsx b/src/app/brukerprofil/BrukerprofilSide.tsx deleted file mode 100644 index d6ebdd18a..000000000 --- a/src/app/brukerprofil/BrukerprofilSide.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from 'react'; -import styled from 'styled-components'; -import { loggEvent } from '../../utils/logger/frontendLogger'; -import { useOnMount } from '../../utils/customHooks'; -import { AlertStripeInfo } from 'nav-frontend-alertstriper'; -import useUrlNyPersonforvalter from './useUrlNyPersonforvalter'; -import { LenkepanelBase } from 'nav-frontend-lenkepanel/lib'; - -const NyBrukerprofilStyling = styled.div` - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - flex-grow: 1; - > *:first-child { - margin-bottom: 1rem; - } -`; - -function BrukerprofilSide() { - useOnMount(() => loggEvent('Sidevisning', 'Brukerprofil')); - const urlNyPersonForvalter = useUrlNyPersonforvalter(); - - return ( - - Redigering av brukerprofil er flyttet - Gå til den nye personforvalteren - - ); -} - -export default BrukerprofilSide; diff --git a/src/app/brukerprofil/__snapshots__/BrukeprofilSide.test.tsx.snap b/src/app/brukerprofil/__snapshots__/BrukeprofilSide.test.tsx.snap deleted file mode 100644 index 8c2de9e80..000000000 --- a/src/app/brukerprofil/__snapshots__/BrukeprofilSide.test.tsx.snap +++ /dev/null @@ -1,71 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Smoketeste brukerprofil 1`] = ` -.c0 { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - flex-grow: 1; -} - -.c0 >*:first-child { - margin-bottom: 1rem; -} - -
-
-
- - - info - - - - - - - - -
- Redigering av brukerprofil er flyttet -
-
- - Gå til den nye personforvalteren - - -
-
-`; diff --git a/src/app/innstillinger/modal/InstillingerModalFormLabels.tsx b/src/app/innstillinger/modal/InstillingerModalFormLabels.tsx index fffca5d84..6527d660a 100644 --- a/src/app/innstillinger/modal/InstillingerModalFormLabels.tsx +++ b/src/app/innstillinger/modal/InstillingerModalFormLabels.tsx @@ -9,9 +9,6 @@ const Label = styled.span` .popover { max-width: 30rem; } - .hjelpetekst__apneknapp { - margin-left: 0.5rem; - } `; export const OppgaveDestinasjonLabel = ( diff --git a/src/app/internarbeidsflatedecorator/decoratorprops.ts b/src/app/internarbeidsflatedecorator/decoratorprops.ts index b4f054c82..5759a8aa6 100644 --- a/src/app/internarbeidsflatedecorator/decoratorprops.ts +++ b/src/app/internarbeidsflatedecorator/decoratorprops.ts @@ -1,20 +1,9 @@ import { Enhet } from '../../rest/resources/saksbehandlersEnheterResource'; -export const RESET_VALUE = '\u0000'; - interface Markup { etterSokefelt?: string; } -export enum EnhetDisplay { - ENHET = 'ENHET', - ENHET_VALG = 'ENHET_VALG' -} - -export enum FnrDisplay { - SOKEFELT = 'SOKEFELT' -} - type KeyDescriptionObject = { char: string; altKey?: boolean; diff --git a/src/app/personside/dialogpanel/RollerUtils.tsx b/src/app/personside/dialogpanel/RollerUtils.tsx deleted file mode 100644 index c17d4c6b0..000000000 --- a/src/app/personside/dialogpanel/RollerUtils.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export enum SaksbehandlerRoller { - HentOppgave = '0000-GA-BD06_HentOppgave' -} diff --git a/src/app/personside/dialogpanel/fortsettDialog/BrukerKanSvare.tsx b/src/app/personside/dialogpanel/fortsettDialog/BrukerKanSvare.tsx deleted file mode 100644 index 6f90c21e6..000000000 --- a/src/app/personside/dialogpanel/fortsettDialog/BrukerKanSvare.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from 'react'; -import Oppgaveliste from '../sendMelding/Oppgaveliste'; -import DialogpanelVelgSak from '../sendMelding/DialogpanelVelgSak'; -import styled from 'styled-components'; -import { FortsettDialogValidator } from './validatorer'; -import { FortsettDialogState } from './FortsettDialogTypes'; -import { SkjemaelementFeilmelding } from 'nav-frontend-skjema'; -import { JournalforingsSakIdentifikator } from '../../infotabs/meldinger/traadvisning/verktoylinje/journalforing/JournalforingPanel'; - -interface Props { - formState: FortsettDialogState; - updateFormState: (change: Partial) => void; - visVelgSak: boolean; - eksisterendeSaker: Array; -} - -const Style = styled.div` - > *:not(:first-child) { - margin-top: 1rem; - } -`; - -function BrukerKanSvare(props: Props) { - const visFeilmelding = !FortsettDialogValidator.sak(props.formState) && props.formState.visFeilmeldinger; - return ( - - ); -} - -export default BrukerKanSvare; diff --git a/src/app/personside/dialogpanel/nyFellesStyling.tsx b/src/app/personside/dialogpanel/nyFellesStyling.tsx index 217bda92a..e5dd4de14 100644 --- a/src/app/personside/dialogpanel/nyFellesStyling.tsx +++ b/src/app/personside/dialogpanel/nyFellesStyling.tsx @@ -1,5 +1,5 @@ import styled from 'styled-components'; -import { pxToRem, theme } from '../../../styles/personOversiktTheme'; +import { theme } from '../../../styles/personOversiktTheme'; import { AlertStripeFeil, AlertStripeInfo, AlertStripeSuksess } from 'nav-frontend-alertstriper'; import * as React from 'react'; import KnappBase from 'nav-frontend-knapper'; @@ -108,22 +108,3 @@ export function DialogpanelKvittering(props: { ); } - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const VelgDialogtypeStyle = styled.div` - display: flex; - justify-content: flex-start; - flex-wrap: wrap; - > * { - margin-top: 0.3rem; - } - > *:not(:last-child) { - margin-right: 1rem; - } -`; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const KategoriSkille = styled.div` - background-color: ${theme.color.kategori}; - padding: 0.2rem ${pxToRem(15)}; -`; diff --git a/src/app/personside/dialogpanel/sendMelding/FeilMeldinger.ts b/src/app/personside/dialogpanel/sendMelding/FeilMeldinger.ts deleted file mode 100644 index 0691178c2..000000000 --- a/src/app/personside/dialogpanel/sendMelding/FeilMeldinger.ts +++ /dev/null @@ -1,3 +0,0 @@ -export enum feilMeldinger { - JOURNALFORING_FEILET = 'Spørsmålet ditt er lagt men journalføring feilet. Prøv manuelt journalføring etter noen minutter.' -} diff --git a/src/app/personside/dialogpanel/sendMelding/standardTekster/domain.ts b/src/app/personside/dialogpanel/sendMelding/standardTekster/domain.ts index 70cc28341..03ecb4365 100644 --- a/src/app/personside/dialogpanel/sendMelding/standardTekster/domain.ts +++ b/src/app/personside/dialogpanel/sendMelding/standardTekster/domain.ts @@ -13,9 +13,6 @@ export enum Locale { ur = 'ur' } -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const LocaleValues: Array = Object.keys(Locale) as Array; - export const localeString: { [key in Locale]: string } = { nb_NO: 'Norsk (Bokmål)', nn_NO: 'Norsk (Nynorsk)', diff --git a/src/app/personside/infotabs/oppfolging/SykefraversoppfolgingEkspanderbartPanel.tsx b/src/app/personside/infotabs/oppfolging/SykefraversoppfolgingEkspanderbartPanel.tsx index c9e910977..0d47765c2 100644 --- a/src/app/personside/infotabs/oppfolging/SykefraversoppfolgingEkspanderbartPanel.tsx +++ b/src/app/personside/infotabs/oppfolging/SykefraversoppfolgingEkspanderbartPanel.tsx @@ -18,8 +18,8 @@ function SykefraversoppfolgingTabell(props: { syfoPunkter: SyfoPunkt[] }) { const sortertPaDato = props.syfoPunkter.sort(datoSynkende((syfoPunkt) => syfoPunkt.dato)); const tableHeaders = ['Innen', 'Hendelse', 'Status']; - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const tableRows = sortertPaDato.map((syfopunkt, index) => [ + + const tableRows = sortertPaDato.map((syfopunkt) => [ formatterDato(syfopunkt.dato), syfopunkt.syfoHendelse, syfopunkt.status diff --git a/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoEndringstekst.tsx b/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoEndringstekst.tsx index ba3010ba0..01f8aa6e5 100644 --- a/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoEndringstekst.tsx +++ b/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoEndringstekst.tsx @@ -15,65 +15,3 @@ function KontoEndringsTekst({ sistEndret }: Props) { return Endret {formatertdato} ; } export default KontoEndringsTekst; - -const FOLKEREGISTERET = 'SKD'; - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function endretAvTekst(rawString: string): string { - if (endretAvBruker(rawString) || endretIPSelv(rawString)) { - return 'av bruker'; - } else if ( - endretIFagsystem(rawString) || - endretIPesys(rawString) || - endretIArena(rawString) || - endretAvKonvertItSystem(rawString) - ) { - return 'av NAV'; - } else if (rawString.match(`AAA2101, ${FOLKEREGISTERET}`)) { - return 'av Skatteetaten'; - } else if (endretIFolkeregisteret(rawString)) { - return 'i Folkeregisteret'; - } else { - return rawString; - } -} - -function endretIFolkeregisteret(rawString: string) { - return ( - rawString.match(FOLKEREGISTERET) || - rawString.toLowerCase() === 'folkeregisteret' || - rawString.toLowerCase() === 'freg' - ); -} - -function endretIFagsystem(rawString: string) { - return rawString && (endretAvNyTypeIdent(rawString) || endretAvGammelTypeIdent(rawString)); -} - -function endretAvNyTypeIdent(rawString: string) { - return rawString.toUpperCase().match('[A-Z][0-9]{6}'); -} - -function endretAvGammelTypeIdent(rawString: string) { - return rawString.toUpperCase().match('[A-Z]{3}[0-9]{4}, [A-Z]{2}[0-9]{2}'); -} - -function endretIPSelv(rawString: string) { - return rawString.match('Srvpsel'); -} - -function endretIArena(rawString: string) { - return rawString.match(/arena/i); -} - -function endretAvKonvertItSystem(rawString: string) { - return rawString.match(/konvert, IT[0-9]{2}/i); -} - -function endretIPesys(rawString: string) { - return rawString.match('srvPensjon'); -} - -function endretAvBruker(rawString: string) { - return rawString.match('[0-9]{7}'); -} diff --git a/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoKildeTekst.tsx b/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoKildeTekst.tsx deleted file mode 100644 index 14783ed0b..000000000 --- a/src/app/personside/visittkort-v2/body/kontaktinformasjon/bankkonto/KontoKildeTekst.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import * as React from 'react'; -import EtikettGraa from '../../../../../../components/EtikettGraa'; - -interface Props { - kilde: string | null; -} -function KontoKildeekst({ kilde }: Props) { - if (!kilde) { - return null; - } - - return Kilde {kilde}; -} -export default KontoKildeekst; diff --git a/src/components/Tilbakemelding/TilbakemeldingFab.tsx b/src/components/Tilbakemelding/TilbakemeldingFab.tsx deleted file mode 100644 index c36b82655..000000000 --- a/src/components/Tilbakemelding/TilbakemeldingFab.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import React, { useCallback } from 'react'; -import styled from 'styled-components'; -import { useClickOutside } from '../../utils/customHooks'; -import TilbakemeldingPopup from './TilbakemeldingPopup'; -import theme, { pxToRem } from '../../styles/personOversiktTheme'; -import { loggEvent } from '../../utils/logger/frontendLogger'; -import { apneIkon, lukkeIkon } from './TilbakemeldingIkoner'; - -const localstoragePrefix = 'modiapersonoversikt__tilbakemelding__'; - -const TilbakemeldingWrapper = styled.div``; -const TilbakemeldingBtn = styled.button` - position: fixed; - bottom: ${theme.margin.px20}; - right: ${theme.margin.px20}; - width: ${pxToRem(64)}; - height: ${pxToRem(64)}; - padding-top: ${theme.margin.px10}; - border-radius: 50%; - border: none; - background-color: white; - box-shadow: 0 ${pxToRem(6)} ${pxToRem(10)} 0 ${theme.color.graaSkrift}; - transition: all 0.1s ease-in-out; - z-index: 999; - - &:hover { - box-shadow: 0 ${pxToRem(6)} ${pxToRem(14)} 0 ${theme.color.graaSkrift}; - transform: scale(1.15); - cursor: pointer; - } - - &:focus { - ${theme.focus} - } -`; - -interface Props { - temaId: string; - sporsmal: string; - kommentarLabel: string; -} - -function tilfredshetErValg(tilfredshet: number) { - return tilfredshet >= 0; -} - -function TilbakemeldingFab(props: Props) { - const localStorageKey = `${localstoragePrefix}${props.temaId}`; - const erBesvartFraLocalStorage = Boolean(window.localStorage.getItem(localStorageKey)); - const [erBesvart, settErBesvart] = React.useState(erBesvartFraLocalStorage); - const [erApen, settErApen] = React.useState(false); - const wrapper = React.createRef(); - - const clickOutsideHandler = useCallback(() => settErApen(false), [settErApen]); - useClickOutside(wrapper, clickOutsideHandler); - - if (erBesvart && !erApen) { - return null; - } - - const settBesvartCallback = (tilfredshet: number, kommentar: string) => { - settErBesvart(true); - window.localStorage.setItem(localStorageKey, 'true'); - - if (tilfredshetErValg(tilfredshet)) { - loggEvent( - 'tilbakemelding', - props.temaId, - {}, - { - tilfredshet, - kommentar - } - ); - } else { - settErApen(false); - } - }; - - const ikon = erApen ? lukkeIkon : apneIkon; - return ( - - - settErApen(!erApen)}> - - {erApen ? 'Lukk tilbakemelding' : 'Vis tilbakemelding'} - - - ); -} -export default TilbakemeldingFab; diff --git a/src/components/Tilbakemelding/TilbakemeldingIkoner.ts b/src/components/Tilbakemelding/TilbakemeldingIkoner.ts deleted file mode 100644 index 3fb9a19e5..000000000 --- a/src/components/Tilbakemelding/TilbakemeldingIkoner.ts +++ /dev/null @@ -1,17 +0,0 @@ -export const lukkeIkon = - 'data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8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3yff8DPl592hvg8xfxl3mzXNSWR1+/ff/x89fvP+Ix15aVBoDaqFEaamrjU21Qq60EasvHijWnsXzNIUoLFcvD9Vc3NhjXXxIZLNfRv/8qPkEO8w3mAAAAAElFTkSuQmCC' -}; diff --git a/src/components/Tilbakemelding/TilbakemeldingPopup.tsx b/src/components/Tilbakemelding/TilbakemeldingPopup.tsx deleted file mode 100644 index c3d49d8ed..000000000 --- a/src/components/Tilbakemelding/TilbakemeldingPopup.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import React, { useState, FormEvent, useRef } from 'react'; -import styled from 'styled-components'; -import { Innholdstittel, Normaltekst, Element } from 'nav-frontend-typografi'; -import theme, { pxToRem } from '../../styles/personOversiktTheme'; -import TilbakemeldingValg from './TilbakemeldingValg'; -import { Textarea } from 'nav-frontend-skjema'; -import { Hovedknapp } from 'nav-frontend-knapper'; -import { smilies } from './TilbakemeldingIkoner'; -import { useFocusOnMount } from '../../utils/customHooks'; -import { LenkeKnapp } from '../common-styled-components'; - -const TilbakemeldingPopupContainer = styled.div` - background-color: #ffffff; - border-radius: 4px; - border: 1px solid ${theme.color.graaSkrift}; - width: ${pxToRem(350)}; - position: fixed; - right: ${pxToRem(25)}; - bottom: ${pxToRem(100)}; - z-index: 998; - padding: ${pxToRem(20)}; - - &:focus { - ${theme.focus} - } -`; -const KnappWrapper = styled.div` - display: flex; - justify-content: space-between; - margin-top: 0.5rem; -`; -const TakkForTilbakemeldingenContainer = styled(TilbakemeldingPopupContainer)` - background-color: #98d0b0; - text-align: center; -`; - -interface Props { - sporsmal: string; - kommentarLabel: string; - erApen: boolean; - besvart: boolean; - settBesvart(tilfredshet: number, besvart: string): void; -} - -interface InternalProps extends Props { - valgt: number; - kommentar: string; - settValgt(valgt: number): void; - settKommentar(kommentar: string): void; - kommentarLabel: string; -} - -function Kommentar(props: InternalProps) { - return ( - <> -