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({
|
||||
templateUrl: 'feedback.component.html',
|
||||
})
|
||||
export class FeedbackComponent {
|
||||
export class FeedbackComponent implements OnInit {
|
||||
feedbackForm: FormGroup;
|
||||
loggedInEmail: string;
|
||||
noEmail: boolean = false;
|
||||
noEmail = false;
|
||||
username: any;
|
||||
feedbackFormStatus: any;
|
||||
feedbackFormStatusError: string = 'Error received, please try again.';
|
||||
feedbackFormStatusError = 'Error received, please try again.';
|
||||
|
||||
constructor(
|
||||
private http: Http,
|
||||
|
@ -55,10 +55,10 @@ export class FeedbackComponent {
|
|||
.feedback(this.feedbackForm.value)
|
||||
.subscribe(
|
||||
result => {
|
||||
if ( result.success == true ) {
|
||||
if ( result.success === true ) {
|
||||
console.log('Successful Upload');
|
||||
console.log(result);
|
||||
this.feedbackFormStatus = "success";
|
||||
this.feedbackFormStatus = 'success';
|
||||
console.log(this.feedbackFormStatus);
|
||||
this.feedbackForm.patchValue({
|
||||
feedbacktext: '',
|
||||
|
@ -66,7 +66,7 @@ export class FeedbackComponent {
|
|||
} else {
|
||||
console.log('Upload Error');
|
||||
this.feedbackFormStatusError = JSON.stringify(result.status) + 'Error, ' + JSON.stringify(result.message);
|
||||
this.feedbackFormStatus = "send_failed";
|
||||
this.feedbackFormStatus = 'send_failed';
|
||||
console.log(this.feedbackFormStatus);
|
||||
}
|
||||
},
|
||||
|
@ -75,13 +75,13 @@ export class FeedbackComponent {
|
|||
console.log(error);
|
||||
try {
|
||||
console.log(error.error);
|
||||
let jsonError = error.json();
|
||||
console.log("boop");
|
||||
const jsonError = error.json();
|
||||
console.log('boop');
|
||||
this.feedbackFormStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
||||
} catch (e) {
|
||||
this.feedbackFormStatusError = 'There was a server error, please try again later.';
|
||||
}
|
||||
this.feedbackFormStatus = "send_failed";
|
||||
this.feedbackFormStatus = 'send_failed';
|
||||
console.log(this.feedbackFormStatus);
|
||||
}
|
||||
);
|
||||
|
|
Reference in a new issue