Linter error fixes for feedback component
This commit is contained in:
parent
921b25718d
commit
662d6be5c9
1 changed files with 13 additions and 13 deletions
|
@ -7,13 +7,13 @@ import 'rxjs/add/operator/map';
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'feedback.component.html',
|
templateUrl: 'feedback.component.html',
|
||||||
})
|
})
|
||||||
export class FeedbackComponent {
|
export class FeedbackComponent implements OnInit {
|
||||||
feedbackForm: FormGroup;
|
feedbackForm: FormGroup;
|
||||||
loggedInEmail: string;
|
loggedInEmail: string;
|
||||||
noEmail: boolean = false;
|
noEmail = false;
|
||||||
username: any;
|
username: any;
|
||||||
feedbackFormStatus: any;
|
feedbackFormStatus: any;
|
||||||
feedbackFormStatusError: string = 'Error received, please try again.';
|
feedbackFormStatusError = 'Error received, please try again.';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private http: Http,
|
private http: Http,
|
||||||
|
@ -55,10 +55,10 @@ export class FeedbackComponent {
|
||||||
.feedback(this.feedbackForm.value)
|
.feedback(this.feedbackForm.value)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
result => {
|
result => {
|
||||||
if ( result.success == true ) {
|
if ( result.success === true ) {
|
||||||
console.log('Successful Upload');
|
console.log('Successful Upload');
|
||||||
console.log(result);
|
console.log(result);
|
||||||
this.feedbackFormStatus = "success";
|
this.feedbackFormStatus = 'success';
|
||||||
console.log(this.feedbackFormStatus);
|
console.log(this.feedbackFormStatus);
|
||||||
this.feedbackForm.patchValue({
|
this.feedbackForm.patchValue({
|
||||||
feedbacktext: '',
|
feedbacktext: '',
|
||||||
|
@ -66,7 +66,7 @@ export class FeedbackComponent {
|
||||||
} else {
|
} else {
|
||||||
console.log('Upload Error');
|
console.log('Upload Error');
|
||||||
this.feedbackFormStatusError = JSON.stringify(result.status) + 'Error, ' + JSON.stringify(result.message);
|
this.feedbackFormStatusError = JSON.stringify(result.status) + 'Error, ' + JSON.stringify(result.message);
|
||||||
this.feedbackFormStatus = "send_failed";
|
this.feedbackFormStatus = 'send_failed';
|
||||||
console.log(this.feedbackFormStatus);
|
console.log(this.feedbackFormStatus);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -75,13 +75,13 @@ export class FeedbackComponent {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
try {
|
try {
|
||||||
console.log(error.error);
|
console.log(error.error);
|
||||||
let jsonError = error.json();
|
const jsonError = error.json();
|
||||||
console.log("boop");
|
console.log('boop');
|
||||||
this.feedbackFormStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
this.feedbackFormStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.feedbackFormStatusError = 'There was a server error, please try again later.';
|
this.feedbackFormStatusError = 'There was a server error, please try again later.';
|
||||||
}
|
}
|
||||||
this.feedbackFormStatus = "send_failed";
|
this.feedbackFormStatus = 'send_failed';
|
||||||
console.log(this.feedbackFormStatus);
|
console.log(this.feedbackFormStatus);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Reference in a new issue