From 53400f774505b7461ba5773f3d2d40cfc7091e34 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 20 Jan 2023 17:31:36 +0200 Subject: [PATCH] Add shouldUpdate in getStakeholder method. Role-verification: Add userInfoLink if user-info is on other portal --- monitor/services/stakeholder.service.ts | 10 +++------- role-verification/role-verification.component.ts | 7 ++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/monitor/services/stakeholder.service.ts b/monitor/services/stakeholder.service.ts index 8b546afd..272cbb39 100644 --- a/monitor/services/stakeholder.service.ts +++ b/monitor/services/stakeholder.service.ts @@ -26,12 +26,8 @@ export class StakeholderService { private promise: Promise; private sub; - constructor(private http: HttpClient, private route: ActivatedRoute) { + constructor(private http: HttpClient) { this.stakeholderSubject = new BehaviorSubject(null); -/* let source = new EventSource(properties.monitorServiceAPIURL + "/stakeholder/events", {withCredentials: true}); - source.addEventListener('message', message => { - console.log(message.data); - });*/ } ngOnDestroy() { @@ -44,8 +40,8 @@ export class StakeholderService { } } - getStakeholder(alias: string): Observable { - if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias) { + getStakeholder(alias: string, shouldUpdate: boolean = false): Observable { + if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) { this.promise = new Promise((resolve, reject) => { this.sub = this.http.get(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => { return this.formalize(this.checkIsUpload(stakeholder)); diff --git a/role-verification/role-verification.component.ts b/role-verification/role-verification.component.ts index 326b0d23..1f2b3a72 100644 --- a/role-verification/role-verification.component.ts +++ b/role-verification/role-verification.component.ts @@ -65,7 +65,10 @@ import {Composer} from "../utils/email/composer"; We are unable to process the request. What happened?
  • You are logged in with a different email, than the one you have received the invitation. - Check here the email of your account.
  • + Check + here + here + the email of your account.
  • The invitation has been canceled.
  • The URL is invalid.
@@ -84,6 +87,8 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn public service: "connect" | "monitor" = "monitor"; @Input() public userInfoLinkPrefix = ''; + @Input() + public userInfoLink = null; public user: User; public verification: any; public code: UntypedFormControl;