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:
@ -1,5 +1,5 @@
|
||||
import { TestBed, inject } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { TestBed, inject } from '@angular/core/testing';
|
||||
|
||||
import { IssueGridService } from './issue-grid.service';
|
||||
|
||||
|
||||
@ -16,10 +16,10 @@ export class IssueGridService {
|
||||
constructor(private http: HttpClient, private log: ErrorLoggerService) {}
|
||||
|
||||
issueGrid(date: string): Observable<IssueGridItem[]> {
|
||||
return <Observable<IssueGridItem[]>>(
|
||||
this.http
|
||||
.get<IssueGridItem[]>(`${url}/${date}`)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'autocomplete')))
|
||||
);
|
||||
return this.http
|
||||
.get<IssueGridItem[]>(`${url}/${date}`)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'autocomplete'))) as Observable<
|
||||
IssueGridItem[]
|
||||
>;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { inject, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { IssueResolver } from './issue-resolver.service';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { IssueComponent } from './issue.component';
|
||||
|
||||
@ -103,7 +103,9 @@ export class IssueComponent 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
|
||||
},
|
||||
@ -151,7 +153,9 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
focusBatch() {
|
||||
setTimeout(() => {
|
||||
if (this.batchElement) this.batchElement.nativeElement.focus();
|
||||
if (this.batchElement) {
|
||||
this.batchElement.nativeElement.focus();
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
@ -204,7 +208,9 @@ export class IssueComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
this.batch = null;
|
||||
setTimeout(() => {
|
||||
if (this.batchElement) this.batchElement.nativeElement.focus();
|
||||
if (this.batchElement) {
|
||||
this.batchElement.nativeElement.focus();
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
@ -256,7 +262,7 @@ export class IssueComponent 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')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user