diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index cd90cda..d43e8ef 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -36,7 +36,7 @@ const routes: Routes = [
{ path: 'password-oublie', component: PageForgotPasswordComponent },
{ path: 'menu', canActivate: [AuthGuard], component: PageMenuSemaineComponent },
{ path: 'repertoire', canActivate: [AuthGuard], component: PageRepertoireComponent },
- { path: 'reinitialisation-password', component: PageResetPasswordComponent },
+ { path: 'reinitialisation-password/:uuid', component: PageResetPasswordComponent },
{ path: 'creation-compte', component: PageSignupComponent },
{ path: 'page-support', component: PageSupportComponent},
{ path: 'to-do-list', canActivate: [AuthGuard], component: PageToDoListComponent },
diff --git a/src/app/components/fiche-contact/fiche-contact.component.html b/src/app/components/fiche-contact/fiche-contact.component.html
index ad8df74..33b89bc 100644
--- a/src/app/components/fiche-contact/fiche-contact.component.html
+++ b/src/app/components/fiche-contact/fiche-contact.component.html
@@ -4,13 +4,17 @@
-
-
diff --git a/src/app/components/fiche-contact/fiche-contact.component.ts b/src/app/components/fiche-contact/fiche-contact.component.ts
index f6c1a8a..2c2a1b5 100644
--- a/src/app/components/fiche-contact/fiche-contact.component.ts
+++ b/src/app/components/fiche-contact/fiche-contact.component.ts
@@ -1,4 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+import { TokenService } from 'src/app/services/token.service';
@Component({
selector: 'app-fiche-contact',
@@ -8,10 +9,20 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
export class FicheContactComponent implements OnInit {
@Input() personne: any;
@Output() clickDelete = new EventEmitter();
+ parent: boolean;
- constructor() {}
- ngOnInit(): void {}
+ constructor(private tokenService: TokenService) {
+ this.parent = false;
+ }
+
+ ngOnInit(): void {
+ const roleUser = this.tokenService.getRole();
+
+ if(roleUser == "ROLE_PARENT"){
+ this.parent = true;
+ }
+ }
onClickDelete(numPerson: number){
window.alert("Le contact à bien été supprimé!")
diff --git a/src/app/components/signin/signin.component.html b/src/app/components/signin/signin.component.html
index 33e5f02..83e4a52 100644
--- a/src/app/components/signin/signin.component.html
+++ b/src/app/components/signin/signin.component.html
@@ -23,9 +23,14 @@
routerLinkActive="active-custom">S'inscrire
-
-
diff --git a/src/app/components/signin/signin.component.ts b/src/app/components/signin/signin.component.ts
index 7ae9a33..ff6c04d 100644
--- a/src/app/components/signin/signin.component.ts
+++ b/src/app/components/signin/signin.component.ts
@@ -14,9 +14,10 @@ import {
styleUrls: ['./signin.component.scss'],
})
export class SigninComponent implements OnInit {
- public errorForm: boolean;
+ alert : any;
+ isShow : boolean;
constructor(private authService: AuthService, private router: Router) {
- this.errorForm = false;
+ this.isShow = false;
}
ngOnInit(): void {}
@@ -26,18 +27,21 @@ export class SigninComponent implements OnInit {
const email = submittedForm.form.value['email'];
const password = submittedForm.form.value['password'];
if (email !== '' && password !== '') {
- this.authService.signin(email, password).subscribe((resp) => {
- console.log('Component Signin: ', resp);
- //if(resp == ){
- this.router.navigate(['tableau-de-bord']);
- //}else{
- // window.alert("Votre identifiant/mot de passe est erroné");
- //}
- console.log('Component Signin: ', resp);
- });
+ this.authService.signin(email, password).subscribe(
+ {
+ next: resp => {
+ this.router.navigate(['tableau-de-bord']);
+ },
+ error: err => {
+ this.alert={"type":"danger", "content":"Le login ou paswword est invalide"};
+ this.isShow = true;
+ },
+ complete: () => console.log('DONE!')
+ });
} else {
// afficher une erreur à l'utilisateur
- this.errorForm = true;
+ this.alert={"type":"danger", "content":"Le login ou password est invalide"};
+ this.isShow = true;
}
}
}
diff --git a/src/app/pages/page-accueil/page-accueil.component.ts b/src/app/pages/page-accueil/page-accueil.component.ts
index a3a39fd..490000a 100644
--- a/src/app/pages/page-accueil/page-accueil.component.ts
+++ b/src/app/pages/page-accueil/page-accueil.component.ts
@@ -1,4 +1,7 @@
+import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
+import { Router } from '@angular/router';
+import { TokenService } from 'src/app/services/token.service';
@Component({
selector: 'app-page-accueil',
@@ -7,9 +10,15 @@ import { Component, OnInit } from '@angular/core';
})
export class PageAccueilComponent implements OnInit {
- constructor() { }
+ constructor(private http: HttpClient, private router: Router, private tokenService: TokenService) {
+
+ }
ngOnInit(): void {
+ const token = this.tokenService.getToken();
+ if(token){
+ this.router.navigate(['tableau-de-bord']);
+ }
}
}
diff --git a/src/app/pages/page-agenda/page-agenda.component.scss b/src/app/pages/page-agenda/page-agenda.component.scss
index 95439b2..8a8fc2c 100644
--- a/src/app/pages/page-agenda/page-agenda.component.scss
+++ b/src/app/pages/page-agenda/page-agenda.component.scss
@@ -40,4 +40,4 @@
.fullscreen {
position: absolute; top:90px; left: 0px; right: 0px; bottom: 0px;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/page-agenda/page-agenda.component.ts b/src/app/pages/page-agenda/page-agenda.component.ts
index 291b1e0..1e438ae 100644
--- a/src/app/pages/page-agenda/page-agenda.component.ts
+++ b/src/app/pages/page-agenda/page-agenda.component.ts
@@ -188,8 +188,8 @@ export class PageAgendaComponent implements AfterViewInit {
end: args.e.end(),
id: args.e.id(),
barColor: "#555555",
- text: args.e.text(),
- membre: {id:this.userId},
+ text: this.rdvSplit(args.e.text()),
+ membre: {id:args.e.data.tags.membre},
team: {id:this.teamId}
}
this.evenementService.updateEvenements(event).subscribe(
diff --git a/src/app/pages/page-dashboard/page-dashboard.component.scss b/src/app/pages/page-dashboard/page-dashboard.component.scss
index 11c3260..d2d8bff 100644
--- a/src/app/pages/page-dashboard/page-dashboard.component.scss
+++ b/src/app/pages/page-dashboard/page-dashboard.component.scss
@@ -12,7 +12,7 @@
.container {
display: flex;
- padding: 10px;
+ padding: 20px;
}
@@ -26,7 +26,7 @@ button{
#boxFour{
height: 150px;
- margin-top: -70px;
+ margin-top: -99px;
width: fit-content;
}
diff --git a/src/app/pages/page-forgot-password/page-forgot-password.component.html b/src/app/pages/page-forgot-password/page-forgot-password.component.html
index d34857a..711b397 100644
--- a/src/app/pages/page-forgot-password/page-forgot-password.component.html
+++ b/src/app/pages/page-forgot-password/page-forgot-password.component.html
@@ -9,10 +9,22 @@
-