From 76ec783626fc9be22774308dcd22d20d03326ad5 Mon Sep 17 00:00:00 2001
From: Jeremie BRISON <ext.sopra.jbrison@grandlyon.com>
Date: Thu, 25 Feb 2021 16:41:15 +0100
Subject: [PATCH] fix(profile) : fix max-height of list owners

---
 src/app/profile/profile.component.html                    | 2 +-
 src/app/profile/profile.component.scss                    | 5 +++++
 .../structure-options-modal.component.html                | 2 +-
 .../structure-options-modal.component.scss                | 8 ++++++++
 src/styles.scss                                           | 2 +-
 5 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/app/profile/profile.component.html b/src/app/profile/profile.component.html
index 4a5e03d17..da389cd0f 100644
--- a/src/app/profile/profile.component.html
+++ b/src/app/profile/profile.component.html
@@ -33,7 +33,7 @@
               }}</a>
               <app-structure-options-modal [structure]="s" (closed)="ngOnInit()"></app-structure-options-modal>
             </div>
-            <div fxLayout="column" fxLayoutGap="14px">
+            <div fxLayout="column" fxLayoutGap="14px" class="ownersBlock">
               <p class="ownerName" *ngFor="let owner of s.owners">{{ owner.email }}</p>
             </div>
           </div>
diff --git a/src/app/profile/profile.component.scss b/src/app/profile/profile.component.scss
index f2547348e..341f12ec1 100644
--- a/src/app/profile/profile.component.scss
+++ b/src/app/profile/profile.component.scss
@@ -48,6 +48,11 @@
 }
 .structureSection {
   margin-bottom: 108px;
+  .ownersBlock {
+    width: 100%;
+    max-height: 300px;
+    overflow: auto;
+  }
 }
 
 .addSection {
diff --git a/src/app/shared/components/structure-options-modal/structure-options-modal.component.html b/src/app/shared/components/structure-options-modal/structure-options-modal.component.html
index a5f68cc4d..a9aab9a78 100644
--- a/src/app/shared/components/structure-options-modal/structure-options-modal.component.html
+++ b/src/app/shared/components/structure-options-modal/structure-options-modal.component.html
@@ -165,7 +165,7 @@
         <h2>Supprimer un compte</h2>
         <div class="ico-close-details" (click)="closeModalOptsProfile()"></div>
       </div>
-      <div fxLayout="column" fxLayoutGap="16px">
+      <div fxLayout="column" fxLayoutGap="16px" class="ownersBlock">
         <div class="row removeOwner" *ngFor="let owner of structure.owners" fxLayoutGap="16px">
           <button class="btn-primary small" (click)="removeOwner(owner.id)">X</button>
           <span>
diff --git a/src/app/shared/components/structure-options-modal/structure-options-modal.component.scss b/src/app/shared/components/structure-options-modal/structure-options-modal.component.scss
index 6edbfaaaf..2d34b631e 100644
--- a/src/app/shared/components/structure-options-modal/structure-options-modal.component.scss
+++ b/src/app/shared/components/structure-options-modal/structure-options-modal.component.scss
@@ -60,6 +60,9 @@ button {
     }
   }
   .removeOwner {
+    white-space: nowrap;
+    width: 84%;
+    text-overflow: ellipsis;
     button {
       width: 40px;
       background-color: $red-default;
@@ -83,4 +86,9 @@ button {
   .ico-close-details {
     min-width: 40px;
   }
+  .ownersBlock {
+    width: 100%;
+    max-height: 300px;
+    overflow: auto;
+  }
 }
diff --git a/src/styles.scss b/src/styles.scss
index 24a7585c8..3a1cf55d2 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -233,7 +233,7 @@ button {
     border-radius: 6px;
     @include background-hash($grey-2);
     border: 1px solid $grey-4;
-    position: absolute;
+    position: fixed;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
-- 
GitLab