refactor: remove catalog sync jobs and version history
CI / Verify (push) Successful in 58s
CI / Build immutable images and deploy (push) Successful in 1m19s

This commit is contained in:
2026-08-31 23:21:14 +07:00 Unverified
parent 737b54bff8
commit bb06108899
14 changed files with 6865 additions and 299 deletions
+3 -4
View File
@@ -4,15 +4,14 @@ import { connection } from "next/server";
import { StructuredDashboard } from "@/components/admin/structured-dashboard";
import { AdminHeader } from "@/components/admin/admin-header";
import { getAdminSession } from "@/lib/auth/server";
import { getActiveCatalog, getLatestCatalogSyncJob, listGuideCards } from "@/lib/guides/queries";
import { getActiveCatalog, listGuideCards } from "@/lib/guides/queries";
export default async function AdminPage() {
await connection();
if (!(await getAdminSession())) redirect("/admin/login");
const [guides, trash, syncJob, catalog] = await Promise.all([
const [guides, trash, catalog] = await Promise.all([
listGuideCards(),
listGuideCards(true),
getLatestCatalogSyncJob(),
getActiveCatalog(),
]);
return (
@@ -24,7 +23,7 @@ export default async function AdminPage() {
<h1 className="font-heading text-3xl font-semibold">Guide Dashboard</h1>
<p className="mt-2 text-muted-foreground">จัดการ Guide แบบภาพ-first และบันทึกขึ้นเว็บไซต์ทันที</p>
</header>
<StructuredDashboard guides={guides} trash={trash} syncJob={syncJob} catalogVersion={catalog?.version ?? null} />
<StructuredDashboard guides={guides} trash={trash} catalogReady={Boolean(catalog)} />
</main>
</div>
);