diff --git a/src/app/pages/page-delete-member/page-delete-member.component.html b/src/app/pages/page-delete-member/page-delete-member.component.html index eca4658..85ce3ef 100644 --- a/src/app/pages/page-delete-member/page-delete-member.component.html +++ b/src/app/pages/page-delete-member/page-delete-member.component.html @@ -5,7 +5,28 @@
-

Supprimer ce membre

-
+
+

Êtes-vous sur de vouloir Supprimer ce compte ?

+
+ +
+
+ +
+
diff --git a/src/app/pages/page-delete-member/page-delete-member.component.scss b/src/app/pages/page-delete-member/page-delete-member.component.scss index e69de29..aae8fd4 100644 --- a/src/app/pages/page-delete-member/page-delete-member.component.scss +++ b/src/app/pages/page-delete-member/page-delete-member.component.scss @@ -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; +} diff --git a/src/app/pages/page-delete-member/page-delete-member.component.ts b/src/app/pages/page-delete-member/page-delete-member.component.ts index aef0557..34b589f 100644 --- a/src/app/pages/page-delete-member/page-delete-member.component.ts +++ b/src/app/pages/page-delete-member/page-delete-member.component.ts @@ -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 { } + } diff --git a/src/app/services/membre.service.ts b/src/app/services/membre.service.ts index 38d2567..105aa78 100644 --- a/src/app/services/membre.service.ts +++ b/src/app/services/membre.service.ts @@ -45,8 +45,8 @@ export class MembreService { } } - deleteMembre(membre: Membre): Observable { - return this.http.delete(`${this.apiUrl}/membres/delete/1`); + deleteMembre(membre: Membre): Observable{ + return this.http.delete(`${this.apiUrl}/membres/delete/${membre.id}`); } updateMembre(membre: Membre): Observable | void {