linting code

This commit is contained in:
Wicklow 2023-10-12 15:35:07 +02:00
parent 72a7463533
commit 5db23f87b4

View File

@ -93,14 +93,14 @@ export class UserListComponent extends RestTable <User> implements OnInit {
ngOnInit () { ngOnInit () {
this.route.queryParams.subscribe(params => { this.route.queryParams.subscribe(params => {
const paramPage = +params['page']; const paramPage = +params['page']
const paramCount = +params['count']; const paramCount = +params['count']
if (!isNaN(paramPage) && !isNaN(paramCount)) { if (!isNaN(paramPage) && !isNaN(paramCount)) {
this.rowsPerPage = paramCount this.rowsPerPage = paramCount
this.start = paramCount * (paramPage - 1); this.start = paramCount * (paramPage - 1)
} }
}); })
this.serverService.getConfig() this.serverService.getConfig()
.subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification) .subscribe(config => this.requiresEmailVerification = config.signup.requiresEmailVerification)
@ -334,15 +334,15 @@ export class UserListComponent extends RestTable <User> implements OnInit {
}) })
} }
onLazyLoadHandler(event: TableLazyLoadEvent) { onLazyLoadHandler (event: TableLazyLoadEvent) {
this.loadLazy(event) this.loadLazy(event)
const url = new URL(window.location.href) const url = new URL(window.location.href)
const page = event.first/event.rows + 1 const page = event.first / event.rows + 1
url.searchParams.set('page', page.toString()) url.searchParams.set('page', page.toString())
url.searchParams.set('count', event.rows.toString()) url.searchParams.set('count', event.rows.toString())
window.history.pushState({}, document.title, url.href) window.history.pushState({}, document.title, url.href)
this.start = event.first this.start = event.first
@ -350,5 +350,4 @@ export class UserListComponent extends RestTable <User> implements OnInit {
this.pagination.start = this.start this.pagination.start = this.start
} }
} }