feat(slutredovisning): Added denial motivation to Slutredovisning. (TV-941)
Merge in TEA/mina-sidor-fa-web from feature/TV-941-report-denial-motivation to develop
Squashed commit of the following:
commit 6a6c60efc0f9b6fc3514f30237eefe1fa9bb8278
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Fri Dec 3 07:10:49 2021 +0100
Updated after PR
commit bbf5d8d4e32b7055311d96421291fff36f62e30f
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Dec 2 08:49:23 2021 +0100
Updated after PR
commit 5c1968029e86312a54dc082ff3fd28593178e29d
Merge: 1e4d6a70 395452e6
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Thu Dec 2 08:47:10 2021 +0100
Merge branch 'develop' into feature/TV-941-report-denial-motivation
commit 1e4d6a7093271353a99b75d3519ff1463b8f36dd
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Tue Nov 30 14:29:36 2021 +0100
Removed lorem text
commit efdea175a377956cc7f3b3c80230fa10d8ef5ec3
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Tue Nov 30 14:15:47 2021 +0100
Added motivation text to reports list and slutredovisning view
commit c47e1c97e65f5ef43ee55b9656c8a206050855c3
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date: Tue Nov 30 12:29:17 2021 +0100
Added motivation to händelser list
This commit is contained in:
@@ -8,6 +8,7 @@ export interface ReportResponse {
|
||||
inskickadDatum: string;
|
||||
statusRapport: string;
|
||||
ciamUserId: string;
|
||||
motivation: string;
|
||||
}
|
||||
export interface ReportsDataResponse {
|
||||
data: ReportResponse[];
|
||||
|
||||
@@ -71,4 +71,6 @@ export interface SlutredovisningResponse {
|
||||
progressDescription: string;
|
||||
nextStepDescription: string;
|
||||
otherInformation: string;
|
||||
status?: string;
|
||||
motivation?: string;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ export interface DeltagareHandelse {
|
||||
isAvbrott: boolean;
|
||||
effectDate: Date;
|
||||
effectDescription: string;
|
||||
motivation: string;
|
||||
}
|
||||
|
||||
export interface DeltagareHandelseData {
|
||||
@@ -28,12 +29,18 @@ export interface DeltagareHandelseData {
|
||||
meta: PaginationMeta;
|
||||
}
|
||||
|
||||
export interface DeltagareHandelseMotivation {
|
||||
title: string;
|
||||
motivation: string;
|
||||
}
|
||||
|
||||
interface DeltagareHandelseApiResponse {
|
||||
description: string;
|
||||
receivedDate: Date;
|
||||
isAvbrott: boolean;
|
||||
tidpunkt: Date;
|
||||
tidpunktDescription: string;
|
||||
motivation: string;
|
||||
}
|
||||
|
||||
export interface DeltagareHandelserApiResponse {
|
||||
@@ -44,11 +51,11 @@ export interface DeltagareHandelserApiResponse {
|
||||
export function mapDeltagareHandelseApiResponse(
|
||||
deltagareHandelseApiResponse: DeltagareHandelseApiResponse
|
||||
): DeltagareHandelse {
|
||||
const { description, receivedDate, isAvbrott } = deltagareHandelseApiResponse;
|
||||
const { description, receivedDate, isAvbrott, motivation } = deltagareHandelseApiResponse;
|
||||
const effectDate = deltagareHandelseApiResponse.tidpunkt;
|
||||
const effectDescription =
|
||||
(GENOMFORANDEHANDELSE_EFFECT_MAP[deltagareHandelseApiResponse.tidpunktDescription] as string) ??
|
||||
deltagareHandelseApiResponse.tidpunktDescription ??
|
||||
'';
|
||||
return { description, receivedDate, isAvbrott, effectDate, effectDescription };
|
||||
return { description, receivedDate, isAvbrott, effectDate, effectDescription, motivation };
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ReportType } from '@msfa-enums/report-type.enum';
|
||||
import { ReportResponse } from './api/report.response.model';
|
||||
import { Franvaro } from './franvaro.model';
|
||||
import { PaginationMeta } from './pagination-meta.model';
|
||||
|
||||
export interface Report {
|
||||
@@ -10,11 +9,7 @@ export interface Report {
|
||||
date: Date;
|
||||
status: string;
|
||||
ciamUserId: string;
|
||||
}
|
||||
|
||||
export interface ReportDetail {
|
||||
genomforandeReferens: string;
|
||||
franvaro?: Franvaro;
|
||||
motivation: string;
|
||||
}
|
||||
|
||||
export interface ReportsData {
|
||||
@@ -23,7 +18,7 @@ export interface ReportsData {
|
||||
}
|
||||
|
||||
export function mapResponseToReport(data: ReportResponse): Report {
|
||||
const { id, genomforandeReferens, typAvRapport, inskickadDatum, statusRapport, ciamUserId } = data;
|
||||
const { id, genomforandeReferens, typAvRapport, inskickadDatum, statusRapport, ciamUserId, motivation } = data;
|
||||
return {
|
||||
id,
|
||||
genomforandeReferens,
|
||||
@@ -31,5 +26,6 @@ export function mapResponseToReport(data: ReportResponse): Report {
|
||||
date: new Date(inskickadDatum),
|
||||
status: statusRapport,
|
||||
ciamUserId,
|
||||
motivation,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user