Skip to content
Snippets Groups Projects
Commit e249e306 authored by mathias.chouet's avatar mathias.chouet
Browse files

Search engine: also search in short title #428

parent 44044b58
No related branches found
No related tags found
2 merge requests!103Resolve "Moteur de recherche sur la page d'accueil",!82Resolve "Ajout de la fonctionnalité "Respect des critères""
Pipeline #138321 passed
......@@ -87,6 +87,7 @@ export class CalculatorListComponent implements OnInit {
item.calculators.push({
type: calcType,
label: ServiceFactory.formulaireService.getLocalisedTitleFromCalculatorType(calcType),
shortLabel: ServiceFactory.formulaireService.getLocalisedShortTitleFromCalculatorType(calcType),
description: ServiceFactory.formulaireService.getLocalisedDescriptionFromCalculatorType(calcType),
buttonId: "create-calc-" + calcType
});
......@@ -121,6 +122,8 @@ export class CalculatorListComponent implements OnInit {
unusedTheme.calculators.push({
type: t,
label: ServiceFactory.formulaireService.getLocalisedTitleFromCalculatorType(t),
shortLabel: ServiceFactory.formulaireService.getLocalisedShortTitleFromCalculatorType(t),
description: ServiceFactory.formulaireService.getLocalisedDescriptionFromCalculatorType(t),
buttonId: "create-calc-" + t
});
}
......@@ -205,7 +208,7 @@ export class CalculatorListComponent implements OnInit {
// filter items based on parent component's search field
for (const i of this.filteredItems) {
i.calculators = i.calculators.filter((c) => {
return this.searchMatches(c.label) || this.searchMatches(c.description);
return this.searchMatches(c.label) || this.searchMatches(c.shortLabel) || this.searchMatches(c.description);
});
}
this.filteredItems = this.filteredItems.filter((i) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment