Linter error fixes for account-edit component
This commit is contained in:
parent
f6c0583481
commit
921b25718d
1 changed files with 13 additions and 13 deletions
|
@ -14,7 +14,7 @@ export class AccountEditComponent implements OnInit {
|
||||||
accountType: any;
|
accountType: any;
|
||||||
// @ViewChild('fileInput') fileInput;
|
// @ViewChild('fileInput') fileInput;
|
||||||
submitStatus: any;
|
submitStatus: any;
|
||||||
submitStatusError: string = 'Error received, please try again.';
|
submitStatusError = 'Error received, please try again.';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private http: Http,
|
private http: Http,
|
||||||
|
@ -72,7 +72,7 @@ export class AccountEditComponent implements OnInit {
|
||||||
console.log(this.settingForm.valid);
|
console.log(this.settingForm.valid);
|
||||||
if (!this.settingForm.valid && !this.settingOrganisationForm.valid) {
|
if (!this.settingForm.valid && !this.settingOrganisationForm.valid) {
|
||||||
console.log('Not Valid!');
|
console.log('Not Valid!');
|
||||||
this.submitStatus = "validation_failed";
|
this.submitStatus = 'validation_failed';
|
||||||
console.log(this.submitStatus);
|
console.log(this.submitStatus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ export class AccountEditComponent implements OnInit {
|
||||||
.subscribe(
|
.subscribe(
|
||||||
result => {
|
result => {
|
||||||
console.log('data submitted!');
|
console.log('data submitted!');
|
||||||
this.submitStatus = "success";
|
this.submitStatus = 'success';
|
||||||
console.log(this.submitStatus);
|
console.log(this.submitStatus);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
@ -116,13 +116,13 @@ export class AccountEditComponent implements OnInit {
|
||||||
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.submitStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
this.submitStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.submitStatusError = 'There was a server error, please try again later.';
|
this.submitStatusError = 'There was a server error, please try again later.';
|
||||||
}
|
}
|
||||||
this.submitStatus = "send_failed";
|
this.submitStatus = 'send_failed';
|
||||||
console.log(this.submitStatus);
|
console.log(this.submitStatus);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -132,7 +132,7 @@ export class AccountEditComponent implements OnInit {
|
||||||
console.log(this.settingForm.valid);
|
console.log(this.settingForm.valid);
|
||||||
if (!this.settingForm.valid && !this.settingCustomerForm.valid) {
|
if (!this.settingForm.valid && !this.settingCustomerForm.valid) {
|
||||||
console.log('Not Valid!');
|
console.log('Not Valid!');
|
||||||
this.submitStatus = "validation_failed";
|
this.submitStatus = 'validation_failed';
|
||||||
console.log(this.submitStatus);
|
console.log(this.submitStatus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ export class AccountEditComponent implements OnInit {
|
||||||
.subscribe(
|
.subscribe(
|
||||||
result => {
|
result => {
|
||||||
console.log('data submitted!');
|
console.log('data submitted!');
|
||||||
this.submitStatus = "success";
|
this.submitStatus = 'success';
|
||||||
console.log(this.submitStatus);
|
console.log(this.submitStatus);
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
@ -173,13 +173,13 @@ export class AccountEditComponent implements OnInit {
|
||||||
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.submitStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
this.submitStatusError = '"' + jsonError.error + '" Error, ' + jsonError.message;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.submitStatusError = 'There was a server error, please try again later.';
|
this.submitStatusError = 'There was a server error, please try again later.';
|
||||||
}
|
}
|
||||||
this.submitStatus = "send_failed";
|
this.submitStatus = 'send_failed';
|
||||||
console.log(this.submitStatus);
|
console.log(this.submitStatus);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Reference in a new issue