Skip to content

Commit

Permalink
Legg til klagekort og klageskjema
Browse files Browse the repository at this point in the history
  • Loading branch information
almyy committed Oct 5, 2023
1 parent 6d85a24 commit 3b76823
Show file tree
Hide file tree
Showing 133 changed files with 1,177 additions and 367 deletions.
22 changes: 0 additions & 22 deletions generated/hendelse-controller/hendelse-controller.msw.ts

This file was deleted.

11 changes: 0 additions & 11 deletions generated/model/urlResponse.ts

This file was deleted.

This file was deleted.

116 changes: 107 additions & 9 deletions innsyn-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,43 @@
}
}
},
"/api/v1/innsyn/{fiksDigisosId}/klage": {
"get": {
"tags": ["klage-controller"],
"operationId": "hentKlager",
"parameters": [
{"name": "fiksDigisosId", "in": "path", "required": true, "schema": {"type": "string"}},
{"name": "Authorization", "in": "header", "required": true, "schema": {"type": "string"}}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json;charset=UTF-8": {
"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KlageDto"}}
}
}
}
}
},
"post": {
"tags": ["klage-controller"],
"operationId": "sendKlage",
"parameters": [
{"name": "fiksDigisosId", "in": "path", "required": true, "schema": {"type": "string"}},
{"name": "Authorization", "in": "header", "required": true, "schema": {"type": "string"}}
],
"requestBody": {
"content": {
"application/json;charset=UTF-8": {"schema": {"$ref": "#/components/schemas/InputKlage"}}
},
"required": true
},
"responses": {
"200": {"description": "OK", "content": {"*/*": {"schema": {"$ref": "#/components/schemas/Unit"}}}}
}
}
},
"/api/v1/info/logg": {
"post": {
"tags": ["info-controller"],
Expand Down Expand Up @@ -562,6 +599,17 @@
}
}
},
"InputKlage": {
"required": ["fiksDigisosId", "klageTekst", "vedlegg", "vedtaksIds"],
"type": "object",
"properties": {
"fiksDigisosId": {"type": "string"},
"klageTekst": {"type": "string"},
"vedtaksIds": {"type": "array", "items": {"type": "string"}},
"vedlegg": {"type": "array", "items": {"type": "string", "format": "binary"}}
}
},
"Unit": {"type": "object"},
"Logg": {
"required": ["columnNumber", "jsFileUrl", "level", "lineNumber", "message", "url", "userAgent"],
"type": "object",
Expand Down Expand Up @@ -625,7 +673,7 @@
"type": "object",
"properties": {
"ar": {"type": "integer", "format": "int32"},
"maned": {"type": "string"},
"maned": {"type": "integer", "format": "int32"},
"foersteIManeden": {"type": "string", "format": "date"},
"utbetalinger": {"type": "array", "items": {"$ref": "#/components/schemas/ManedUtbetaling"}}
}
Expand All @@ -647,7 +695,50 @@
"UrlResponse": {
"required": ["link", "linkTekst"],
"type": "object",
"properties": {"linkTekst": {"type": "string"}, "link": {"type": "string"}}
"properties": {
"linkTekst": {
"type": "string",
"enum": [
"SOKNAD_SEND_TIL_KONTOR",
"SOKNAD_UNDER_BEHANDLING",
"SOKNAD_MOTTATT_MED_KOMMUNENAVN",
"SOKNAD_MOTTATT_UTEN_KOMMUNENAVN",
"SOKNAD_FERDIGBEHANDLET",
"SOKNAD_BEHANDLES_IKKE",
"SOKNAD_VIDERESENDT_PAPIRSOKNAD_MED_NORG_ENHET",
"SOKNAD_VIDERESENDT_PAPIRSOKNAD_UTEN_NORG_ENHET",
"SOKNAD_VIDERESENDT_MED_NORG_ENHET",
"SOKNAD_VIDERESENDT_UTEN_NORG_ENHET",
"SOKNAD_KAN_IKKE_VISE_STATUS_MED_TITTEL",
"SOKNAD_KAN_IKKE_VISE_STATUS_UTEN_TITTEL",
"SAK_UNDER_BEHANDLING_MED_TITTEL",
"SAK_UNDER_BEHANDLING_UTEN_TITTEL",
"SAK_FERDIGBEHANDLET_MED_TITTEL",
"SAK_FERDIGBEHANDLET_UTEN_TITTEL",
"SAK_KAN_IKKE_VISE_STATUS_MED_TITTEL",
"SAK_KAN_IKKE_VISE_STATUS_UTEN_TITTEL",
"ANTALL_SENDTE_VEDLEGG",
"VILKAR_OPPDATERT",
"UTBETALINGER_OPPDATERT",
"BREV_OM_SAKSBEANDLINGSTID",
"ETTERSPOR_MER_DOKUMENTASJON",
"ETTERSPOR_IKKE_MER_DOKUMENTASJON",
"DOKUMENTASJONKRAV",
"SOKNAD_SEND_TIL_KONTOR_LENKETEKST",
"VIS_BREVET_LENKETEKST"
]
},
"link": {"type": "string"}
}
},
"FilUrl": {
"required": ["id", "url"],
"type": "object",
"properties": {
"dato": {"type": "string", "format": "date"},
"url": {"type": "string"},
"id": {"type": "string"}
}
},
"SaksStatusResponse": {
"required": ["skalViseVedtakInfoPanel", "tittel"],
Expand All @@ -665,14 +756,9 @@
]
},
"skalViseVedtakInfoPanel": {"type": "boolean"},
"vedtaksfilUrlList": {"type": "array", "items": {"$ref": "#/components/schemas/VedtaksfilUrl"}}
"vedtaksfilUrlList": {"type": "array", "items": {"$ref": "#/components/schemas/FilUrl"}}
}
},
"VedtaksfilUrl": {
"required": ["vedtaksfilUrl"],
"type": "object",
"properties": {"dato": {"type": "string", "format": "date"}, "vedtaksfilUrl": {"type": "string"}}
},
"OppgaveElement": {
"required": ["dokumenttype", "erFraInnsyn"],
"type": "object",
Expand Down Expand Up @@ -714,6 +800,18 @@
"kommunenummer": {"type": "string"}
}
},
"KlageDto": {
"required": ["klageUrl", "status"],
"type": "object",
"properties": {
"klageUrl": {"$ref": "#/components/schemas/FilUrl"},
"status": {
"type": "string",
"enum": ["SENDT", "MOTTATT", "UNDER_BEHANDLING", "FERDIG_BEHANDLET", "HOS_STATSFORVALTER"]
},
"nyttVedtakUrl": {"$ref": "#/components/schemas/FilUrl"}
}
},
"HendelseResponse": {
"required": ["hendelseType", "tidspunkt"],
"type": "object",
Expand Down Expand Up @@ -774,7 +872,7 @@
"items": {"$ref": "#/components/schemas/ManedUtbetaling"}
},
"ar": {"type": "integer", "format": "int32"},
"maned": {"type": "string"}
"maned": {"type": "integer", "format": "int32"}
}
},
"SaksDetaljerResponse": {
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const nextConfig = {
];
},
output: "standalone",
assetPrefix: process.env.NEXT_PUBLIC_ASSET_PREFIX,
assetPrefix: process.env.NODE_ENV === "production" ? process.env.NEXT_PUBLIC_ASSET_PREFIX : undefined,
reactStrictMode: true,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
experimental: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {UthevetPanel} from "../paneler/UthevetPanel";
import styled from "styled-components";
import Banner from "../banner/Banner";
import {useTranslation} from "next-i18next";
import {useHarTilgang} from "../../../generated/tilgang-controller/tilgang-controller";
import {useHarTilgang} from "../../generated/tilgang-controller/tilgang-controller";
import {logger} from "@navikt/next-logger";
import {useRouter} from "next/router";

Expand Down
24 changes: 6 additions & 18 deletions src/components/arkfanePanel/ArkfanePanel.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
import React from "react";
import {Panel, Tabs} from "@navikt/ds-react";
import {Tabs} from "@navikt/ds-react";
import styled from "styled-components";
import {useTranslation} from "next-i18next";
import {ErrorColored} from "@navikt/ds-icons";
import {useHentHendelser} from "../../../generated/hendelse-controller/hendelse-controller";
import {useHentHendelser} from "../../generated/hendelse-controller/hendelse-controller";
import useFiksDigisosId from "../../hooks/useFiksDigisosId";
import {useHentVedlegg} from "../../../generated/vedlegg-controller/vedlegg-controller";
import {useHentVedlegg} from "../../generated/vedlegg-controller/vedlegg-controller";
import Panel from "../panel/Panel";

enum ARKFANER {
HISTORIKK = "Historikk",
VEDLEGG = "Vedlegg",
}

const StyledPanel = styled(Panel)<{$hasError: boolean}>`
position: relative;
margin-top: 2rem;
padding: 1rem 0 1rem 0;
border-color: ${(props) => (props.$hasError ? "var(--a-red-500)" : "transparent")};
@media screen and (min-width: 641px) {
padding-left: 60px;
padding-right: 80px;
margin-top: 3rem;
}
`;

const StyledErrorColored = styled(ErrorColored)`
position: absolute;
@media screen and (min-width: 641px) {
Expand Down Expand Up @@ -52,7 +40,7 @@ const ArkfanePanel: React.FC<Props> = (props) => {
(valgtFane === ARKFANER.HISTORIKK && hendelserHasError) || (valgtFane === ARKFANER.VEDLEGG && vedleggHasError);

return (
<StyledPanel $hasError={hasError}>
<Panel hasError={hasError}>
{hasError && <StyledErrorColored title="Feil" />}
<Tabs onChange={setValgtFane} value={valgtFane}>
<Tabs.List>
Expand All @@ -66,7 +54,7 @@ const ArkfanePanel: React.FC<Props> = (props) => {
{props.vedleggChildren}
</Tabs.Panel>
</Tabs>
</StyledPanel>
</Panel>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/driftsmelding/Driftsmelding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
getDriftsmeldingByKommuneResponseOrDigisosId,
useFileUploadAllowed,
} from "./DriftsmeldingUtilities";
import {KommuneResponse} from "../../../generated/model";
import {KommuneResponse} from "../../generated/model";

const kommuneResponse_ok: KommuneResponse = {
erInnsynDeaktivert: false,
Expand Down
2 changes: 1 addition & 1 deletion src/components/driftsmelding/DriftsmeldingUtilities.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {KommuneResponse} from "../../../generated/model";
import {KommuneResponse} from "../../generated/model";
import {listeOverFeiledeIder} from "./StoppedeFiksDigisosIder";

export interface Driftsmelding {
Expand Down
4 changes: 2 additions & 2 deletions src/components/ettersendelse/EttersendelseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import useKommune from "../../hooks/useKommune";
import {useFileUploadAllowed} from "../driftsmelding/DriftsmeldingUtilities";
import {useQueryClient} from "@tanstack/react-query";
import useFiksDigisosId from "../../hooks/useFiksDigisosId";
import {getHentVedleggQueryKey} from "../../../generated/vedlegg-controller/vedlegg-controller";
import {OppgaveElementHendelsetype} from "../../../generated/model";
import {getHentVedleggQueryKey} from "../../generated/vedlegg-controller/vedlegg-controller";
import {OppgaveElementHendelsetype} from "../../generated/model";
import {useTranslation} from "next-i18next";
import VedleggSuccess from "../filopplasting/VedleggSuccess";
import FilOpplastingBlokk from "../filopplasting/FilOpplastingBlokk";
Expand Down
14 changes: 7 additions & 7 deletions src/components/filopplasting/useFilOpplasting.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import {useCallback, useEffect, useMemo, useState} from "react";
import {UseMutationOptions, useQueryClient} from "@tanstack/react-query";
import {fileUploadFailedEvent, logDuplicatedFiles} from "../../utils/amplitude";
import {SendVedleggBody, VedleggOpplastingResponseStatus} from "../../../generated/model";
import {SendVedleggBody, VedleggOpplastingResponseStatus} from "../../generated/model";
import {containsIllegalCharacters, maxCombinedFileSize, maxFileSize} from "../../utils/vedleggUtils";
import {
getHentVedleggQueryKey,
sendVedlegg,
useSendVedlegg,
} from "../../../generated/vedlegg-controller/vedlegg-controller";
} from "../../generated/vedlegg-controller/vedlegg-controller";
import {ErrorType} from "../../axios-instance";
import useFiksDigisosId from "../../hooks/useFiksDigisosId";
import {getHentHendelserQueryKey} from "../../../generated/hendelse-controller/hendelse-controller";
import {getHentHendelserQueryKey} from "../../generated/hendelse-controller/hendelse-controller";
import {logger} from "@navikt/next-logger";
import {useFilUploadSuccessful} from "./FilUploadSuccessfulContext";

export interface Metadata {
type: string;
tilleggsinfo: string | undefined;
innsendelsesfrist: string | undefined;
hendelsetype: string | undefined;
hendelsereferanse: string | undefined;
tilleggsinfo?: string;
innsendelsesfrist?: string;
hendelsetype?: string;
hendelsereferanse?: string;
}

export interface Error {
Expand Down
4 changes: 2 additions & 2 deletions src/components/forelopigSvar/ForelopigSvar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as React from "react";
import {useTranslation} from "next-i18next";
import EksternLenke from "../eksternLenke/EksternLenke";
import {Alert} from "@navikt/ds-react";
import {useHentForelopigSvarStatus} from "../../../generated/forelopig-svar-controller/forelopig-svar-controller";
import {useHentSoknadsStatus} from "../../../generated/soknads-status-controller/soknads-status-controller";
import {useHentForelopigSvarStatus} from "../../generated/forelopig-svar-controller/forelopig-svar-controller";
import {useHentSoknadsStatus} from "../../generated/soknads-status-controller/soknads-status-controller";
import useFiksDigisosId from "../../hooks/useFiksDigisosId";

const ForelopigSvarAlertstripe: React.FC = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/historikk/Historikk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {BodyShort, Button, Label, Link as NavDsLink} from "@navikt/ds-react";
import {UnmountClosed} from "react-collapse";
import styled from "styled-components";
import {Collapse, Expand} from "@navikt/ds-icons";
import {useHentHendelser} from "../../../generated/hendelse-controller/hendelse-controller";
import {HendelseResponse} from "../../../generated/model";
import {useHentHendelser} from "../../generated/hendelse-controller/hendelse-controller";
import {HendelseResponse} from "../../generated/model";
import {HistorikkTekstEnum} from "./HistorikkTekstEnum";
import Link from "next/link";

Expand Down
Loading

0 comments on commit 3b76823

Please sign in to comment.