|
|
@@ -58,12 +58,17 @@ export default function AdminUsersFilters({
|
|
|
onDraftChange,
|
|
|
onApply,
|
|
|
onReset,
|
|
|
+ loadedCount = 0,
|
|
|
disabled,
|
|
|
}) {
|
|
|
const q = draft?.q ?? "";
|
|
|
const role = draft?.role ?? "";
|
|
|
const branchId = draft?.branchId ?? "";
|
|
|
|
|
|
+ const safeLoadedCount = Number.isFinite(loadedCount)
|
|
|
+ ? Math.max(0, loadedCount)
|
|
|
+ : 0;
|
|
|
+
|
|
|
return (
|
|
|
<div className="space-y-3">
|
|
|
<div className="grid gap-3 md:grid-cols-3">
|
|
|
@@ -96,19 +101,25 @@ export default function AdminUsersFilters({
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div className="flex flex-wrap gap-2">
|
|
|
- <Button type="button" onClick={onApply} disabled={disabled}>
|
|
|
- Anwenden
|
|
|
- </Button>
|
|
|
+ <div className="flex flex-wrap items-center justify-between gap-2">
|
|
|
+ <div className="flex flex-wrap gap-2">
|
|
|
+ <Button type="button" onClick={onApply} disabled={disabled}>
|
|
|
+ Anwenden
|
|
|
+ </Button>
|
|
|
|
|
|
- <Button
|
|
|
- type="button"
|
|
|
- variant="outline"
|
|
|
- onClick={onReset}
|
|
|
- disabled={disabled}
|
|
|
- >
|
|
|
- Zurücksetzen
|
|
|
- </Button>
|
|
|
+ <Button
|
|
|
+ type="button"
|
|
|
+ variant="outline"
|
|
|
+ onClick={onReset}
|
|
|
+ disabled={disabled}
|
|
|
+ >
|
|
|
+ Zurücksetzen
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <span className="rounded-md bg-muted px-2 py-1 text-xs text-muted-foreground">
|
|
|
+ {safeLoadedCount} Benutzer geladen
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|