Files
WebApp/src/app/features/indicadores/indicadores-definitions.ts
T
Angel Capetillo Zavala 7b8fd9e01d feat(indicadores): CaMa labels, single-period filters and the four-card strip
CaMa reads «cáncer de mama» everywhere on the indicators page and uses the compact filter: interval, one period and Aplicar on one row, without the mode selector, the multiple selection or the editing summaries. The opportunity strip is the four cards only, and the biopsy distribution card is no longer drawn in the summary (it stays in Datos y definiciones). Other domains keep their filter and strip.

(cherry picked from commit 7c9dcf634e5870fec35ab96347b0863b2e3bb86e)
2026-11-12 00:29:08 -06:00

28 lines
1.4 KiB
TypeScript

import { Component, Input, output } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { Dominio, Indicador, TipoPeriodo } from './indicadores.models';
import { figureDisplayName } from './indicadores-figure-labels';
import { PERIOD_INTERPRETATION } from './indicadores-methodology';
import { IndicadorMetadata } from './indicador-metadata';
@Component({
selector: 'app-indicadores-definitions',
imports: [MatButtonModule, IndicadorMetadata],
templateUrl: './indicadores-definitions.html',
styleUrl: './indicadores-definitions.scss',
})
export class IndicadoresDefinitions {
readonly opened = new Set<string>();
open(id: string, event: Event) { if ((event.target as HTMLDetailsElement).open) this.opened.add(this.dominio + ':' + id); }
@Input({ required: true }) dominio!: Dominio;
@Input({ required: true }) catalog: readonly Indicador[] = [];
@Input() loading = false;
@Input() error = '';
readonly retry = output<void>();
readonly domainNames: Record<Dominio, string> = { tea: 'TEA', cacu: 'cáncer cervicouterino', cama: 'cáncer de mama' };
readonly periodNames: Record<TipoPeriodo, string> = { semestre: 'Semestral', mes: 'Mensual' };
readonly figureDisplayName = figureDisplayName;
readonly periodInterpretation = PERIOD_INTERPRETATION;
get periodTypes() { return [...new Set(this.catalog.flatMap(item => item.tipos_periodo))]; }
}