fix: lock directory during assignment changes
This commit is contained in:
@@ -90,6 +90,7 @@ export class Users {
|
||||
}
|
||||
|
||||
protected submitSearch(): void {
|
||||
if (this.assignmentBusyUserId() !== null) return;
|
||||
const search = this.searchDraft().trim();
|
||||
if (this.loading() && search === this.search() && this.page() === 1) return;
|
||||
this.search.set(search);
|
||||
@@ -98,13 +99,13 @@ export class Users {
|
||||
}
|
||||
|
||||
protected previousPage(): void {
|
||||
if (this.page() <= 1 || this.loading()) return;
|
||||
if (this.page() <= 1 || this.loading() || this.assignmentBusyUserId() !== null) return;
|
||||
this.page.update((value) => value - 1);
|
||||
this.loadDirectory();
|
||||
}
|
||||
|
||||
protected nextPage(): void {
|
||||
if (!this.directory()?.hasNextPage || this.loading()) return;
|
||||
if (!this.directory()?.hasNextPage || this.loading() || this.assignmentBusyUserId() !== null) return;
|
||||
this.page.update((value) => value + 1);
|
||||
this.loadDirectory();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user