feat(indicadores): "Fijar indicador" only from five indicators, like the search

How: the catalog card gets a `fijable` input and shows its pin button only when
it is true; the page passes searchVisible(), so the button appears with the
search, from MIN_BUSQUEDA (5) indicators in Resumen. Below that, saved pins are
ignored when ordering the cards, so a pin from a longer catalog can't reorder
cards that offer no way to unpin.

Implications: cáncer de mama (three charts) has no pin buttons; CaCu and TEA
keep them. Pins stay saved and come back if the domain grows past the threshold.
This commit is contained in:
rockdrigo
2026-11-09 20:37:49 -06:00
parent 612a11fa6f
commit 502fc969f0
4 changed files with 14 additions and 7 deletions
@@ -331,6 +331,8 @@ export class IndicadoresPage {
readonly searchResults = computed(() => {
const selected = new Set(this.selectedIndicators());
const items = this.catalogOrder().filter(item => selected.has(item.id));
// Below MIN_BUSQUEDA there are no pin buttons, so saved pins don't reorder the cards either.
if (!this.searchVisible()) return { items };
return { items: [...items.filter(item => this.isPinned(item)), ...items.filter(item => !this.isPinned(item))] };
});
readonly catalogLoading = signal(true);