Merge pull request #34 in TEA/dafa-web-monorepo from feature/TV-271-participant-hide-show-ssn to develop
Squashed commit of the following: commit aa442dd054833d8004f50250110c817db761494c Author: Cecilia Varnava <cecilia.varnava@arbetsformedlingen.se> Date: Fri Jun 18 14:30:37 2021 +0200 TV-271 add hide ssn component to participant page
This commit is contained in:
@@ -19,7 +19,13 @@
|
|||||||
<dt>Namn</dt>
|
<dt>Namn</dt>
|
||||||
<dd *ngIf="detailedParticipantData.fullName; else emptyDD">{{ detailedParticipantData.fullName }}</dd>
|
<dd *ngIf="detailedParticipantData.fullName; else emptyDD">{{ detailedParticipantData.fullName }}</dd>
|
||||||
<dt>Personnummer</dt>
|
<dt>Personnummer</dt>
|
||||||
<dd *ngIf="detailedParticipantData.ssn; else emptyDD">{{ detailedParticipantData.ssn }}</dd>
|
<dd *ngIf="detailedParticipantData.ssn; else emptyDD">
|
||||||
|
<dafa-hide-text
|
||||||
|
symbols="********-****"
|
||||||
|
[changingText]="detailedParticipantData.ssn"
|
||||||
|
ariaLabelType="personnummer"
|
||||||
|
></dafa-hide-text>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h3>Särskilda behov</h3>
|
<h3>Särskilda behov</h3>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { BackLinkModule } from '@dafa-shared/components/back-link/back-link.modu
|
|||||||
import { IconModule } from '@dafa-shared/components/icon/icon.module';
|
import { IconModule } from '@dafa-shared/components/icon/icon.module';
|
||||||
import { LayoutModule } from '@dafa-shared/components/layout/layout.module';
|
import { LayoutModule } from '@dafa-shared/components/layout/layout.module';
|
||||||
import { ParticipantCardComponent } from './participant-card.component';
|
import { ParticipantCardComponent } from './participant-card.component';
|
||||||
|
import { HideTextModule } from '@dafa-shared/components/hide-text/hide-text.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
@@ -17,6 +18,7 @@ import { ParticipantCardComponent } from './participant-card.component';
|
|||||||
DigiNgLinkInternalModule,
|
DigiNgLinkInternalModule,
|
||||||
IconModule,
|
IconModule,
|
||||||
BackLinkModule,
|
BackLinkModule,
|
||||||
|
HideTextModule,
|
||||||
],
|
],
|
||||||
exports: [ParticipantCardComponent],
|
exports: [ParticipantCardComponent],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export interface Participant {
|
|||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
fullName: string;
|
fullName: string;
|
||||||
|
ssn: string;
|
||||||
status: ParticipantStatus;
|
status: ParticipantStatus;
|
||||||
nextStep: string;
|
nextStep: string;
|
||||||
service: Service;
|
service: Service;
|
||||||
@@ -29,6 +30,7 @@ export interface ParticipantApiResponseData {
|
|||||||
id: string;
|
id: string;
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
|
ssn: string;
|
||||||
status: ParticipantStatus;
|
status: ParticipantStatus;
|
||||||
nextStep: string;
|
nextStep: string;
|
||||||
service: Service;
|
service: Service;
|
||||||
@@ -39,12 +41,25 @@ export interface ParticipantApiResponseData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function mapParticipantApiResponseToParticipant(data: ParticipantApiResponseData): Participant {
|
export function mapParticipantApiResponseToParticipant(data: ParticipantApiResponseData): Participant {
|
||||||
const { id, firstName, lastName, status, nextStep, service, errandNumber, startDate, endDate, handleBefore } = data;
|
const {
|
||||||
|
id,
|
||||||
|
firstName,
|
||||||
|
lastName,
|
||||||
|
ssn,
|
||||||
|
status,
|
||||||
|
nextStep,
|
||||||
|
service,
|
||||||
|
errandNumber,
|
||||||
|
startDate,
|
||||||
|
endDate,
|
||||||
|
handleBefore,
|
||||||
|
} = data;
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
firstName,
|
firstName,
|
||||||
lastName,
|
lastName,
|
||||||
fullName: `${firstName} ${lastName}`,
|
fullName: `${firstName} ${lastName}`,
|
||||||
|
ssn,
|
||||||
status,
|
status,
|
||||||
nextStep,
|
nextStep,
|
||||||
service,
|
service,
|
||||||
|
|||||||
Reference in New Issue
Block a user