diff --git a/src/app/utils/subscribe/invite/invite.component.ts b/src/app/utils/subscribe/invite/invite.component.ts index 681bf30..324b9f6 100644 --- a/src/app/utils/subscribe/invite/invite.component.ts +++ b/src/app/utils/subscribe/invite/invite.component.ts @@ -37,6 +37,7 @@ export class InviteComponent implements OnInit { public email: Email; public body: Body; public recipients: string; + public fullname:string; public areValid: boolean = true; @@ -80,12 +81,13 @@ export class InviteComponent implements OnInit { this._communityService.getCommunity(this.properties, this.properties.communityAPI+this.communityId).subscribe ( community => { this.community = community; - + this.fullname = Session.getUserFullName(); + console.log("Fullname from session " + Session.getUserFullName()); this.defaultBody = '

You are invited to subscribe to ' + this.community.title + ' dashboard.' + '
The purpose of this dashboard is to gather, link & monitor the research results related to your community.

The community dashboard is part of the OpenAIRE-Connect project and currently is in BETA version.

'; // TODO move the initialisation - this.body = {/*salutation: "Dear Sir/Madame,",*/ fromMessage: ", on behalf of ", fromName: "", paragraphs: this.defaultBody, /*closing: "Kind regards,",*/ signature: "OpenAIRE team", ps: ""}; + this.body = {/*salutation: "Dear Sir/Madame,",*/ fromMessage: ", on behalf of ", fromName: this.fullname, paragraphs: this.defaultBody, /*closing: "Kind regards,",*/ signature: "OpenAIRE team", ps: ""}; this.email = {body: "", subject: "[OpenAIRE-Connect] " + community.title, recipients: []}; this.recipients = ""; @@ -93,7 +95,6 @@ export class InviteComponent implements OnInit { }, error => this.handleError(error) ); - } else { this.status = this.errorCodes.DONE; this.missingCommunityId = "There is no community selected!"; @@ -130,7 +131,7 @@ export class InviteComponent implements OnInit { this.successfulSentMessage = res + " email sent successfully!"; } - this.body = {/*salutation: "Dear Sir/Madame,",*/ fromMessage: ", on behalf of ", fromName: "", paragraphs: this.defaultBody, /*closing: "Kind regards,",*/ signature: "OpenAIRE team", ps: ""}; + this.body = {/*salutation: "Dear Sir/Madame,",*/ fromMessage: ", on behalf of ", fromName: this.fullname, paragraphs: this.defaultBody, /*closing: "Kind regards,",*/ signature: "OpenAIRE team", ps: ""}; this.email = {body: "", subject: "[OpenAIRE-Connect] " + this.community.title, recipients: []}; this.recipients = ""; },