dasboard pas fini et modif addmembre
This commit is contained in:
parent
9e40a5ff68
commit
896c0c5f3a
13 changed files with 158 additions and 35 deletions
|
@ -41,6 +41,7 @@ import { PageUpdateAccountComponent } from './pages/page-update-account/page-upd
|
||||||
import { DayPilot, DayPilotModule } from "@daypilot/daypilot-lite-angular";
|
import { DayPilot, DayPilotModule } from "@daypilot/daypilot-lite-angular";
|
||||||
import { registerLocaleData } from '@angular/common';
|
import { registerLocaleData } from '@angular/common';
|
||||||
import localeFr from '@angular/common/locales/fr';
|
import localeFr from '@angular/common/locales/fr';
|
||||||
|
import { CardAvatarComponent } from './components/card-avatar/card-avatar.component';
|
||||||
registerLocaleData(localeFr)
|
registerLocaleData(localeFr)
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -80,6 +81,7 @@ registerLocaleData(localeFr)
|
||||||
FooterComponent,
|
FooterComponent,
|
||||||
PageDeleteAccountComponent,
|
PageDeleteAccountComponent,
|
||||||
PageUpdateAccountComponent,
|
PageUpdateAccountComponent,
|
||||||
|
CardAvatarComponent,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
|
|
13
src/app/components/card-avatar/card-avatar.component.html
Normal file
13
src/app/components/card-avatar/card-avatar.component.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<div class="container mt-5 membre">
|
||||||
|
<div class="row d-flex justify-content-center">
|
||||||
|
<div class="col-md-auto">
|
||||||
|
<div class="card p-3 py-4 align-items">
|
||||||
|
<!-- récuperer couleur du back-->
|
||||||
|
<div class="text-center"><div class="rounded-circle"id="couleur"[style.background-color]="membre.couleur"></div></div>
|
||||||
|
<div class="text-center mt-3">
|
||||||
|
<h3 class="mt-2 mb-0">{{membre.prenom }} {{membre.nom }}</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
20
src/app/components/card-avatar/card-avatar.component.scss
Normal file
20
src/app/components/card-avatar/card-avatar.component.scss
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#couleur{
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: black;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
min-height: 8px;
|
||||||
|
border: none;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 8px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: small;
|
||||||
|
}
|
25
src/app/components/card-avatar/card-avatar.component.spec.ts
Normal file
25
src/app/components/card-avatar/card-avatar.component.spec.ts
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { CardAvatarComponent } from './card-avatar.component';
|
||||||
|
|
||||||
|
describe('CardAvatarComponent', () => {
|
||||||
|
let component: CardAvatarComponent;
|
||||||
|
let fixture: ComponentFixture<CardAvatarComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ CardAvatarComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(CardAvatarComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
17
src/app/components/card-avatar/card-avatar.component.ts
Normal file
17
src/app/components/card-avatar/card-avatar.component.ts
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-card-avatar',
|
||||||
|
templateUrl: './card-avatar.component.html',
|
||||||
|
styleUrls: ['./card-avatar.component.scss']
|
||||||
|
})
|
||||||
|
export class CardAvatarComponent implements OnInit {
|
||||||
|
@Input() membre: any;
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
|
|
|
@ -54,8 +54,8 @@ export class PageAddMemberComponent implements OnInit {
|
||||||
public onSubmit(): void {
|
public onSubmit(): void {
|
||||||
console.log('value : ', this.addMemberForm.value);
|
console.log('value : ', this.addMemberForm.value);
|
||||||
console.log('form : ', this.addMemberForm);
|
console.log('form : ', this.addMemberForm);
|
||||||
const firstNameValue = this.addMemberForm.value['firstNameFc'];
|
|
||||||
const lastNameValue = this.addMemberForm.value['lastNameFc'];
|
const lastNameValue = this.addMemberForm.value['lastNameFc'];
|
||||||
|
const firstNameValue = this.addMemberForm.value['firstNameFc'];
|
||||||
const emailValue = this.addMemberForm.value['emailFc'];
|
const emailValue = this.addMemberForm.value['emailFc'];
|
||||||
const roleValue = this.addMemberForm.value['roleFc'];
|
const roleValue = this.addMemberForm.value['roleFc'];
|
||||||
const passwordValue = this.addMemberForm.value['passwordFc'];
|
const passwordValue = this.addMemberForm.value['passwordFc'];
|
||||||
|
@ -65,8 +65,8 @@ export class PageAddMemberComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
const membre: Membre = {
|
const membre: Membre = {
|
||||||
nom: firstNameValue,
|
nom: lastNameValue,
|
||||||
prenom: lastNameValue,
|
prenom: firstNameValue,
|
||||||
email: emailValue,
|
email: emailValue,
|
||||||
password: passwordValue,
|
password: passwordValue,
|
||||||
couleur: couleurValue,
|
couleur: couleurValue,
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<div>
|
<app-header></app-header>
|
||||||
<app-header></app-header>
|
<div class="row">
|
||||||
<app-side-bar></app-side-bar>
|
<div class="col-md-auto">
|
||||||
</div>
|
<app-side-bar></app-side-bar>
|
||||||
|
</div>
|
||||||
<div class="ajoutContact-form text-center">
|
<div class="ajoutContact-form text-center">
|
||||||
<h1>Ajouter un contact</h1>
|
<h3>Ajouter un contact</h3>
|
||||||
<main class="form-ajoutContact">
|
<main class="form-ajoutContact">
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="ajoutContactForm">
|
<form (ngSubmit)="onSubmit()" [formGroup]="ajoutContactForm">
|
||||||
|
|
||||||
|
@ -83,4 +84,5 @@
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,32 +1,39 @@
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar></app-side-bar>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h3 class="titre">Bienvenue {{conectedUser.prenom}}!!</h3>
|
<h3 class="titre">Bienvenue {{conectedUser.prenom}}!!</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row d-flex align-items-center flex-row">
|
<div class="row d-flex align-items-center flex-row">
|
||||||
|
|
||||||
<div class="col-4">
|
<div class="col-sm-3 col-xs-6 box border" id="boxThree">
|
||||||
<div class="flex-row border">
|
|
||||||
<app-meteo></app-meteo>
|
<app-meteo></app-meteo>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-row border">
|
<div class="col-sm-3 col-xs-6 box border" id="boxTwo">
|
||||||
<span>Humeur en attente component</span>
|
<app-calendrier>A venir</app-calendrier>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-3 col-xs-6 box border" id="boxFour">
|
||||||
|
<div>
|
||||||
|
<p>Humeur en attente component
|
||||||
|
</p>
|
||||||
|
<p>Humeur en attente component
|
||||||
|
</p>
|
||||||
|
<p>Humeur en attente component
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row avatar">
|
||||||
|
<div class="col" *ngFor="let membreData of listMembres">
|
||||||
|
<app-card-avatar [membre]="membreData">
|
||||||
|
</app-card-avatar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-8 border">
|
|
||||||
<app-calendrier>A venir</app-calendrier>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<app-card-member>A modifier</app-card-member>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
|
@ -1,10 +1,11 @@
|
||||||
.titre{
|
.titre{
|
||||||
|
display: inline-flex;
|
||||||
|
margin-left: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meteo {
|
.meteo {
|
||||||
display: flex;
|
|
||||||
margin-left: 500px;
|
margin-left: 500px;
|
||||||
margin-top: -60px;
|
margin-top: -60px;
|
||||||
}
|
}
|
||||||
|
@ -12,11 +13,38 @@
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid 8c2e9b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button{
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.calendrier{
|
.calendrier{
|
||||||
align-content: flex-end;
|
align-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
#boxFour{
|
||||||
|
height: 150px;
|
||||||
|
margin-top: -70px;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
#boxThree{
|
||||||
|
margin-top: -85px;
|
||||||
|
height: 150px;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
#boxTwo{
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-left: 150px;
|
||||||
|
height: 50%;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar{
|
||||||
|
margin-top: -50px;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
|
@ -12,18 +12,25 @@ import { TokenService } from 'src/app/services/token.service';
|
||||||
export class PageDashboardComponent implements OnInit {
|
export class PageDashboardComponent implements OnInit {
|
||||||
|
|
||||||
conectedUser: any;
|
conectedUser: any;
|
||||||
|
listMembres: any[];
|
||||||
|
|
||||||
constructor(private membreService: MembreService,
|
constructor(private membreService: MembreService,
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private tokenService: TokenService) {
|
private tokenService: TokenService) {
|
||||||
}
|
this.listMembres = [];
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.membreService.getMembreId(this.tokenService.getCurrentMembreId()).subscribe((result) => {
|
this.membreService.getMembreId(this.tokenService.getCurrentMembreId()).subscribe((result) => {
|
||||||
this.conectedUser = result ;
|
this.conectedUser = result ;
|
||||||
console.log(result);
|
console.log(result);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.membreService.getMembresByTeamId()?.subscribe((membres: any[]) => {
|
||||||
|
console.log(membres);
|
||||||
|
this.listMembres = membres;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
<div>
|
<app-header></app-header>
|
||||||
<app-header></app-header>
|
<div class="row">
|
||||||
<app-side-bar></app-side-bar>
|
<div class="col-md-auto">
|
||||||
</div>
|
<app-side-bar></app-side-bar>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modifContact-form text-center">
|
<div class="modifContact-form text-center">
|
||||||
<h1>Modifier ce contact</h1>
|
<h3>Modifier ce contact</h3>
|
||||||
<main class="form-modifContact">
|
<main class="form-modifContact">
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="modifContactForm">
|
<form (ngSubmit)="onSubmit()" [formGroup]="modifContactForm">
|
||||||
|
|
||||||
|
@ -84,4 +85,5 @@
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -69,5 +69,6 @@ export class PageRepertoireComponent implements OnInit {
|
||||||
}
|
}
|
||||||
this.router.navigate(['repertoire/']);
|
this.router.navigate(['repertoire/']);
|
||||||
});
|
});
|
||||||
|
window.location.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue