diff --git a/src/app/[locale]/admin/page.tsx b/src/app/[locale]/admin/page.tsx index bf75d93..f6ff294 100644 --- a/src/app/[locale]/admin/page.tsx +++ b/src/app/[locale]/admin/page.tsx @@ -2,7 +2,7 @@ import { getSessionUser } from "@/lib/session"; import { getTranslations } from "next-intl/server"; import { redirect } from "next/navigation"; import { listTenants } from "@/lib/k8s"; -import { StatusBadge } from "@/components/ui/status-badge"; +import { AdminPanel } from "@/components/admin/admin-panel"; export default async function AdminPage() { const user = await getSessionUser(); @@ -30,76 +30,7 @@ export default async function AdminPage() {
{t("noTenants")}
-| - {t("name")} - | -- {t("displayName")} - | -- {t("phase")} - | -- {t("packages")} - | -- {t("created")} - | -
|---|---|---|---|---|
| - {tenant.metadata.name} - | -- {tenant.spec.displayName} - | -
- |
- - {tenant.spec.packages?.join(", ") || "—"} - | -- {tenant.metadata.creationTimestamp - ? new Date( - tenant.metadata.creationTimestamp - ).toLocaleDateString() - : "—"} - | -
{t("loadingRequests")}
+{t("noRequests")}
+| + {t("company")} + | ++ {t("contact")} + | ++ {t("agentName")} + | ++ {t("packages")} + | ++ {t("status")} + | ++ {t("submitted")} + | ++ {t("actions")} + | +
|---|---|---|---|---|---|---|
|
+
+ {req.companyName}
+
+ |
+
+
+ {req.contactName}
+
+
+ {req.contactEmail}
+
+ |
+ + {req.agentName} + | ++ {req.packages?.length + ? req.packages.join(", ") + : "—"} + | +
+ |
+ + {new Date(req.createdAt).toLocaleDateString()} + | +
+
+ {req.status === "pending" && (
+ <>
+
+
+ >
+ )}
+ {(req.status === "provisioning" ||
+ req.status === "approved") &&
+ req.tenantName && (
+
+ {t("viewTenant")}
+
+ )}
+ {req.status === "rejected" && (
+
+ )}
+
+ {req.adminNotes && (
+ + {req.adminNotes} + + )} + |
+
{t("noTenants")}
+| + {t("name")} + | ++ {t("displayName")} + | ++ {t("phase")} + | ++ {t("packages")} + | ++ {t("created")} + | ++ {t("actions")} + | +
|---|---|---|---|---|---|
| + {tenant.metadata.name} + | ++ {tenant.spec.displayName} + | +
+ |
+ + {tenant.spec.packages?.join(", ") || "—"} + | ++ {tenant.metadata.creationTimestamp + ? new Date( + tenant.metadata.creationTimestamp + ).toLocaleDateString() + : "—"} + | ++ + {t("manage")} + + | +
+ {label} +
++ {value} +
+