Some minor bugfixes

This commit is contained in:
Erik Tiekstra
2021-10-11 12:22:08 +02:00
parent 771e73b086
commit 99c0ac3ae3
3 changed files with 10 additions and 7 deletions

View File

@@ -13,10 +13,7 @@
af-variation="success"
class="deltagare-avvikelse__alert"
>
<p>
Avvikelserapport för deltagare {{avrop.fullName}} är nu inskickad till Arbetsförmedlingen och inväntar
godkännande.
</p>
<p>Avvikelserapport (avvikelse) för deltagare {{avrop.fullName}} är nu inskickad till Arbetsförmedlingen.</p>
<dl>
<dt>Datum</dt>
<dd>{{submittedDate | date:'longDate'}} kl {{submittedDate | date:'shortTime'}}</dd>

View File

@@ -313,9 +313,9 @@
<dd>{{knownReasonCommentFormControl.value}}</dd>
</ng-container>
</ng-container>
<dt>Datum</dt>
<dt>Dag för frånvaro</dt>
<dd>
<digi-typography-time [afDateTime]="dateFormControl.value"></digi-typography-time>
<digi-typography-time [afDateTime]="dateFormValueAsDate"></digi-typography-time>
</dd>
<dt>Heldag eller del av dag</dt>
<dd>{{dayOrPartOfDayFromValue}}</dd>

View File

@@ -58,7 +58,9 @@ export class FranvaroReportComponent {
{ label: 'Del av dag', value: false },
];
constructor(private franvaroReportService: FranvaroReportService, private activatedRoute: ActivatedRoute) {}
constructor(private franvaroReportService: FranvaroReportService, private activatedRoute: ActivatedRoute) {
this.dateFormControl.valueChanges.subscribe(value => console.log(value));
}
get showOtherKnownReasonsSelect(): boolean {
return this.reasonFormControl.value === ANNAN_KAND_ORSAK_ID;
@@ -112,6 +114,10 @@ export class FranvaroReportComponent {
return this.franvaroFormGroup.get('knownReasonComment') as FormControl;
}
get dateFormValueAsDate(): Date {
return new Date(this.dateFormControl.value);
}
getReasonNameFromValue(reasons: OrsaksKoderFranvaro[], value: string): string {
return reasons.find(reason => reason.value.toString() === value)?.name;
}