Commit ae1800d8 authored by Grand Francois's avatar Grand Francois
Browse files

fix: remove duplicated results in calculators when variable order is provided

refs #535
parent f2bcc865
Pipeline #35776 passed with stages
in 17 minutes and 22 seconds
......@@ -183,30 +183,6 @@ export class FixedResultsComponent extends ResultsComponentDirective {
}
}
}
// 2) else, is it a fixed parameter ?
if (! resultFound) {
for (const fp of this.fixedParams) {
if (fp.symbol === symbol) {
let label = this.formattedLabel(fp);
const nub = fp.paramDefinition.parentNub;
// add child type and position before label
if (nub && nub.parent && nub.parent.childrenType) {
const pos = nub.findPositionInParent();
// label = this.intlService.localizeText("INFO_OUVRAGE") + " n°" + (pos + 1) + ": " + label;
const cn = capitalize(this.intlService.childName(nub));
label = sprintf(this.intlService.localizeText("INFO_STUFF_N"), cn)
+ (pos + 1) + ": " + label;
}
label += this._fixedResults.getHelpLink(symbol);
data.push({
label: label,
value: this.formattedValue(fp),
isCalcResult: false // for CSS
});
}
}
}
}
return data;
}
......
......@@ -108,7 +108,7 @@ export class FormulaireFixedVar extends FormulaireDefinition {
protected compute() {
this.runNubCalc(this.currentNub);
this.refreshFieldsets(); // important: before reaffectResultComponents() or it will break results components localization
this.reaffectResultComponents();
// this.reaffectResultComponents(); // seems useless since called from runNubCalc()
}
protected reaffectResultComponents() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment