People directories, ministries, organization contacts (migrations 062 to 064)

- People tags (062): Data → People tags (Musicians seeded); a person's
  Directories repeater tags them and their Specialty line shows on
  their tile. A People directory section preset shows a tag's first
  12 and links to its full page, /directory/<tag>, with page meta and
  a sitemap entry. Tiles' details panels show a person's links.
- Ministries (063): a new organization kind. A group picks its
  ministry and its page says "Ministry: <name>", linked to the
  ministry's website. Ministries have no public page, list, sitemap
  or timeline entry, and aren't offered where a record links to its
  organization. organizations is rebuilt for the kind CHECK.
- Organization contacts (064): Data → Contact types; a private
  Contacts repeater on each organization (editors and up, readRole on
  a child collection). Tools → Newsletter → Recipients filters them
  by type, kind, region and published and downloads a Mailchimp CSV.
- A trigger refusing a save with a sentence is shown as that message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-03 22:57:34 -05:00
parent 07e56bfd20
commit 0ed7315156
38 changed files with 1108 additions and 29 deletions

View file

@ -28,9 +28,10 @@ what a dropdown in the admin editor says.
| If it's… | It lives in… | Change it by… |
| ------------------------------------------------------------ | ---------------- | ------------------------------------ |
| A record: an event, organization, person, team, award, timeline entry | the database | editing it in the admin |
| People tags (directories, eg. Musicians, at `/directory/<tag>`) and contact types (Minister, General info), and organizations' contacts | the database | Admin → Data → People tags, Contact types; who carries a tag is set on the person, contacts on the organization |
| The front page's words, photos, bands, stats and paths | the database | Admin → Pages → Front page |
| Blog posts, and the Community page's blog settings (headings, pins, feeds) | the database | Admin → Data → Blog posts, and Admin → Pages → Community |
| The sections of Retreats, Community, Resources, Organization and History: titles, blurbs, accents, their content blocks and presets (the blog, groups map, regions, partners, events, timeline) | the database | Admin → Pages → the page. A section title is 30 characters at most (it's listed in the side nav); a front page heading fits about 60. Preset names: `PRESETS` in `src/lib/adminSchema/sitePages.ts`, what each draws: `PRESETS` in `src/pages/SitePage.tsx` |
| The sections of Retreats, Community, Resources, Organization and History: titles, blurbs, accents, their content blocks and presets (the blog, groups map, regions, partners, events, timeline, a people directory) | the database | Admin → Pages → the page. A section title is 30 characters at most (it's listed in the side nav); a front page heading fits about 60. Preset names: `PRESETS` in `src/lib/adminSchema/sitePages.ts`, what each draws: `PRESETS` in `src/pages/SitePage.tsx` |
| The **label** a dropdown shows in the admin | code | [one file](#renaming-what-a-dropdown-shows) |
| The **list of allowed values** behind a fixed dropdown | database CHECK + code | [a migration and three files](#adding-removing-or-renaming-a-stored-value) |
| Navigation, colors, the site banner, history decades, the map grid | code | [the file named below](#other-content-that-lives-in-code) |
@ -166,7 +167,7 @@ also in `server/src/admin-schema/` and a CHECK):
| Entity → field | Stored values | Labeled? | Also used on the public site by |
| --- | --- | --- | --- |
| Organizations → Kind (+ list filter) | national, region, group, partner | no, shows values | `ORG_BASE` in `src/lib/hrefs.ts` (the route each kind uses) |
| Organizations → Kind (+ list filter) | national, region, group, partner, ministry | no, shows values | `ORG_BASE` in `src/lib/hrefs.ts` (the route each kind uses). A ministry has no page or list on the public site (the public routes, `pageMeta.js` and the sitemap leave it out, `ORG_KINDS` in `server/src/routes/content.js` doesn't take it); only its groups name it. `KINDS` in `src/components/admin/NewsletterRecipients.tsx` (the export's filter) lists every kind too. |
| Organizations → Region → Scope | domestic, international, virtual | no | the Community page groups regions by it |
| Organizations → Region areas → Edge | top, bottom | no | the group map (`OrgList-Map.tsx`) |
| Events → Type (+ list filter) | retreat, class, workshop, meeting, other | no | `EVENT_TYPES` in `src/lib/eventTypes.ts` (public labels and plurals) |
@ -188,6 +189,7 @@ also in `server/src/admin-schema/` and a CHECK):
| Front page → Stats → Number Source | manual, years_since, regions, … | **yes**, `STAT_SOURCES` | `STAT_QUERIES` in `server/src/routes/home.js`; see [below](#front-page-stat-sources) |
| Front page → Featured cards → Card type (Community → Community blog: pinned community posts offers link and video only) | record, link, video | **yes**, `FEATURED_KINDS` | `FeaturedCards.tsx` (how each kind draws), `loadFeaturedCards` in `server/src/shape.js` |
| Front page → Featured cards → Record type | event, organization, person, team, award | no | `FEATURED_REFS` in `server/src/shape.js` (what each fills the card with); the triggers in `030_featured_cards.sql` |
| Pages → Sections → Preset | community_blog, group_map, region_list, partner_list, events, timeline, people_directory | **yes**, `PRESETS` in `src/lib/adminSchema/sitePages.ts` (which pages offer which, the list passed to each `sitePage`) | `PRESETS` in `src/pages/SitePage.tsx`. A People directory shows its tag's first `DIRECTORY_PREVIEW` people (`src/pages/sections/PeopleDirectory.tsx`), linking to `/directory/<tag>`. |
| Every list → Published / Listed / Featured filter | 1, 0 | **yes** | n/a |
"No, shows values" means the dropdown currently shows the raw value,
@ -199,11 +201,14 @@ code):
| Dropdown | `optionsFrom` | Comes from |
| --- | --- | --- |
| Group → Region | `regions` | organizations of kind region |
| Group → Ministry | `ministries` | organizations of kind ministry |
| People → Directories → Tag; Pages → Sections → Directory: tag | `person_tag_types` | Data → People tags |
| Organizations → Contacts → Type | `contact_types` | Data → Contact types |
| Event → Scope (+ list filter); Front page → Countdown → Only this scope | `event_scopes` | the `event_scopes` table (migration only) |
| Event hosts → Organization; affiliations; team and award "Organization" / "Awarded by"; person → Home organization | `organizations` | organizations, labeled by name |
| Event hosts → Organization; affiliations; team and award "Organization" / "Awarded by"; person → Home organization | `organizations` | organizations, labeled by name, except ministries (they have no page to link to) |
| Event hosts / event people / team members / timeline people → Person | `people` | people |
| Community → Community blog: pinned posts (ours) → Post | `blog_posts` | blog posts, newest first |
| Timeline → Record; Featured cards → Record | `record_refs` | every event, organization, award, person and team, narrowed by the type picked beside it |
| Timeline → Record; Featured cards → Record | `record_refs` | every event, organization (but ministries), award, person and team, narrowed by the type picked beside it |
| Affiliations → Team | `teams` | teams, filtered to the chosen organization |
| Person awards → Award | `awards` | awards, labeled "Award (Organization)" |
| Person awards → Presented at; Front page → Count down to; Front page → Featured event | `events` | events |