Linter error fixes for account-edit component

This commit is contained in:
Tom Bloor 2017-09-19 14:56:07 +01:00
parent f6c0583481
commit 921b25718d

View file

@ -14,7 +14,7 @@ export class AccountEditComponent implements OnInit {
accountType: any;
// @ViewChild('fileInput') fileInput;
submitStatus: any;
submitStatusError: string = 'Error received, please try again.';
submitStatusError = 'Error received, please try again.';
constructor(
private http: Http,
@ -72,7 +72,7 @@ export class AccountEditComponent implements OnInit {
console.log(this.settingForm.valid);
if (!this.settingForm.valid && !this.settingOrganisationForm.valid) {
console.log('Not Valid!');
this.submitStatus = "validation_failed";
this.submitStatus = 'validation_failed';
console.log(this.submitStatus);
return;
}
@ -108,7 +108,7 @@ export class AccountEditComponent implements OnInit {
.subscribe(
result => {
console.log('data submitted!');
this.submitStatus = "success";
this.submitStatus = 'success';
console.log(this.submitStatus);
},
error => {
@ -116,13 +116,13 @@ export class AccountEditComponent implements OnInit {
console.log(error);
try {
console.log(error.error);
let jsonError = error.json();
console.log("boop");
const jsonError = error.json();
console.log('boop');
this.submitStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
} catch (e) {
this.submitStatusError = 'There was a server error, please try again later.';
}
this.submitStatus = "send_failed";
this.submitStatus = 'send_failed';
console.log(this.submitStatus);
}
);
@ -132,7 +132,7 @@ export class AccountEditComponent implements OnInit {
console.log(this.settingForm.valid);
if (!this.settingForm.valid && !this.settingCustomerForm.valid) {
console.log('Not Valid!');
this.submitStatus = "validation_failed";
this.submitStatus = 'validation_failed';
console.log(this.submitStatus);
return;
}
@ -165,7 +165,7 @@ export class AccountEditComponent implements OnInit {
.subscribe(
result => {
console.log('data submitted!');
this.submitStatus = "success";
this.submitStatus = 'success';
console.log(this.submitStatus);
},
error => {
@ -173,13 +173,13 @@ export class AccountEditComponent implements OnInit {
console.log(error);
try {
console.log(error.error);
let jsonError = error.json();
console.log("boop");
const jsonError = error.json();
console.log('boop');
this.submitStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
} catch (e) {
this.submitStatusError = 'There was a server error, please try again later.';
}
this.submitStatus = "send_failed";
this.submitStatus = 'send_failed';
console.log(this.submitStatus);
}
);