Skip to content
Snippets Groups Projects

Resolve "Ajout de la fonctionnalité "Respect des critères""

Merged David Dorchies requested to merge 60-ajout-de-la-fonctionnalite-respect-des-criteres into devel
1 file
+ 15
3
Compare changes
  • Side-by-side
  • Inline
@@ -30,9 +30,7 @@ export class FormulaireVerificateur extends FormulaireFixedVar {
if (sender.id === "select_target_pass" && data.action === "select") {
// update Verificateur property: Pass to check
this._currentNub.properties.setPropValue("nubToVerify", data.value ? data.value.value : undefined);
// refresh jet type selector
const ntv = (this._currentNub as Verificateur).nubToVerify;
(this.getFormulaireNodeById("select_pab_jet_type") as SelectField).disabled = ! (ntv !== undefined && ntv.calcType === CalculatorType.Pab);
this.refreshJetTypeSelector();
} else if (sender.id === "select_species_list" && data.action === "select") {
// update Verificateur property: Species list (string[])
@@ -43,4 +41,18 @@ export class FormulaireVerificateur extends FormulaireFixedVar {
}
}
protected compute() {
this.runNubCalc(this.currentNub);
this.reaffectResultComponents();
// do not refreshFieldsets() (useless here) or jet type selector's disabled state will be reset
}
/**
* Disables Jet Type selector if target pass is not a Pab
*/
protected refreshJetTypeSelector() {
const ntv = (this._currentNub as Verificateur).nubToVerify;
(this.getFormulaireNodeById("select_pab_jet_type") as SelectField).disabled = ! (ntv !== undefined && ntv.calcType === CalculatorType.Pab);
}
}
Loading