Fix: Login deleting old clients was conflicting with login history

Chore: Moved to angular linting using the recommended plugins / settings
This commit is contained in:
2020-12-08 12:09:19 +05:30
parent d5048bc455
commit 57ef355170
176 changed files with 940 additions and 831 deletions
+15 -6
View File
@@ -105,7 +105,9 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
'f2',
(): boolean => {
setTimeout(() => {
if (this.dateElement) this.dateElement.nativeElement.focus();
if (this.dateElement) {
this.dateElement.nativeElement.focus();
}
}, 0);
return false; // Prevent bubbling
},
@@ -116,7 +118,9 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
new Hotkey(
'ctrl+s',
(): boolean => {
if (this.canSave()) this.save();
if (this.canSave()) {
this.save();
}
return false; // Prevent bubbling
},
['INPUT', 'SELECT', 'TEXTAREA'],
@@ -126,8 +130,9 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
new Hotkey(
'ctrl+p',
(): boolean => {
if (this.voucher.id && !this.voucher.posted && this.auth.allowed('post-vouchers'))
if (this.voucher.id && !this.voucher.posted && this.auth.allowed('post-vouchers')) {
this.post();
}
return false; // Prevent bubbling
},
['INPUT', 'SELECT', 'TEXTAREA'],
@@ -162,7 +167,9 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
focusAccount() {
setTimeout(() => {
if (this.accountElement) this.accountElement.nativeElement.focus();
if (this.accountElement) {
this.accountElement.nativeElement.focus();
}
}, 0);
}
@@ -203,7 +210,9 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
this.account = null;
this.accBal = null;
setTimeout(() => {
if (this.accountElement) this.accountElement.nativeElement.focus();
if (this.accountElement) {
this.accountElement.nativeElement.focus();
}
}, 0);
}
@@ -256,7 +265,7 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
}
return (
this.voucher.user.id === (this.auth.user as User).id ||
this.auth.allowed("edit-other-user's-vouchers")
this.auth.allowed('edit-other-user\'s-vouchers')
);
}