Merge branch 'dev' of https://github.com/AlineRinquin/organizee-front into dev
This commit is contained in:
commit
efa5bb8d22
29 changed files with 2219 additions and 12292 deletions
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"workbench.colorCustomizations": {
|
||||||
|
"titleBar.activeBackground": "#4950a1"
|
||||||
|
}
|
||||||
|
}
|
2
file
Normal file
2
file
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
truc
|
||||||
|
|
13835
package-lock.json
generated
13835
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,6 +4,7 @@ import { PageAccountComponent } from './pages/page-account/page-account.componen
|
||||||
import { PageAccueilComponent } from './pages/page-accueil/page-accueil.component';
|
import { PageAccueilComponent } from './pages/page-accueil/page-accueil.component';
|
||||||
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 { PageCreationTeamComponent } from './pages/page-creation-team/page-creation-team.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';
|
||||||
|
@ -28,10 +29,12 @@ const routes: Routes = [
|
||||||
{ path: 'password-oublie', component: PageForgotPasswordComponent },
|
{ path: 'password-oublie', component: PageForgotPasswordComponent },
|
||||||
{ path: 'menu', component: PageMenuSemaineComponent },
|
{ path: 'menu', component: PageMenuSemaineComponent },
|
||||||
{ path: 'repertoire', component: PageRepertoireComponent },
|
{ path: 'repertoire', component: PageRepertoireComponent },
|
||||||
{ path: 'reset-password', component: PageResetPasswordComponent },
|
{ path: 'reinitialisation-password', component: PageResetPasswordComponent },
|
||||||
{ path: 'creation-compte', component: PageSignupComponent },
|
{ path: 'creation-compte', component: PageSignupComponent },
|
||||||
{ path: 'to-do-list', component: PageToDoListComponent },
|
{ path: 'to-do-list', component: PageToDoListComponent },
|
||||||
{ path: 'modifier-membre', component: PageUpdateMemberComponent },
|
{ path: 'modifier-membre', component: PageUpdateMemberComponent },
|
||||||
|
{ path: 'ajouter-contact', component: PageAjoutContactComponent },
|
||||||
|
{ path: 'modifier-contact', component: PageAjoutContactComponent },
|
||||||
{ path: 'creation-team', component : PageCreationTeamComponent},
|
{ path: 'creation-team', component : PageCreationTeamComponent},
|
||||||
{ path: 'test', component : PageTestFormComponent},
|
{ path: 'test', component : PageTestFormComponent},
|
||||||
{ path: '**', component: PageNotFoundComponent }
|
{ path: '**', component: PageNotFoundComponent }
|
||||||
|
|
|
@ -33,6 +33,8 @@ import { PaginationComponent } from './components/pagination/pagination.componen
|
||||||
import { CreneauComponent } from './components/creneau/creneau.component';
|
import { CreneauComponent } from './components/creneau/creneau.component';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
import { PageAjoutContactComponent } from './pages/page-ajout-contact/page-ajout-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 { PageCreationTeamComponent } from './pages/page-creation-team/page-creation-team.component';
|
||||||
import { PageTestFormComponent } from './pages/page-test-form/page-test-form.component';
|
import { PageTestFormComponent } from './pages/page-test-form/page-test-form.component';
|
||||||
|
|
||||||
|
@ -67,6 +69,8 @@ import { PageTestFormComponent } from './pages/page-test-form/page-test-form.com
|
||||||
FicheContactComponent,
|
FicheContactComponent,
|
||||||
PaginationComponent,
|
PaginationComponent,
|
||||||
CreneauComponent,
|
CreneauComponent,
|
||||||
|
PageAjoutContactComponent,
|
||||||
|
PageModifierContactComponent,
|
||||||
PageCreationTeamComponent,
|
PageCreationTeamComponent,
|
||||||
PageTestFormComponent,
|
PageTestFormComponent,
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,18 +1,29 @@
|
||||||
<div>
|
<div class="container">
|
||||||
<button class="w-100 btn btn-lg btn-rounded btn-secondary">
|
<div class="row">
|
||||||
Modifier
|
<div class="col-sm">
|
||||||
</button>
|
<button class="w-100 btn btn-lg btn-rounded btn-secondary">
|
||||||
<button class="w-100 btn btn-lg btn-rounded btn-secondary">
|
Modifier
|
||||||
Supprimer
|
</button>
|
||||||
</button>
|
</div>
|
||||||
<img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/contact-1.png"/>
|
<div class="col-sm">
|
||||||
<p class="fiche-contact" >{{ personne.prenom }} {{ personne.nom }}</p>
|
<button class="w-100 btn btn-lg btn-rounded btn-secondary">
|
||||||
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/phone.png"/>
|
Supprimer
|
||||||
{{ personne.telephone }}</p>
|
</button>
|
||||||
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/logo-gmail.png"/>
|
</div>
|
||||||
{{ personne.email }}</p>
|
<div class="row align-items-center">
|
||||||
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/gateau.png"/>
|
<div class="col-md-6 offset-md-3">
|
||||||
{{ personne.dateNaissance }}</p>
|
<img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/contact-1.png"/>
|
||||||
<p class="fiche-contact" >
|
<p class="fiche-contact" >{{ personne.prenom }} {{ personne.nom }}</p>
|
||||||
{{ personne.adresse }}</p>
|
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/phone.png"/>
|
||||||
|
{{ personne.telephone }}</p>
|
||||||
|
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/logo-gmail.png"/>
|
||||||
|
{{ personne.email }}</p>
|
||||||
|
<p class="fiche-contact" ><img style="max-height: 12% ; max-width: 12%" src="../../../assets/images/gateau.png"/>
|
||||||
|
{{ personne.dateNaissance }}</p>
|
||||||
|
<p class="fiche-contact" >
|
||||||
|
{{ personne.adresse }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,16 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #5a1e63 !important;
|
background-color: #5a1e63 !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 330px;
|
max-width: 150px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
border: 1px solid 8c2e9b;
|
||||||
|
padding: 10px;
|
||||||
|
box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
|
||||||
|
rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
|
||||||
|
max-height: 1200px;
|
||||||
|
max-width: 350px;
|
||||||
|
}
|
||||||
|
|
|
@ -4,9 +4,6 @@ export interface Membre {
|
||||||
email: string;
|
email: string;
|
||||||
password: string;
|
password: string;
|
||||||
dateNaissance: Date;
|
dateNaissance: Date;
|
||||||
profil: boolean;
|
|
||||||
roleList: string[];
|
|
||||||
|
|
||||||
passwordConfirm: string;
|
passwordConfirm: string;
|
||||||
roleList: string[];
|
roleList: string[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,7 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar></app-side-bar>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<button button type="button" class="btn btn-primary btn-lg"
|
||||||
|
routerLink="../creation-team"
|
||||||
|
routerLinkActive="active-custom">Créer ma team</button>
|
||||||
|
</div>
|
||||||
|
|
|
@ -67,7 +67,6 @@ export class PageAddMemberComponent implements OnInit {
|
||||||
email: emailValue,
|
email: emailValue,
|
||||||
password: passwordValue,
|
password: passwordValue,
|
||||||
dateNaissance: dateNaissanceValue,
|
dateNaissance: dateNaissanceValue,
|
||||||
profil: profilValue,
|
|
||||||
passwordConfirm: passwordConfirmValue,
|
passwordConfirm: passwordConfirmValue,
|
||||||
roleList: ["ROLE_PARENT"]
|
roleList: ["ROLE_PARENT"]
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
<div>
|
||||||
|
<app-header></app-header>
|
||||||
|
<app-side-bar></app-side-bar>
|
||||||
|
</div>
|
||||||
|
<div class="ajoutContact-form text-center">
|
||||||
|
<main class="form-ajoutContact">
|
||||||
|
<form (ngSubmit)="onSubmit()" [formGroup]="ajoutContactForm">
|
||||||
|
<h1>Ajouter un contact</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingInputlastName"
|
||||||
|
placeholder=""
|
||||||
|
name="lastName"
|
||||||
|
formControlName="lastNameFc">
|
||||||
|
<label for="floatingInputlastName">Nom</label>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingInputfirstName"
|
||||||
|
placeholder=""
|
||||||
|
name="firstName"
|
||||||
|
formControlName="firstNameFc">
|
||||||
|
<label for="floatingInputfirstName">Prénom</label>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingInputTelephone"
|
||||||
|
placeholder=""
|
||||||
|
name="telephone"
|
||||||
|
formControlName="telephoneFc">
|
||||||
|
<label for="floatingInputfirstName">Téléphone</label>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="email"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingInput"
|
||||||
|
placeholder=""
|
||||||
|
name="email"
|
||||||
|
formControlName="emailFc">
|
||||||
|
<label for="floatingInput">Adresse email</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="date"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingInputdateNaissance"
|
||||||
|
placeholder=""
|
||||||
|
name="dateNaissance"
|
||||||
|
formControlName="dateNaissanceFc">
|
||||||
|
<label for="floatingInputfirstName">Date de naissance</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="text"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingInputAdresse"
|
||||||
|
placeholder=""
|
||||||
|
name="adresse"
|
||||||
|
formControlName="adresseFc">
|
||||||
|
<label for="floatingInputfirstName">Adresse</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="w-100 btn btn-lg btn-success"
|
||||||
|
type="submit"
|
||||||
|
[disabled]="ajoutContactForm.invalid">Valider</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
</div>
|
|
@ -0,0 +1,26 @@
|
||||||
|
.login-form {
|
||||||
|
height: 100vh;
|
||||||
|
padding-top: 40px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-ajoutContact {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 330px;
|
||||||
|
padding: 15px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-ajoutContact .checkbox {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-ajoutContact .form-floating:focus-within {
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-ajoutContact input[type="email"] {
|
||||||
|
margin-bottom: -1px;
|
||||||
|
border-bottom-right-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PageAjoutContactComponent } from './page-ajout-contact.component';
|
||||||
|
|
||||||
|
describe('PageAjoutContactComponent', () => {
|
||||||
|
let component: PageAjoutContactComponent;
|
||||||
|
let fixture: ComponentFixture<PageAjoutContactComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ PageAjoutContactComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PageAjoutContactComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,71 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import {
|
||||||
|
FormBuilder,
|
||||||
|
FormControl,
|
||||||
|
FormGroup,
|
||||||
|
Validators,
|
||||||
|
} from '@angular/forms';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { Contact } from '../../models/contact';
|
||||||
|
import { RepertoireService } from '../../services/repertoire.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-page-ajout-contact',
|
||||||
|
templateUrl: './page-ajout-contact.component.html',
|
||||||
|
styleUrls: ['./page-ajout-contact.component.scss'],
|
||||||
|
})
|
||||||
|
export class PageAjoutContactComponent implements OnInit {
|
||||||
|
public ajoutContactForm: FormGroup;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private repertoireService: RepertoireService,
|
||||||
|
private router: Router,
|
||||||
|
private fb: FormBuilder
|
||||||
|
) {
|
||||||
|
this.ajoutContactForm = new FormGroup({});
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
// *********************************pensser a changer group car déprécié********************************
|
||||||
|
this.ajoutContactForm = this.fb.group({
|
||||||
|
lastNameFc: new FormControl('', [Validators.required]),
|
||||||
|
firstNameFc: new FormControl('', [Validators.required]),
|
||||||
|
telephoneFc: new FormControl('', [Validators.required]),
|
||||||
|
emailFc: new FormControl('', [
|
||||||
|
Validators.email,
|
||||||
|
Validators.required,
|
||||||
|
Validators.pattern(/^([\w\.\-_]+)?\w+@[\w-_]+(\.\w+){1,}/gim),
|
||||||
|
]), // chercher une meilleure regex
|
||||||
|
dateNaissanceFc: new FormControl('', [Validators.required]),
|
||||||
|
adresseFc: new FormControl('', [Validators.required]),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public onSubmit(): void {
|
||||||
|
console.log('value : ', this.ajoutContactForm.value);
|
||||||
|
console.log('form : ', this.ajoutContactForm);
|
||||||
|
const firstNameValue = this.ajoutContactForm.value['firstNameFc'];
|
||||||
|
const lastNameValue = this.ajoutContactForm.value['lastNameFc'];
|
||||||
|
const telephoneValue = this.ajoutContactForm.value['telephoneFc'];
|
||||||
|
const emailValue = this.ajoutContactForm.value['emailFc'];
|
||||||
|
const dateNaissanceValue = this.ajoutContactForm.value['dateNaissanceFc'];
|
||||||
|
const adresseValue = this.ajoutContactForm.value['adresseFc'];
|
||||||
|
|
||||||
|
const contact: Contact = {
|
||||||
|
nom: lastNameValue,
|
||||||
|
prenom: firstNameValue,
|
||||||
|
telephone: telephoneValue,
|
||||||
|
email: emailValue,
|
||||||
|
dateNaissance: dateNaissanceValue,
|
||||||
|
adresse: adresseValue,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (contact.nom !== '') {
|
||||||
|
this.repertoireService.addContact(contact).subscribe((resp) => {
|
||||||
|
this.router.navigate(['repertoire/']);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// affichage erreur
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
<p>page-modifier-contact works!</p>
|
|
@ -0,0 +1,25 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PageModifierContactComponent } from './page-modifier-contact.component';
|
||||||
|
|
||||||
|
describe('PageModifierContactComponent', () => {
|
||||||
|
let component: PageModifierContactComponent;
|
||||||
|
let fixture: ComponentFixture<PageModifierContactComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ PageModifierContactComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PageModifierContactComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-page-modifier-contact',
|
||||||
|
templateUrl: './page-modifier-contact.component.html',
|
||||||
|
styleUrls: ['./page-modifier-contact.component.scss']
|
||||||
|
})
|
||||||
|
export class PageModifierContactComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,2 +1,12 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<p>Error 404 Page Not FOUND!!!!!!!!!!!</p>
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<p> Page introuvable</p>
|
||||||
|
<a routerLink="" routerLinkActive="!active"><br><br>
|
||||||
|
Je retourne à l'accueil<br><br><br><br><br><br><br><br><br><br><br><br></a>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
|
||||||
|
a.hover {
|
||||||
|
color :rgb(219, 200, 28)
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: rgb(32, 114, 45);
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
// si on préfère une image en fond
|
||||||
|
// background-image: url("../../../assets/images/404.jpg");
|
||||||
|
// background-size: cover;
|
||||||
|
|
||||||
|
background-image: linear-gradient(to left top, #051937, #004d7a, #008793, #e2ebe7, #f8faf5);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-not-found',
|
selector: 'app-page-not-found',
|
||||||
templateUrl: './page-not-found.component.html',
|
templateUrl: './page-not-found.component.html',
|
||||||
|
@ -7,9 +8,28 @@ import { Component, OnInit } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class PageNotFoundComponent implements OnInit {
|
export class PageNotFoundComponent implements OnInit {
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* version alternative pour mettre une redirection automatique
|
||||||
|
---------------
|
||||||
|
---------------
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
----------------
|
||||||
|
constructor(private routeur: Router) { }
|
||||||
|
----------------
|
||||||
|
ngOnInit(): void {
|
||||||
|
setTimeout(
|
||||||
|
() => {
|
||||||
|
this.routeur.navigate(["accueil"]);
|
||||||
|
}, 3000
|
||||||
|
);
|
||||||
|
} } */
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
type="submit">Tous les contacts
|
type="submit">Tous les contacts
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button class="w-100 btn btn-lg btn-rounded btn-secondary">
|
<button routerLink="/ajouter-contact" class="w-100 btn btn-lg btn-rounded btn-secondary">
|
||||||
Ajouter un contact
|
Ajouter un contact
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
||||||
(keyup)="onSearchChange(word.value)">
|
(keyup)="onSearchChange(word.value)">
|
||||||
|
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<!--<button class="btn btn-secondary" type="button">Rechercher</button>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1 +1,26 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
|
<div class="signin-form text-center">
|
||||||
|
<main class="form-signin">
|
||||||
|
<form (ngSubmit)="onSubmit(resetForm)" #resetForm="ngForm">
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="email" class="form-control" id="floatingEmail" placeholder="" name="email" ngModel required
|
||||||
|
[ngClass]="{'is-valid': resetForm.form.touched && resetForm.form.value['email'] != '' ,
|
||||||
|
'is-invalid': resetForm.form.touched && resetForm.form.value['email'] == ''}">
|
||||||
|
<label for="floatingEmail">Email</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-floating">
|
||||||
|
<input type="password" class="form-control" id="floatingPassword" placeholder="" name="password" ngModel
|
||||||
|
required [ngClass]="{'is-valid': resetForm.form.touched && resetForm.form.value['password'] != '' ,
|
||||||
|
'is-invalid': resetForm.form.touched && resetForm.form.value['password'] == ''}">
|
||||||
|
<label for="floatingPassword">Mot de passe</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="w-100 btn btn-lg btn-success" type="submit" [disabled]="resetForm.invalid">Se connecter</button>
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,21 @@ import { Component, OnInit } from '@angular/core';
|
||||||
styleUrls: ['./page-reset-password.component.scss']
|
styleUrls: ['./page-reset-password.component.scss']
|
||||||
})
|
})
|
||||||
export class PageResetPasswordComponent implements OnInit {
|
export class PageResetPasswordComponent implements OnInit {
|
||||||
|
authService: any;
|
||||||
|
router: any;
|
||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {}
|
||||||
}
|
|
||||||
|
|
||||||
|
public onSubmit(submittedForm: any): void {
|
||||||
|
console.log(submittedForm.form.value);
|
||||||
|
const password = submittedForm.form.value['password'];
|
||||||
|
const email = submittedForm.form.value['email'];
|
||||||
|
console.log(email);
|
||||||
|
this.authService.resetPassword(email, password).subscribe((resp: any) => {
|
||||||
|
this.router.navigate(['tableau-de-bord']);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,79 +1,130 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<div class="signup-form text-center">
|
<div class="signup-form text-center">
|
||||||
<main class="form-signup">
|
<main class="form-signup">
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="signupForm">
|
<form (ngSubmit)="onSubmit()" [formGroup]="signupForm">
|
||||||
<h1>Incrivez-vous !</h1>
|
<h1>Inscrivez-vous !</h1>
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
<input type="text"
|
<input
|
||||||
class="form-control"
|
type="text"
|
||||||
id="floatingInputlastName"
|
class="form-control"
|
||||||
placeholder=""
|
id="floatingInputlastName"
|
||||||
name="lastName"
|
placeholder=""
|
||||||
formControlName="lastNameFc"
|
name="lastName"
|
||||||
[ngClass]="{'is-valid' : signupForm.controls['lastNameFc'].touched && signupForm.controls['lastNameFc'].valid,
|
formControlName="lastNameFc"
|
||||||
'is-invalid': signupForm.controls['lastNameFc'].touched && !signupForm.controls['lastNameFc'].valid}">
|
[ngClass]="{
|
||||||
<label for="floatingInputlastName">Nom</label>
|
'is-valid':
|
||||||
</div>
|
signupForm.controls['lastNameFc'].touched &&
|
||||||
<div class="form-floating">
|
signupForm.controls['lastNameFc'].valid,
|
||||||
<input type="text"
|
'is-invalid':
|
||||||
class="form-control"
|
signupForm.controls['lastNameFc'].touched &&
|
||||||
id="floatingInputfirstName"
|
!signupForm.controls['lastNameFc'].valid
|
||||||
placeholder=""
|
}"
|
||||||
name="firstName"
|
/>
|
||||||
formControlName="firstNameFc"
|
<label for="floatingInputlastName">Nom</label>
|
||||||
[ngClass]="{'is-valid' : signupForm.controls['firstNameFc'].touched && signupForm.controls['firstNameFc'].valid,
|
</div>
|
||||||
'is-invalid': signupForm.controls['firstNameFc'].touched && !signupForm.controls['firstNameFc'].valid}">
|
<div class="form-floating">
|
||||||
<label for="floatingInputfirstName">Prénom</label>
|
<input
|
||||||
</div>
|
type="text"
|
||||||
<div class="form-floating">
|
class="form-control"
|
||||||
<input type="date"
|
id="floatingInputfirstName"
|
||||||
class="form-control"
|
placeholder=""
|
||||||
id="floatingInputdateNaissance"
|
name="firstName"
|
||||||
placeholder=""
|
formControlName="firstNameFc"
|
||||||
name="dateNaissance"
|
[ngClass]="{
|
||||||
formControlName="dateNaissanceFc"
|
'is-valid':
|
||||||
[ngClass]="{'is-valid' : signupForm.controls['dateNaissanceFc'].touched && signupForm.controls['dateNaissanceFc'].valid,
|
signupForm.controls['firstNameFc'].touched &&
|
||||||
'is-invalid': signupForm.controls['dateNaissanceFc'].touched && !signupForm.controls['dateNaissanceFc'].valid}">
|
signupForm.controls['firstNameFc'].valid,
|
||||||
<label for="floatingInputfirstName">Date de naissance</label>
|
'is-invalid':
|
||||||
</div>
|
signupForm.controls['firstNameFc'].touched &&
|
||||||
<div class="form-floating">
|
!signupForm.controls['firstNameFc'].valid
|
||||||
<input type="email"
|
}"
|
||||||
class="form-control"
|
/>
|
||||||
id="floatingInput"
|
<label for="floatingInputfirstName">Prénom</label>
|
||||||
placeholder=""
|
</div>
|
||||||
name="email"
|
<div class="form-floating">
|
||||||
formControlName="emailFc"
|
<input
|
||||||
[ngClass]="{'is-valid' : signupForm.controls['emailFc'].touched && signupForm.controls['emailFc'].valid,
|
type="date"
|
||||||
'is-invalid': signupForm.controls['emailFc'].touched && !signupForm.controls['emailFc'].valid}">
|
class="form-control"
|
||||||
<label for="floatingInput">Adresse email</label>
|
id="floatingInputdateNaissance"
|
||||||
</div>
|
placeholder=""
|
||||||
<div class="form-floating">
|
name="dateNaissance"
|
||||||
<input type="password"
|
formControlName="dateNaissanceFc"
|
||||||
class="form-control"
|
[ngClass]="{
|
||||||
id="floatingPassword"
|
'is-valid':
|
||||||
placeholder=""
|
signupForm.controls['dateNaissanceFc'].touched &&
|
||||||
name="password"
|
signupForm.controls['dateNaissanceFc'].valid,
|
||||||
formControlName="passwordFc"
|
'is-invalid':
|
||||||
[ngClass]="{'is-valid' : signupForm.controls['passwordFc'].touched && signupForm.controls['passwordFc'].valid,
|
signupForm.controls['dateNaissanceFc'].touched &&
|
||||||
'is-invalid': signupForm.controls['passwordFc'].touched && !signupForm.controls['passwordFc'].valid}">
|
!signupForm.controls['dateNaissanceFc'].valid
|
||||||
<label for="floatingPassword">Mot de passe</label>
|
}"
|
||||||
</div>
|
/>
|
||||||
<div class="form-floating">
|
<label for="floatingInputfirstName">Date de naissance</label>
|
||||||
<input type="passwordConfirm"
|
</div>
|
||||||
class="form-control"
|
<div class="form-floating">
|
||||||
id="floatingpasswordConfirm"
|
<input
|
||||||
placeholder=""
|
type="email"
|
||||||
name="passwordConfirm"
|
class="form-control"
|
||||||
formControlName="passwordConfirmFc"
|
id="floatingInput"
|
||||||
[ngClass]="{'is-valid' : signupForm.controls['passwordConfirmFc'].touched && signupForm.controls['passwordConfirmFc'].valid,
|
placeholder=""
|
||||||
'is-invalid': signupForm.controls['passwordConfirmFc'].touched && !signupForm.controls['passwordConfirmFc'].valid}">
|
name="email"
|
||||||
<label for="floatingPassword">Confirmer mot de passe</label>
|
formControlName="emailFc"
|
||||||
</div>
|
[ngClass]="{
|
||||||
|
'is-valid':
|
||||||
|
signupForm.controls['emailFc'].touched &&
|
||||||
|
signupForm.controls['emailFc'].valid,
|
||||||
|
'is-invalid':
|
||||||
|
signupForm.controls['emailFc'].touched &&
|
||||||
|
!signupForm.controls['emailFc'].valid
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<label for="floatingInput">Adresse email</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-floating">
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingPassword"
|
||||||
|
placeholder=""
|
||||||
|
name="password"
|
||||||
|
formControlName="passwordFc"
|
||||||
|
[ngClass]="{
|
||||||
|
'is-valid':
|
||||||
|
signupForm.controls['passwordFc'].touched &&
|
||||||
|
signupForm.controls['passwordFc'].valid,
|
||||||
|
'is-invalid':
|
||||||
|
signupForm.controls['passwordFc'].touched &&
|
||||||
|
!signupForm.controls['passwordFc'].valid
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<label for="floatingPassword">Mot de passe</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-floating">
|
||||||
|
<input
|
||||||
|
type="passwordConfirm"
|
||||||
|
class="form-control"
|
||||||
|
id="floatingpasswordConfirm"
|
||||||
|
placeholder=""
|
||||||
|
name="passwordConfirm"
|
||||||
|
formControlName="passwordConfirmFc"
|
||||||
|
[ngClass]="{
|
||||||
|
'is-valid':
|
||||||
|
signupForm.controls['passwordConfirmFc'].touched &&
|
||||||
|
signupForm.controls['passwordConfirmFc'].valid,
|
||||||
|
'is-invalid':
|
||||||
|
signupForm.controls['passwordConfirmFc'].touched &&
|
||||||
|
!signupForm.controls['passwordConfirmFc'].valid
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
<label for="floatingPassword">Confirmer mot de passe</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button class="w-100 btn btn-lg btn-success"
|
<button
|
||||||
type="submit"
|
class="w-100 btn btn-lg btn-success"
|
||||||
[disabled]="signupForm.invalid">Je m'inscris !</button>
|
type="submit"
|
||||||
|
[disabled]="signupForm.invalid"
|
||||||
</form>
|
>
|
||||||
</main>
|
Je m'inscris !
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,7 +25,7 @@ export class PageSignupComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// *********************************penser 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(
|
||||||
{
|
{
|
||||||
firstNameFc: new FormControl('', [Validators.required]),
|
firstNameFc: new FormControl('', [Validators.required]),
|
||||||
|
@ -61,30 +61,16 @@ export class PageSignupComponent implements OnInit {
|
||||||
const passwordValue = this.signupForm.value['passwordFc'];
|
const passwordValue = this.signupForm.value['passwordFc'];
|
||||||
const dateNaissanceValue = this.signupForm.value['dateNaissanceFc'];
|
const dateNaissanceValue = this.signupForm.value['dateNaissanceFc'];
|
||||||
const passwordConfirmValue = this.signupForm.value['passwordConfirmFc'];
|
const passwordConfirmValue = this.signupForm.value['passwordConfirmFc'];
|
||||||
|
|
||||||
const roleValue = ['ROLE_PARENT'];
|
const roleValue = ['ROLE_PARENT'];
|
||||||
|
|
||||||
const membre: Membre = {
|
const membre: Membre = {
|
||||||
prenom: prenomValue,
|
|
||||||
nom: nomValue,
|
nom: nomValue,
|
||||||
|
prenom: prenomValue,
|
||||||
email: emailValue,
|
email: emailValue,
|
||||||
password: passwordValue,
|
password: passwordValue,
|
||||||
dateNaissance: dateNaissanceValue,
|
dateNaissance: dateNaissanceValue,
|
||||||
passwordConfirm: passwordConfirmValue,
|
passwordConfirm: passwordConfirmValue,
|
||||||
roleList: roleValue,
|
roleList: roleValue,
|
||||||
|
|
||||||
const teamValue = '';
|
|
||||||
|
|
||||||
const membre: Membre = {
|
|
||||||
nom: firstNameValue,
|
|
||||||
prenom: lastNameValue,
|
|
||||||
email: emailValue,
|
|
||||||
password: passwordValue,
|
|
||||||
dateNaissance: dateNaissanceValue,
|
|
||||||
profil: profilValue,
|
|
||||||
passwordConfirm: passwordConfirmValue,
|
|
||||||
roleList: ["ROLE_PARENT"]
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (membre.email !== '' && membre.password !== '') {
|
if (membre.email !== '' && membre.password !== '') {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||||
|
import { identifierModuleUrl } from '@angular/compiler';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { map, Observable } from 'rxjs';
|
import { map, Observable } from 'rxjs';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
@ -22,6 +23,7 @@ export class AuthService {
|
||||||
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,11 +56,16 @@ export class AuthService {
|
||||||
return this.http.post(`${this.apiUrl}/membres/forgot-password`, body);
|
return this.http.post(`${this.apiUrl}/membres/forgot-password`, body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetPassword(email: string, password: string): Observable<any> {
|
||||||
|
const body = password;
|
||||||
|
console.log(password);
|
||||||
|
return this.http.post(`${this.apiUrl}/membres/reset-password/${email}`, body);
|
||||||
|
}
|
||||||
|
|
||||||
creationTeam(team: Team): Observable<any> {
|
creationTeam(team: Team): Observable<any> {
|
||||||
console.log(team);
|
console.log(team);
|
||||||
|
|
||||||
return this.http.post(`${this.apiUrl}/creation-compte`, team);
|
return this.http.post(`${this.apiUrl}/teams/add`, team);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,17 @@ export class RepertoireService {
|
||||||
return this.http.get(`${this.apiUrl}/contacts/team/1`);
|
return this.http.get(`${this.apiUrl}/contacts/team/1`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sur le component fiche contact de la page repertoire
|
addContact(contact: Contact): Observable<any> {
|
||||||
// sur clic de btn modifier ou supproimer ca renvois vers page modifier contact
|
console.log(contact);
|
||||||
//page modifier contact faire un get by id du contact en question
|
|
||||||
// appeler methode/ update /delette/ add et contact by id
|
return this.http.post(`${this.apiUrl}/contacts/add`, contact);
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteContact() {
|
||||||
|
return this.http.delete(`${this.apiUrl}/contacts/delete`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// updateContact(){
|
||||||
|
// return this.http.put(`${this.apiUrl}/contacts/update/1`);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
BIN
src/assets/images/404.jpg
Normal file
BIN
src/assets/images/404.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Loading…
Add table
Reference in a new issue