Gobernanza: the header's domain switcher, model titles, confirmations, a stop button, an upload button

This commit is contained in:
Roberto Treviño
2026-11-29 12:39:07 -06:00
parent cde9b1cfb1
commit 979b7cf34d
6 changed files with 162 additions and 63 deletions
+5 -4
View File
@@ -43,10 +43,11 @@ export class App {
),
{ initialValue: '' },
);
/** The domain of an indicator page, if this is one. */
protected readonly domain = computed(
() => /^\/indicadores\/(\w+)/.exec(this.url())?.[1] as Domain | undefined,
);
/** The section and domain of a page that has one (indicators, governance): the switcher
* moves between that section's domains. */
private readonly place = computed(() => /^\/(indicadores|gobernanza)\/(\w+)/.exec(this.url()));
protected readonly section = computed(() => this.place()?.[1] ?? 'indicadores');
protected readonly domain = computed(() => this.place()?.[2] as Domain | undefined);
protected readonly others = computed(() =>
(this.domains.value() ?? []).filter((d) => d !== this.domain() && this.auth.canSee(d)),
);