-
- {{field}}
-
-
+
+
Email sent failed! Please try again.
+
+
+
+
Issue #{{i + 1}}
+
+
+
+
-
-
-
- Report issue for another field
-
-
-
-
-
-
Please leave us your E-mail to notify you about the reporting status.
-
-
-
-
-
-
-
-
-
+
+
+
+ Please leave us your E-mail to notify you about the reporting status.
+
+
+
+
+
+
+
+
+
diff --git a/landingPages/feedback/feedback.component.ts b/landingPages/feedback/feedback.component.ts
index 85216ba3..54a40930 100644
--- a/landingPages/feedback/feedback.component.ts
+++ b/landingPages/feedback/feedback.component.ts
@@ -29,6 +29,7 @@ export class FeedbackComponent implements OnInit, OnChanges {
@ViewChild('feedback') feedback: ElementRef;
@ViewChild('backModal') backModal: AlertModal;
@Input() showForm: boolean = false;
+ @Output() showFormChange: EventEmitter = new EventEmitter();
@Input() resultLandingInfo: ResultLandingInfo = null;
@Input() organizationInfo: OrganizationInfo = null;
@Input() projectInfo: ProjectInfo = null;
@@ -37,7 +38,6 @@ export class FeedbackComponent implements OnInit, OnChanges {
@Input() properties: EnvProperties = null;
@Input() entityType: string = null;
@Input() fields: string[] = [];
- @Output() show: EventEmitter = new EventEmitter();
public sending: boolean = false;
public sent: boolean = false;
@@ -45,10 +45,12 @@ export class FeedbackComponent implements OnInit, OnChanges {
public form: FormGroup;
public url: string = null;
public recipients: string[] = [];
- subscriptions =[];
+ subscriptions = [];
+
constructor(private fb: FormBuilder,
private emailService: EmailService) {
}
+
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
@@ -56,15 +58,16 @@ export class FeedbackComponent implements OnInit, OnChanges {
}
});
}
+
ngOnInit(): void {
- if(typeof window !== "undefined") {
- this.url = window.location.href;
+ if (typeof window !== "undefined") {
+ this.url = window.location.href;
}
- if(this.resultLandingInfo) {
+ if (this.resultLandingInfo) {
this.title = this.resultLandingInfo.title;
- } else if(this.organizationInfo) {
+ } else if (this.organizationInfo) {
this.title = this.organizationInfo.title.name;
- } else if(this.dataProviderInfo) {
+ } else if (this.dataProviderInfo) {
this.title = this.dataProviderInfo.title.name;
}
this.recipients = [this.properties.feedbackmail];
@@ -72,7 +75,8 @@ export class FeedbackComponent implements OnInit, OnChanges {
}
ngOnChanges(changes: SimpleChanges): void {
- if(changes.showForm) {
+ if (changes.showForm) {
+ console.log(changes);
this.init();
}
}
@@ -106,7 +110,7 @@ export class FeedbackComponent implements OnInit, OnChanges {
}
changeShowForm(value: boolean) {
- this.show.emit(value);
+ this.showFormChange.emit(value);
HelperFunctions.scroll();
}
@@ -127,13 +131,13 @@ export class FeedbackComponent implements OnInit, OnChanges {
this.subscriptions.push(this.emailService.contact(this.properties,
Composer.composeEmailForFeedback(this.form.value, this.recipients), this.form.get('recaptcha').value).subscribe(sent => {
this.error = !sent;
- if(sent) {
- if(this.form.get('email').value !== '') {
+ if (sent) {
+ if (this.form.get('email').value !== '') {
this.subscriptions.push(this.emailService.contact(this.properties,
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);
- }
+ if (sent) {
+ //console.log('An email has been sent to user ' + this.form.get('email').value);
+ }
}));
}
this.init();
diff --git a/landingPages/feedback/feedback.module.ts b/landingPages/feedback/feedback.module.ts
index 4e485c2b..23ba3680 100644
--- a/landingPages/feedback/feedback.module.ts
+++ b/landingPages/feedback/feedback.module.ts
@@ -7,9 +7,11 @@ import {MatSelectModule} from "@angular/material/select";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
import {EmailService} from "../../utils/email/email.service";
import {RecaptchaModule} from "ng-recaptcha";
+import {IconsModule} from "../../utils/icons/icons.module";
+import {InputModule} from "../../sharedComponents/input/input.module";
@NgModule({
- imports: [CommonModule, LandingHeaderModule, ReactiveFormsModule, MatSelectModule, AlertModalModule, RecaptchaModule],
+ imports: [CommonModule, LandingHeaderModule, ReactiveFormsModule, MatSelectModule, AlertModalModule, RecaptchaModule, IconsModule, InputModule],
declarations: [FeedbackComponent],
providers: [EmailService],
exports: [FeedbackComponent]
diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html
index 1315c818..ccbf2b02 100644
--- a/landingPages/organization/organization.component.html
+++ b/landingPages/organization/organization.component.html
@@ -273,7 +273,7 @@
+ [(showForm)]="showFeedback">