feat(indicadores): "Buscar indicadores" only from five indicators
How: searchVisible compares the indicators shown in Resumen with MIN_BUSQUEDA (5) instead of 2. Below it every card is in view and the selector and its "Mostrando n de m" line are not rendered. Implications: cáncer de mama (three charts in Resumen) loses the selector; CaCu (five) and TEA keep it. Pinning still works without it. If a domain grows past the threshold the selector comes back with no other change.
This commit is contained in:
@@ -38,6 +38,7 @@ const SECTIONS: readonly { id: DashboardSection; label: string }[] = [
|
||||
];
|
||||
// Domains with enough periods for their history to say anything.
|
||||
const CON_HISTORICO: readonly Dominio[] = ['tea', 'cama'];
|
||||
const MIN_BUSQUEDA = 5;
|
||||
const HISTORICO_SECTIONS: readonly { id: DashboardSection; label: string }[] = [SECTIONS[0], { id: 'historico', label: 'Histórico' }, SECTIONS[1], SECTIONS[2]];
|
||||
|
||||
@Component({
|
||||
@@ -307,7 +308,8 @@ export class IndicadoresPage {
|
||||
readonly catalog = signal<Indicador[]>([]);
|
||||
// Ids of the indicators to render; null shows the whole catalog.
|
||||
readonly indicatorSelection = signal<string[] | null>(null);
|
||||
readonly searchVisible = computed(() => this.catalogOrder().length >= 2);
|
||||
// With a few indicators every card is in view; the selector only pays off from MIN_BUSQUEDA on.
|
||||
readonly searchVisible = computed(() => this.catalogOrder().length >= MIN_BUSQUEDA);
|
||||
// Stable presentation priority; pins still take precedence in the grid.
|
||||
readonly catalogOrder = computed(() => {
|
||||
const catalog = this.catalog();
|
||||
|
||||
Reference in New Issue
Block a user