From ad433146320eaf4e3976e5ffc401eccb88700efa Mon Sep 17 00:00:00 2001
From: AlineRinquin <aline.rinquin.ar@gmail.com>
Date: Sat, 5 Mar 2022 12:41:24 +0100
Subject: [PATCH] ng model et comment code

---
 src/app/components/fiche-contact/fiche-contact.component.ts  | 1 +
 .../pages/page-ajout-contact/page-ajout-contact.component.ts | 2 +-
 .../page-modifier-contact.component.html                     | 5 +++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/app/components/fiche-contact/fiche-contact.component.ts b/src/app/components/fiche-contact/fiche-contact.component.ts
index 2c2a1b5..2d99fde 100644
--- a/src/app/components/fiche-contact/fiche-contact.component.ts
+++ b/src/app/components/fiche-contact/fiche-contact.component.ts
@@ -24,6 +24,7 @@ export class FicheContactComponent implements OnInit {
     }
   }
 
+  // supprime le contact
   onClickDelete(numPerson: number){
     window.alert("Le contact à bien été supprimé!")
     this.clickDelete.emit(numPerson);
diff --git a/src/app/pages/page-ajout-contact/page-ajout-contact.component.ts b/src/app/pages/page-ajout-contact/page-ajout-contact.component.ts
index 1076f68..34f9d99 100644
--- a/src/app/pages/page-ajout-contact/page-ajout-contact.component.ts
+++ b/src/app/pages/page-ajout-contact/page-ajout-contact.component.ts
@@ -63,7 +63,7 @@ export class PageAjoutContactComponent implements OnInit {
       email: emailValue,
       dateNaissance: dateNaissanceValue,
       adresse: adresseValue,
-      team: { id: teamId }, // changer l'id quand la personne est logé => recuperer l'id de la team du membre
+      team: { id: teamId }, 
     };
 
     if (contact.nom !== '') {
diff --git a/src/app/pages/page-modifier-contact/page-modifier-contact.component.html b/src/app/pages/page-modifier-contact/page-modifier-contact.component.html
index 9a52750..4c69c68 100644
--- a/src/app/pages/page-modifier-contact/page-modifier-contact.component.html
+++ b/src/app/pages/page-modifier-contact/page-modifier-contact.component.html
@@ -11,7 +11,8 @@
             
             <div class="form-floating">
             <input type="color" class="form-control" id="floatingInputcouleur" placeholder="" name="couleur"
-            formControlName="couleurFc" value= "{{ listContactInfo.couleur }}">
+            formControlName="couleurFc" value= "{{ listContactInfo.couleur }}"
+            [(ngModel)]="listContactInfo.couleur">
             </div>
 
             <div class="form-floating">
@@ -83,7 +84,7 @@
 
             <button class="w-100 btn btn-lg btn-secondary" 
                     type="submit" 
-                    [disabled]="modifContactForm.invalid">Valider</button>
+                    >Valider</button>
 
         </form>
     </main>