Histórico CaCu: remove the notice above the panels
This commit is contained in:
@@ -9,7 +9,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { PlotlyChart } from '../../shared/plotly/plotly-chart';
|
||||
import { IndicadoresHistorico } from './indicadores-historico';
|
||||
import { AVISO_CACU, HISTORICO_CACU } from './indicadores-historico-config';
|
||||
import { HISTORICO_CACU } from './indicadores-historico-config';
|
||||
import { Indicador } from './indicadores.models';
|
||||
|
||||
@Component({ selector: 'app-plotly-chart', inputs: ['figure', 'label', 'showNotes'], template: '' })
|
||||
@@ -113,12 +113,11 @@ describe('Histórico de CaCu', () => {
|
||||
fixture.destroy(); TestBed.resetTestingModule();
|
||||
}
|
||||
});
|
||||
it('el aviso de validación clínica y supresión se ve siempre', () => {
|
||||
it('no antepone ningún aviso a los paneles', () => {
|
||||
// Fails if a notice about clinical validation or suppression is shown again above the history's panels.
|
||||
montar();
|
||||
const aviso = root().querySelector('[data-aviso="historico"]')!;
|
||||
expect(aviso.textContent).toBe(AVISO_CACU);
|
||||
expect(aviso.textContent).toContain('validación clínica');
|
||||
expect(aviso.textContent).toContain('supresión');
|
||||
expect(root().querySelector('[data-aviso="historico"]')).toBeNull();
|
||||
expect(root().textContent).not.toContain('sujetos a validación clínica');
|
||||
});
|
||||
it('al abrir pide solo los últimos cinco periodos de cada medida y no repite la lista', () => {
|
||||
// Pins down the first request: the page asks for the latest five months, not the twelve it could.
|
||||
|
||||
@@ -29,8 +29,6 @@ export interface HistoricoDominio {
|
||||
conciliarC2?: boolean;
|
||||
// A composition period with no units is «sin dato», not a bar of zeros.
|
||||
c2SinPoblacionSinDato?: boolean;
|
||||
// Shown above the panels.
|
||||
aviso?: string;
|
||||
}
|
||||
|
||||
// CaMa's history, in the order of the mockup. The titles are the mockup's; an indicator the catalog does not
|
||||
@@ -45,9 +43,6 @@ export const HISTORICO_CAMA: readonly { id: string; titulo: string }[] = [
|
||||
{ id: 'cama_dias_resultado_diagnostico', titulo: 'Días del resultado de la mastografía al diagnóstico' },
|
||||
];
|
||||
|
||||
export const AVISO_CACU = 'Los resultados de CaCu están sujetos a validación clínica y a la política institucional de supresión estadística. '
|
||||
+ 'Los conjuntos clínicos, los horizontes y los umbrales son provisionales. No los use para decidir.';
|
||||
|
||||
// CaCu's history. The first six read the measures `dev` publishes; the last three are reserved.
|
||||
export const HISTORICO_CACU: readonly PanelHistorico[] = [
|
||||
{ id: 'cacu_eu7', titulo: 'Distribución de resultados citológicos', contrato: 'C2', grafica: 'barras_apiladas' },
|
||||
@@ -73,7 +68,6 @@ const HISTORICOS: Readonly<Partial<Record<Dominio, HistoricoDominio>>> = {
|
||||
periodosIniciales: 5,
|
||||
conciliarC2: true,
|
||||
c2SinPoblacionSinDato: true,
|
||||
aviso: AVISO_CACU,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ function agrupar(paneles: (Panel & { datos?: IndicadorDatos })[], tema: Tema): P
|
||||
selector: 'app-indicadores-historico',
|
||||
imports: [MatButtonModule, MatButtonToggleModule, MatFormFieldModule, MatProgressBarModule, MatSelectModule, PlotlyChart],
|
||||
template: `
|
||||
@if (aviso(); as texto) { <p class="aviso" role="note" data-aviso="historico">{{ texto }}</p> }
|
||||
<div class="controles compacto">
|
||||
<h2>Filtros</h2>
|
||||
<div class="controles-fila">
|
||||
@@ -141,8 +140,6 @@ function agrupar(paneles: (Panel & { datos?: IndicadorDatos })[], tema: Tema): P
|
||||
@use '@angular/material' as mat;
|
||||
|
||||
:host { display: block; min-width: 0; }
|
||||
.aviso { margin: 0 0 var(--issste-space-3); padding: var(--issste-space-3) var(--issste-space-6); background: var(--issste-surface); color: var(--issste-text);
|
||||
border: 1px solid var(--issste-border); border-left-width: 4px; border-radius: var(--issste-radius); font: var(--mat-sys-body-medium); }
|
||||
.controles { display: flex; flex-direction: column; align-items: stretch; gap: var(--issste-space-3); margin-bottom: var(--issste-space-6); padding: var(--issste-space-3) var(--issste-space-6);
|
||||
background: var(--issste-surface); color: var(--issste-text); border: 1px solid var(--issste-border); border-radius: var(--issste-radius); }
|
||||
.controles h2 { margin: 0; font-family: var(--issste-font-heading); font-size: 1rem; font-weight: 500; line-height: 1.3; }
|
||||
@@ -189,7 +186,6 @@ export class IndicadoresHistorico {
|
||||
readonly retryCatalog = output<void>();
|
||||
// What the domain declares for its history (`indicadores-historico-config`); none for a domain that draws its catalog.
|
||||
private readonly config = computed(() => historicoDeDominio(this.dominio()));
|
||||
readonly aviso = computed(() => this.config()?.aviso);
|
||||
// The indicators the tab draws: the domain's fixed list, where the catalog publishes it and the panel is active;
|
||||
// the whole catalog elsewhere. A reserved panel is never one of them, whatever the catalog publishes.
|
||||
private readonly publicados = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user