Merge branch 'develop' of ssh://bitbucket.arbetsformedlingen.se:7999/tea/mina-sidor-fa-web into develop

This commit is contained in:
Daniel Appelgren
2021-10-08 15:22:37 +02:00
2 changed files with 73 additions and 71 deletions

View File

@@ -1,79 +1,81 @@
<msfa-layout>
<digi-typography>
<section class="deltagare-card" *ngIf="activeTab$ | async as activeTab">
<header class="deltagare-card__header">
<msfa-back-link [route]="['/deltagare']">Tillbaka till deltagarlistan</msfa-back-link>
<h1>Deltagarinformation</h1>
</header>
<digi-navigation-tabs af-aria-label="Deltagarinformation">
<digi-navigation-tab
(afOnToggle)="setActiveTab(0)"
af-aria-label="Deltagare & tjänst"
af-id="deltagare-card-personal-information"
*ngIf="deltagareTjanstVisible"
>
<ng-container *ngIf="activeTab === '0'">
<msfa-deltagare-tab-personal-information
*ngIf="(tab0Loading$ | async) === false; else loadingRef"
class="deltagare-card__tab-contents"
[contactInformation]="contactInformation$ | async"
[avropInformation]="avropInformation$ | async"
[availableHandledare]="availableHandledare$ | async"
[handledarePickerVisible]="handledarePickerVisible"
></msfa-deltagare-tab-personal-information>
</ng-container>
</digi-navigation-tab>
<ng-container *ngIf="contactInformation$ | async as contactInformation">
<header class="deltagare-card__header">
<msfa-back-link [route]="['/deltagare']">Tillbaka till deltagarlistan</msfa-back-link>
<h1>{{contactInformation.fullName }}</h1>
</header>
<digi-navigation-tabs [afAriaLabel]="'Deltagarinformation för ' + contactInformation.fullName">
<digi-navigation-tab
(afOnToggle)="setActiveTab(0)"
af-aria-label="Deltagare & tjänst"
af-id="deltagare-card-personal-information"
*ngIf="deltagareTjanstVisible"
>
<ng-container *ngIf="activeTab === '0'">
<msfa-deltagare-tab-personal-information
*ngIf="(tab0Loading$ | async) === false; else loadingRef"
class="deltagare-card__tab-contents"
[contactInformation]="contactInformation"
[avropInformation]="avropInformation$ | async"
[availableHandledare]="availableHandledare$ | async"
[handledarePickerVisible]="handledarePickerVisible"
></msfa-deltagare-tab-personal-information>
</ng-container>
</digi-navigation-tab>
<digi-navigation-tab
(afOnToggle)="setActiveTab(1)"
af-aria-label="Rapportering"
af-id="deltagare-card-reports"
*ngIf="reportingTabVisible"
>
<ng-container *ngIf="activeTab === '1'">
<msfa-deltagare-tab-reports
[reportsData]="reportsData$ | async"
[genomforandeReferens]="currentGenomforandeReferens$ | async"
(reportsPaginated)="setNewPage($event)"
></msfa-deltagare-tab-reports>
</ng-container>
</digi-navigation-tab>
<digi-navigation-tab
(afOnToggle)="setActiveTab(1)"
af-aria-label="Rapportering"
af-id="deltagare-card-reports"
*ngIf="reportingTabVisible"
>
<ng-container *ngIf="activeTab === '1'">
<msfa-deltagare-tab-reports
[reportsData]="reportsData$ | async"
[genomforandeReferens]="currentGenomforandeReferens$ | async"
(reportsPaginated)="setNewPage($event)"
></msfa-deltagare-tab-reports>
</ng-container>
</digi-navigation-tab>
<digi-navigation-tab
(afOnToggle)="setActiveTab(2)"
af-aria-label="Erfarenheter"
af-id="deltagare-card-experiences"
*ngIf="experiencesVisible"
>
<ng-container *ngIf="activeTab === '2'">
<msfa-deltagare-tab-experiences
*ngIf="(tab2Loading$ | async) === false; else loadingRef"
class="deltagare-card__tab-contents"
[workExperiences]="workExperiences$ | async"
[educations]="educations$ | async"
[highestEducation]="highestEducation$ | async"
[driversLicense]="driversLicense$ | async"
></msfa-deltagare-tab-experiences>
</ng-container>
</digi-navigation-tab>
<digi-navigation-tab
(afOnToggle)="setActiveTab(2)"
af-aria-label="Erfarenheter"
af-id="deltagare-card-experiences"
*ngIf="experiencesVisible"
>
<ng-container *ngIf="activeTab === '2'">
<msfa-deltagare-tab-experiences
*ngIf="(tab2Loading$ | async) === false; else loadingRef"
class="deltagare-card__tab-contents"
[workExperiences]="workExperiences$ | async"
[educations]="educations$ | async"
[highestEducation]="highestEducation$ | async"
[driversLicense]="driversLicense$ | async"
></msfa-deltagare-tab-experiences>
</ng-container>
</digi-navigation-tab>
<digi-navigation-tab
(afOnToggle)="setActiveTab(3)"
af-aria-label="Känsliga uppgifter"
af-id="deltagare-card-sensitive-information"
*ngIf="sensitiveDataVisible"
>
<ng-container *ngIf="activeTab === '3'">
<msfa-deltagare-tab-sensitive-information
*ngIf="(tab3Loading$ | async) === false; else loadingRef"
class="deltagare-card__tab-contents"
[avropInformation]="avropInformation$ | async"
[workLanguages]="workLanguages$ | async"
[disabilities]="disabilities$ | async"
></msfa-deltagare-tab-sensitive-information>
</ng-container>
</digi-navigation-tab>
</digi-navigation-tabs>
<digi-navigation-tab
(afOnToggle)="setActiveTab(3)"
af-aria-label="Känsliga uppgifter"
af-id="deltagare-card-sensitive-information"
*ngIf="sensitiveDataVisible"
>
<ng-container *ngIf="activeTab === '3'">
<msfa-deltagare-tab-sensitive-information
*ngIf="(tab3Loading$ | async) === false; else loadingRef"
class="deltagare-card__tab-contents"
[avropInformation]="avropInformation$ | async"
[workLanguages]="workLanguages$ | async"
[disabilities]="disabilities$ | async"
></msfa-deltagare-tab-sensitive-information>
</ng-container>
</digi-navigation-tab>
</digi-navigation-tabs>
</ng-container>
</section>
</digi-typography>
</msfa-layout>

View File

@@ -113,7 +113,7 @@ export class DeltagareCardComponent {
private deltagareCardService: DeltagareCardService,
private handledareService: HandledareService,
private userService: UserService
) {}
) { }
get deltagareTjanstVisible(): boolean {
return this._userRoles?.some(