Show fullName in invite form

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@54049 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-11-29 12:39:51 +00:00
parent 15a93413ac
commit 2cf817426a
1 changed files with 5 additions and 4 deletions

View File

@ -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 = '<p>You are invited to subscribe to <a href="https://beta.' + this.communityId + '.openaire.eu/">' + this.community.title + '</a> dashboard.'
+ '<br>The purpose of this dashboard is to gather, link &amp; monitor the research results related to your community.</p><p>The community dashboard is part of the <a href="https://connect.openaire.eu/">OpenAIRE-Connect</a> project and currently is in BETA version.</p>';
// 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 = "";
},