fix: lock directory during assignment changes

This commit is contained in:
Bastian Wagner
2026-08-01 10:44:17 +02:00
parent 9dc9dc3dcf
commit 9eec6268d0
3 changed files with 91 additions and 5 deletions

View File

@@ -15,10 +15,11 @@
type="search"
name="directorySearch"
[value]="searchDraft()"
[disabled]="assignmentBusyUserId() !== null"
(input)="searchDraft.set($any($event.target).value)"
/>
</mat-form-field>
<button mat-stroked-button type="submit" [disabled]="loading()">Suchen</button>
<button mat-stroked-button type="submit" [disabled]="loading() || assignmentBusyUserId() !== null">Suchen</button>
</form>
@if (mutationError()) {
@@ -138,11 +139,21 @@
</div>
<nav class="pagination" aria-label="Benutzerseiten">
<button mat-button type="button" [disabled]="directory()!.page <= 1 || loading()" (click)="previousPage()">
<button
mat-button
type="button"
[disabled]="directory()!.page <= 1 || loading() || assignmentBusyUserId() !== null"
(click)="previousPage()"
>
<mat-icon>chevron_left</mat-icon>Zurück
</button>
<span>Seite {{ directory()!.page }} · {{ directory()!.total }} Benutzer</span>
<button mat-button type="button" [disabled]="!directory()!.hasNextPage || loading()" (click)="nextPage()">
<button
mat-button
type="button"
[disabled]="!directory()!.hasNextPage || loading() || assignmentBusyUserId() !== null"
(click)="nextPage()"
>
Weiter<mat-icon>chevron_right</mat-icon>
</button>
</nav>