From 82d03d0bc32bff9960b0fb5b80b63cc9400f596a Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Tue, 21 Dec 2021 17:25:18 +0100
Subject: [PATCH] fix(structure-form): add missing method after merge issue

---
 src/app/form/structure-form/form.component.ts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/app/form/structure-form/form.component.ts b/src/app/form/structure-form/form.component.ts
index 8cadbf370..f6a90b9bb 100644
--- a/src/app/form/structure-form/form.component.ts
+++ b/src/app/form/structure-form/form.component.ts
@@ -1018,6 +1018,15 @@ export class FormComponent implements OnInit {
     this.router.navigateByUrl('acteurs');
   }
 
+  public shouldDisplayPage(index: number): boolean {
+    // handle OtherAccompaniment
+    if (index == this.pageTypeEnum.structureOtherAccompaniment) {
+      if (this.structureForm.value.proceduresAccompaniment.includes('autres')) return true;
+      else return false;
+    }
+    return true;
+  }
+
   public checkIfPasswordHasSpecialChar(password: string): boolean {
     if (password.match(CustomRegExp.SPECHAR)) return true;
     return false;
-- 
GitLab