Merge pull request #33 from AlineRinquin/aline

Ajout des couleurs et un peu css
This commit is contained in:
AlineRinquin 2022-02-17 10:22:54 +01:00 committed by GitHub
commit 30fa1f7de5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 60 additions and 16 deletions

View File

@ -11,18 +11,32 @@
</button> </button>
</div> </div>
<div class="row align-items-center"> <div class="row align-items-center">
<div class="col-md-6 offset-md-3"> <div class="col-md-12">
<p class="fiche-contact" >
{{ personne.couleur }}</p> <div class="row d-flex justify-content-center flex-row">
<p class="fiche-contact" >{{ personne.prenom }} {{ personne.nom }}</p> <div class= "couleur col-4" [style.background-color]="personne.couleur"></div>
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/phone.png"/> <span class="fiche-contact col-7" >{{ personne.prenom }} {{ personne.nom }} </span>
{{ personne.telephone }}</p> </div>
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/logo-gmail.png"/>
{{ personne.email }}</p> <div class="row d-flex justify-content-center flex-row">
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/gateau.png"/> <img class= "col-4" style="max-height: 12% ; max-width: 12%" src="../../../assets/images/phone.png"/>
{{ personne.dateNaissance }}</p> <span class="fiche-contact col-7" >{{ personne.telephone }}</span>
<p class="fiche-contact" > </div>
{{ personne.adresse }}</p>
<div class="row d-flex justify-content-center flex-row">
<img class= "col-4" style="max-height: 12% ; max-width: 12%" src="../../../assets/images/logo-gmail.png"/>
<span class="fiche-contact col-7" >{{ personne.email }}</span>
</div>
<div class="row d-flex justify-content-center flex-row">
<img class= "col-4" style="max-height: 12% ; max-width: 12%" src="../../../assets/images/gateau.png"/>
<span class="fiche-contact col-7" >{{ personne.dateNaissance }}</span>
</div>
<div class="row d-flex justify-content-center flex-row">
<p class="fiche-contact col-7" >{{ personne.adresse }}</p>
</div>
</div> </div>
</div> </div>

View File

@ -7,6 +7,26 @@
margin: auto; margin: auto;
} }
.couleur{
border: none;
margin-top: -15px;
border-radius: 80%;
width: 60px;
height: 60px;
flex-direction: row;
}
.info{
display:flex;
justify-content: center;
}
.fiche-contact{
display:flex;
justify-content: center;
flex-direction: row;
}
.container { .container {
border: 1px solid 8c2e9b; border: 1px solid 8c2e9b;
padding: 10px; padding: 10px;

View File

@ -30,6 +30,7 @@ export class PageAjoutContactComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
// *********************************pensser à changer group car déprécié******************************** // *********************************pensser à changer group car déprécié********************************
this.ajoutContactForm = this.fb.group({ this.ajoutContactForm = this.fb.group({
couleurFc: new FormControl('', [Validators.required]),
lastNameFc: new FormControl('', [Validators.required]), lastNameFc: new FormControl('', [Validators.required]),
firstNameFc: new FormControl('', [Validators.required]), firstNameFc: new FormControl('', [Validators.required]),
telephoneFc: new FormControl('', [Validators.required]), telephoneFc: new FormControl('', [Validators.required]),

View File

@ -10,7 +10,7 @@
<div class="form-floating"> <div class="form-floating">
<input type="color" class="form-control" id="floatingInputcouleur" placeholder="" name="couleur" <input type="color" class="form-control" id="floatingInputcouleur" placeholder="" name="couleur"
formControlName="couleurFc"> formControlName="couleurFc" value= "{{ listContactInfo.couleur }}">
</div> </div>
<div class="form-floating"> <div class="form-floating">

View File

@ -44,6 +44,7 @@ export class PageModifierContactComponent implements OnInit {
// *********************************pensser à changer group car déprécié******************************** // *********************************pensser à changer group car déprécié********************************
this.modifContactForm = this.fb.group({ this.modifContactForm = this.fb.group({
couleurFc: new FormControl('', [Validators.required]),
lastNameFc: new FormControl('', [Validators.required]), lastNameFc: new FormControl('', [Validators.required]),
firstNameFc: new FormControl('', [Validators.required]), firstNameFc: new FormControl('', [Validators.required]),
telephoneFc: new FormControl('', [Validators.required]), telephoneFc: new FormControl('', [Validators.required]),
@ -71,7 +72,7 @@ export class PageModifierContactComponent implements OnInit {
//Méthode qui envoie les champs modifiés pour mise à jour //Méthode qui envoie les champs modifiés pour mise à jour
public onSubmit(): void { public onSubmit(): void {
const couleurValue = this.modifContactForm.value['']; const couleurValue = this.modifContactForm.value['couleurFc'];
const firstNameValue = this.modifContactForm.value['firstNameFc']; const firstNameValue = this.modifContactForm.value['firstNameFc'];
const lastNameValue = this.modifContactForm.value['lastNameFc']; const lastNameValue = this.modifContactForm.value['lastNameFc'];
const telephoneValue = this.modifContactForm.value['telephoneFc']; const telephoneValue = this.modifContactForm.value['telephoneFc'];

View File

@ -27,7 +27,7 @@
<div class="row justify-content-evenly"> <div class="row justify-content-evenly">
<div class="col-4"> <div class="col-4">
<div *ngFor="let personne of listContact" (click)="onClick(personne)"> <div *ngFor="let personne of listContact" (click)="onClick(personne)">
<img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/contact-1.png" /> <div class= "couleur" [style.background-color]="personne.couleur"></div>
<p class="fiche-contact">{{ personne.prenom }} {{ personne.nom }}</p> <p class="fiche-contact">{{ personne.prenom }} {{ personne.nom }}</p>
</div> </div>
</div> </div>

View File

@ -16,6 +16,14 @@
flex-direction: row; flex-direction: row;
} }
.couleur{
border: none;
margin-top: -15px;
border-radius: 80%;
width: 60px;
height: 60px;
flex-direction: row;
}
;h4 { ;h4 {
color: black; color: black;
font-weight: bold; font-weight: bold;

View File

@ -38,6 +38,6 @@ export class RepertoireService {
} }
updateContact(contact: Contact): Observable<any> { updateContact(contact: Contact): Observable<any> {
return this.http.put(`${this.apiUrl}/contacts/update/`, contact); return this.http.put(`${this.apiUrl}/contacts/update/1`, contact);
} }
} }