feature(Periodisk redovisning): Man kan nu bara göra periodisk redovisning ifall Gemensam planering är gjord (TV-808)
Squashed commit of the following: commit b2f7ac185f7cbd1725627201e533bc3508b5c174 Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se> Date: Tue Oct 26 17:01:40 2021 +0200 En Gemensam planering måste ha mottagits för att en Periodisk redovisning ska kunna skapas.
This commit is contained in:
@@ -23,7 +23,9 @@
|
||||
</digi-notification-alert>
|
||||
<msfa-back-link route="../">Tillbaka till deltagaren</msfa-back-link>
|
||||
</div>
|
||||
|
||||
<ng-template #formRef>
|
||||
<ng-container *ngIf="avrop.hasGemensamPlanering; else failedGemensamPlaneringCheck">
|
||||
<form
|
||||
*ngIf="periods$ | async as periods; else loadingRef"
|
||||
class="periodisk-redovisning-form__form"
|
||||
@@ -82,7 +84,10 @@
|
||||
></digi-ng-form-radiobutton-group>
|
||||
</digi-form-fieldset>
|
||||
<div aria-atomic="true" role="alert">
|
||||
<digi-form-validation-message *ngIf="formControlIsInvalid(hasOfferedJobFormControl)" af-variation="error">
|
||||
<digi-form-validation-message
|
||||
*ngIf="formControlIsInvalid(hasOfferedJobFormControl)"
|
||||
af-variation="error"
|
||||
>
|
||||
Ett val är obligatoriskt
|
||||
</digi-form-validation-message>
|
||||
</div>
|
||||
@@ -203,8 +208,8 @@
|
||||
></digi-icon-check-circle>
|
||||
<span>
|
||||
{{getActivityMetadata(activity.id).name}}: {{ activity.performedRemotely &&
|
||||
activity.performedPhysically ? 'på distans och på plats' : activity.performedRemotely ? 'på distans'
|
||||
: 'på plats'}}
|
||||
activity.performedPhysically ? 'på distans och på plats' : activity.performedRemotely ? 'på
|
||||
distans' : 'på plats'}}
|
||||
</span>
|
||||
</dd>
|
||||
</ng-template>
|
||||
@@ -233,11 +238,28 @@
|
||||
>
|
||||
<p>Vill du behålla de svar och aktiviteter du tidigare valt?</p>
|
||||
</digi-ng-dialog>
|
||||
</ng-container>
|
||||
</ng-template>
|
||||
</div>
|
||||
</msfa-report-layout>
|
||||
</msfa-layout>
|
||||
|
||||
<ng-template #failedGemensamPlaneringCheck>
|
||||
<div class="periodisk-redovisning-form__failed-gemensam-planering-check-notification">
|
||||
<digi-notification-alert
|
||||
af-heading="Kan inte skapa gemensam planering"
|
||||
af-size="M"
|
||||
af-variation="info"
|
||||
af-closeable="false"
|
||||
>
|
||||
<p>En Gemensam planering måste ha mottagits för att en Periodisk redovisning ska kunna skapas.</p>
|
||||
</digi-notification-alert>
|
||||
</div>
|
||||
<p>
|
||||
<msfa-back-link route="../">Tillbaka till deltagaren</msfa-back-link>
|
||||
</p>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #skeletonRef>
|
||||
<digi-ng-skeleton-base
|
||||
[afCount]="3"
|
||||
|
||||
@@ -66,4 +66,8 @@
|
||||
&__activity-check {
|
||||
color: var(--digi--ui--color--border--success);
|
||||
}
|
||||
|
||||
&__failed-gemensam-planering-check-notification {
|
||||
margin-bottom: $digi--layout--gutter--l;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ export interface AvropResponse {
|
||||
handledareCiamUserId: string;
|
||||
handledare: string;
|
||||
recievedTimestamp: Date;
|
||||
hasGemensamPlanering: boolean;
|
||||
}
|
||||
|
||||
export interface AvropApiResponse {
|
||||
|
||||
@@ -26,6 +26,7 @@ export interface Avrop extends AvropCompact {
|
||||
handledareCiamUserId: string;
|
||||
handledare: string;
|
||||
receivedTimestamp: Date;
|
||||
hasGemensamPlanering: boolean;
|
||||
}
|
||||
|
||||
export interface AvropCompactData {
|
||||
@@ -52,6 +53,7 @@ export function mapAvropResponseToAvrop(data: AvropResponse): Avrop {
|
||||
handledareCiamUserId,
|
||||
handledare,
|
||||
recievedTimestamp,
|
||||
hasGemensamPlanering,
|
||||
} = data;
|
||||
|
||||
return {
|
||||
@@ -73,5 +75,6 @@ export function mapAvropResponseToAvrop(data: AvropResponse): Avrop {
|
||||
handledareCiamUserId: handledareCiamUserId,
|
||||
handledare,
|
||||
receivedTimestamp: new Date(recievedTimestamp),
|
||||
hasGemensamPlanering,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user