Merge pull request #182 in TEA/mina-sidor-fa-web from feature/TV-730 to develop

Squashed commit of the following:

commit 2641466f4e98ab9c6c5c373746fb06a95b9b1e78
Author: fueno <nicolas.fuentes-maturana@arbetsformedlingen.se>
Date:   Fri Oct 8 15:02:33 2021 +0200

    TV-730 refactoring fullName

commit 3c71ef42540d1486516faeaa26cf1ea670dc82f4
Merge: 5dfafc5f 890573b1
Author: fueno <nicolas.fuentes-maturana@arbetsformedlingen.se>
Date:   Wed Oct 6 17:25:40 2021 +0200

    Merge branch 'develop' into feature/TV-730

commit 5dfafc5f12faf04f69dbd33f37751a23ad01ecea
Author: fueno <nicolas.fuentes-maturana@arbetsformedlingen.se>
Date:   Wed Oct 6 17:20:49 2021 +0200

    TV-730 correction

commit eecd0e7be78c07d7110565954adf3a7039ca769b
Author: fueno <nicolas.fuentes-maturana@arbetsformedlingen.se>
Date:   Wed Oct 6 17:18:52 2021 +0200

    TV-730 dont use tap, subscribe in init

commit 7e6f7e9252cb1b3c61f176d573f5058b48a3d8d1
Author: fueno <nicolas.fuentes-maturana@arbetsformedlingen.se>
Date:   Wed Oct 6 14:05:57 2021 +0200

    TV-730 display full name as header
This commit is contained in:
Nicolas Fuentes Maturana
2021-10-08 15:04:25 +02:00
parent 438241db49
commit bd988236c5
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(