From 80c9b347c3d2ecbfb6f36c845396d3813f4fea78 Mon Sep 17 00:00:00 2001
From: FORESTIER Fabien <fabien.forestier@soprasteria.com>
Date: Thu, 8 Aug 2019 17:31:33 +0200
Subject: [PATCH] Small bug fixes

---
 .../components/reuses/detail/reuse-detail.component.html | 9 +++++----
 src/app/components/reuses/edit/reuse-form.component.ts   | 4 ++--
 src/app/components/reuses/list/reuses.component.scss     | 3 +++
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/app/components/reuses/detail/reuse-detail.component.html b/src/app/components/reuses/detail/reuse-detail.component.html
index 169e248..200cbfc 100644
--- a/src/app/components/reuses/detail/reuse-detail.component.html
+++ b/src/app/components/reuses/detail/reuse-detail.component.html
@@ -32,10 +32,11 @@
               <span class="has-text-weight-bold">Date de dernière mise à jour: </span>
               <span>{{reuse.updateDate}}</span>
             </p>
-            <div>
-              <p><span class="has-text-weight-bold">Statut:</span> {{ reuse.published ? 'Publié' : 'Brouillon' }}
-              </p>
-            </div>
+
+            <p>
+              <span class="has-text-weight-bold">Statut:</span> {{ reuse.published ? 'Publié' : 'Brouillon' }}
+            </p>
+
             <p>
               <span class="has-text-weight-bold">Site web: </span>
               <span><a [href]="reuse.website">{{reuse.website}}</a></span>
diff --git a/src/app/components/reuses/edit/reuse-form.component.ts b/src/app/components/reuses/edit/reuse-form.component.ts
index e98eb61..bb5c642 100644
--- a/src/app/components/reuses/edit/reuse-form.component.ts
+++ b/src/app/components/reuses/edit/reuse-form.component.ts
@@ -91,7 +91,7 @@ export class ReuseFormComponent implements OnInit {
                 message: 'La réutilisation a été mise à jour avec succès.',
                 type: 'success',
               });
-              this._router.navigate(['/reutilisations', reuseUpdated._id]);
+              this._router.navigate(['/reutilisations', this.reuse._id]);
             },
             (err) => {
               this._notificationService.notify({
@@ -107,7 +107,7 @@ export class ReuseFormComponent implements OnInit {
                 message: 'La réutilisation a été mise à jour avec succès.',
                 type: 'success',
               });
-              this._router.navigate(['/reutilisations', reuseUpdated._id]);
+              this._router.navigate(['/reutilisations', this.reuse._id]);
             },
             () => {
               this._notificationService.notify({
diff --git a/src/app/components/reuses/list/reuses.component.scss b/src/app/components/reuses/list/reuses.component.scss
index e69de29..978f6d7 100644
--- a/src/app/components/reuses/list/reuses.component.scss
+++ b/src/app/components/reuses/list/reuses.component.scss
@@ -0,0 +1,3 @@
+.has-text-centered {
+  justify-content: center;
+}
-- 
GitLab