From 9c65a65bcddbe4f42eda93041624c96ba97907ea Mon Sep 17 00:00:00 2001 From: Ronni Baslund Date: Sat, 30 May 2026 08:29:40 +0200 Subject: [PATCH] refactor(operator): remove tenant creation (tenants are partner-owned) Tenants always belong to a partner, so the operator must not create orphan (partnerless) tenants. Remove the NewTenantModal component, the POST /api/tenants proxy route, and the New-tenant button/modal from the tenants page. Tenant creation now happens only via the partner portal wizard (which forces partnerId). --- apps/operator/components/NewTenantModal.vue | 265 ------------------ apps/operator/pages/tenants/index.vue | 16 -- .../operator/server/api/tenants/index.post.ts | 6 - 3 files changed, 287 deletions(-) delete mode 100644 apps/operator/components/NewTenantModal.vue delete mode 100644 apps/operator/server/api/tenants/index.post.ts diff --git a/apps/operator/components/NewTenantModal.vue b/apps/operator/components/NewTenantModal.vue deleted file mode 100644 index 26e4602..0000000 --- a/apps/operator/components/NewTenantModal.vue +++ /dev/null @@ -1,265 +0,0 @@ - - - - - diff --git a/apps/operator/pages/tenants/index.vue b/apps/operator/pages/tenants/index.vue index 1af703f..abd17c6 100644 --- a/apps/operator/pages/tenants/index.vue +++ b/apps/operator/pages/tenants/index.vue @@ -7,16 +7,6 @@ const { data: tenants, refresh, pending } = await useFetch('/api/tenan const search = ref('') const statusFilter = ref<'all' | TenantStatus>('all') -const createOpen = ref(false) - -async function onCreated(tenant: Tenant) { - createOpen.value = false - // Refresh the list so the new row appears immediately, then jump into the - // detail page — that's where the operator will configure domains, billing, - // and trigger provisioning. - await refresh() - await navigateTo(`/tenants/${tenant.slug}`) -} const filtered = computed(() => { const q = search.value.trim().toLowerCase() @@ -60,15 +50,9 @@ function navTo(t: Tenant) { Refresh - - - New tenant - - -