diff --git a/connect/connectHelper.ts b/connect/connectHelper.ts index c58ad99f..098553d7 100644 --- a/connect/connectHelper.ts +++ b/connect/connectHelper.ts @@ -3,7 +3,7 @@ import {HttpParams} from '@angular/common/http'; export class ConnectHelper { public static getCommunityFromDomain(domain: string): string{ - domain = "beta.covid-19.openaire.eu"; //for testing + //domain = "beta.covid-19.openaire.eu"; //for testing if (domain.indexOf('openaire.eu') === -1) { return null; } diff --git a/utils/email/composer.ts b/utils/email/composer.ts index a6580ff3..28e4aa04 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -13,9 +13,9 @@ export class Composer { private static openaireAddress = "www.openaire.eu
"; private static signature = Composer.closing + "
" + Composer.openaireAddress; - private static ifYouAreNotResponsible(): string { + private static ifYouAreNotResponsible(mail): string { return "If you are not responsible for this community, please " - + "contact us. "; + + "contact us. "; } private static manageNotificationSettings(communityId: string): string { @@ -28,7 +28,7 @@ export class Composer { + "" + communityName + ". "; } - public static composeEmailForNewManager(communityId: string, communityName: string, newCommunityManagers: any): Email { + public static composeEmailForNewManager(communityId: string, communityName: string, newCommunityManagers: any, mail: string): Email { let email: Email = new Email(); email.subject = this.subjectPrefix + communityName + ": Welcome new manager"; @@ -42,7 +42,7 @@ export class Composer { + "You can access the administration tool by clicking the \"Manage\" button that will be available in the top right corner of the dashboard." + "

" + this.signature - + "

" + this.ifYouAreNotResponsible() + "

" + + "

" + this.ifYouAreNotResponsible(mail) + "

" + ""; email.recipients = newCommunityManagers; @@ -90,7 +90,7 @@ export class Composer { return email; } - public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers: any) : Email { + public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers: any, mail: string) : Email { let email: Email = new Email(); email.subject = this.subjectPrefix + communityName + ": Managers list notification"; @@ -100,7 +100,7 @@ export class Composer { + this.signature + "

" + this.youAreManagerOfTheCommunity(communityId, communityName) - + this.ifYouAreNotResponsible() + + this.ifYouAreNotResponsible(mail) + "
" + this.manageNotificationSettings(communityId) + "

" @@ -110,13 +110,13 @@ export class Composer { return email; } - public static composeEmailToInformManagers(communityName: string, communityId: string, managers: any, subscriberMail: any): Email { + public static composeEmailToInformManagers(communityName: string, communityId: string, managers: any, subscriberMail: any, adminPortalURL: string): Email { let email: Email = new Email(); email.subject = this.subjectPrefix + communityName + ": New subscriber notification"; email.body = "
" + "

There is a new subscriber ("+subscriberMail+") for \"" + communityName + "\" community. Click " - + "here to manage the subscribers list.

" + this.signature + "

" diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index 5c57914b..ecea4a65 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -158,4 +158,5 @@ export class EnvProperties { indexInfoAPI: string; altMetricsAPIURL: string; b2noteAPIURL: string; + adminPortalURL: string; }