Skip to content
Snippets Groups Projects
Commit 3d531261 authored by François Grand's avatar François Grand
Browse files

refactor: remove useless code

refs #586
parent e7bec0d5
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!205Resolve "Traduction des résultats : tous les libellés ne sont pas modifiés quand on change de langue"
...@@ -23,10 +23,6 @@ export class FormulaireSectionParametree extends FormulaireSection { ...@@ -23,10 +23,6 @@ export class FormulaireSectionParametree extends FormulaireSection {
this.reaffectResultComponents(); this.reaffectResultComponents();
} }
protected runNubCalc(nub: Nub, computedParam?: ParamDefinition): Result {
return nub.CalcSerie();
}
protected reaffectResultComponents() { protected reaffectResultComponents() {
this.resetFormResults(); // to avoid adding fixed parameters more than once (see below) this.resetFormResults(); // to avoid adding fixed parameters more than once (see below)
const sectNub: SectionParametree = this.currentNub as SectionParametree; const sectNub: SectionParametree = this.currentNub as SectionParametree;
......
...@@ -47,11 +47,6 @@ export class FormulaireSection extends FormulaireFixedVar { ...@@ -47,11 +47,6 @@ export class FormulaireSection extends FormulaireFixedVar {
const newSect = Session.getInstance().createSection(data.value); const newSect = Session.getInstance().createSection(data.value);
(this._currentNub as SectionNub).setSection(newSect); (this._currentNub as SectionNub).setSection(newSect);
// reflect changes in GUI // reflect changes in GUI
for (const fs of this.allFieldsets) {
// show / hide dependent fields
fs.updateFields();
}
// show / hide dependent fields
this.refreshFieldsets(); this.refreshFieldsets();
this.reset(); this.reset();
} }
......
...@@ -38,7 +38,6 @@ export class FieldSet extends FormulaireElement implements IProperties { ...@@ -38,7 +38,6 @@ export class FieldSet extends FormulaireElement implements IProperties {
public setNub(sn: Nub, update: boolean = true) { public setNub(sn: Nub, update: boolean = true) {
this._nub = sn; this._nub = sn;
this.setParentNubForAllFields();
if (update) { if (update) {
this.updateFields(); this.updateFields();
} }
...@@ -135,9 +134,6 @@ export class FieldSet extends FormulaireElement implements IProperties { ...@@ -135,9 +134,6 @@ export class FieldSet extends FormulaireElement implements IProperties {
return this._jsonConfig; return this._jsonConfig;
} }
private setParentNubForAllFields() {
}
/** /**
* crée un input * crée un input
* @param json definition de l'input, extrait du fichier de conf du module de calcul * @param json definition de l'input, extrait du fichier de conf du module de calcul
...@@ -280,32 +276,6 @@ export class FieldSet extends FormulaireElement implements IProperties { ...@@ -280,32 +276,6 @@ export class FieldSet extends FormulaireElement implements IProperties {
} }
} }
public getNodeParameter(symbol: string): NgParameter {
for (const p of this.kids) {
if (p instanceof NgParameter) {
if (p.isDisplayed && p.symbol === symbol) {
return p;
}
}
}
}
public getNodeParameterValue(symbol: string): number {
const p = this.getNodeParameter(symbol);
if (!p) {
throw new Error(`FieldSet.getNodeParameterValue() : pas de paramètre ${symbol} trouvé`);
}
switch (p.radioState) {
case ParamRadioConfig.FIX:
return p.getValue();
case ParamRadioConfig.VAR:
case ParamRadioConfig.CAL:
return undefined;
}
}
/** /**
* retourne la valeur actuellement sélectionnée d'un SelectField (qui doit être affiché) * retourne la valeur actuellement sélectionnée d'un SelectField (qui doit être affiché)
* @param selectFieldId id du SelectField * @param selectFieldId id du SelectField
......
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