From 955a2b55f8bb7c9e841b4c7a4c412542b1650eb1 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Thu, 27 Aug 2020 10:52:40 +0200
Subject: [PATCH] Work on #431 - update label in Pab QA links

---
 src/app/components/param-link/param-link.component.ts | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/app/components/param-link/param-link.component.ts b/src/app/components/param-link/param-link.component.ts
index fbe6f2226..3365f915a 100644
--- a/src/app/components/param-link/param-link.component.ts
+++ b/src/app/components/param-link/param-link.component.ts
@@ -1,7 +1,7 @@
 import { Component, Input, Output, EventEmitter, OnChanges, OnDestroy } from "@angular/core";
 
 import { NgParameter } from "../../formulaire/elements/ngparam";
-import { LinkedValue, ParamValueMode, Observer, Structure, acSection, ParamDefinition, ChildNub } from "jalhyd";
+import { LinkedValue, ParamValueMode, Observer, acSection, ParamDefinition, ChildNub, Cloisons, Pab } from "jalhyd";
 import { FormulaireService } from "../../services/formulaire.service";
 import { I18nService } from "../../services/internationalisation.service";
 import { FormulaireDefinition } from "../../formulaire/definition/form-definition";
@@ -169,7 +169,14 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy {
         }
 
         // 1. Paramètre / résultat d'un Nub enfant au sein d'un Nub parent
-        if (i.nub instanceof ChildNub) {
+        if (
+            (i.nub instanceof ChildNub)
+            || (
+                (i.nub instanceof Cloisons)
+                && i.nub.parent !== undefined
+                && (i.nub.parent instanceof Pab)
+            )
+        ) {
             let pos: number;
             pos = i.nub.findPositionInParent();
             return `${preview} - ` + sprintf(
-- 
GitLab