feat(mitt-konto): Added link to CIAM self-service to support edit functionality. (TV-954)
Merge in TEA/mina-sidor-fa-web from feature/TV-954-CIAM-self-service-link to develop Squashed commit of the following: commit 86ce019f1cbe2b78fec6f07ce28318004daf3b3f Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se> Date: Mon Dec 6 14:41:51 2021 +0100 Added link to CIAM self-service
This commit is contained in:
@@ -12,7 +12,13 @@
|
|||||||
</header>
|
</header>
|
||||||
<main class="my-account__contents" *ngIf="user$ | async as user; else loadingRef">
|
<main class="my-account__contents" *ngIf="user$ | async as user; else loadingRef">
|
||||||
<div class="my-account__block">
|
<div class="my-account__block">
|
||||||
<h2>Personuppgifter</h2>
|
<h2>
|
||||||
|
Personuppgifter
|
||||||
|
<ui-link-button [uiHref]="selfServiceUrl" uiTarget="_blank" uiType="tertiary">
|
||||||
|
<ui-icon [uiType]="IconType.EDIT"></ui-icon>
|
||||||
|
Ändra personuppgifter
|
||||||
|
</ui-link-button>
|
||||||
|
</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Förnamn</dt>
|
<dt>Förnamn</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { UiIconType } from '@ui/icon/icon-type.enum';
|
import { environment } from '@msfa-environment';
|
||||||
import { Employee } from '@msfa-models/employee.model';
|
import { Employee } from '@msfa-models/employee.model';
|
||||||
import { Organization } from '@msfa-models/organization.model';
|
import { Organization } from '@msfa-models/organization.model';
|
||||||
import { Role } from '@msfa-models/role.model';
|
import { Role } from '@msfa-models/role.model';
|
||||||
import { UserService } from '@msfa-services/api/user.service';
|
import { UserService } from '@msfa-services/api/user.service';
|
||||||
import { RoleService } from '@msfa-services/role.service';
|
import { RoleService } from '@msfa-services/role.service';
|
||||||
|
import { UiIconType } from '@ui/icon/icon-type.enum';
|
||||||
import { combineLatest, Observable } from 'rxjs';
|
import { combineLatest, Observable } from 'rxjs';
|
||||||
import { filter, map } from 'rxjs/operators';
|
import { filter, map } from 'rxjs/operators';
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ export class MyAccountComponent {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
allRoles: Role[] = this.roleService.allRoles;
|
allRoles: Role[] = this.roleService.allRoles;
|
||||||
|
selfServiceUrl = environment.ciam.selfServiceUrl;
|
||||||
readonly IconType = UiIconType;
|
readonly IconType = UiIconType;
|
||||||
|
|
||||||
constructor(private userService: UserService, private roleService: RoleService, private router: Router) {}
|
constructor(private userService: UserService, private roleService: RoleService, private router: Router) {}
|
||||||
|
|||||||
@@ -2,5 +2,6 @@ export interface Ciam {
|
|||||||
clientId: string;
|
clientId: string;
|
||||||
loginUrl: string;
|
loginUrl: string;
|
||||||
logoutUrl: string;
|
logoutUrl: string;
|
||||||
|
selfServiceUrl: string;
|
||||||
refreshUrl: string;
|
refreshUrl: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Feature } from '@msfa-enums/feature.enum';
|
import { Feature } from '@msfa-enums/feature.enum';
|
||||||
|
import { Ciam } from './ciam.model';
|
||||||
|
|
||||||
export interface Environment {
|
export interface Environment {
|
||||||
version?: string;
|
version?: string;
|
||||||
@@ -8,12 +9,7 @@ export interface Environment {
|
|||||||
headers: { [key: string]: string };
|
headers: { [key: string]: string };
|
||||||
skipHeadersOn: string[];
|
skipHeadersOn: string[];
|
||||||
};
|
};
|
||||||
ciam: {
|
ciam: Ciam;
|
||||||
clientId?: string;
|
|
||||||
loginUrl: string;
|
|
||||||
logoutUrl: string;
|
|
||||||
refreshUrl: string;
|
|
||||||
};
|
|
||||||
activeFeatures: Feature[];
|
activeFeatures: Feature[];
|
||||||
elastic?: {
|
elastic?: {
|
||||||
serviceName: string;
|
serviceName: string;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export const CIAM_TEST: Ciam = {
|
|||||||
clientId: '5d08c2e4-763e-42f6-b858-24e4773bb83d',
|
clientId: '5d08c2e4-763e-42f6-b858-24e4773bb83d',
|
||||||
loginUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/oauth2/authorization?response_type=code&scope=openid',
|
loginUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/oauth2/authorization?response_type=code&scope=openid',
|
||||||
logoutUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/logout',
|
logoutUrl: 'https://ciam-test.arbetsformedlingen.se:8443/uas/logout',
|
||||||
|
selfServiceUrl: 'https://ciam-test.arbetsformedlingen.se:7443/eidm2/wf/self-service',
|
||||||
refreshUrl: '/refreshToken',
|
refreshUrl: '/refreshToken',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -11,6 +12,7 @@ export const CIAM_PROD: Ciam = {
|
|||||||
clientId: '71010833-e445-4bbc-926a-775247b7a6e3',
|
clientId: '71010833-e445-4bbc-926a-775247b7a6e3',
|
||||||
loginUrl: 'https://ciam.arbetsformedlingen.se/uas/oauth2/authorization?response_type=code&scope=openid',
|
loginUrl: 'https://ciam.arbetsformedlingen.se/uas/oauth2/authorization?response_type=code&scope=openid',
|
||||||
logoutUrl: 'https://ciam.arbetsformedlingen.se/uas/logout',
|
logoutUrl: 'https://ciam.arbetsformedlingen.se/uas/logout',
|
||||||
|
selfServiceUrl: 'https://ciam.arbetsformedlingen.se/eidm2/wf/self-service',
|
||||||
refreshUrl: '/refreshToken',
|
refreshUrl: '/refreshToken',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -18,5 +20,6 @@ export const CIAM_MOCK: Ciam = {
|
|||||||
clientId: '',
|
clientId: '',
|
||||||
loginUrl: '/mock-login',
|
loginUrl: '/mock-login',
|
||||||
logoutUrl: '/mock-login',
|
logoutUrl: '/mock-login',
|
||||||
|
selfServiceUrl: 'https://ciam-test.arbetsformedlingen.se:7443/eidm2/wf/self-service',
|
||||||
refreshUrl: '/refreshToken',
|
refreshUrl: '/refreshToken',
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ng-template #externalLinkRef>
|
<ng-template #externalLinkRef>
|
||||||
<a *ngIf="uiHref" [ngClass]="linkButtonClass" [attr.href]="uiHref">
|
<a *ngIf="uiHref" [ngClass]="linkButtonClass" [attr.href]="uiHref" [attr.target]="uiTarget">
|
||||||
<ng-container *ngTemplateOutlet="contentRef"></ng-container>
|
<ng-container *ngTemplateOutlet="contentRef"></ng-container>
|
||||||
</a>
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export class LinkButtonComponent {
|
|||||||
@Input() uiFullWidth = false;
|
@Input() uiFullWidth = false;
|
||||||
@Input() uiRouterLink: string | string[];
|
@Input() uiRouterLink: string | string[];
|
||||||
@Input() uiHref: string;
|
@Input() uiHref: string;
|
||||||
|
@Input() uiTarget: '_blank' | '_self' | '_parent' | '_top' | string = '_self';
|
||||||
@Input() uiQueryParams: Params = null;
|
@Input() uiQueryParams: Params = null;
|
||||||
|
|
||||||
roundedButtonTypes: UiLinkButtonType[] = [
|
roundedButtonTypes: UiLinkButtonType[] = [
|
||||||
|
|||||||
Reference in New Issue
Block a user