Compare commits
2 Commits
feature/cl
...
feat/cl4-s
| Author | SHA1 | Date | |
|---|---|---|---|
| 9deac1388d | |||
| e87f86ae86 |
@@ -50,7 +50,7 @@ export default async function DashboardPage() {
|
|||||||
supabase
|
supabase
|
||||||
.from("plesk_domains")
|
.from("plesk_domains")
|
||||||
.select(
|
.select(
|
||||||
"id, plesk_instance_id, subscription_id, status, domain_name, hosting_type, source_created_at, aliases_count, updated_at, subscription:plesk_subscriptions(status)",
|
"id, plesk_instance_id, subscription_id, domain_name, status, hosting_type, source_created_at, aliases_count, updated_at",
|
||||||
)
|
)
|
||||||
.eq("agency_id", context.agencyId)
|
.eq("agency_id", context.agencyId)
|
||||||
.order("updated_at", { ascending: false })
|
.order("updated_at", { ascending: false })
|
||||||
@@ -107,9 +107,6 @@ export default async function DashboardPage() {
|
|||||||
source_created_at: string | null;
|
source_created_at: string | null;
|
||||||
aliases_count: number | null;
|
aliases_count: number | null;
|
||||||
updated_at: string;
|
updated_at: string;
|
||||||
subscription: {
|
|
||||||
status: string | null;
|
|
||||||
} | null;
|
|
||||||
}> | null;
|
}> | null;
|
||||||
},
|
},
|
||||||
{ data: BillingSummary | null },
|
{ data: BillingSummary | null },
|
||||||
@@ -170,16 +167,7 @@ export default async function DashboardPage() {
|
|||||||
<DashboardControls
|
<DashboardControls
|
||||||
instances={instances ?? []}
|
instances={instances ?? []}
|
||||||
subscriptions={subscriptions ?? []}
|
subscriptions={subscriptions ?? []}
|
||||||
domains={(domains ?? []).map((domain) => {
|
domains={domains ?? []}
|
||||||
const joinedStatus = Array.isArray(domain.subscription)
|
|
||||||
? domain.subscription[0]?.status
|
|
||||||
: domain.subscription?.status;
|
|
||||||
|
|
||||||
return {
|
|
||||||
...domain,
|
|
||||||
status: joinedStatus ?? "unknown",
|
|
||||||
};
|
|
||||||
})}
|
|
||||||
autoSyncByInstance={Object.fromEntries(autoSyncByInstance.entries())}
|
autoSyncByInstance={Object.fromEntries(autoSyncByInstance.entries())}
|
||||||
/>
|
/>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user