Use Composer
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@54343 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
70acf2df7d
commit
54314fdaaf
|
@ -12,6 +12,7 @@ import {EnvProperties} from '../../../openaire
|
|||
|
||||
import {CommunityInfo} from '../../../openaireLibrary/connect/community/communityInfo';
|
||||
import {Email} from "../../../openaireLibrary/utils/email/email";
|
||||
import {Composer} from "../../../openaireLibrary/utils/email/composer";
|
||||
|
||||
import {Session} from '../../../openaireLibrary/login/utils/helper.class';
|
||||
import {LoginErrorCodes} from '../../../openaireLibrary/login/utils/guardHelper.class';
|
||||
|
@ -233,21 +234,43 @@ export class CommunityEditFormComponent implements OnInit{
|
|||
}
|
||||
|
||||
private sendMailToNewManagers(managers: any) {
|
||||
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/", this.composeEmailForNewManager(this.community.title, managers)).subscribe(
|
||||
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/",
|
||||
Composer.composeEmailForNewManager(this.communityId, this.community.title, managers)).subscribe(
|
||||
res => {
|
||||
console.log("The email has been sent successfully!")
|
||||
},
|
||||
error => console.log(error)
|
||||
);
|
||||
);
|
||||
|
||||
// this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/sendMail/",
|
||||
// this.composeEmailForNewManager(this.community.title, managers)).subscribe(
|
||||
// res => {
|
||||
// console.log("The email has been sent successfully!")
|
||||
// },
|
||||
// error => console.log(error)
|
||||
// );
|
||||
}
|
||||
|
||||
private informOldManagersForTheNewOnes(managers: any) {
|
||||
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/notifyForNewManagers/" + this.communityId, this.composeEmailToInformOldManagersForTheNewOnes(this.community.title, this.communityId, this.firstVersionOfManagers)).subscribe(
|
||||
this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/notifyForNewManagers/" + this.communityId,
|
||||
Composer.composeEmailToInformOldManagersForTheNewOnes(this.community.title, this.communityId,
|
||||
this.firstVersionOfManagers,
|
||||
this.community.managers)).subscribe(
|
||||
res => {
|
||||
console.log("The email has been sent successfully!")
|
||||
},
|
||||
error => console.log(error)
|
||||
);
|
||||
);
|
||||
|
||||
// this._emailService.sendEmail(this.properties.adminToolsAPIURL + "/notifyForNewManagers/" + this.communityId,
|
||||
// this.composeEmailToInformOldManagersForTheNewOnes(this.community.title,
|
||||
// this.communityId,
|
||||
// this.firstVersionOfManagers)).subscribe(
|
||||
// res => {
|
||||
// console.log("The email has been sent successfully!")
|
||||
// },
|
||||
// error => console.log(error)
|
||||
// );
|
||||
}
|
||||
|
||||
private composeEmailForNewManager(communityName: string, newCommunityManagers: any): Email {
|
||||
|
|
Loading…
Reference in New Issue