avancées page account/ modif side bar/modif card-member
This commit is contained in:
parent
8c36759ce3
commit
ab58fd0c6a
5 changed files with 73 additions and 43 deletions
|
@ -7,7 +7,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
min-height: 22rem;
|
min-height: 14rem;
|
||||||
border: none;
|
border: none;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
.buttons button:nth-child(1) {
|
.buttons button:nth-child(1) {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
border: 1px solid #7879F1 !important;
|
border: 1px solid #7879F1 !important;
|
||||||
color: #7879F1;
|
color: #7879F1;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
|
|
||||||
.buttons button:nth-child(1):hover {
|
.buttons button:nth-child(1):hover {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
border: 1px solid #7879F1 !important;
|
border: 1px solid #7879F1 !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: rgb(238, 238, 238);
|
background-color: #c3c3e7;
|
||||||
}
|
}
|
||||||
.nav{
|
.nav{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
|
@ -1,47 +1,33 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
|
<app-side-bar></app-side-bar>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<app-side-bar></app-side-bar>
|
|
||||||
<div class="col-9 offset-2" id="main">
|
<div class="col-9 offset-2" id="main">
|
||||||
<h1>Ma team</h1>
|
<h1>{{currentTeam.nom}}</h1>
|
||||||
|
<div class="row">
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<button
|
<app-card-member [membre]="currentUser"> </app-card-member>
|
||||||
button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary btn-lg"
|
|
||||||
routerLink="../modifier-compte"
|
|
||||||
routerLinkActive="active-custom"
|
|
||||||
>
|
|
||||||
Modifier mon compte
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<button
|
<button
|
||||||
button
|
id = "bouton-ajout"
|
||||||
type="button"
|
|
||||||
class="btn btn-primary btn-lg"
|
|
||||||
routerLink="../supprimer-compte"
|
|
||||||
routerLinkActive="active-custom"
|
|
||||||
>
|
|
||||||
Supprimer mon compte
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex justify-content-center">
|
|
||||||
<button
|
|
||||||
button
|
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-primary btn-lg"
|
class="btn btn-primary btn-lg"
|
||||||
routerLink="../ajout-membre"
|
routerLink="../ajout-membre"
|
||||||
routerLinkActive="active-custom"
|
routerLinkActive="active-custom"
|
||||||
>
|
>Ajouter un membre
|
||||||
Ajouter un membre
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col" *ngFor="let membreData of listMembres">
|
|
||||||
|
<ng-container *ngFor="let membreData of listMembres">
|
||||||
|
<div class="col" *ngIf= "membreData.id != currentUser.id" >
|
||||||
<app-card-member [membre]="membreData"> </app-card-member>
|
<app-card-member [membre]="membreData"> </app-card-member>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<app-footer></app-footer>
|
||||||
|
|
|
@ -1,3 +1,29 @@
|
||||||
button{
|
button{
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main{
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ng-container{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bouton-ajout {
|
||||||
|
margin-top: 5px;
|
||||||
|
border: 1px solid #7879F1 !important;
|
||||||
|
background-color: #7879F1;
|
||||||
|
color: #fff;
|
||||||
|
height: 50px;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bouton-ajout:hover {
|
||||||
|
margin-top: 5px;
|
||||||
|
border: 1px solid #191933 !important;
|
||||||
|
background-color: #191933;
|
||||||
|
color: #fff;
|
||||||
|
height: 50px;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
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 { TokenService } from 'src/app/services/token.service';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -9,16 +13,28 @@ import { MembreService } from 'src/app/services/membre.service';
|
||||||
})
|
})
|
||||||
export class PageAccountComponent implements OnInit {
|
export class PageAccountComponent implements OnInit {
|
||||||
public listMembres: any[];
|
public listMembres: any[];
|
||||||
|
currentUser: any;
|
||||||
|
currentTeam: any;
|
||||||
|
|
||||||
constructor(private membreService: MembreService) {
|
constructor(private membreService: MembreService,
|
||||||
|
private teamService: TeamService,
|
||||||
|
private tokenService: TokenService,
|
||||||
|
private router: Router) {
|
||||||
this.listMembres = [];
|
this.listMembres = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
/** Récuperer la team du membre connecté **/
|
||||||
|
this.teamService.getTeamById()?.subscribe((team) => {
|
||||||
|
this.currentTeam = team;
|
||||||
|
});
|
||||||
|
/** Récuperer le membre connecté **/
|
||||||
|
this.membreService.getMembreId(this.tokenService.getCurrentMembreId()).subscribe((user) => {
|
||||||
|
this.currentUser = user;
|
||||||
|
});
|
||||||
|
/** Récuperer la liste des membres de la team **/
|
||||||
this.membreService.getMembresByTeamId()?.subscribe((membres: any[]) => {
|
this.membreService.getMembresByTeamId()?.subscribe((membres: any[]) => {
|
||||||
console.log(membres);
|
|
||||||
this.listMembres = membres;
|
this.listMembres = membres;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue