Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2026-07-14 16:33:07 +02:00
8 changed files with 253 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ export type AdminTenant = {
short: string
user_count: number
locked?: string | null
lockedByExportJobId?: string | null
}
export type AdminUserProfile = {

View File

@@ -29,6 +29,13 @@ const lastImportResult = ref<null | {
restoredFiles: number
skippedFiles: number
}>(null)
const lockedOptions = [
{ label: "Aktiv", value: null },
{ label: "Tenant-Wartung", value: "maintenance_tenant" },
{ label: "Globale Wartung", value: "maintenance" },
{ label: "Allgemeine Sperre", value: "general" },
{ label: "Kein Abonnement", value: "no_subscription" },
]
const tenantForm = ref<AdminTenant | null>(null)
const assignedUsers = ref<AdminUser[]>([])
@@ -77,6 +84,7 @@ const saveTenant = async () => {
await admin.updateTenant(tenantForm.value.id, {
name: tenantForm.value.name,
short: tenantForm.value.short,
locked: tenantForm.value.locked || null,
})
await fetchTenant()
@@ -316,7 +324,25 @@ onMounted(async () => {
<UFormField label="Kürzel">
<UInput v-model="tenantForm.short" />
</UFormField>
<UFormField label="Locked Mode">
<USelectMenu
v-model="tenantForm.locked"
:items="lockedOptions"
value-key="value"
label-key="label"
/>
</UFormField>
</UForm>
<UAlert
v-if="tenantForm.lockedByExportJobId"
class="mt-4"
title="Automatische Sperre aktiv"
:description="`Dieser Tenant wird gerade durch Export/Import ${tenantForm.lockedByExportJobId} pausiert.`"
color="warning"
variant="soft"
/>
</UCard>
<UCard v-if="!loading && tenantForm" class="mt-3">