feat(app): administration screens and anatomical catalogue (V1-2.5 G, H, I)

Administration page (board 10), species, rights, official sheets list with filters, creation from the core's empty document, overview with the working-copy action; catalogue list (search by sheet name), sheet and version pages through PreviewSheet with zoom and pan. App 650, typecheck, lint, build green.
This commit is contained in:
bchanot committed 2026-11-02 17:18:27 +01:00
1 parent 9f7824dc08
commit 0176b3184d
42 files changed
+6438 -39

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@ const CAPABILITIES: ReadonlySet<OwnCatalogGrant['kind']> = new Set([
])
/** Not revoked and not past its expiry, on the device clock. */
function isActive(grant: OwnCatalogGrant, now: number): boolean {
export function isGrantActive(grant: OwnCatalogGrant, now: number): boolean {
if (grant.revoked_at) return false
return grant.expires_at === null || Date.parse(grant.expires_at) > now
}
@@ -30,7 +30,7 @@ export function navigationHint(
roles: readonly PlatformRole[],
now: number = Date.now(),
): NavigationHint {
const active = grants.filter((grant) => isActive(grant, now))
const active = grants.filter((grant) => isGrantActive(grant, now))
const capability = active.some((grant) => CAPABILITIES.has(grant.kind))
return {
catalog: capability || active.some((grant) => grant.kind === 'catalog_reader'),