From 8527024606b5178aaefb76e8c0a4ce56aafdb94b Mon Sep 17 00:00:00 2001 From: Sana EL HIRI Date: Mon, 7 Mar 2022 16:26:52 +0100 Subject: [PATCH] nettoyage code --- src/app/models/membre.ts | 3 --- src/app/pages/page-account/page-account.component.html | 2 +- src/app/pages/page-account/page-account.component.ts | 2 -- src/app/pages/page-add-member/page-add-member.component.ts | 1 - .../page-delete-member/page-delete-member.component.ts | 7 +------ .../pages/page-to-do-list/page-to-do-list.component.scss | 2 +- .../page-update-member/page-update-member.component.ts | 2 -- src/app/services/team.service.ts | 2 -- 8 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/app/models/membre.ts b/src/app/models/membre.ts index a715404..f8fad13 100644 --- a/src/app/models/membre.ts +++ b/src/app/models/membre.ts @@ -1,5 +1,3 @@ -import { Team } from "./team"; - export interface Membre { id: string; nom: string; @@ -9,6 +7,5 @@ export interface Membre { dateNaissance: Date; couleur: string; passwordConfirm: string; - //team: Team; roleList: string[]; } diff --git a/src/app/pages/page-account/page-account.component.html b/src/app/pages/page-account/page-account.component.html index e87ebd6..22e9e59 100644 --- a/src/app/pages/page-account/page-account.component.html +++ b/src/app/pages/page-account/page-account.component.html @@ -24,7 +24,7 @@
- + diff --git a/src/app/pages/page-account/page-account.component.ts b/src/app/pages/page-account/page-account.component.ts index e705c09..8699f62 100644 --- a/src/app/pages/page-account/page-account.component.ts +++ b/src/app/pages/page-account/page-account.component.ts @@ -42,11 +42,9 @@ export class PageAccountComponent implements OnInit { const userRole = this.tokenService.getRole(); if(userRole == "ROLE_PARENT"){ this.parent = true; - console.log('Rôle : ' + userRole); } else if(userRole== "ROLE_ENFANT"){ this.parent = false; - console.log('Rôle : ' + userRole); } } diff --git a/src/app/pages/page-add-member/page-add-member.component.ts b/src/app/pages/page-add-member/page-add-member.component.ts index 5867f19..d5a1543 100644 --- a/src/app/pages/page-add-member/page-add-member.component.ts +++ b/src/app/pages/page-add-member/page-add-member.component.ts @@ -90,7 +90,6 @@ export class PageAddMemberComponent implements OnInit { const mail: Mail = { recipient: emailValue, subject: "Votre mot de passe Organizee", - //message: 'Votre mot de passe' message: `Bonjour ${firstNameValue}!\n Voici vos identifiants de connexion : \n Identifiant : ${emailValue} Mot de passe : ${passwordValue}` 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 47a086d..f512194 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,4 @@ -import { Component, EventEmitter, OnInit, Output } from '@angular/core'; +import { Component,OnInit} from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { MembreService } from 'src/app/services/membre.service'; import { TokenService } from 'src/app/services/token.service'; @@ -16,7 +16,6 @@ export class PageDeleteMemberComponent implements OnInit { constructor(private membreService: MembreService, private tokenService: TokenService, - private router: Router, private route: ActivatedRoute) { this.membreInfos = ''; this.parent = false; @@ -32,7 +31,6 @@ export class PageDeleteMemberComponent implements OnInit { .getMembreId(this.membreId) .subscribe((membreInfos: any) => { this.membreInfos = membreInfos; - console.log(membreInfos.id); }); /** Récupérer le rôle de l'uilisateur connecté pour lui imposer des limitations s'il a un ROLE_ENFANT **/ @@ -40,17 +38,14 @@ export class PageDeleteMemberComponent implements OnInit { const userRole = this.tokenService.getRole(); if(userRole == "ROLE_PARENT"){ this.parent = true; - console.log('Rôle : ' + userRole); } else if(userRole== "ROLE_ENFANT"){ this.parent = false; - console.log('Rôle : ' + userRole); } } /********************** Suppresion d'un membre au click ********************/ onClickDelete(): void { - console.log(this.membreInfos); this.membreService.deleteMembre(this.membreInfos.id).subscribe((resp) => { return resp }); diff --git a/src/app/pages/page-to-do-list/page-to-do-list.component.scss b/src/app/pages/page-to-do-list/page-to-do-list.component.scss index 499b75c..72fe441 100644 --- a/src/app/pages/page-to-do-list/page-to-do-list.component.scss +++ b/src/app/pages/page-to-do-list/page-to-do-list.component.scss @@ -3,7 +3,7 @@ color: #5d5fef; font-size: 30px; margin-left: 240px; - margin-top: 40px; + margin-top: 20px; } .btn { diff --git a/src/app/pages/page-update-member/page-update-member.component.ts b/src/app/pages/page-update-member/page-update-member.component.ts index b7c5c52..cc90005 100644 --- a/src/app/pages/page-update-member/page-update-member.component.ts +++ b/src/app/pages/page-update-member/page-update-member.component.ts @@ -100,8 +100,6 @@ export class PageUpdateMemberComponent implements OnInit { roleList: [roleValue] }; - console.log(membre); - this.membreService.updateMembre(membre)?.subscribe((resp) => { this.router.navigate(['compte']); }); diff --git a/src/app/services/team.service.ts b/src/app/services/team.service.ts index 3e96bab..0de1c80 100644 --- a/src/app/services/team.service.ts +++ b/src/app/services/team.service.ts @@ -32,8 +32,6 @@ export class TeamService { } addTeam(team: Team): Observable { - console.log(team); - return this.http.post(`${this.apiUrl}/teams/add`, team); }