feat(admin): archive users and their profiles permanently
All checks were successful
Build and Release FEDEO / verify (push) Successful in 1m5s
Build and Release FEDEO / build-and-release (push) Successful in 6m53s

This commit is contained in:
2026-10-15 14:22:12 +02:00
parent 5dc9e686fc
commit 4ffafef3f1
26 changed files with 519 additions and 75 deletions

View File

@@ -12,6 +12,7 @@ const createUserModalOpen = ref(false)
const createdUserPassword = ref("")
const users = ref<AdminUser[]>([])
const searchString = ref("")
const showArchived = ref(false)
const createUserForm = ref({
email: "",
@@ -27,13 +28,15 @@ const templateColumns = [
{ key: "email", label: "E-Mail" },
{ key: "tenant_count", label: "Tenants" },
{ key: "is_admin", label: "Admin" },
{ key: "status", label: "Status" },
]
const filteredRows = computed(() => {
const search = searchString.value.trim().toLowerCase()
const rows = users.value.map((user) => ({
const rows = users.value.filter((user) => showArchived.value || !user.archived_at).map((user) => ({
...user,
tenant_count: user.tenant_ids.length,
status: user.archived_at ? "Archiviert" : "Aktiv",
is_admin: user.is_admin ? "Ja" : "Nein",
}))
@@ -50,7 +53,7 @@ const fetchUsers = async () => {
loading.value = true
try {
const overview = await admin.getOverview()
const overview = await admin.getOverview(true)
users.value = overview.users
} catch (err: any) {
console.error("[administration/users/index]", err)
@@ -119,6 +122,7 @@ onMounted(async () => {
<template>
<UDashboardNavbar title="Administration: Benutzer" :badge="filteredRows.length">
<template #right>
<UCheckbox v-model="showArchived" label="Archivierte anzeigen" />
<UInput
v-model="searchString"
icon="i-heroicons-magnifying-glass"