Add a Listed flag: published records reachable only by their link

is_listed (migration 027) sits beside is_published on organizations,
events, people, teams and awards. Unticked, the record's own page
still works, but the site's lists leave it out: the list routes, a
region's chapters, an organization's events, teams and awards, the
QR page's directory, and the front page's counts and countdown.
Places where someone attached it by hand (rosters, hosts, billed
people, recipients, timeline, a pinned countdown) still show it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 14:50:41 -05:00
parent 3c02eb8971
commit cd393e4ab2
7 changed files with 120 additions and 38 deletions

View file

@ -19,6 +19,9 @@
awards published
people published
and each leaves out unlisted records (is_listed = 0): the QR page
is public, and listing them here would undo the point of them.
The site already serves each of these at its own URL; this only
lists them in one place.
═══════════════════════════════════════════════════════════════ */
@ -39,32 +42,32 @@ directory.get("/directory", (c) => {
events: all(
`SELECT id, title AS name, starts_on
FROM events
WHERE is_published = 1
WHERE is_published = 1 AND is_listed = 1
ORDER BY starts_on IS NULL, starts_on DESC, title`,
),
organizations: all(
`SELECT id, name, kind
FROM organizations
WHERE is_published = 1
WHERE is_published = 1 AND is_listed = 1
ORDER BY kind, name`,
),
teams: all(
`SELECT t.id, t.name, o.name AS org_name
FROM teams t
JOIN organizations o ON o.id = t.org_id AND o.is_published = 1
WHERE t.is_published = 1
WHERE t.is_published = 1 AND t.is_listed = 1
ORDER BY o.name, t.sort_order, t.name`,
),
awards: all(
`SELECT id, name
FROM awards
WHERE is_published = 1
WHERE is_published = 1 AND is_listed = 1
ORDER BY name`,
),
people: all(
`SELECT id, display_name AS name
FROM people
WHERE is_published = 1
WHERE is_published = 1 AND is_listed = 1
ORDER BY COALESCE(sort_name, display_name)`,
),
},