From da400cae4408bf642f0751fbe2632bcb237e9a51 Mon Sep 17 00:00:00 2001
From: Bastien Dumont <bdumont@grandlyon.com>
Date: Wed, 20 Dec 2023 11:38:02 +0100
Subject: [PATCH] fix(ui): warning border on collapse

---
 .../profile-structure/profile-structure.component.html |  8 +++++++-
 .../components/v3/collapse/collapse.component.ts       | 10 +++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/app/profile/profile-structure/profile-structure.component.html b/src/app/profile/profile-structure/profile-structure.component.html
index c8454650e..7d1574853 100644
--- a/src/app/profile/profile-structure/profile-structure.component.html
+++ b/src/app/profile/profile-structure/profile-structure.component.html
@@ -1,4 +1,10 @@
-<app-collapse [variant]="collapseVariant" [size]="'medium'" [boxShadow]="true">
+<app-collapse
+  class="borderWarning"
+  [variant]="collapseVariant"
+  [size]="'medium'"
+  [boxShadow]="true"
+  [warningBorder]="!isValid()"
+>
   <app-collapse-header>
     <div class="collapseHeader">
       <div class="left">
diff --git a/src/app/shared/components/v3/collapse/collapse.component.ts b/src/app/shared/components/v3/collapse/collapse.component.ts
index 2d4275e96..46777b8b8 100644
--- a/src/app/shared/components/v3/collapse/collapse.component.ts
+++ b/src/app/shared/components/v3/collapse/collapse.component.ts
@@ -22,6 +22,8 @@ export class CollapseComponent implements AfterContentInit {
   /** Box-shadow when expanded? */
   @Input() boxShadow? = false;
 
+  @Input() warningBorder? = false;
+
   /** Default expanded value */
   @Input() expanded? = false;
 
@@ -39,6 +41,12 @@ export class CollapseComponent implements AfterContentInit {
   }
 
   public get classes(): string[] {
-    return [this.variant, this.size, this.expanded ? 'expanded' : '', this.boxShadow ? 'boxShadow' : ''];
+    return [
+      this.variant,
+      this.size,
+      this.expanded ? 'expanded' : '',
+      this.boxShadow ? 'boxShadow' : '',
+      this.warningBorder ? 'warningBorder' : '',
+    ];
   }
 }
-- 
GitLab