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:
parent
07e56bfd20
commit
0ed7315156
38 changed files with 1108 additions and 29 deletions
|
|
@ -16,7 +16,9 @@
|
|||
extensions 1:1 side tables, optionally gated on a column
|
||||
value (organizations.kind decides whether a
|
||||
regions or groups row should exist)
|
||||
children ordered collections, replaced wholesale on save
|
||||
children ordered collections, replaced wholesale on save;
|
||||
`readRole` on one hides it from lesser roles, as
|
||||
on an extension (an organization's contacts)
|
||||
singleton the one id this entity ever has; the engine
|
||||
refuses create and delete (see front_page)
|
||||
check (db, id) => void, run after a save has written
|
||||
|
|
@ -52,6 +54,8 @@ import { frontPage } from "./admin-schema/frontPage.js";
|
|||
import { blogPosts } from "./admin-schema/blog.js";
|
||||
import { siteSettings } from "./admin-schema/siteSettings.js";
|
||||
import { newsletters } from "./admin-schema/newsletters.js";
|
||||
import { personTagTypes } from "./admin-schema/personTags.js";
|
||||
import { contactTypes } from "./admin-schema/contactTypes.js";
|
||||
import {
|
||||
communityPage,
|
||||
retreatsPage,
|
||||
|
|
@ -64,6 +68,8 @@ export const ENTITIES = {
|
|||
organizations,
|
||||
events,
|
||||
people,
|
||||
person_tag_types: personTagTypes,
|
||||
contact_types: contactTypes,
|
||||
teams,
|
||||
awards,
|
||||
timeline,
|
||||
|
|
@ -81,13 +87,20 @@ export const ENTITIES = {
|
|||
/* ── Options for the form's select inputs ────────────────────── */
|
||||
|
||||
export const OPTION_QUERIES = {
|
||||
// Ministries have no public page (063_ministries.sql), so nothing
|
||||
// that links to its organization can pick one; a group picks its
|
||||
// ministry from `ministries`.
|
||||
organizations:
|
||||
"SELECT id, name AS label, kind FROM organizations ORDER BY kind, name",
|
||||
"SELECT id, name AS label, kind FROM organizations WHERE kind <> 'ministry' ORDER BY kind, name",
|
||||
regions:
|
||||
"SELECT id, name AS label FROM organizations WHERE kind = 'region' ORDER BY name",
|
||||
ministries:
|
||||
"SELECT id, name AS label FROM organizations WHERE kind = 'ministry' ORDER BY name",
|
||||
event_scopes: "SELECT id, name AS label FROM event_scopes ORDER BY sort_order",
|
||||
events: "SELECT id, title AS label FROM events ORDER BY starts_on DESC, title",
|
||||
people: "SELECT id, display_name AS label FROM people ORDER BY sort_name, display_name",
|
||||
person_tag_types: "SELECT id, name AS label FROM person_tag_types ORDER BY sort_order, name",
|
||||
contact_types: "SELECT id, name AS label FROM contact_types ORDER BY sort_order, name",
|
||||
blog_posts: "SELECT id, title AS label FROM blog_posts ORDER BY published_on DESC, title",
|
||||
|
||||
// org_id rides along so the affiliation row can filter the list
|
||||
|
|
@ -103,7 +116,7 @@ export const OPTION_QUERIES = {
|
|||
record_refs: `
|
||||
SELECT 'event' AS kind, id, title AS label FROM events
|
||||
UNION ALL
|
||||
SELECT 'organization', id, name || ' (' || kind || ')' FROM organizations
|
||||
SELECT 'organization', id, name || ' (' || kind || ')' FROM organizations WHERE kind <> 'ministry'
|
||||
UNION ALL
|
||||
SELECT 'award', id, name FROM awards
|
||||
UNION ALL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue