Merge pull request #99 from AlineRinquin/dev
Dev verssion au 11/03/22 verssion 1.2
This commit is contained in:
commit
9b67d21485
58 changed files with 540 additions and 359 deletions
|
@ -5,7 +5,6 @@ import { PageAccueilComponent } from './pages/page-accueil/page-accueil.componen
|
||||||
import { PageAddMemberComponent } from './pages/page-add-member/page-add-member.component';
|
import { PageAddMemberComponent } from './pages/page-add-member/page-add-member.component';
|
||||||
import { PageAgendaComponent } from './pages/page-agenda/page-agenda.component';
|
import { PageAgendaComponent } from './pages/page-agenda/page-agenda.component';
|
||||||
import { PageAjoutContactComponent } from './pages/page-ajout-contact/page-ajout-contact.component';
|
import { PageAjoutContactComponent } from './pages/page-ajout-contact/page-ajout-contact.component';
|
||||||
import { PageCreationTeamComponent } from './pages/page-creation-team/page-creation-team.component';
|
|
||||||
import { PageDashboardComponent } from './pages/page-dashboard/page-dashboard.component';
|
import { PageDashboardComponent } from './pages/page-dashboard/page-dashboard.component';
|
||||||
import { PageDeleteMemberComponent } from './pages/page-delete-member/page-delete-member.component';
|
import { PageDeleteMemberComponent } from './pages/page-delete-member/page-delete-member.component';
|
||||||
import { PageForgotPasswordComponent } from './pages/page-forgot-password/page-forgot-password.component';
|
import { PageForgotPasswordComponent } from './pages/page-forgot-password/page-forgot-password.component';
|
||||||
|
@ -30,7 +29,7 @@ const routes: Routes = [
|
||||||
{ path: 'ajout-membre', canActivate: [AuthGuard], component: PageAddMemberComponent },
|
{ path: 'ajout-membre', canActivate: [AuthGuard], component: PageAddMemberComponent },
|
||||||
{ path: 'agenda', canActivate: [AuthGuard], component: PageAgendaComponent },
|
{ path: 'agenda', canActivate: [AuthGuard], component: PageAgendaComponent },
|
||||||
{ path: 'tableau-de-bord', canActivate: [AuthGuard], component: PageDashboardComponent },
|
{ path: 'tableau-de-bord', canActivate: [AuthGuard], component: PageDashboardComponent },
|
||||||
{ path: 'supprimer-membre', canActivate: [AuthGuard], component: PageDeleteMemberComponent },
|
{ path: 'supprimer-membre/:id', canActivate: [AuthGuard], component: PageDeleteMemberComponent },
|
||||||
{ path: 'password-oublie', component: PageForgotPasswordComponent },
|
{ path: 'password-oublie', component: PageForgotPasswordComponent },
|
||||||
{ path: 'menu', canActivate: [AuthGuard], component: PageMenuSemaineComponent },
|
{ path: 'menu', canActivate: [AuthGuard], component: PageMenuSemaineComponent },
|
||||||
{ path: 'repertoire', canActivate: [AuthGuard], component: PageRepertoireComponent },
|
{ path: 'repertoire', canActivate: [AuthGuard], component: PageRepertoireComponent },
|
||||||
|
@ -40,7 +39,6 @@ const routes: Routes = [
|
||||||
{ path: 'to-do-list', canActivate: [AuthGuard], component: PageToDoListComponent },
|
{ path: 'to-do-list', canActivate: [AuthGuard], component: PageToDoListComponent },
|
||||||
{ path: 'modifier-membre/:id', canActivate: [AuthGuard], component: PageUpdateMemberComponent },
|
{ path: 'modifier-membre/:id', canActivate: [AuthGuard], component: PageUpdateMemberComponent },
|
||||||
{ path: 'ajouter-contact', canActivate: [AuthGuard], component: PageAjoutContactComponent },
|
{ path: 'ajouter-contact', canActivate: [AuthGuard], component: PageAjoutContactComponent },
|
||||||
{ path: 'creation-team', canActivate: [AuthGuard], component: PageCreationTeamComponent },
|
|
||||||
{ path: 'footer', component: FooterComponent},
|
{ path: 'footer', component: FooterComponent},
|
||||||
{ path: 'ajout-evenement', canActivate: [AuthGuard], component: PageAjoutEvenementsComponent },
|
{ path: 'ajout-evenement', canActivate: [AuthGuard], component: PageAjoutEvenementsComponent },
|
||||||
{ path: '**', component: PageNotFoundComponent },
|
{ path: '**', component: PageNotFoundComponent },
|
||||||
|
|
|
@ -30,7 +30,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
import { PageAjoutContactComponent } from './pages/page-ajout-contact/page-ajout-contact.component';
|
import { PageAjoutContactComponent } from './pages/page-ajout-contact/page-ajout-contact.component';
|
||||||
import { PageModifierContactComponent } from './pages/page-modifier-contact/page-modifier-contact.component';
|
import { PageModifierContactComponent } from './pages/page-modifier-contact/page-modifier-contact.component';
|
||||||
import { PageCreationTeamComponent } from './pages/page-creation-team/page-creation-team.component';
|
|
||||||
import { AutofocusFixModule } from 'ngx-autofocus-fix';
|
import { AutofocusFixModule } from 'ngx-autofocus-fix';
|
||||||
import { FooterComponent } from './components/footer/footer.component';
|
import { FooterComponent } from './components/footer/footer.component';
|
||||||
import { DayPilot, DayPilotModule } from "@daypilot/daypilot-lite-angular";
|
import { DayPilot, DayPilotModule } from "@daypilot/daypilot-lite-angular";
|
||||||
|
@ -41,6 +40,7 @@ import { HumeurComponent } from './components/humeur/humeur.component';
|
||||||
import { DeconnexionComponent } from './components/deconnexion/deconnexion.component';
|
import { DeconnexionComponent } from './components/deconnexion/deconnexion.component';
|
||||||
import { AlertComponent } from './components/alert/alert.component';
|
import { AlertComponent } from './components/alert/alert.component';
|
||||||
import { PageAjoutEvenementsComponent } from './pages/page-ajout-evenements/page-ajout-evenements.component';
|
import { PageAjoutEvenementsComponent } from './pages/page-ajout-evenements/page-ajout-evenements.component';
|
||||||
|
import { PageSupportComponent } from './pages/page-support/page-support.component';
|
||||||
registerLocaleData(localeFr)
|
registerLocaleData(localeFr)
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -72,13 +72,13 @@ registerLocaleData(localeFr)
|
||||||
CreneauComponent,
|
CreneauComponent,
|
||||||
PageAjoutContactComponent,
|
PageAjoutContactComponent,
|
||||||
PageModifierContactComponent,
|
PageModifierContactComponent,
|
||||||
PageCreationTeamComponent,
|
|
||||||
FooterComponent,
|
FooterComponent,
|
||||||
CardAvatarComponent,
|
CardAvatarComponent,
|
||||||
DeconnexionComponent,
|
DeconnexionComponent,
|
||||||
HumeurComponent,
|
HumeurComponent,
|
||||||
AlertComponent,
|
AlertComponent,
|
||||||
PageAjoutEvenementsComponent
|
PageAjoutEvenementsComponent,
|
||||||
|
PageSupportComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="alert alert-{{alert.type}} alert-dismissible fade show" role="alert" style="position:absolute;z-index:9999;top:10px;right:50%;transform: translateX(50%);width:600px; text-align:center;">
|
<div class="alert alert-{{alert.type}} alert-dismissible fade show" role="alert" style="position:fixed;z-index:9999;top:10px;right:50%;transform: translateX(50%);width:600px; text-align:center;">
|
||||||
{{alert.content}}
|
{{alert.content}}
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" (click)="onClickCloseAlert()"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close" (click)="onClickCloseAlert()"></button>
|
||||||
</div>
|
</div>
|
|
@ -8,11 +8,13 @@
|
||||||
<h3 class="mt-2 mb-0">{{membre.prenom }} {{membre.nom }}</h3>
|
<h3 class="mt-2 mb-0">{{membre.prenom }} {{membre.nom }}</h3>
|
||||||
<div class="buttons text-center"><button button type="button" class="btn btn-outline-primary px-4"
|
<div class="buttons text-center"><button button type="button" class="btn btn-outline-primary px-4"
|
||||||
routerLink="../modifier-membre/{{membre.id}}"
|
routerLink="../modifier-membre/{{membre.id}}"
|
||||||
routerLinkActive="active-custom">
|
routerLinkActive="active-custom"
|
||||||
|
[hidden]="parent == false">
|
||||||
Modifier
|
Modifier
|
||||||
</button><button button type="button" class="btn btn-primary px-4"
|
</button><button button type="button" class="btn btn-primary px-4"
|
||||||
routerLink="../supprimer-membre"
|
routerLink="../supprimer-membre/{{membre.id}}"
|
||||||
routerLinkActive="active-custom">
|
routerLinkActive="active-custom"
|
||||||
|
[hidden]="parent == false">
|
||||||
Supprimer
|
Supprimer
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
.mt-5 {
|
||||||
|
margin-top: 0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
#couleur{
|
#couleur{
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
|
import { TokenService } from 'src/app/services/token.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-card-member',
|
selector: 'app-card-member',
|
||||||
|
@ -7,10 +8,24 @@ import { Component, Input, OnInit } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class CardMemberComponent implements OnInit {
|
export class CardMemberComponent implements OnInit {
|
||||||
@Input() membre: any;
|
@Input() membre: any;
|
||||||
|
parent: boolean;
|
||||||
|
|
||||||
constructor() { }
|
constructor(private tokenService: TokenService) {
|
||||||
|
this.parent = false;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
/** Récupérer le rôle de l'uilisateur connecté pour lui imposer des limitations s'il a un ROLE_ENFANT **/
|
||||||
|
/** Il s'agit de cacher les boutons qui permettent de modifier et supprimer les profils (html)**/
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,5 @@
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-outline-primary btn-circle btn-xl"
|
class="btn btn-outline-primary btn-circle btn-xl"
|
||||||
(click)="onClickDeco()"
|
(click)="onClickDeco()"
|
||||||
>
|
> Déconnexion
|
||||||
Se déconnecter
|
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -1,10 +1,25 @@
|
||||||
.btn-circle.btn-xl {
|
.btn-circle.btn-xl {
|
||||||
width: 80px;
|
width: auto;
|
||||||
height: 80px;
|
height: auto;
|
||||||
padding: 10px 16px;
|
padding: 10px;
|
||||||
border-radius: 40px;
|
border-radius: 15px;
|
||||||
font-size: 10px;
|
background-color: white;
|
||||||
|
font-size: 12px;
|
||||||
|
color: black;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-circle.btn-xl:hover {
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 15px;
|
||||||
|
background-color: #5d5fef;
|
||||||
|
font-size: 12px;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<div class="footer text-center" >
|
<div class="footer text-center" >
|
||||||
<h3>Plan du site</h3>
|
<h3>Plan du site</h3>
|
||||||
<div class="liens">
|
<div class="liens">
|
||||||
<a routerLink="../accueil" routerLinkActive="active-custom" class="nav-link">Page d'accueil</a>
|
|
||||||
<a routerLink="../tableau-de-bord" routerLinkActive="active-custom" class="nav-link">Tableau de bord</a>
|
<a routerLink="../tableau-de-bord" routerLinkActive="active-custom" class="nav-link">Tableau de bord</a>
|
||||||
<a routerLink="../compte" routerLinkActive="active-custom" class="nav-link">Ma Team</a>
|
<a routerLink="../compte" routerLinkActive="active-custom" class="nav-link">Ma Team</a>
|
||||||
<a routerLink="../repertoire" routerLinkActive="active-custom" class="nav-link">Répertoire</a>
|
<a routerLink="../repertoire" routerLinkActive="active-custom" class="nav-link">Répertoire</a>
|
||||||
<a routerLink="../to-do-list" routerLinkActive="active-custom" class="nav-link">To-Do-List</a>
|
<a routerLink="../to-do-list" routerLinkActive="active-custom" class="nav-link">To-Do-List</a>
|
||||||
<a routerLink="../agenda" routerLinkActive="active-custom" class="nav-link">Agenda</a>
|
<a routerLink="../agenda" routerLinkActive="active-custom" class="nav-link">Agenda</a>
|
||||||
<a routerLink="../menu" routerLinkActive="active-custom" class="nav-link">Menus</a>
|
<a routerLink="../menu" routerLinkActive="active-custom" class="nav-link">Menus</a>
|
||||||
|
<a routerLink="../page-support" routerLinkActive="active-custom" class="nav-link">Nous contacter</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,10 +1,23 @@
|
||||||
.liens {
|
.liens {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
color : blue;
|
}
|
||||||
font-size: smaller;
|
|
||||||
|
a{
|
||||||
|
color: rgb(54, 54, 54);
|
||||||
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
margin-top: 20px;
|
margin-top: 40px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
padding-top: 10px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3{
|
||||||
|
color :rgb(54, 54, 54);
|
||||||
|
font-size : 16px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
|
@ -1,18 +1,11 @@
|
||||||
<nav
|
<nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top shadow">
|
||||||
class="navbar sticky-top navbar-expand-lg navbar-light bg-light shadow py-0"
|
|
||||||
>
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
|
<a class="navbar-brand" routerLink="/accueil">
|
||||||
<div class="navbar-nav">
|
<img id="img" src="../../../assets/images/logo-organizee.png" />
|
||||||
<img
|
Organizee
|
||||||
id="img"
|
</a>
|
||||||
routerLink="accueil"
|
|
||||||
routerLinkActive="active-custom"
|
|
||||||
src="../../../assets/images/logo-organizee.png"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div id="navbarText">
|
||||||
<a class="navbar-brand" href="#">Organizee</a>
|
<app-deconnexion *ngIf="isLogged" ></app-deconnexion>
|
||||||
</div>
|
</div>
|
||||||
<app-deconnexion *ngIf="isLogged"></app-deconnexion>
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
|
#img {
|
||||||
|
height:45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar{
|
||||||
|
height: auto;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
position: relative;
|
|
||||||
margin-right: 70%;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 3rem;
|
font-size: 2rem;
|
||||||
color: #5d5fef;
|
color: #5d5fef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,13 +31,6 @@ a:active {
|
||||||
color: #5d5fef;
|
color: #5d5fef;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-nav {
|
.container-fluid{
|
||||||
height: 6rem;
|
width:90%;
|
||||||
}
|
|
||||||
|
|
||||||
#img {
|
|
||||||
position: absolute;
|
|
||||||
max-width: 5%;
|
|
||||||
margin-left: 5%;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
|
|
||||||
<h2>Mon humeur :</h2>
|
<h2>Mon humeur :</h2>
|
||||||
|
|
||||||
|
<app-alert
|
||||||
|
*ngIf="isShow"
|
||||||
|
[alert]="alert"
|
||||||
|
(eventClose)="onClickCloseAlert()"
|
||||||
|
></app-alert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,3 +25,4 @@
|
||||||
|
|
||||||
|
|
||||||
</div> </div>
|
</div> </div>
|
||||||
|
|
|
@ -6,6 +6,7 @@ p>img {
|
||||||
img {
|
img {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
margin: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.humeur {
|
.humeur {
|
||||||
|
@ -13,6 +14,7 @@ display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
background-color: #87AFC7;
|
width: 400px;
|
||||||
|
background-color:rgb(120, 121, 241);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
|
@ -1,4 +1,6 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { MembreService } from 'src/app/services/membre.service';
|
||||||
|
import { TokenService } from 'src/app/services/token.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-humeur',
|
selector: 'app-humeur',
|
||||||
|
@ -6,10 +8,10 @@ import { Component, OnInit } from '@angular/core';
|
||||||
styleUrls: ['./humeur.component.scss']
|
styleUrls: ['./humeur.component.scss']
|
||||||
})
|
})
|
||||||
export class HumeurComponent implements OnInit {
|
export class HumeurComponent implements OnInit {
|
||||||
|
monHumeurLien! : string[];
|
||||||
|
monHumeurTitle! : string[] ;
|
||||||
monHumeurLien! : string[];
|
isShow: boolean;
|
||||||
monHumeurTitle! : string[] ;
|
alert: any;
|
||||||
|
|
||||||
|
|
||||||
tabHumeur= [
|
tabHumeur= [
|
||||||
|
@ -19,18 +21,48 @@ export class HumeurComponent implements OnInit {
|
||||||
{ title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"},
|
{ title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"},
|
||||||
{ title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ]
|
{ title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ]
|
||||||
|
|
||||||
constructor() { }
|
constructor(private membreService: MembreService, private tokenService: TokenService) {
|
||||||
|
this.isShow= false;
|
||||||
|
this.alert="";
|
||||||
|
|
||||||
ngOnInit(): void { }
|
}
|
||||||
|
|
||||||
onChoixHumeur(numero: number){
|
ngOnInit(): void {
|
||||||
|
const userId = this.tokenService.getCurrentMembreId();
|
||||||
|
this.membreService.getMembreId(userId).subscribe({
|
||||||
|
next: result => {
|
||||||
|
//this.monHumeurTitle= [this.tabHumeur[result.smiley].title];
|
||||||
|
this.monHumeurLien= result.smiley;
|
||||||
|
// console.log("resultat smiley ", result.smiley);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onChoixHumeur(numero: any){
|
||||||
this.monHumeurTitle= [this.tabHumeur[numero].title];
|
this.monHumeurTitle= [this.tabHumeur[numero].title];
|
||||||
this.monHumeurLien= [this.tabHumeur[numero].lien];
|
this.monHumeurLien= [this.tabHumeur[numero].lien];
|
||||||
|
|
||||||
|
this.membreService.updateHumeur(this.tabHumeur[numero].lien)?.subscribe(
|
||||||
|
{
|
||||||
|
next: result => {
|
||||||
|
this.alert={"type":"success", "content":"L'humeur a bien été modifiée"};
|
||||||
|
this.isShow = true;
|
||||||
|
},
|
||||||
|
error: err => {
|
||||||
|
this.alert={"type":"danger", "content":"Problème lors de la modification de l'humeur"};
|
||||||
|
this.isShow = true;
|
||||||
|
},
|
||||||
|
complete: () => console.log('DONE!')
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
console.log("humeur titre est : ", this.monHumeurTitle);
|
console.log("humeur titre est : ", this.monHumeurTitle);
|
||||||
console.log("humeur lien est : ", this.monHumeurLien);
|
console.log("humeur lien est : ", this.monHumeurLien);
|
||||||
console.log("index humeur est : ", numero );
|
console.log("index humeur est : ", numero);
|
||||||
|
}
|
||||||
|
|
||||||
|
onClickCloseAlert(){
|
||||||
|
this.isShow=!this.isShow;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
//background-color: #c3c3e7;
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
.nav{
|
.nav{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
@ -19,5 +20,9 @@ li {
|
||||||
|
|
||||||
a{
|
a{
|
||||||
color: black;
|
color: black;
|
||||||
|
background-color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
padding: none;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border-radius: 15px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.deleteTache {
|
.deleteTache {
|
||||||
width: 75%;
|
width: 10%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 14px;
|
margin-left: 14px;
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.modifier-element {
|
.modifier-element {
|
||||||
font-size: 24px;
|
font-size: 18px;
|
||||||
color: white;
|
color: white;
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -3,7 +3,6 @@ import { Router } from '@angular/router';
|
||||||
import { Tache } from 'src/app/models/tache';
|
import { Tache } from 'src/app/models/tache';
|
||||||
import { ToDoList } from 'src/app/models/to-do-list';
|
import { ToDoList } from 'src/app/models/to-do-list';
|
||||||
import { TodoService } from 'src/app/services/todo.service';
|
import { TodoService } from 'src/app/services/todo.service';
|
||||||
import { TodoList } from 'src/app/todo-list';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-to-do-list',
|
selector: 'app-to-do-list',
|
||||||
|
@ -13,7 +12,6 @@ import { TodoList } from 'src/app/todo-list';
|
||||||
export class ToDoListComponent implements OnInit {
|
export class ToDoListComponent implements OnInit {
|
||||||
@Input() todo!: ToDoList;
|
@Input() todo!: ToDoList;
|
||||||
public beforeEditCache: string;
|
public beforeEditCache: string;
|
||||||
//public todos: ToDoList[];
|
|
||||||
public todoTitle: string;
|
public todoTitle: string;
|
||||||
public idTodo: number;
|
public idTodo: number;
|
||||||
public filter: string;
|
public filter: string;
|
||||||
|
@ -24,7 +22,6 @@ export class ToDoListComponent implements OnInit {
|
||||||
|
|
||||||
constructor(private TodoService: TodoService, private router: Router) {
|
constructor(private TodoService: TodoService, private router: Router) {
|
||||||
this.beforeEditCache = '';
|
this.beforeEditCache = '';
|
||||||
//this.todos = [];
|
|
||||||
this.todoTitle = '';
|
this.todoTitle = '';
|
||||||
this.idTodo = 0;
|
this.idTodo = 0;
|
||||||
this.filter = '';
|
this.filter = '';
|
||||||
|
@ -37,8 +34,10 @@ export class ToDoListComponent implements OnInit {
|
||||||
this.beforeEditCache = '';
|
this.beforeEditCache = '';
|
||||||
this.casesRestantes = true;
|
this.casesRestantes = true;
|
||||||
this.filter = 'tous';
|
this.filter = 'tous';
|
||||||
this.idTodo = 4;
|
|
||||||
this.todoTitle = '';
|
this.todoTitle = '';
|
||||||
|
if (this.toDoRest() === 0) {
|
||||||
|
this.masterSelected = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//supprimer la todoList en fonction de son id
|
//supprimer la todoList en fonction de son id
|
||||||
deleteTodo(id: number): void {
|
deleteTodo(id: number): void {
|
||||||
|
@ -51,12 +50,13 @@ export class ToDoListComponent implements OnInit {
|
||||||
//ajouter tache par l'id de son parent todoList
|
//ajouter tache par l'id de son parent todoList
|
||||||
addTache(idTodoList: number) {
|
addTache(idTodoList: number) {
|
||||||
//idTodoList id que la todoList que l'on récupère
|
//idTodoList id que la todoList que l'on récupère
|
||||||
console.log(idTodoList);
|
//console.log(idTodoList);
|
||||||
|
//permet de construire l'objet à passer en base
|
||||||
const tache: Tache = {
|
const tache: Tache = {
|
||||||
id: 0,
|
id: 0,
|
||||||
texte: this.todoTitle,
|
texte: this.todoTitle,
|
||||||
etat: false,
|
etat: false,
|
||||||
editing: false,
|
editing: false, //flag permettant de passer le texte en input pour update
|
||||||
};
|
};
|
||||||
console.log(this.tache);
|
console.log(this.tache);
|
||||||
if (this.todoTitle != '') {
|
if (this.todoTitle != '') {
|
||||||
|
@ -70,9 +70,19 @@ export class ToDoListComponent implements OnInit {
|
||||||
|
|
||||||
//modifier le titre de la to-do-list
|
//modifier le titre de la to-do-list
|
||||||
updateTodo(todoList: ToDoList): void {
|
updateTodo(todoList: ToDoList): void {
|
||||||
this.TodoService.updateTodo(todoList)?.subscribe((resp) => {
|
let nouvelleTodolist = {
|
||||||
|
id: todoList.id,
|
||||||
|
nom: todoList.nom,
|
||||||
|
team: todoList.team,
|
||||||
|
};
|
||||||
|
console.log(todoList.team);
|
||||||
|
if (nouvelleTodolist.nom != '') {
|
||||||
|
this.TodoService.updateTodo(nouvelleTodolist)?.subscribe((resp) => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
window.alert('Il faut saisir du texte'); // sinon msg d'erreur}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//modifier la tâche par l'input
|
//modifier la tâche par l'input
|
||||||
|
@ -81,7 +91,7 @@ export class ToDoListComponent implements OnInit {
|
||||||
tache.editing = true;
|
tache.editing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// modifier une tâche validation de l'input
|
// modifier une tâche validation de l'input + update check
|
||||||
doneEdit(tache: Tache): void {
|
doneEdit(tache: Tache): void {
|
||||||
if (tache.texte.trim().length === 0) {
|
if (tache.texte.trim().length === 0) {
|
||||||
tache.texte = this.beforeEditCache;
|
tache.texte = this.beforeEditCache;
|
||||||
|
@ -94,12 +104,14 @@ export class ToDoListComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// annuler la modification
|
// annuler la modification de la tâche
|
||||||
cancelEdit(tache: Tache): void {
|
cancelEdit(tache: Tache): void {
|
||||||
tache.texte = this.beforeEditCache;
|
tache.texte = this.beforeEditCache;
|
||||||
tache.editing = false;
|
tache.editing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//supprimer la tache
|
//supprimer la tache
|
||||||
deleteTache(id: number) {
|
deleteTache(id: number) {
|
||||||
this.TodoService.deleteTacheById(id).subscribe((resp) => {
|
this.TodoService.deleteTacheById(id).subscribe((resp) => {
|
||||||
|
@ -112,17 +124,20 @@ export class ToDoListComponent implements OnInit {
|
||||||
return this.todo.taches.filter((tache: Tache) => !tache.etat).length;
|
return this.todo.taches.filter((tache: Tache) => !tache.etat).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Cocher toutes les tâches de la liste
|
//Vérifie si toutes les tâches de la liste sont cochées
|
||||||
listComplete(): boolean {
|
listComplete(): boolean {
|
||||||
return this.todo.taches.filter((tache: Tache) => tache).length > 0;
|
return this.todo.taches.filter((tache: Tache) => tache).length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//cocher toutes les cases de la todoList
|
//cocher/décoche les éléments à partir de la case checkAll
|
||||||
cocherAllTodoList(): void {
|
cocherAllTodoList(): void {
|
||||||
for (var i = 0; i < this.todo.taches.length; i++) {
|
for (var i = 0; i < this.todo.taches.length; i++) {
|
||||||
this.todo.taches[i].etat = this.masterSelected;
|
this.todo.taches[i].etat = this.masterSelected;
|
||||||
|
this.TodoService.updateTache(this.todo.taches[i]).subscribe((resp) => {
|
||||||
|
console.log(this.todo.taches[i]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
this.cocherAllTodoList();
|
//this.cocherAllTodoList();
|
||||||
}
|
}
|
||||||
|
|
||||||
casesQuiRestes(): boolean {
|
casesQuiRestes(): boolean {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { Team } from "./team";
|
||||||
|
|
||||||
export interface Membre {
|
export interface Membre {
|
||||||
id: string;
|
id: string;
|
||||||
nom: string;
|
nom: string;
|
||||||
|
@ -7,6 +9,6 @@ export interface Membre {
|
||||||
dateNaissance: Date;
|
dateNaissance: Date;
|
||||||
couleur: string;
|
couleur: string;
|
||||||
passwordConfirm: string;
|
passwordConfirm: string;
|
||||||
// smiley: string;
|
|
||||||
roleList: string[];
|
roleList: string[];
|
||||||
|
team?: Team;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,7 @@ export interface Tache {
|
||||||
id : number,
|
id : number,
|
||||||
texte: string,
|
texte: string,
|
||||||
etat : boolean,
|
etat : boolean,
|
||||||
editing : boolean
|
editing : boolean// editing n'existe pas dans la BDD,
|
||||||
|
//c'est juste un état dont on a besoin dans le front pour pouvoir transformer les tâches et
|
||||||
|
// le titre des todo en input
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
export interface Team {
|
export interface Team {
|
||||||
|
id: string;
|
||||||
nom : string;
|
nom : string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,4 +5,5 @@ export interface ToDoList {
|
||||||
nom: string;
|
nom: string;
|
||||||
taches: Tache[];
|
taches: Tache[];
|
||||||
id: number;
|
id: number;
|
||||||
|
team? : Team;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar [backgroundColor]="'#7879F1'"></app-side-bar>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9 offset-2" id="main">
|
<div class="col-9 offset-2" id="main">
|
||||||
<h1 class="col-md-auto">{{ currentTeam.nom }}</h1>
|
<h2 class="col-md-auto titre">{{ currentTeam.nom }}</h2>
|
||||||
<div>
|
<div class="contenu">
|
||||||
<!-- Pour récupérer le membre connecté-->
|
<!-- Pour récupérer le membre connecté-->
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<app-card-member [membre]="currentUser"> </app-card-member>
|
<app-card-member [membre]="currentUser"> </app-card-member>
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
class="btn btn-primary btn-lg"
|
class="btn btn-primary btn-lg"
|
||||||
routerLink="../ajout-membre"
|
routerLink="../ajout-membre"
|
||||||
routerLinkActive="active-custom"
|
routerLinkActive="active-custom"
|
||||||
|
[hidden]="parent == false"
|
||||||
>
|
>
|
||||||
Ajouter un membre
|
Ajouter un membre
|
||||||
</button>
|
</button>
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Pour exclure le membre connecté de la liste car il est récupéré plus haut-->
|
<!-- Pour exclure le membre connecté de la liste car il est récupéré plus haut-->
|
||||||
<!-- ng-container pour gérer l'espace vide que laissé le membre exclu à cause du dom -->
|
<!-- ng-container pour gérer l'espace vide que laisse le membre exclu à cause du dom -->
|
||||||
<!-- cf. : https://angular.io/guide/built-in-directives#hosting-a-directive-without-a-dom-element-->
|
<!-- cf. : https://angular.io/guide/built-in-directives#hosting-a-directive-without-a-dom-element-->
|
||||||
<ng-container *ngFor="let membreData of listMembres">
|
<ng-container *ngFor="let membreData of listMembres">
|
||||||
<!-- Condition dans ngIf mais une div à la place du ng-container pour le style-->
|
<!-- Condition dans ngIf mais une div à la place du ng-container pour le style-->
|
||||||
|
|
|
@ -2,6 +2,14 @@ button{
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.titre{
|
||||||
|
display: inline-flex;
|
||||||
|
margin-left: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: #5d5fef;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
#main{
|
#main{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +20,7 @@ ng-container{
|
||||||
|
|
||||||
#bouton-ajout {
|
#bouton-ajout {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
margin-bottom: 20px;
|
||||||
border: 1px solid #7879F1 !important;
|
border: 1px solid #7879F1 !important;
|
||||||
background-color: #7879F1;
|
background-color: #7879F1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { MembreService } from 'src/app/services/membre.service';
|
import { MembreService } from 'src/app/services/membre.service';
|
||||||
import { TeamService } from 'src/app/services/team.service';
|
import { TeamService } from 'src/app/services/team.service';
|
||||||
import { TokenService } from 'src/app/services/token.service';
|
import { TokenService } from 'src/app/services/token.service';
|
||||||
|
@ -15,12 +14,13 @@ export class PageAccountComponent implements OnInit {
|
||||||
public listMembres: any[];
|
public listMembres: any[];
|
||||||
currentUser: any;
|
currentUser: any;
|
||||||
currentTeam: any;
|
currentTeam: any;
|
||||||
|
parent: boolean;
|
||||||
|
|
||||||
constructor(private membreService: MembreService,
|
constructor(private membreService: MembreService,
|
||||||
private teamService: TeamService,
|
private teamService: TeamService,
|
||||||
private tokenService: TokenService,
|
private tokenService: TokenService) {
|
||||||
private router: Router) {
|
|
||||||
this.listMembres = [];
|
this.listMembres = [];
|
||||||
|
this.parent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -36,5 +36,16 @@ export class PageAccountComponent implements OnInit {
|
||||||
this.membreService.getMembresByTeamId()?.subscribe((membres: any[]) => {
|
this.membreService.getMembresByTeamId()?.subscribe((membres: any[]) => {
|
||||||
this.listMembres = membres;
|
this.listMembres = membres;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** Récupérer le rôle de l'uilisateur connecté pour lui imposer des limitations s'il a un ROLE_ENFANT **/
|
||||||
|
/** Il s'agit de cacher les boutons qui permettent de modifier et supprimer les profils (html)**/
|
||||||
|
const userRole = this.tokenService.getRole();
|
||||||
|
if(userRole == "ROLE_PARENT"){
|
||||||
|
this.parent = true;
|
||||||
}
|
}
|
||||||
|
else if(userRole== "ROLE_ENFANT"){
|
||||||
|
this.parent = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<app-header></app-header>
|
<nav class="navbar navbar-expand-lg navbar-light bg-light sticky-top shadow">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a class="navbar-brand" routerLink="/accueil">
|
||||||
|
<img id="img" src="../../../assets/images/logo-organizee.png" />
|
||||||
|
Organizee
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="bienvenue">
|
<div class="bienvenue">
|
||||||
|
@ -16,9 +23,9 @@ lu, nous sommes là pour vous aider !</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pub">
|
<div class="pub">
|
||||||
<img src="../../../assets/images/menu.png" />
|
<img class="imgAcc" src="../../../assets/images/menu.png" />
|
||||||
<img src="../../../assets/images/repertoire.png" />
|
<img class="imgAcc" src="../../../assets/images/repertoire.png" />
|
||||||
<img src="../../../assets/images/todo.png" />
|
<img class="imgAcc" src="../../../assets/images/todo.png" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,3 +1,43 @@
|
||||||
|
/** Header accueil **/
|
||||||
|
|
||||||
|
#img {
|
||||||
|
height:45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar{
|
||||||
|
height: auto;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 2rem;
|
||||||
|
color: #5d5fef;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #5d5fef;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus {
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
background: #a5a6f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #7879f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:active {
|
||||||
|
color: #5d5fef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container-fluid{
|
||||||
|
width:90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Contenu de la page **/
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +80,7 @@ p {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
.imgAcc {
|
||||||
border: 1px solid #d3d3d3;
|
border: 1px solid #d3d3d3;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-shadow: 6px 6px #d3d3d3;
|
box-shadow: 6px 6px #d3d3d3;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar [backgroundColor]="'#7879F1'"></app-side-bar>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9 offset-2" id="main">
|
<div class="col-9 offset-2" id="main">
|
||||||
|
@ -161,3 +161,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-footer></app-footer>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
}
|
}
|
||||||
h1{
|
h1{
|
||||||
color: rgba(0, 0, 0, 0.658);
|
color: rgba(0, 0, 0, 0.658);
|
||||||
font-size: 34px;
|
font-size: 28px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,11 +89,13 @@ export class PageAddMemberComponent implements OnInit {
|
||||||
|
|
||||||
const mail: Mail = {
|
const mail: Mail = {
|
||||||
recipient: emailValue,
|
recipient: emailValue,
|
||||||
subject: "Votre mot de passe Organizee",
|
subject: "Votre mot de passe provisoire Organizee",
|
||||||
//message: 'Votre mot de passe'
|
|
||||||
message: `Bonjour ${firstNameValue}!\n Voici vos identifiants de connexion : \n
|
message: `Bonjour ${firstNameValue}!\n Voici vos identifiants de connexion : \n
|
||||||
Identifiant : ${emailValue}
|
Identifiant : ${emailValue}
|
||||||
Mot de passe : ${passwordValue}`
|
Mot de passe provisoire : ${passwordValue}
|
||||||
|
Veuillez modifier votre mot de passe dès la première connexion :
|
||||||
|
http://localhost:4200/password-oublie
|
||||||
|
`
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,3 @@
|
||||||
<app-header></app-header>
|
|
||||||
<app-side-bar></app-side-bar>
|
|
||||||
|
|
||||||
<app-alert
|
|
||||||
*ngIf="isShow"
|
|
||||||
[alert]="alert"
|
|
||||||
(eventClose)="onClickCloseAlert()"
|
|
||||||
></app-alert>
|
|
||||||
|
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="alert alert-{{ alert.type }}"
|
class="alert alert-{{ alert.type }}"
|
||||||
role="alert"
|
role="alert"
|
||||||
|
@ -25,13 +16,16 @@
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<app-header></app-header>
|
||||||
|
<app-side-bar [backgroundColor]="'#F178B6'"></app-side-bar>
|
||||||
|
<h2 class="titre">Agenda</h2>
|
||||||
|
<app-alert
|
||||||
|
*ngIf="isShow"
|
||||||
|
[alert]="alert"
|
||||||
|
(eventClose)="onClickCloseAlert()"
|
||||||
|
></app-alert>
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div style="width: 150px">
|
<div style="width: 100%" id="daypilot">
|
||||||
<app-side-bar></app-side-bar>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="width: 100%">
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<daypilot-navigator
|
<daypilot-navigator
|
||||||
|
@ -90,3 +84,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-footer></app-footer>
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
|
.titre{
|
||||||
|
color : rgb(241,120,182);
|
||||||
|
font-size: 30px;
|
||||||
|
margin-left: 240px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
.wrap {
|
.wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#daypilot{
|
||||||
|
margin-left: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
@ -41,3 +51,10 @@
|
||||||
.fullscreen {
|
.fullscreen {
|
||||||
position: absolute; top:90px; left: 0px; right: 0px; bottom: 0px;
|
position: absolute; top:90px; left: 0px; right: 0px; bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: rgb(241,120,182);
|
||||||
|
color : white;
|
||||||
|
border-radius: 12px;
|
||||||
|
border-color: white;
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-auto">
|
<div class="col-md-auto">
|
||||||
<app-side-bar class="sidebarMenu"></app-side-bar>
|
<app-side-bar [backgroundColor]="'#F178B6'"></app-side-bar>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 offset-md-4 text-center">
|
<div class="col-md-4 offset-md-4 text-center">
|
||||||
<h2>Ajouter un évènement à l'agenda</h2>
|
<h2>Ajouter un évènement à l'agenda</h2>
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
<app-header></app-header>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-auto">
|
|
||||||
<app-side-bar></app-side-bar>
|
|
||||||
</div>
|
|
||||||
<div class="col team-form text-center">
|
|
||||||
<h1>Créer votre team</h1>
|
|
||||||
<main class="form-team">
|
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="teamForm">
|
|
||||||
<div class="form-floating">
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
class="form-control"
|
|
||||||
id="floatingInputName"
|
|
||||||
placeholder=""
|
|
||||||
name="name"
|
|
||||||
formControlName="nameFc"
|
|
||||||
[ngClass]="{
|
|
||||||
'is-valid':
|
|
||||||
teamForm.controls['nameFc'].touched &&
|
|
||||||
teamForm.controls['nameFc'].valid,
|
|
||||||
'is-invalid':
|
|
||||||
teamForm.controls['nameFc'].touched &&
|
|
||||||
!teamForm.controls['nameFc'].valid
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
<label for="floatingInputName">Nom</label>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
class="w-100 btn btn-lg btn-success"
|
|
||||||
type="submit"
|
|
||||||
[disabled]="teamForm.invalid"
|
|
||||||
>
|
|
||||||
Je crée ma team
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,41 +0,0 @@
|
||||||
.team-form{
|
|
||||||
margin-top: 20px;
|
|
||||||
align-content: center;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
button{
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.login-form {
|
|
||||||
height: 100vh;
|
|
||||||
padding-top: 40px;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-team {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 500px;
|
|
||||||
padding: 15px;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-team .checkbox {
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-team .form-floating:focus-within {
|
|
||||||
z-index: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-team input[type="email"] {
|
|
||||||
margin-bottom: -1px;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-team input[type="password"] {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-top-left-radius: 0;
|
|
||||||
border-top-right-radius: 0;
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { PageCreationTeamComponent } from './page-creation-team.component';
|
|
||||||
|
|
||||||
describe('PageCreationTeamComponent', () => {
|
|
||||||
let component: PageCreationTeamComponent;
|
|
||||||
let fixture: ComponentFixture<PageCreationTeamComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
declarations: [ PageCreationTeamComponent ]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(PageCreationTeamComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,71 +0,0 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import {
|
|
||||||
FormBuilder,
|
|
||||||
FormControl,
|
|
||||||
FormGroup,
|
|
||||||
Validators,
|
|
||||||
} from '@angular/forms';
|
|
||||||
import { Router } from '@angular/router';
|
|
||||||
import { Team } from 'src/app/models/team';
|
|
||||||
import { MembreService } from 'src/app/services/membre.service';
|
|
||||||
import { TeamService } from 'src/app/services/team.service';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-page-creation-team',
|
|
||||||
templateUrl: './page-creation-team.component.html',
|
|
||||||
styleUrls: ['./page-creation-team.component.scss'],
|
|
||||||
})
|
|
||||||
export class PageCreationTeamComponent implements OnInit {
|
|
||||||
public teamForm: FormGroup;
|
|
||||||
constructor(
|
|
||||||
private teamService: TeamService,
|
|
||||||
private membreService: MembreService,
|
|
||||||
private router: Router,
|
|
||||||
private fb: FormBuilder
|
|
||||||
) {
|
|
||||||
this.teamForm = new FormGroup({});
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
// *********************************penser a changer group car déprécié********************************
|
|
||||||
this.teamForm = new FormGroup({
|
|
||||||
nameFc : new FormControl('', [Validators.required])
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public onSubmit(): void {
|
|
||||||
console.log('value : ', this.teamForm.value);
|
|
||||||
console.log('form : ', this.teamForm);
|
|
||||||
const nameValue = this.teamForm.value['nameFc'];
|
|
||||||
|
|
||||||
const team: Team = {
|
|
||||||
nom : nameValue,
|
|
||||||
};
|
|
||||||
if (team.nom !== '' ) {
|
|
||||||
this.teamService.addTeam(team).subscribe((resp) => {
|
|
||||||
this.router.navigate(['compte']);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// affichage erreur
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfirmedValidator(controlName: string, matchingControlName: string) {
|
|
||||||
return (formGroup: FormGroup) => {
|
|
||||||
const control = formGroup.controls[controlName];
|
|
||||||
const matchingControl = formGroup.controls[matchingControlName];
|
|
||||||
if (
|
|
||||||
matchingControl.errors &&
|
|
||||||
!matchingControl.errors['confirmedValidator']
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (control.value !== matchingControl.value) {
|
|
||||||
matchingControl.setErrors({ confirmedValidator: true });
|
|
||||||
} else {
|
|
||||||
matchingControl.setErrors(null);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar [backgroundColor]="'#7879F1'"></app-side-bar>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row p-1 col-12 ">
|
<div class="row p-1 col-12 ">
|
||||||
|
<h2 class="titre">Dashboard</h2>
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
<h3 class="titre">Bienvenue {{ conectedUser.prenom }}!!</h3>
|
<h3 >Bienvenue {{ conectedUser.prenom }} !</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row col-12">
|
<div class="row col-12">
|
||||||
|
|
|
@ -2,7 +2,15 @@
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
color: #5d5fef;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3{
|
||||||
|
display: inline-flex;
|
||||||
|
margin-left: 20px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meteo {
|
.meteo {
|
||||||
|
@ -11,7 +19,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
margin-left:200px;
|
margin-left:200px;
|
||||||
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar{
|
.avatar{
|
||||||
|
|
|
@ -2,10 +2,33 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-auto">
|
<div class="col-md-auto">
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar [backgroundColor]="'#7879F1'"></app-side-bar>
|
||||||
</div>
|
</div>
|
||||||
<div class="col compte text-center">
|
<div class="col text-center">
|
||||||
<h1>Supprimer ce membre</h1>
|
<main class="contenu">
|
||||||
<main class="contenu-compte"></main>
|
<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"
|
||||||
|
[hidden]="parent == false"
|
||||||
|
>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"
|
||||||
|
(click)="onClickDelete()"
|
||||||
|
[hidden]="parent == false"
|
||||||
|
>Oui, je souhaite supprimer ce compte
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-footer></app-footer>
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
.contenu{
|
||||||
|
padding-top: 100px;
|
||||||
|
padding-bottom: 100px;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
|
@ -1,4 +1,7 @@
|
||||||
import { Component, OnInit } 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';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-delete-member',
|
selector: 'app-page-delete-member',
|
||||||
|
@ -6,10 +9,47 @@ import { Component, OnInit } from '@angular/core';
|
||||||
styleUrls: ['./page-delete-member.component.scss']
|
styleUrls: ['./page-delete-member.component.scss']
|
||||||
})
|
})
|
||||||
export class PageDeleteMemberComponent implements OnInit {
|
export class PageDeleteMemberComponent implements OnInit {
|
||||||
|
public membreId: any;
|
||||||
|
public membreInfos: any;
|
||||||
|
parent: boolean;
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
constructor(private membreService: MembreService,
|
||||||
|
private tokenService: TokenService,
|
||||||
|
private router: Router,
|
||||||
|
private route: ActivatedRoute) {
|
||||||
|
this.membreInfos = '';
|
||||||
|
this.parent = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
/** Pour récuperer l'id du membre à modifier **/
|
||||||
|
this.membreId = this.route.snapshot.paramMap.get('id');
|
||||||
|
|
||||||
|
/** Appel Api **/
|
||||||
|
this.membreService
|
||||||
|
.getMembreId(this.membreId)
|
||||||
|
.subscribe((membreInfos: any) => {
|
||||||
|
this.membreInfos = membreInfos;
|
||||||
|
});
|
||||||
|
|
||||||
|
/** Récupérer le rôle de l'uilisateur connecté pour lui imposer des limitations s'il a un ROLE_ENFANT **/
|
||||||
|
/** Il s'agit de cacher les boutons qui permettent de modifier et supprimer les profils (html)**/
|
||||||
|
const userRole = this.tokenService.getRole();
|
||||||
|
if(userRole == "ROLE_PARENT"){
|
||||||
|
this.parent = true;
|
||||||
|
}
|
||||||
|
else if(userRole== "ROLE_ENFANT"){
|
||||||
|
this.parent = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************** Suppresion d'un membre au click ********************/
|
||||||
|
onClickDelete(): void {
|
||||||
|
console.log("coucou");
|
||||||
|
this.membreService.deleteMembre(this.membreInfos).subscribe((resp) => {
|
||||||
|
this.router.navigate(['compte']);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
|
<app-side-bar [backgroundColor]="'#F7C02B'"></app-side-bar>
|
||||||
|
<h2 class="titre">Menu de la semaine</h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-auto">
|
|
||||||
<app-side-bar class="sidebarMenu"></app-side-bar>
|
|
||||||
</div>
|
|
||||||
<div class="col menu text-center">
|
<div class="col menu text-center">
|
||||||
<h2>Menu de la semaine</h2>
|
|
||||||
<main class="contenu-menu">
|
<main class="contenu-menu">
|
||||||
<app-card-menu></app-card-menu>
|
<app-card-menu></app-card-menu>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
|
.titre{
|
||||||
|
color: #5d5fef;
|
||||||
|
font-size: 30px;
|
||||||
|
margin-left: 240px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar [backgroundColor]="'#c3c3e7'"></app-side-bar>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="ctn-link min-vh-100">
|
<div class="ctn-link min-vh-100">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="col-md-auto">
|
<div class="col-md-auto">
|
||||||
<app-side-bar [backgroundColor]="'#5a1e63'"></app-side-bar>
|
<app-side-bar [backgroundColor]="'#5a1e63'"></app-side-bar>
|
||||||
</div>
|
</div>
|
||||||
|
<h2 class="titre">Répertoire</h2>
|
||||||
<div class="col compte text-center py-3">
|
<div class="col compte text-center py-3">
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
.titre{
|
||||||
|
display: inline-flex;
|
||||||
|
margin-left: 20px;
|
||||||
|
color: #5d5fef;
|
||||||
|
font-size: 30px;
|
||||||
|
margin-left: 240px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #5a1e63 !important;
|
background-color: #5a1e63 !important;
|
||||||
|
|
|
@ -5,7 +5,9 @@ import {
|
||||||
FormGroup,
|
FormGroup,
|
||||||
Validators,
|
Validators,
|
||||||
} from '@angular/forms';
|
} from '@angular/forms';
|
||||||
import { Router, RouterLink } from '@angular/router';
|
import { Router} from '@angular/router';
|
||||||
|
import { Team } from 'src/app/models/team';
|
||||||
|
import { TeamService } from 'src/app/services/team.service';
|
||||||
import { Membre } from '../../models/membre';
|
import { Membre } from '../../models/membre';
|
||||||
import { AuthService } from '../../services/auth.service';
|
import { AuthService } from '../../services/auth.service';
|
||||||
|
|
||||||
|
@ -19,6 +21,7 @@ export class PageSignupComponent implements OnInit {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
|
private teamService: TeamService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private fb: FormBuilder
|
private fb: FormBuilder
|
||||||
) {
|
) {
|
||||||
|
@ -29,6 +32,7 @@ export class PageSignupComponent implements OnInit {
|
||||||
// *********************************pensser a changer group car déprécié********************************
|
// *********************************pensser a changer group car déprécié********************************
|
||||||
this.signupForm = this.fb.group(
|
this.signupForm = this.fb.group(
|
||||||
{
|
{
|
||||||
|
teamNameFc: new FormControl('', [Validators.required]),
|
||||||
firstNameFc: new FormControl('', [Validators.required]),
|
firstNameFc: new FormControl('', [Validators.required]),
|
||||||
lastNameFc: new FormControl('', [Validators.required]),
|
lastNameFc: new FormControl('', [Validators.required]),
|
||||||
dateNaissanceFc: new FormControl('', [Validators.required]),
|
dateNaissanceFc: new FormControl('', [Validators.required]),
|
||||||
|
@ -55,6 +59,7 @@ export class PageSignupComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public onSubmit(): void {
|
public onSubmit(): void {
|
||||||
|
const teamNameValue = this.signupForm.value['teamNameFc'];
|
||||||
const idValue = this.signupForm.value[''];
|
const idValue = this.signupForm.value[''];
|
||||||
const prenomValue = this.signupForm.value['firstNameFc'];
|
const prenomValue = this.signupForm.value['firstNameFc'];
|
||||||
const nomValue = this.signupForm.value['lastNameFc'];
|
const nomValue = this.signupForm.value['lastNameFc'];
|
||||||
|
@ -65,6 +70,17 @@ export class PageSignupComponent implements OnInit {
|
||||||
const couleurValue = this.signupForm.value['couleurFc'];
|
const couleurValue = this.signupForm.value['couleurFc'];
|
||||||
const roleValue = ['ROLE_PARENT'];
|
const roleValue = ['ROLE_PARENT'];
|
||||||
|
|
||||||
|
const team: Team = {
|
||||||
|
id : "",
|
||||||
|
nom : teamNameValue,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (emailValue !== '' && passwordValue !== '' && team.nom!== '') {
|
||||||
|
//création Team
|
||||||
|
this.teamService.addTeam(team).subscribe((respTeam) => {
|
||||||
|
//récupération de l'id auto-généré (respTeam.id) dans l'id team (team.id)
|
||||||
|
team.id = respTeam.id;
|
||||||
|
//création objet membre avec l'objet team crée
|
||||||
const membre: Membre = {
|
const membre: Membre = {
|
||||||
id: idValue,
|
id: idValue,
|
||||||
nom: nomValue,
|
nom: nomValue,
|
||||||
|
@ -74,12 +90,15 @@ export class PageSignupComponent implements OnInit {
|
||||||
couleur: couleurValue,
|
couleur: couleurValue,
|
||||||
dateNaissance: dateNaissanceValue,
|
dateNaissance: dateNaissanceValue,
|
||||||
passwordConfirm: passwordConfirmValue,
|
passwordConfirm: passwordConfirmValue,
|
||||||
|
team: team,
|
||||||
roleList: roleValue,
|
roleList: roleValue,
|
||||||
};
|
};
|
||||||
|
//création du membre en bdd avec l'objet membre
|
||||||
if (membre.email !== '' && membre.password !== '') {
|
this.authService.signup(membre).subscribe((respMembre) => {
|
||||||
this.authService.signup(membre).subscribe((resp) => {
|
|
||||||
this.router.navigate(['accueil']);
|
this.router.navigate(['accueil']);
|
||||||
|
return respMembre
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// affichage erreur
|
// affichage erreur
|
||||||
|
|
|
@ -29,3 +29,4 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<app-footer></app-footer>
|
|
@ -1,10 +1,8 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<div class="row">
|
<app-side-bar [backgroundColor]="'#4E9E7B'"></app-side-bar>
|
||||||
<div class="col-md-auto">
|
<h2 class="titre">To-Do-List</h2>
|
||||||
<app-side-bar></app-side-bar>
|
<div class="row ">
|
||||||
</div>
|
|
||||||
<div class="col menu text-center">
|
<div class="col menu text-center">
|
||||||
<h2>To-Do-List</h2>
|
|
||||||
<div class="d-flex align-items-stretch"></div>
|
<div class="d-flex align-items-stretch"></div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -13,7 +11,6 @@
|
||||||
[(ngModel)]="todoListTitle"
|
[(ngModel)]="todoListTitle"
|
||||||
(keyup.enter)="addTodoByTeamId()"
|
(keyup.enter)="addTodoByTeamId()"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="d-flex align-items-stretch">
|
<div class="d-flex align-items-stretch">
|
||||||
<div class="custom-main container p-3">
|
<div class="custom-main container p-3">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -1,6 +1,20 @@
|
||||||
|
.titre{
|
||||||
|
margin-left: 20px;
|
||||||
|
color: #5d5fef;
|
||||||
|
font-size: 30px;
|
||||||
|
margin-left: 240px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin-top: 1%;
|
margin-top: 1%;
|
||||||
margin-bottom: 1%;
|
margin-bottom: 1%;
|
||||||
color: black;
|
color: black;
|
||||||
box-shadow: 5px 5px 5px gray;
|
box-shadow: 5px 5px 5px gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.row{
|
||||||
|
margin-left: 20px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ToDoList } from 'src/app/models/to-do-list';
|
import { ToDoList } from 'src/app/models/to-do-list';
|
||||||
import { TodoService } from 'src/app/services/todo.service';
|
import { TodoService } from 'src/app/services/todo.service';
|
||||||
import { Team } from 'src/app/models/team';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-to-do-list',
|
selector: 'app-page-to-do-list',
|
||||||
|
@ -30,7 +30,7 @@ export class PageToDoListComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ajouter une todo List si l'input n'est pas vide
|
//Ajouter une todo List si l'input contient un texte
|
||||||
addTodoByTeamId() {
|
addTodoByTeamId() {
|
||||||
const todoList: ToDoList = {
|
const todoList: ToDoList = {
|
||||||
nom: this.todoListTitle,
|
nom: this.todoListTitle,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar [backgroundColor]="'#7879F1'"></app-side-bar>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9 offset-2" id="main">
|
<div class="col-9 offset-2" id="main">
|
||||||
|
@ -80,8 +80,7 @@
|
||||||
placeholder=""
|
placeholder=""
|
||||||
name="Role"
|
name="Role"
|
||||||
formControlName="roleFc"
|
formControlName="roleFc"
|
||||||
value="{{membreInfos.roleList}}"
|
value=""
|
||||||
[(ngModel)]="membreInfos.roleList"
|
|
||||||
>
|
>
|
||||||
<option value="ROLE_PARENT">Adulte</option>
|
<option value="ROLE_PARENT">Adulte</option>
|
||||||
<option value="ROLE_ENFANT">Enfant</option>
|
<option value="ROLE_ENFANT">Enfant</option>
|
||||||
|
@ -110,3 +109,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-footer></app-footer>
|
||||||
|
|
|
@ -100,10 +100,8 @@ export class PageUpdateMemberComponent implements OnInit {
|
||||||
roleList: [roleValue]
|
roleList: [roleValue]
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(membre);
|
|
||||||
|
|
||||||
this.membreService.updateMembre(membre)?.subscribe((resp) => {
|
this.membreService.updateMembre(membre)?.subscribe((resp) => {
|
||||||
//this.router.navigate(['compte']);
|
this.router.navigate(['compte']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,7 @@ export class AuthService {
|
||||||
//methode pour s'inscrire - on passe l'objet en entier
|
//methode pour s'inscrire - on passe l'objet en entier
|
||||||
signup(membre: Membre): Observable<any> {
|
signup(membre: Membre): Observable<any> {
|
||||||
console.log(membre);
|
console.log(membre);
|
||||||
|
|
||||||
return this.http.post(`${this.apiUrl}/membres/sign-up`, membre);
|
return this.http.post(`${this.apiUrl}/membres/sign-up`, membre);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//methode pour se connecter - on passe id et pwd
|
//methode pour se connecter - on passe id et pwd
|
||||||
|
@ -60,8 +58,6 @@ export class AuthService {
|
||||||
return this.http.post(`${this.apiUrl}/teams/add`, team);
|
return this.http.post(`${this.apiUrl}/teams/add`, team);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addMember(membre: Membre): Observable<any> {
|
addMember(membre: Membre): Observable<any> {
|
||||||
console.log(membre);
|
console.log(membre);
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@ export class MembreService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteMembre(membre: Membre): Observable<any> {
|
deleteMembre(membre: Membre): Observable<any>{
|
||||||
return this.http.delete(`${this.apiUrl}/membres/delete/1`);
|
return this.http.delete(`${this.apiUrl}/membres/delete/${membre.id}`, {responseType: "text"});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMembre(membre: Membre): Observable<any> | void {
|
updateMembre(membre: Membre): Observable<any> | void {
|
||||||
|
@ -57,4 +57,16 @@ export class MembreService {
|
||||||
this.router.navigate(['accueil']);
|
this.router.navigate(['accueil']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateHumeur(numero : any) : Observable<any> | void {
|
||||||
|
const userId = this.tokenService.getCurrentMembreId();
|
||||||
|
if (userId){
|
||||||
|
return this.http.put(`${this.apiUrl}/membres/update/smiley/${userId}`, numero);
|
||||||
|
}else {
|
||||||
|
this.router.navigate(['accueil']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,6 @@ export class TeamService {
|
||||||
}
|
}
|
||||||
|
|
||||||
addTeam(team: Team): Observable<any> {
|
addTeam(team: Team): Observable<any> {
|
||||||
console.log(team);
|
|
||||||
|
|
||||||
return this.http.post(`${this.apiUrl}/teams/add`, team);
|
return this.http.post(`${this.apiUrl}/teams/add`, team);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,8 @@ export const environment = {
|
||||||
production: false,
|
production: false,
|
||||||
apiUrl: 'http://localhost:8088',
|
apiUrl: 'http://localhost:8088',
|
||||||
tokenKey: 'TOKEN-ORGANIZEE',
|
tokenKey: 'TOKEN-ORGANIZEE',
|
||||||
debug: true,
|
// pour afficher des infos en mode debug
|
||||||
|
debug: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue