Skip to content

Commit

Permalink
Merge branch 'master' into beskrivelseInnstillingsoppgave
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnsteingarmo authored Aug 10, 2023
2 parents aced6ff + c0010bc commit a76cccf
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 27 deletions.
2 changes: 0 additions & 2 deletions build_n_deploy/naiserator/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spec:
replicas:
min: 2
max: 2
cpuThresholdPercentage: 50
port: 8000
liveness:
path: /isAlive
Expand Down Expand Up @@ -39,7 +38,6 @@ spec:
- id: "ea930b6b-9397-44d9-b9e6-f4cf527a632a" # 0000-GA-Fortrolig_Adresse
resources:
limits:
cpu: 2000m
memory: 1024Mi
requests:
memory: 512Mi
Expand Down
2 changes: 0 additions & 2 deletions build_n_deploy/naiserator/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spec:
replicas:
min: 2
max: 2
cpuThresholdPercentage: 50
port: 8000
liveness:
path: /isAlive
Expand Down Expand Up @@ -39,7 +38,6 @@ spec:
- id: "9ec6487d-f37a-4aad-a027-cd221c1ac32b" # 0000-GA-Fortrolig_Adresse
resources:
limits:
cpu: 2000m
memory: 1024Mi
requests:
memory: 512Mi
Expand Down
2 changes: 0 additions & 2 deletions src/frontend/App/context/toggles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export enum ToggleName {
opprettBehandlingForFerdigstiltJournalpost = 'familie.ef.sak.opprett-behandling-for-ferdigstilt-journalpost', // Permission-toggle
visAutomatiskUtfylleVilkår = 'familie.ef.sak.frontend-automatisk-utfylle-vilkar', // Miljø-toggle
visSatsendring = 'familie.ef.sak.frontend-vis-satsendring',
visEndringerPersonopplysninger = 'familie.ef.sak.frontend.personopplysninger-endringer',
visInntektPersonoversikt = 'familie.ef.sak.frontend.vis-inntekt-personoversikt',
angreSendTilBeslutter = 'familie.ef.sak.frontend-angre-send-til-beslutter',
ulikeInntekter = 'familie.ef.sak-ulike-inntekter',
visVurderHenvendelseOppgaver = 'familie.ef.sak.automatiske-oppgaver-lokalkontor',
fremleggsoppgave = 'familie.ef.sak.automatiske-oppgaver.fremleggsoppgave',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React, { useState } from 'react';
import { Button, Heading } from '@navikt/ds-react';
import DataViewer from '../../../Felles/DataViewer/DataViewer';
import { utledEndringerPåPersonopplysninger } from './utils';
import { useToggles } from '../../../App/context/TogglesContext';
import { ToggleName } from '../../../App/context/toggles';
import { useBehandling } from '../../../App/context/BehandlingContext';
import {
endringerKeyTilTekst,
Expand Down Expand Up @@ -85,18 +83,12 @@ const Endringsdetaljer: React.FC<{ endringer: IEndringer; personopplysning: keyo
};

const Personopplysningsendringer: React.FC<{ behandlingId: string }> = ({ behandlingId }) => {
const { toggles } = useToggles();
const skalViseKomponent = toggles[ToggleName.visEndringerPersonopplysninger];
const { endringerPersonopplysninger, nullstillGrunnlagsendringer, vilkårState } =
useBehandling();
const [nyGrunnlagsdataHentes, settNyGrunnlagsdataHentes] = useState(false);

const { oppdaterGrunnlagsdataOgHentVilkår } = vilkårState;

if (!skalViseKomponent) {
return <></>;
}

const oppdaterGrunnlagsdata = () => {
if (!nyGrunnlagsdataHentes) {
settNyGrunnlagsdataHentes(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { Utsendingsinfo } from '../Utsendingsinfo';
import styled from 'styled-components';
import { Journalposttype } from '@navikt/familie-typer';
import { DownFilled, LeftFilled, RightFilled } from '@navikt/ds-icons';
import { useToggles } from '../../../App/context/TogglesContext';
import { skalViseLenke } from '../utils';
import { PadlockLockedIcon } from '@navikt/aksel-icons';

Expand Down Expand Up @@ -50,7 +49,6 @@ const ikonForJournalposttype: Record<Journalposttype, React.ReactElement> = {
export const HovedTabellrad: React.FC<{ dokument: Dokumentinfo; erKlikketId: string }> = ({
dokument,
}) => {
const { toggles } = useToggles();
return (
<TrHoveddokument>
<Td>{formaterNullableIsoDatoTid(dokument.dato)}</Td>
Expand All @@ -61,7 +59,7 @@ export const HovedTabellrad: React.FC<{ dokument: Dokumentinfo; erKlikketId: str
</InnUt>
</Td>
<Td>
{skalViseLenke(dokument, toggles) ? (
{skalViseLenke(dokument) ? (
<>
<HovedLenke
key={dokument.journalpostId}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Td } from '../../../Felles/Personopplysninger/TabellWrapper';
import { LogiskeVedlegg } from './LogiskeVedlegg';
import { BodyShortSmall } from '../../../Felles/Visningskomponenter/Tekster';
import styled from 'styled-components';
import { useToggles } from '../../../App/context/TogglesContext';
import { skalViseLenke } from '../utils';
import { IkkeTilgang } from './Hovedtabellrad';
import { PadlockLockedIcon } from '@navikt/aksel-icons';
Expand All @@ -20,13 +19,12 @@ const LenkeVenstreMargin = styled.a`
export const Tabellrad: React.FC<{ dokument: Dokumentinfo; erKlikketId: string }> = ({
dokument,
}) => {
const { toggles } = useToggles();
return (
<tr>
<Td></Td>
<Td></Td>
<Td>
{skalViseLenke(dokument, toggles) ? (
{skalViseLenke(dokument) ? (
<>
<LenkeVenstreMargin
href={`/dokument/journalpost/${dokument.journalpostId}/dokument-pdf/${dokument.dokumentinfoId}`}
Expand Down
8 changes: 1 addition & 7 deletions src/frontend/Komponenter/Personoversikt/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { BehandlingStatus } from '../../App/typer/behandlingstatus';
import { Behandlingstype } from '../../App/typer/behandlingstype';
import { VedleggRequest } from './vedleggRequest';
import { Dokumentinfo } from '../../App/typer/dokumentliste';
import { ToggleName, Toggles } from '../../App/context/toggles';

export const alleBehandlingerErFerdigstiltEllerSattPåVent = (fagsak: Fagsak) =>
fagsak.behandlinger.every(
Expand Down Expand Up @@ -47,9 +46,4 @@ export const oppdaterVedleggFilter = (
};
};

export const skalViseLenke = (dokument: Dokumentinfo, toggles: Toggles): boolean => {
return (
(toggles[ToggleName.dokumentoversiktLinkTilDokument] || dokument.tema === 'ENF') &&
dokument.harSaksbehandlerTilgang
);
};
export const skalViseLenke = (dokument: Dokumentinfo): boolean => dokument.harSaksbehandlerTilgang;

0 comments on commit a76cccf

Please sign in to comment.