CaCu page: the times to treatment are real cards again (the strip's hiding is what was reverted)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 04:10:28 -06:00
parent 7fcc0091d7
commit 0f0f85db39
7 changed files with 37 additions and 15 deletions
@@ -17,7 +17,7 @@ import { applyGlobal, domainTypes, GlobalFilterState, IndicadoresMemory, pending
import { IndicadorPeriodFilters } from './indicador-period-filters';
import { IndicadorCatalogCard } from './indicador-catalog-card';
import { esSocioConteos } from './indicadores-conteos-pareados';
import { CACU_RESULTADO_KPI, CAMA_FUERA_DEL_RESUMEN, ID_HISTOPATOLOGIA_CAMA, KPI_BY_DOMAIN, KPI_RESUMEN_TEA, KpiCardSlot, camaKpiCards } from './indicadores-kpi';
import { CACU_RESULTADO_KPI, CACU_TRATAMIENTO_KPIS, CAMA_FUERA_DEL_RESUMEN, ID_HISTOPATOLOGIA_CAMA, KPI_BY_DOMAIN, KPI_RESUMEN_TEA, KpiCardSlot, cacuPendingKpiCards, camaKpiCards } from './indicadores-kpi';
import { TeaResumenPeriodo } from './tea-resumen-periodo';
import { IndicadorKpiPanel } from './indicador-kpi-panel';
import { IndicadorScreeningRoute } from './indicador-screening-route';
@@ -342,7 +342,10 @@ export class IndicadoresPage {
return this.dominio === 'cacu' && ROUTE_IDS.every(id => this.catalog().some(item => item.id === id));
}
// How many indicators the graphic section shows: all the catalog, except in CaMa, which draws only some of them.
get availableKpis() { return this.kpisByDomain[this.dominio].filter(definition => this.catalog().some(item => item.id === definition.id)); }
get availableKpis() {
const definitions = this.dominio === 'cacu' ? [...this.kpisByDomain.cacu, ...CACU_TRATAMIENTO_KPIS] : this.kpisByDomain[this.dominio];
return definitions.filter(definition => this.catalog().some(item => item.id === definition.id));
}
// TEA shows a summary paragraph instead of its cards for exactly one explicitly chosen period.
get teaResumenPeriodo(): string | undefined {
const selection = this.filters?.applied.selection;
@@ -359,7 +362,8 @@ export class IndicadoresPage {
// What the KPI grid draws. CaMa adds explicit pending cards for opportunity indicators the catalog does not publish.
get kpiCards(): KpiCardSlot[] {
if (this.dominio === 'cama') return camaKpiCards(id => this.catalog().some(item => item.id === id));
return this.opportunityKpis.map(definition => ({ definition, pending: false }));
const cards = this.opportunityKpis.map(definition => ({ definition, pending: false }));
return this.dominio === 'cacu' ? [...cards, ...cacuPendingKpiCards(cards.map(card => card.definition.id))] : cards;
}
private readonly catalogRequests = new Subject<void>();
readonly catalog = signal<Indicador[]>([]);