Call local chapters groups, everywhere
The organization kind is 'group', its side table is groups, pages live at /groups/<id> and the Community page's section is #groups. Migration 052 converts existing databases: the kind and the tables whose CHECKs name chapters are rebuilt, the front page count and request category follow, and the site's own /chapters/ and #chapters links in records are rewritten. Request files now go in Requests/Groups on the shared drive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
175a18976d
commit
38aff34c97
42 changed files with 473 additions and 254 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
ORGANIZATIONS
|
||||
|
||||
Regions, chapters, partners and NGU itself are one table and one
|
||||
Regions, groups, partners and NGU itself are one table and one
|
||||
endpoint. Anything that lists organizations reads them the same
|
||||
way and filters by kind:
|
||||
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
`details`, so a list component can render the common parts
|
||||
without knowing what it's holding:
|
||||
|
||||
region { scope, map_note, areas[], chapters[] }
|
||||
chapter { region_id, region_name, region_color, meets, started }
|
||||
region { scope, map_note, areas[], groups[] }
|
||||
group { region_id, region_name, region_color, meets, started }
|
||||
partner {}
|
||||
|
||||
Each kind is a separate request path, so the cache in api.ts
|
||||
|
|
@ -47,7 +47,7 @@ export function useOrganizations(kind) {
|
|||
one for the rest (NGU itself) or a bad id.
|
||||
───────────────────────────────────────────────────────────── */
|
||||
|
||||
const WITH_PAGE = new Set(["region", "chapter", "partner"]);
|
||||
const WITH_PAGE = new Set(["region", "group", "partner"]);
|
||||
|
||||
export function orgPath(org) {
|
||||
return WITH_PAGE.has(org?.kind) && !isBadId(org.id) ? orgHref(org.id, org.kind) : null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue