From d661d051ae505c6cc3ae11f2cd36df046793adef Mon Sep 17 00:00:00 2001
From: Hugo NOUTS <hnouts@grandlyon.com>
Date: Mon, 30 May 2022 15:06:19 +0000
Subject: [PATCH] fix(toastr): design feedbacks

---
 src/app/form/form-view/form-view.component.ts                | 5 ++++-
 .../form-view/structure-form/structure-form.component.ts     | 1 -
 src/styles.scss                                              | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/app/form/form-view/form-view.component.ts b/src/app/form/form-view/form-view.component.ts
index af54a2359..ec91fb1e5 100644
--- a/src/app/form/form-view/form-view.component.ts
+++ b/src/app/form/form-view/form-view.component.ts
@@ -8,6 +8,7 @@ import { Structure } from '../../models/structure.model';
 import { StructureWithOwners } from '../../models/structureWithOwners.model';
 import { User } from '../../models/user.model';
 import { ProfileService } from '../../profile/services/profile.service';
+import { NotificationService } from '../../services/notification.service';
 import { PersonalOfferService } from '../../services/personal-offer.service';
 import { StructureService } from '../../services/structure.service';
 import { MustMatch } from '../../shared/validator/form';
@@ -75,7 +76,8 @@ export class FormViewComponent implements OnInit {
     private route: ActivatedRoute,
     private profileService: ProfileService,
     private structureService: StructureService,
-    private personalOfferService: PersonalOfferService
+    private personalOfferService: PersonalOfferService,
+    private notificationService: NotificationService
   ) {}
 
   async ngOnInit(): Promise<void> {
@@ -342,6 +344,7 @@ export class FormViewComponent implements OnInit {
     let editStructure = this.editForm.value;
     editStructure.hours = this.hoursForm.value;
     this.structureService.editStructure(editStructure).subscribe(() => {
+      this.notificationService.showSuccess('Vos modifications ont bien été prises en compte.', '');
       history.back();
     });
   }
diff --git a/src/app/form/form-view/structure-form/structure-form.component.ts b/src/app/form/form-view/structure-form/structure-form.component.ts
index 2bb467f91..a1e136391 100644
--- a/src/app/form/form-view/structure-form/structure-form.component.ts
+++ b/src/app/form/form-view/structure-form/structure-form.component.ts
@@ -228,7 +228,6 @@ export class StructureFormComponent implements OnChanges, OnInit {
       this.pagesValidation[structureFormStep.structureConsent] = {
         valid: !this.isEditMode ? this.userAcceptSavedDate : true,
       };
-
       this.updatePageValid();
     }
   }
diff --git a/src/styles.scss b/src/styles.scss
index 7676b6406..76c2be28f 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -85,7 +85,7 @@ a {
     &::after {
       content: url('/assets/ico/toast-success.svg') !important;
       position: absolute !important;
-      top: 14px !important;
+      top: 5px !important;
       left: 5px !important;
     }
   }
@@ -97,7 +97,7 @@ a {
     &::after {
       content: url('assets/ico/toast-error.svg') !important;
       position: absolute !important;
-      top: 14px !important;
+      top: 5px !important;
       left: 5px !important;
     }
   }
-- 
GitLab