+
-
-
- Value : {{ addMemberForm.value | json }}
-
-
- Form valid : {{ addMemberForm.valid }}
-
+
+
Ajouter un membre
+
+
+
+
+
+
diff --git a/src/app/pages/page-add-member/page-add-member.component.scss b/src/app/pages/page-add-member/page-add-member.component.scss
index 333e617..43a4849 100644
--- a/src/app/pages/page-add-member/page-add-member.component.scss
+++ b/src/app/pages/page-add-member/page-add-member.component.scss
@@ -4,29 +4,72 @@
background-color: #f5f5f5;
}
-.form-signup {
+.form-addMember {
width: 100%;
max-width: 330px;
padding: 15px;
- margin: auto;
+ margin-top: 50px;
+ margin-left: auto;
+ margin-right: auto;
+ border: solid 1px;
+ border-radius: 10px;
+ background-color: #fcddec;
+ border-color: #ef5da8;
}
-.form-signup .checkbox {
+.form-addMember .checkbox {
font-weight: 400;
}
-.form-signup .form-floating:focus-within {
+.form-addMember .form-floating:focus-within {
z-index: 2;
}
-.form-signup input[type="email"] {
- margin-bottom: -1px;
+.form-addMember input[type="email"] {
+ margin-bottom: 10px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
-.form-signup input[type="password"] {
+.form-addMember input[type="color"] {
+ border: none;
+ margin-bottom: 10px;
+ margin-top: -70px;
+ margin-left: 100px;
+ border-radius: 50%;
+ width: 100px;
+ height: 100px;
+}
+
+.form-addMember input[type="color"]::-webkit-color-swatch {
+ border: none;
+ margin-top: -15px;
+ border-radius: 80%;
+ width: 80px;
+ height: 80px;
+}
+
+.form-addMember input[type="text"] {
+ margin-bottom: 10px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.form-addMember input[type="date"] {
+ margin-bottom: 10px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.form-addMember input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
+
+.btn-outline-success {
+ margin-top: 10px;
+ background-color: #ffff;
+ color: #ef5da8 !important;
+ border-color: #ef5da8 !important;
+}
diff --git a/src/app/pages/page-add-member/page-add-member.component.ts b/src/app/pages/page-add-member/page-add-member.component.ts
index 1f2ca88..44e15b6 100644
--- a/src/app/pages/page-add-member/page-add-member.component.ts
+++ b/src/app/pages/page-add-member/page-add-member.component.ts
@@ -3,6 +3,7 @@ import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'
import { Router } from '@angular/router';
import { Membre } from 'src/app/models/membre';
import { AuthService } from 'src/app/services/auth.service';
+import { MembreService } from 'src/app/services/membre.service';
@Component({
selector: 'app-page-add-member',
@@ -13,6 +14,7 @@ export class PageAddMemberComponent implements OnInit {
public addMemberForm: FormGroup;
constructor(
+ private membreService: MembreService,
private authService: AuthService,
private router: Router,
private fb: FormBuilder
@@ -27,7 +29,7 @@ export class PageAddMemberComponent implements OnInit {
firstNameFc: new FormControl('', [Validators.required]),
lastNameFc: new FormControl('', [Validators.required]),
dateNaissanceFc: new FormControl('', [Validators.required]),
- couleurFc: new FormControl('', [Validators.required]),
+ couleurFc: new FormControl('', []),
emailFc: new FormControl('', [
Validators.email,
Validators.required,
@@ -74,7 +76,7 @@ export class PageAddMemberComponent implements OnInit {
if (membre.email !== '' && membre.password !== '') {
this.authService.signup(membre).subscribe((resp) => {
- this.router.navigate(['account/signin']);
+ this.router.navigate(['compte']);
});
} else {
// affichage erreur
diff --git a/src/app/pages/page-creation-team/page-creation-team.component.html b/src/app/pages/page-creation-team/page-creation-team.component.html
index 27d1f6c..e0fcb61 100644
--- a/src/app/pages/page-creation-team/page-creation-team.component.html
+++ b/src/app/pages/page-creation-team/page-creation-team.component.html
@@ -1,30 +1,27 @@
-
-
+
+
+
+
Créer votre team
+
+
+
+
+
diff --git a/src/app/pages/page-creation-team/page-creation-team.component.scss b/src/app/pages/page-creation-team/page-creation-team.component.scss
index 333e617..0e2a8d8 100644
--- a/src/app/pages/page-creation-team/page-creation-team.component.scss
+++ b/src/app/pages/page-creation-team/page-creation-team.component.scss
@@ -1,31 +1,40 @@
+.team-form{
+ margin-top: 20px;
+ align-content: center;
+
+}
+
+button{
+ margin-top: 10px;
+}
.login-form {
height: 100vh;
padding-top: 40px;
background-color: #f5f5f5;
}
-.form-signup {
+.form-team {
width: 100%;
- max-width: 330px;
+ max-width: 500px;
padding: 15px;
margin: auto;
}
-.form-signup .checkbox {
+.form-team .checkbox {
font-weight: 400;
}
-.form-signup .form-floating:focus-within {
+.form-team .form-floating:focus-within {
z-index: 2;
}
-.form-signup input[type="email"] {
+.form-team input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
-.form-signup input[type="password"] {
+.form-team input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
diff --git a/src/app/pages/page-creation-team/page-creation-team.component.ts b/src/app/pages/page-creation-team/page-creation-team.component.ts
index 9326242..c7a9ec7 100644
--- a/src/app/pages/page-creation-team/page-creation-team.component.ts
+++ b/src/app/pages/page-creation-team/page-creation-team.component.ts
@@ -7,7 +7,7 @@ import {
} from '@angular/forms';
import { Router } from '@angular/router';
import { Team } from 'src/app/models/team';
-import { AuthService } from '../../services/auth.service';
+import { TeamService } from 'src/app/services/team.service';
@Component({
selector: 'app-page-creation-team',
@@ -17,7 +17,7 @@ import { AuthService } from '../../services/auth.service';
export class PageCreationTeamComponent implements OnInit {
public teamForm: FormGroup;
constructor(
- private authService: AuthService,
+ private teamService: TeamService,
private router: Router,
private fb: FormBuilder
) {
@@ -43,7 +43,7 @@ export class PageCreationTeamComponent implements OnInit {
if (team.nom !== '' ) {
- this.authService.creationTeam(team).subscribe((resp) => {
+ this.teamService.addTeam(team).subscribe((resp) => {
this.router.navigate(['compte']);
});
} else {
diff --git a/src/app/pages/page-delete-account/page-delete-account.component.html b/src/app/pages/page-delete-account/page-delete-account.component.html
new file mode 100644
index 0000000..18e56eb
--- /dev/null
+++ b/src/app/pages/page-delete-account/page-delete-account.component.html
@@ -0,0 +1,12 @@
+
+
+
+
+
Supprimer votre compte
+
+
+
+
+
diff --git a/src/app/pages/page-delete-account/page-delete-account.component.scss b/src/app/pages/page-delete-account/page-delete-account.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/page-delete-account/page-delete-account.component.spec.ts b/src/app/pages/page-delete-account/page-delete-account.component.spec.ts
new file mode 100644
index 0000000..1515cf6
--- /dev/null
+++ b/src/app/pages/page-delete-account/page-delete-account.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PageDeleteAccountComponent } from './page-delete-account.component';
+
+describe('PageDeleteAccountComponent', () => {
+ let component: PageDeleteAccountComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ PageDeleteAccountComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PageDeleteAccountComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/page-delete-account/page-delete-account.component.ts b/src/app/pages/page-delete-account/page-delete-account.component.ts
new file mode 100644
index 0000000..0388cf0
--- /dev/null
+++ b/src/app/pages/page-delete-account/page-delete-account.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-page-delete-account',
+ templateUrl: './page-delete-account.component.html',
+ styleUrls: ['./page-delete-account.component.scss']
+})
+export class PageDeleteAccountComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/pages/page-delete-member/page-delete-member.component.html b/src/app/pages/page-delete-member/page-delete-member.component.html
index e91fa55..d6ce21b 100644
--- a/src/app/pages/page-delete-member/page-delete-member.component.html
+++ b/src/app/pages/page-delete-member/page-delete-member.component.html
@@ -1 +1,12 @@
+
+
+
+
Supprimer ce membre
+
+
+
+
+
diff --git a/src/app/pages/page-not-found/page-not-found.component.html b/src/app/pages/page-not-found/page-not-found.component.html
index 860c18d..c410e3b 100644
--- a/src/app/pages/page-not-found/page-not-found.component.html
+++ b/src/app/pages/page-not-found/page-not-found.component.html
@@ -1,5 +1,5 @@
-
+
diff --git a/src/app/pages/page-repertoire/page-repertoire.component.html b/src/app/pages/page-repertoire/page-repertoire.component.html
index 662c241..20fbd8c 100644
--- a/src/app/pages/page-repertoire/page-repertoire.component.html
+++ b/src/app/pages/page-repertoire/page-repertoire.component.html
@@ -26,6 +26,6 @@
{{ personne.prenom }} {{ personne.nom }}
-
+
diff --git a/src/app/pages/page-repertoire/page-repertoire.component.ts b/src/app/pages/page-repertoire/page-repertoire.component.ts
index f025092..99e0f66 100644
--- a/src/app/pages/page-repertoire/page-repertoire.component.ts
+++ b/src/app/pages/page-repertoire/page-repertoire.component.ts
@@ -69,7 +69,10 @@ export class PageRepertoireComponent implements OnInit {
this.openDetails = personne;
}
- // this.repertoireService.deleteContact(contact).subscribe((resp) => {
- // this.router.navigate(['repertoire/']);
- // });
+
+ onClickDelete(contact: Contact){
+ this.repertoireService.deleteContact(contact).subscribe((resp) => {
+ this.router.navigate(['repertoire/']);
+ });
+ }
}
diff --git a/src/app/pages/page-update-account/page-update-account.component.html b/src/app/pages/page-update-account/page-update-account.component.html
new file mode 100644
index 0000000..0210d99
--- /dev/null
+++ b/src/app/pages/page-update-account/page-update-account.component.html
@@ -0,0 +1,12 @@
+
+
+
+
+
Modifier votre compte
+
+
+
+
+
diff --git a/src/app/pages/page-update-account/page-update-account.component.scss b/src/app/pages/page-update-account/page-update-account.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/pages/page-update-account/page-update-account.component.spec.ts b/src/app/pages/page-update-account/page-update-account.component.spec.ts
new file mode 100644
index 0000000..d65402a
--- /dev/null
+++ b/src/app/pages/page-update-account/page-update-account.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { PageUpdateAccountComponent } from './page-update-account.component';
+
+describe('PageUpdateAccountComponent', () => {
+ let component: PageUpdateAccountComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ PageUpdateAccountComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(PageUpdateAccountComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/pages/page-update-account/page-update-account.component.ts b/src/app/pages/page-update-account/page-update-account.component.ts
new file mode 100644
index 0000000..4fcb39b
--- /dev/null
+++ b/src/app/pages/page-update-account/page-update-account.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-page-update-account',
+ templateUrl: './page-update-account.component.html',
+ styleUrls: ['./page-update-account.component.scss']
+})
+export class PageUpdateAccountComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/pages/page-update-member/page-update-member.component.html b/src/app/pages/page-update-member/page-update-member.component.html
index e91fa55..31fb62e 100644
--- a/src/app/pages/page-update-member/page-update-member.component.html
+++ b/src/app/pages/page-update-member/page-update-member.component.html
@@ -1 +1,12 @@
+
+
+
+
Modifier ce membre
+
+
+
+
+
diff --git a/src/app/services/membre.service.spec.ts b/src/app/services/membre.service.spec.ts
new file mode 100644
index 0000000..535450a
--- /dev/null
+++ b/src/app/services/membre.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { MembreService } from './membre.service';
+
+describe('MembreService', () => {
+ let service: MembreService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(MembreService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/app/services/membre.service.ts b/src/app/services/membre.service.ts
new file mode 100644
index 0000000..c43ac46
--- /dev/null
+++ b/src/app/services/membre.service.ts
@@ -0,0 +1,40 @@
+import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { environment } from 'src/environments/environment';
+import { Membre } from '../models/membre';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class MembreService {
+ apiUrl: string;
+ tokenKey: string;
+
+ constructor(private http: HttpClient) {
+ this.apiUrl = environment.apiUrl;
+ this.tokenKey = environment.tokenKey;
+ }
+
+ getMembres(): Observable {
+ return this.http.get(`${this.apiUrl}/membres/all`);
+ }
+
+ getMembreId(id: any): Observable {
+ return this.http.get(`${this.apiUrl}/membres/1` + id);
+ }
+
+ addMembre(membre: Membre): Observable {
+ console.log(membre);
+
+ return this.http.post(`${this.apiUrl}/membres/add`, membre);
+ }
+
+ deleteMembre(membre: Membre): Observable {
+ return this.http.delete(`${this.apiUrl}/membres/delete/1`);
+ }
+
+ updateMembre(membre: Membre): Observable {
+ return this.http.put(`${this.apiUrl}/membres/update/1`, membre);
+ }
+}
diff --git a/src/app/services/team.service.spec.ts b/src/app/services/team.service.spec.ts
new file mode 100644
index 0000000..d9ca39e
--- /dev/null
+++ b/src/app/services/team.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { TeamService } from '../services/team.service';
+
+describe('TeamService', () => {
+ let service: TeamService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(TeamService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/app/services/team.service.ts b/src/app/services/team.service.ts
new file mode 100644
index 0000000..1aed726
--- /dev/null
+++ b/src/app/services/team.service.ts
@@ -0,0 +1,41 @@
+import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { Observable } from 'rxjs';
+import { environment } from 'src/environments/environment';
+import { Team } from '../models/team';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class TeamService {
+ apiUrl: string;
+ tokenKey: string;
+
+
+ constructor(private http: HttpClient) {
+ this.apiUrl = environment.apiUrl;
+ this.tokenKey = environment.tokenKey;
+ }
+ getTeams(): Observable {
+ return this.http.get(`${this.apiUrl}/teams/all`);
+ }
+
+ getTeamById(id: any): Observable {
+ return this.http.get(`${this.apiUrl}/teams/1` + id);
+ }
+
+ addTeam(team: Team): Observable {
+ console.log(team);
+
+ return this.http.post(`${this.apiUrl}/teams/add`, team);
+ }
+
+ deleteTeam(team: Team): Observable {
+ return this.http.delete(`${this.apiUrl}/teams/delete/1`);
+ }
+
+ updateTeam(team: Team): Observable {
+ return this.http.put(`${this.apiUrl}/teams/update/1`, team);
+ }
+
+}
diff --git a/src/index.html b/src/index.html
index be52832..3a4f4c0 100644
--- a/src/index.html
+++ b/src/index.html
@@ -6,6 +6,8 @@
+
+
diff --git a/src/styles.scss b/src/styles.scss
index 48fa0ce..6effa48 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -1 +1,3 @@
@import "~bootstrap/scss/bootstrap.scss";
+//Pour utiliser les icons ne fonctionne que si vous avez fait cette commande : npm i bootstrap-icons --save
+@import "~bootstrap-icons/font/bootstrap-icons.scss";