Tidy the structure the audit found
- The colour defaults have one source, server/src/themeDefaults.js, read by the server and the admin; the build stops if src/index.css disagrees with it - server/src/admin-schema.js split into admin-schema/, one file per entity plus columns.js (the registry checked identical) - loadOwned() in shape.js replaces the same three loads on four detail routes (every public route checked identical); one NO_STORE - One OrgLogo component for the org lists and the chapter map; an organization's own page now shows the same initials as the lists - One localISO() for the viewer's calendar day, in place of three - Boot refuses a descriptor dropdown value the table's CHECK doesn't allow, instead of it failing on save - Deleted the unused Other.tsx and white-background logo; chapters.ts is useCommunity.ts; isSuper() in the Panel; stale comments and docs corrected Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
048c7599ce
commit
f934b1dd93
44 changed files with 1187 additions and 1170 deletions
|
|
@ -57,6 +57,7 @@ import {
|
|||
json,
|
||||
loadBlocks,
|
||||
loadLinks,
|
||||
loadOwned,
|
||||
marks,
|
||||
paragraphs,
|
||||
shapeSeries,
|
||||
|
|
@ -492,9 +493,7 @@ content.get("/events/:id", (c) => {
|
|||
|
||||
if (!row) return c.json({ error: "No such event" }, 404);
|
||||
|
||||
const links = loadLinks(db, "event", [id]).get(id) ?? [];
|
||||
const cards = loadBlocks(db, "event", [id], "card").get(id) ?? [];
|
||||
const body = loadBlocks(db, "event", [id], "body").get(id) ?? [];
|
||||
const { links, cards, body } = loadOwned(db, "event", id);
|
||||
const hosts = loadHosts(db, [id]).get(id) ?? [];
|
||||
|
||||
const people = db
|
||||
|
|
@ -602,9 +601,7 @@ content.get("/organizations/:id", (c) => {
|
|||
|
||||
if (!row) return c.json({ error: "No such organization" }, 404);
|
||||
|
||||
const links = loadLinks(db, "organization", [id]).get(id) ?? [];
|
||||
const cards = loadBlocks(db, "organization", [id], "card").get(id) ?? [];
|
||||
const body = loadBlocks(db, "organization", [id], "body").get(id) ?? [];
|
||||
const { links, cards, body } = loadOwned(db, "organization", id);
|
||||
|
||||
const organization = shapeOrganization(row, links, cards, body);
|
||||
const one = [organization];
|
||||
|
|
@ -684,9 +681,7 @@ content.get("/teams/:id", (c) => {
|
|||
|
||||
if (!row) return c.json({ error: "No such team" }, 404);
|
||||
|
||||
const links = loadLinks(db, "team", [id]).get(id) ?? [];
|
||||
const cards = loadBlocks(db, "team", [id], "card").get(id) ?? [];
|
||||
const body = loadBlocks(db, "team", [id], "body").get(id) ?? [];
|
||||
const { links, cards, body } = loadOwned(db, "team", id);
|
||||
|
||||
return json(c, { team: { ...shapeTeam(row, links, cards), blocks: body } });
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue