Organization cards: list partners, ministries or a hand-picked set (migration 067)

The Partners section's preset gets "Cards: list" (partners by default,
ministries, or both) and an optional hand-picked list
(page_section_orgs, partners or ministries only, enforced by trigger)
that replaces it in its own order. /organizations takes kind=ministry
and ids=; the plain list still leaves ministries out. Ministry cards
link to their website only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-04 22:40:24 -05:00
parent 635dd21083
commit fd7e1b6fc1
11 changed files with 146 additions and 23 deletions

View file

@ -15,7 +15,7 @@ const PRESETS = {
community_blog: "Community blog (its settings are below)",
group_map: "Local groups map",
region_list: "Unity Regions list",
partner_list: "Partner organization cards",
partner_list: "Organization cards (partners, ministries)",
events: "Event carousel or grid",
timeline: "Timeline",
people_directory: "People directory (a tag's people)",
@ -37,6 +37,7 @@ const EVENT_TYPES = [
];
const EVENTS = { path: "preset", value: "events" };
const CARDS = { path: "preset", value: "partner_list" };
const sectionsChild = (presets: string[]) => ({
key: "sections",
@ -113,6 +114,23 @@ const sectionsChild = (presets: string[]) => ({
},
]
: []),
...(presets.includes("partner_list")
? [
{
path: "org_kinds",
label: "Cards: list",
widget: "select",
options: [
["partner", "Partners"],
["ministry", "Ministries"],
["partner,ministry", "Partners and ministries"],
],
blankLabel: "Default: Partners",
help: "Every published, listed one, by name. Organizations picked below replace this list.",
when: CARDS,
},
]
: []),
...(presets.includes("group_map")
? [
{
@ -127,6 +145,16 @@ const sectionsChild = (presets: string[]) => ({
: []),
],
children: [
{
key: "orgs",
label: "Cards: organizations",
note: "Picked here, these show instead of the list above, in this order: partners or ministries, published ones, listed or not.",
addLabel: "Add organization",
when: CARDS,
title: (row, options) => options?.card_orgs?.find((o) => o.id === row.org_id)?.label ?? "New organization",
blank: { org_id: "" },
fields: [{ path: "org_id", label: "Organization", widget: "select", optionsFrom: "card_orgs", required: true }],
},
{
...blocksChild,
label: "Blocks",