ok
This commit is contained in:
commit
22af2a20ba
33 changed files with 655 additions and 17 deletions
|
|
@ -4,6 +4,7 @@ import { Injectable } from '@angular/core';
|
|||
import { map, Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Membre } from '../models/membre';
|
||||
import { Team } from '../models/team';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
|
@ -24,6 +25,7 @@ export class AuthService {
|
|||
return this.http.post(`${this.apiUrl}/membres/sign-up`, membre);
|
||||
}
|
||||
|
||||
|
||||
signin(email: string, password: string): Observable<any> {
|
||||
const body = {
|
||||
email: email,
|
||||
|
|
@ -58,4 +60,19 @@ export class AuthService {
|
|||
console.log(password);
|
||||
return this.http.post(`${this.apiUrl}/membres/reset-password/${email}`, body);
|
||||
}
|
||||
|
||||
creationTeam(team: Team): Observable<any> {
|
||||
console.log(team);
|
||||
|
||||
return this.http.post(`${this.apiUrl}/creation-compte`, team);
|
||||
}
|
||||
|
||||
|
||||
|
||||
addMember(membre: Membre): Observable<any> {
|
||||
console.log(membre);
|
||||
|
||||
return this.http.post(`${this.apiUrl}/tableau-de-bord`, membre);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
16
src/app/services/organizee.service.spec.ts
Normal file
16
src/app/services/organizee.service.spec.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { OrganizeeService } from './organizee.service';
|
||||
|
||||
describe('OrganizeeService', () => {
|
||||
let service: OrganizeeService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(OrganizeeService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
18
src/app/services/organizee.service.ts
Normal file
18
src/app/services/organizee.service.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { map, Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class OrganizeeService {
|
||||
apiUrl: string;
|
||||
tokenKey: string;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
// On se sert des variables d'environnement de notre application
|
||||
this.apiUrl = environment.apiUrl;
|
||||
this.tokenKey = environment.tokenKey;
|
||||
}
|
||||
}
|
||||
16
src/app/services/repertoire.service.spec.ts
Normal file
16
src/app/services/repertoire.service.spec.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RepertoireService } from './repertoire.service';
|
||||
|
||||
describe('RepertoireService', () => {
|
||||
let service: RepertoireService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(RepertoireService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
28
src/app/services/repertoire.service.ts
Normal file
28
src/app/services/repertoire.service.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { map, Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Contact } from '../models/contact';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RepertoireService {
|
||||
apiUrl: string;
|
||||
tokenKey: string;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
// On se sert des variables d'environnement de notre application
|
||||
this.apiUrl = environment.apiUrl;
|
||||
this.tokenKey = environment.tokenKey;
|
||||
}
|
||||
|
||||
getContact(): Observable<any> {
|
||||
return this.http.get(`${this.apiUrl}/contacts/team/1`);
|
||||
}
|
||||
|
||||
//sur le component fiche contact de la page repertoire
|
||||
// sur clic de btn modifier ou supproimer ca renvois vers page modifier contact
|
||||
//page modifier contact faire un get by id du contact en question
|
||||
// appeler methode/ update /delette/ add et contact by id
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue