petites avancées

This commit is contained in:
Sana EL HIRI 2022-03-04 18:07:59 +01:00
parent 4ccbbf869b
commit f8fccea027
4 changed files with 83 additions and 6 deletions

View File

@ -5,7 +5,28 @@
<app-side-bar></app-side-bar>
</div>
<div class="col compte text-center">
<h1>Supprimer ce membre</h1>
<main class="contenu-compte"></main>
<main class="contenu-compte">
<p class="d-flex justify-content-center">Êtes-vous sur de vouloir Supprimer ce compte ?</p>
<div class="d-flex justify-content-center">
<button
id = "bouton-ajout"
type="button"
class="btn btn-primary btn-lg bouton-non"
routerLink="../compte"
routerLinkActive="active-custom"
>Non, je ne souhaite pas supprimer ce compte
</button>
</div>
<div class="d-flex justify-content-center">
<button
id = "bouton-ajout"
type="button"
class="btn btn-primary btn-lg bouton-oui"
>Oui, je souhaite supprimer ce compte
</button>
</div>
</main>
</div>
</div>

View File

@ -0,0 +1,49 @@
p{
font-size: 30px;
margin-top: 20px;
}
button{
margin-top: 10px;
}
.bouton-non {
margin-top: 5px;
margin-right: 5px;
border: 1px solid #7879F1 !important;
background-color: #7879F1;
height: 40px;
width: 450px;
text-align: center;
}
.bouton-non:hover {
margin-top: 5px;
margin-right: 5px;
border: 1px solid #68d182 !important;
background-color: #68d182;
color: #fff;
height: 40px;
width: 450px;
text-align: center;
}
.bouton-oui {
margin-top: 5px;
border: 1px solid #7879F1 !important;
background-color: #7879F1;
color: #fff;
height: 40px;
width: 450px;
text-align: center;
}
.bouton-oui:hover {
margin-top: 5px;
border: 1px solid #bd4646 !important;
background-color: #bd4646;
color: #fff;
height: 40px;
width: 450px;
text-align: center;
}

View File

@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { MembreService } from 'src/app/services/membre.service';
import { TokenService } from 'src/app/services/token.service';
@Component({
selector: 'app-page-delete-member',
@ -6,10 +8,15 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./page-delete-member.component.scss']
})
export class PageDeleteMemberComponent implements OnInit {
@Output() clickDelete = new EventEmitter();
parent: boolean;
constructor() { }
constructor(private tokenService: TokenService, private membreService: MembreService) {
this.parent = false;
}
ngOnInit(): void {
}
}

View File

@ -45,8 +45,8 @@ export class MembreService {
}
}
deleteMembre(membre: Membre): Observable<any> {
return this.http.delete(`${this.apiUrl}/membres/delete/1`);
deleteMembre(membre: Membre): Observable<any>{
return this.http.delete(`${this.apiUrl}/membres/delete/${membre.id}`);
}
updateMembre(membre: Membre): Observable<any> | void {