diff --git a/landingPages/feedback/feedback.component.ts b/landingPages/feedback/feedback.component.ts index 03609b4d..50de1603 100644 --- a/landingPages/feedback/feedback.component.ts +++ b/landingPages/feedback/feedback.component.ts @@ -43,7 +43,7 @@ export class FeedbackComponent implements OnInit, OnChanges { public error: boolean = false; public form: FormGroup; public url: string = null; - public recipients: string[] = ['kostis30fylloy@gmail.com']; + public recipients: string[] = []; constructor(private fb: FormBuilder, private emailService: EmailService) { @@ -60,6 +60,7 @@ export class FeedbackComponent implements OnInit, OnChanges { } else if(this.dataProviderInfo) { this.title = this.dataProviderInfo.title.name; } + this.recipients = [this.properties.feedbackmail]; this.init(); } @@ -114,6 +115,14 @@ export class FeedbackComponent implements OnInit, OnChanges { this.emailService.contact(this.properties.adminToolsAPIURL + '/contact', Composer.composeEmailForFeedback(this.form.value, this.recipients)).subscribe(sent => { this.error = !sent; if(sent) { + if(this.form.get('email').value !== '') { + this.emailService.contact(this.properties.adminToolsAPIURL + '/contact', + Composer.composeEmailForUserAfterFeedback([this.form.get('email').value])).subscribe(sent => { + if(sent) { + //console.log('An email has been sent to user ' + this.form.get('email').value); + } + }) + } this.init(); this.sent = true; } diff --git a/landingPages/landing-utils/fundedBy.component.ts b/landingPages/landing-utils/fundedBy.component.ts index 2187db97..feaf131f 100644 --- a/landingPages/landing-utils/fundedBy.component.ts +++ b/landingPages/landing-utils/fundedBy.component.ts @@ -8,7 +8,7 @@ import {Project} from "../../utils/result-preview/result-preview";
  • Funded by: - + {{item['funderShortname']?item['funderShortname']:item['funderName']}} [no funder available] diff --git a/utils/authors/showAuthors.component.ts b/utils/authors/showAuthors.component.ts index 779c67ad..6fa69ef8 100644 --- a/utils/authors/showAuthors.component.ts +++ b/utils/authors/showAuthors.component.ts @@ -16,8 +16,8 @@ import {AlertModal} from "../modal/alert"; [class.uk-text-small]="small"> {{author.fullName}} - {{" "}} + + {{" "}} {{author.fullName}} diff --git a/utils/email/composer.ts b/utils/email/composer.ts index e702acd9..67aa41bd 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -65,7 +65,7 @@ export class Composer { return email; } - public static composeEmailForFeedback(info: {name: string, url: string, email: string, issues: any[],}, recipients: string[]): Email { + public static composeEmailForFeedback(info: {name: string, url: string, email: string, issues: any[]}, recipients: string[]): Email { let email: Email = new Email(); email.subject = 'Feedback report for ' + info.name; email.body = "
    " @@ -79,6 +79,17 @@ export class Composer { return email; } + public static composeEmailForUserAfterFeedback(recipients: string[]): Email { + let email: Email = new Email(); + email.subject = 'Feedback report received'; + email.body = "
    " + + "

    This is an automated message to let you know that your feedback has been successfully received. Our graph experts will get back to you as soon as possible.


    " + + "Thank you for contacting OpenAIRE." + + "
    "; + email.recipients = recipients; + return email; + } + public static composeEmailToInformOldManagersForTheNewOnes(communityName: string, communityId: string, firstVersionOfManagers: any, managers: any) : Email { let email: Email = new Email();