[Library | Trunk]: Add email composer function as parameter

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60252 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-01-15 11:58:34 +00:00
parent 0a8713e225
commit 3b0f4a3e2b
1 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
public role: "member" | "manager" = "manager";
@Input()
public message: string = null;
@Input()
public emailComposer: Function;
public user: User = null;
public active: any[];
public pending: any[];
@ -179,7 +181,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
this.loadPending = true;
let details = {
link: this.link,
email: Composer.composeEmailForMonitorDashboard(this.name, this.invited.value, this.role)
email: this.emailComposer(this.name, this.invited.value, this.role)
}
this.userRegistryService.invite(this.type, this.id, details, this.role).subscribe(() => {
if (!this.pending.includes(this.invited.value)) {