Move email's body initialization to library

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@54446 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-12-18 12:56:54 +00:00
parent 7871be91b0
commit 535bcec34d
1 changed files with 7 additions and 8 deletions

View File

@ -85,16 +85,15 @@ export class InviteComponent implements OnInit {
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 = {fromMessage: ", on behalf of ", fromName: this.fullname, paragraphs: this.defaultBody, signature: "OpenAIRE team", note: ""};
this.email = {body: "", subject: "[OpenAIRE-Connect] " + community.title, recipients: []};
this.recipients = "";
this.defaultBody = Composer.initializeInvitationEmailsBody(this.communityId, this.community.title);
this.status = this.errorCodes.DONE;
// TODO move the initialisation
this.body = {fromMessage: ", on behalf of ", fromName: this.fullname, paragraphs: this.defaultBody, signature: "OpenAIRE team", note: ""};
this.email = {body: "", subject: "[OpenAIRE-Connect] " + community.title, recipients: []};
this.recipients = "";
this.status = this.errorCodes.DONE;
},
error => this.handleError(error)
);