fix(seed): rename reserved 'status' field to 'parity_status'
ci/woodpecker/push/container Pipeline was canceled
ci/woodpecker/push/container Pipeline was canceled
emdash reserves 'status' as a built-in entry field (publish state), so 'emdash seed' rejected the plugins collection's custom 'status' select with 'Field slug status is reserved' — leaving the catalog empty. Rename the domain field slug to parity_status (label stays 'Migration status') across the seed field def + 39 entries, the collections type, and all plugin-data reads. The public ?status= URL filter param and StatusBadge prop name are unchanged.
This commit is contained in:
+1038
-1026
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ interface Props {
|
||||
data: {
|
||||
title: string;
|
||||
purpose?: string | null;
|
||||
status?: string | null;
|
||||
parity_status?: string | null;
|
||||
source_cms?: string | null;
|
||||
target_cms?: string | null;
|
||||
};
|
||||
@@ -19,7 +19,7 @@ const d = entry.data;
|
||||
<li class="plugin-card">
|
||||
<h3><a href={`/plugins/${entry.id}`}>{d.title}</a></h3>
|
||||
<div class="meta">
|
||||
<StatusBadge status={d.status} />
|
||||
<StatusBadge status={d.parity_status} />
|
||||
{d.source_cms && <span>{d.source_cms}{d.target_cms ? ` → ${d.target_cms}` : ""}</span>}
|
||||
</div>
|
||||
{d.purpose && <p>{d.purpose}</p>}
|
||||
|
||||
Vendored
+1
-1
@@ -28,7 +28,7 @@ declare module "emdash" {
|
||||
source_cms: string;
|
||||
target_cms?: string | null;
|
||||
category?: string | null;
|
||||
status: string;
|
||||
parity_status: string;
|
||||
source_repo_url?: string | null;
|
||||
target_repo_url?: string | null;
|
||||
notes?: import("emdash").PortableTextBlock[] | null;
|
||||
|
||||
@@ -20,13 +20,13 @@ const statusFilter = url.searchParams.get("status") ?? "";
|
||||
const sourceFilter = url.searchParams.get("source") ?? "";
|
||||
|
||||
const sources = Array.from(new Set(plugins.map((p) => p.data.source_cms).filter(Boolean))).sort();
|
||||
const present = new Set(plugins.map((p) => p.data.status).filter(Boolean));
|
||||
const present = new Set(plugins.map((p) => p.data.parity_status).filter(Boolean));
|
||||
const statuses = STATUSES.filter((s) => present.has(s.value));
|
||||
|
||||
const filtered = plugins.filter((p) => {
|
||||
const d = p.data;
|
||||
if (q && !(`${d.title} ${d.purpose ?? ""}`.toLowerCase().includes(q))) return false;
|
||||
if (statusFilter && d.status !== statusFilter) return false;
|
||||
if (statusFilter && d.parity_status !== statusFilter) return false;
|
||||
if (sourceFilter && d.source_cms !== sourceFilter) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
@@ -50,7 +50,7 @@ const targetCmsSlug = resolveCmsSlug(d?.target_cms, cmsIndex);
|
||||
</p>
|
||||
<h1>{d.title}</h1>
|
||||
<p class="meta">
|
||||
<StatusBadge status={d.status} />
|
||||
<StatusBadge status={d.parity_status} />
|
||||
{d.source_cms && <span class="source-target">{d.source_cms}{d.target_cms ? ` → ${d.target_cms}` : ""}</span>}
|
||||
</p>
|
||||
{d.purpose && <p class="lead">{d.purpose}</p>}
|
||||
|
||||
Reference in New Issue
Block a user