Skip to content
Snippets Groups Projects
Commit 2eabb520 authored by francois.grand's avatar francois.grand
Browse files

#48 ParamFieldLineComponent : affichage de l'option "lié" pour les paramètres...

 #48 ParamFieldLineComponent : affichage de l'option "lié" pour les paramètres dans le cas des ouvrages parallèles uniquement si au moins 2 ouvrages sont présents
parent f591bb50
No related branches found
No related tags found
1 merge request!22Resolve "Lier des paramètres ou des résultats entre les calculettes"
......@@ -4,7 +4,7 @@ import { InternationalisationService } from "../../services/internationalisation
import { NgParameter, ParamRadioConfig } from "../../formulaire/ngparam";
import { NgParamInputComponent } from "../ngparam-input/ngparam-input.component";
import { ServiceFactory } from "../../services/service-factory";
import { ParamValueMode, CalculatorType } from "jalhyd";
import { ParamValueMode, CalculatorType, ParallelStructure } from "jalhyd";
import { FormulaireService } from "../../services/formulaire/formulaire.service";
@Component({
......@@ -137,8 +137,17 @@ export class ParamFieldLineComponent implements OnChanges {
* calcule la présence du radio "paramètre lié" (importé d'une autre calculette)
*/
private hasRadioLink(): boolean {
if (this._formService.formulaires.length > 0)
return this._formService.formulaires.length > 1 || this._formService.formulaires[0].calculatorType == CalculatorType.ParallelStructure;
if (this._formService.formulaires.length > 0) {
if (this._formService.formulaires.length > 1)
return true;
if (this._formService.formulaires[0].calculatorType == CalculatorType.ParallelStructure) {
const ps: ParallelStructure = this._formService.formulaires[0].currentSessionNub.nub as ParallelStructure;
if (ps.structures.length > 1)
return true;
}
}
return false;
}
......
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