CL3.8 domain actions: suspend/unsuspend subscription from domains table

This commit is contained in:
2026-03-05 10:38:05 +00:00
parent b80b3797fe
commit 067e0d9080
3 changed files with 218 additions and 5 deletions

View File

@@ -3,7 +3,6 @@ import { DashboardControls } from "@/components/dashboard/dashboard-controls";
import { getServerAgencyContextOrRedirect } from "@/lib/agency";
import type { Database } from "@/lib/types";
import { createSupabaseServerClient } from "@/lib/supabase/server";
import type { PostgrestError } from "@supabase/supabase-js";
type AgencySummary = Pick<
Database["public"]["Tables"]["agencies"]["Row"],
@@ -51,7 +50,7 @@ export default async function DashboardPage() {
supabase
.from("plesk_domains")
.select(
"id, plesk_instance_id, domain_name, status, hosting_type, source_created_at, aliases_count, updated_at",
"id, plesk_instance_id, subscription_id, domain_name, status, hosting_type, source_created_at, aliases_count, updated_at",
)
.eq("agency_id", context.agencyId)
.order("updated_at", { ascending: false })
@@ -101,6 +100,7 @@ export default async function DashboardPage() {
data: Array<{
id: string;
plesk_instance_id: string;
subscription_id: string | null;
domain_name: string;
status: string | null;
hosting_type: string | null;