détails + début formulaire contacts
This commit is contained in:
parent
21f782a4ea
commit
790ee67f71
9 changed files with 80 additions and 32 deletions
|
@ -1,12 +1,14 @@
|
||||||
<div class="footer text-center" >
|
<div class="footer text-center" >
|
||||||
<h3>Plan du site</h3>
|
<h3>Plan du site</h3>
|
||||||
<div class="liens">
|
<div class="liens">
|
||||||
<a routerLink="../tableau-de-bord" routerLinkActive="active-custom" class="nav-link">Tableau de bord</a>
|
|
||||||
<a routerLink="../compte" routerLinkActive="active-custom" class="nav-link">Ma Team</a>
|
<a routerLink="../compte" routerLinkActive="active-custom" class="nav-link">Ma Team</a>
|
||||||
|
<a routerLink="../tableau-de-bord" routerLinkActive="active-custom" class="nav-link">Dashboard</a>
|
||||||
<a routerLink="../repertoire" routerLinkActive="active-custom" class="nav-link">Répertoire</a>
|
<a routerLink="../repertoire" routerLinkActive="active-custom" class="nav-link">Répertoire</a>
|
||||||
<a routerLink="../to-do-list" routerLinkActive="active-custom" class="nav-link">To-Do-List</a>
|
<a routerLink="../to-do-list" routerLinkActive="active-custom" class="nav-link">To-Do-List</a>
|
||||||
<a routerLink="../agenda" routerLinkActive="active-custom" class="nav-link">Agenda</a>
|
|
||||||
<a routerLink="../menu" routerLinkActive="active-custom" class="nav-link">Menus</a>
|
<a routerLink="../menu" routerLinkActive="active-custom" class="nav-link">Menus</a>
|
||||||
|
<a routerLink="../agenda" routerLinkActive="active-custom" class="nav-link">Agenda</a>
|
||||||
<a routerLink="../page-support" routerLinkActive="active-custom" class="nav-link">Nous contacter</a>
|
<a routerLink="../page-support" routerLinkActive="active-custom" class="nav-link">Nous contacter</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- juste une suite de liens pour faire un plan du site et un accès direct -->
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
<h2>Mon humeur :</h2>
|
<h2>Mon humeur :</h2>
|
||||||
|
|
||||||
|
<!-- envoie une alerte sur le header au clic du changement d'humeur-->
|
||||||
<app-alert
|
<app-alert
|
||||||
*ngIf="isShow"
|
*ngIf="isShow"
|
||||||
[alert]="alert"
|
[alert]="alert"
|
||||||
|
@ -10,12 +11,13 @@
|
||||||
></app-alert>
|
></app-alert>
|
||||||
|
|
||||||
|
|
||||||
|
<!--affichage de l'humeur sur laquelle on a cliqué-->
|
||||||
<p><img src="{{monHumeurLien}}" alt="{{monHumeurTitle}}" *ngIf="monHumeurLien" ></p>
|
<p><img src="{{monHumeurLien}}" alt="{{monHumeurTitle}}" *ngIf="monHumeurLien" ></p>
|
||||||
|
|
||||||
<p>Je modifie mon avatar :</p>
|
<p>Je modifie mon avatar :</p>
|
||||||
|
|
||||||
|
<!--Directive structurelle *ngFor pour afficher tous les éléments du tableau-->
|
||||||
|
<!-- puis récupération au click de l'indice de l'humeur choisie-->
|
||||||
<div class="humeur" *ngFor="let humor of tabHumeur; let i=index">
|
<div class="humeur" *ngFor="let humor of tabHumeur; let i=index">
|
||||||
<img src="{{humor.lien}}" alt="{{humor.title}}" (click)="onChoixHumeur(i)">
|
<img src="{{humor.lien}}" alt="{{humor.title}}" (click)="onChoixHumeur(i)">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,7 @@ monHumeurTitle! : string[] ;
|
||||||
isShow: boolean;
|
isShow: boolean;
|
||||||
alert: any;
|
alert: any;
|
||||||
|
|
||||||
|
// tableau des humeurs, lien vers les images et titre pour meilleure accesibilité
|
||||||
tabHumeur= [
|
tabHumeur= [
|
||||||
{ title : "Je vais bien", lien : "assets/images/emoticon-heureux.png"},
|
{ title : "Je vais bien", lien : "assets/images/emoticon-heureux.png"},
|
||||||
{ title : "Je pleure", lien : "assets/images/emoticon-pleurer.png"},
|
{ title : "Je pleure", lien : "assets/images/emoticon-pleurer.png"},
|
||||||
|
@ -21,27 +21,33 @@ alert: any;
|
||||||
{ title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"},
|
{ title : "Je suis en colère", lien : "assets/images/emoticon-insulter.png"},
|
||||||
{ title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ]
|
{ title : "Je suis en joie", lien : "assets/images/emoticon-feter.png"} ]
|
||||||
|
|
||||||
|
|
||||||
constructor(private membreService: MembreService, private tokenService: TokenService) {
|
constructor(private membreService: MembreService, private tokenService: TokenService) {
|
||||||
this.isShow= false;
|
this.isShow= false;
|
||||||
this.alert="";
|
this.alert="";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// récupère le getCurrentMembreId (stocké dans token.service),
|
||||||
|
// qui est l'identifiant du membre et qui stocké dans le token
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const userId = this.tokenService.getCurrentMembreId();
|
const userId = this.tokenService.getCurrentMembreId();
|
||||||
this.membreService.getMembreId(userId).subscribe({
|
this.membreService.getMembreId(userId).subscribe({
|
||||||
next: result => {
|
next: result => {
|
||||||
//this.monHumeurTitle= [this.tabHumeur[result.smiley].title];
|
|
||||||
this.monHumeurLien= result.smiley;
|
this.monHumeurLien= result.smiley;
|
||||||
// console.log("resultat smiley ", result.smiley);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// méthode pour récupérer l'indice de l'humeur sur laquelle on a cliqué
|
||||||
onChoixHumeur(numero: any){
|
onChoixHumeur(numero: any){
|
||||||
this.monHumeurTitle= [this.tabHumeur[numero].title];
|
this.monHumeurTitle= [this.tabHumeur[numero].title];
|
||||||
this.monHumeurLien= [this.tabHumeur[numero].lien];
|
this.monHumeurLien= [this.tabHumeur[numero].lien];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Permet de faire la mise à jour des caractéristiques du membre
|
||||||
|
// Subscribe exécute l'observable, dont le rôle est de suivre le changement d'humeur
|
||||||
|
// et en deuxième ligne de chaque paramètre, affecte l'alerte du header
|
||||||
this.membreService.updateHumeur(this.tabHumeur[numero].lien)?.subscribe(
|
this.membreService.updateHumeur(this.tabHumeur[numero].lien)?.subscribe(
|
||||||
{
|
{
|
||||||
next: result => {
|
next: result => {
|
||||||
|
@ -56,11 +62,13 @@ onChoixHumeur(numero: any){
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
console.log("humeur titre est : ", this.monHumeurTitle);
|
console.log("humeur titre est : ", this.monHumeurTitle);
|
||||||
console.log("humeur lien est : ", this.monHumeurLien);
|
console.log("humeur lien est : ", this.monHumeurLien);
|
||||||
console.log("index humeur est : ", numero);
|
console.log("index humeur est : ", numero);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// méthode pur afficher
|
||||||
onClickCloseAlert(){
|
onClickCloseAlert(){
|
||||||
this.isShow=!this.isShow;
|
this.isShow=!this.isShow;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
|
|
||||||
|
|
||||||
|
<!--App-rooting.ts indique que si aucun url ne correspond, on arrive sur cette page-->
|
||||||
|
<!-- { path: '**', component: PageNotFoundComponent },-->
|
||||||
|
|
||||||
|
|
||||||
|
<!--Lien pour nous renvoyer à la racine du localhost-->
|
||||||
<a routerLink="" routerLinkActive="!active">Je retourne à l'accueil</a>
|
<a routerLink="" routerLinkActive="!active">Je retourne à l'accueil</a>
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,6 @@ p{
|
||||||
|
|
||||||
.min-vh-100 {
|
.min-vh-100 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
//background-image: linear-gradient(to left top, #051937, #004d7a, #008793, #e2ebe7, #f8faf5);
|
|
||||||
//max-width: max-content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img {justify-content: center;
|
img {justify-content: center;
|
||||||
|
|
|
@ -1,32 +1,36 @@
|
||||||
<!-- <div>
|
<div>
|
||||||
<app-header></app-header>
|
<app-header></app-header>
|
||||||
<app-side-bar></app-side-bar>
|
<app-side-bar></app-side-bar>
|
||||||
</div> -->
|
</div>
|
||||||
|
<app-side-bar [backgroundColor]="'rgb(184, 202, 235)'"></app-side-bar>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h2>Demande support</h2>
|
<h2>Nous contacter</h2>
|
||||||
<form action="/demande_support" method="post">
|
<form action="demande_support" method="post">
|
||||||
|
|
||||||
<label for="name">Nom :</label>
|
<label for="name">Nom :</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" id="name" value="Votre nom" name="user_name">
|
<input type="text" id="name" value={{memberName.nom}} name="user_name">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<label for="mail">E-mail :</label>
|
<label for="mail">E-mail :</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="email" id="mail" name="user_mail" value="Votre adresse mail">
|
<input type="email" id="mail" name="user_mail" value={{memberName.email}} >
|
||||||
</div>
|
</div>
|
||||||
<label for="msg">Message :</label>
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<textarea id="msg" name="user_message">Formulez votre demande ici</textarea>
|
<label for="msg">Message :</label>
|
||||||
</div>
|
|
||||||
|
<textarea id="message" name="message" placeholder="Formulez votre demande ici" required></textarea>
|
||||||
|
|
||||||
<div class="button">
|
<div class="button">
|
||||||
|
<button class="btn btn-primary" (click)="onSendMail()">Envoyez votre message</button>
|
||||||
<button class="btn btn-primary">Envoyez votre message</button>
|
<button type="button" class="btn btn-danger" (click)="onDeleteMail()">Effacer</button>
|
||||||
<button type="button" class="btn btn-danger">Effacer</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
|
@ -1,9 +1,12 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
form {
|
form {
|
||||||
background-color: rgb(184, 202, 235);
|
background-color: rgb(184, 202, 235);
|
||||||
width: 600px;
|
width: 600px;
|
||||||
border: 3px solid blue;
|
border: 1px solid blue;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 1em;
|
border-radius: 2em;
|
||||||
padding:3em;
|
padding:3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
|
import { TokenService } from 'src/app/services/token.service';
|
||||||
|
import { Membre } from 'src/app/models/membre';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||||
|
import { MembreService } from 'src/app/services/membre.service';
|
||||||
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
|
||||||
//DRIVEN FORM
|
//DRIVEN FORM
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -8,12 +16,25 @@ import { Component, OnInit } from '@angular/core';
|
||||||
})
|
})
|
||||||
export class PageSupportComponent implements OnInit {
|
export class PageSupportComponent implements OnInit {
|
||||||
|
|
||||||
constructor() { }
|
memberName: any;
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
constructor(private membreService: MembreService,
|
||||||
|
private http: HttpClient,
|
||||||
|
private router: Router,
|
||||||
|
private tokenService: TokenService) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.membreService.getMembreId(this.tokenService.getCurrentMembreId()).subscribe((result) => {
|
||||||
|
this.memberName = result ; }) }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
onSendMail(){ }
|
||||||
|
|
||||||
|
onDeleteMail(){ }
|
||||||
|
|
||||||
|
}
|
|
@ -58,6 +58,8 @@ export class MembreService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//récupère l'identifiant du membre, ainsi que le lien de son humeur
|
||||||
|
//"numero" est l'indice de l'humeur dans le tableau des humeurs
|
||||||
updateHumeur(numero : any) : Observable<any> | void {
|
updateHumeur(numero : any) : Observable<any> | void {
|
||||||
const userId = this.tokenService.getCurrentMembreId();
|
const userId = this.tokenService.getCurrentMembreId();
|
||||||
if (userId){
|
if (userId){
|
||||||
|
@ -67,6 +69,10 @@ updateHumeur(numero : any) : Observable<any> | void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue