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

Fix #466 - Fixed results in ParallelStructures modules have wrong parameters

parent a475807a
No related branches found
No related tags found
No related merge requests found
Pipeline #138402 passed
......@@ -300,10 +300,10 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
* éléments du formulaire
* @param symbol string
*/
public getParamFromSymbol(symbol: string): NgParameter {
public getParamFromSymbol(param: ParamDefinition): NgParameter {
for (const p of this.allFormElements) {
if (p instanceof NgParameter) {
if (p.symbol === symbol) {
if (p.symbol === param.symbol && p.paramDefinition.parentNub.uid === param.parentNub.uid) {
return p;
}
}
......@@ -461,7 +461,7 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
const cpd = this.currentNub.calculatedParam;
let ngparam: NgParameter;
if (cpd !== undefined) {
ngparam = this.getParamFromSymbol(cpd.symbol);
ngparam = this.getParamFromSymbol(cpd);
if (ngparam === undefined) { // calculated parameter is not displayed on screen
ngparam = new NgParameter(cpd, this);
}
......@@ -479,7 +479,7 @@ export abstract class FormulaireDefinition extends FormulaireNode implements Obs
const fixedParams: ParamDefinition[] = this._currentNub.findFixedParams();
let fnp: NgParameter[] = [];
for (const fp of fixedParams) {
fnp.push(this.getParamFromSymbol(fp.symbol));
fnp.push(this.getParamFromSymbol(fp));
}
fnp = fnp.filter((e) => e !== undefined);
return fnp;
......
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