Affichage postes
continuous-integration/drone/push Build encountered an error
Details
continuous-integration/drone/push Build encountered an error
Details
commit
eb3240ff4a
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 19 KiB |
@ -1,53 +1,108 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import PP from "../../assets/img/unknown.png";
|
import PP from "../../assets/img/unknown.png";
|
||||||
|
import PLUS from "../../assets/img/plus.png";
|
||||||
import { NavLink } from "react-router-dom";
|
import { NavLink } from "react-router-dom";
|
||||||
|
|
||||||
|
|
||||||
const ConfigurationDuProfil = ()=>{
|
const ConfigurationDuProfil = ()=>{
|
||||||
|
|
||||||
|
|
||||||
const userData = useSelector((state) => state.user.user);
|
const userData = useSelector((state) => state.user.user);
|
||||||
const [pseudo, setPseudo] = useState('');
|
const [pseudo, setPseudo] = useState('');
|
||||||
const [nomUtilisateur, setNomUtilisateur] = useState('');
|
const [nomUtilisateur, setNomUtilisateur] = useState('');
|
||||||
|
const [displayAdd, setDisplayAdd] = useState(false);
|
||||||
|
/*const [updateImage, setUpdateImage]= useState(false);
|
||||||
|
const setimageDeProfile=()=>{
|
||||||
|
if(updateImage=true){
|
||||||
|
useState("");
|
||||||
|
setDisplayAdd(false);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
setDisplayAdd(false);
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
var handleLoadFile=(e)=>{
|
||||||
|
var image = document.getElementById("output");
|
||||||
|
image.src = URL.createObjectURL(e.target.files[0]);
|
||||||
|
|
||||||
|
};
|
||||||
|
var a=PP;
|
||||||
return(
|
return(
|
||||||
|
|
||||||
<div className='modificationDuProfilBackgroud'>
|
<div className='modificationDuProfilBackgroud'>
|
||||||
<h2 className='ligneHorizontal' >Modifucation du Profil</h2>
|
<h2 className='ligneHorizontal' >Modifucation du Profil</h2>
|
||||||
<div className='modificationDuProfil' >
|
<div className='modificationDuProfil' >
|
||||||
<img src={PP} className="imageDeProfilConfiguration imageDeProfil"/>
|
<button className='imageDeProfilConfigurationPlus imageDeProfil' >
|
||||||
|
<img src={PLUS} className="plusButton "/>
|
||||||
<div className='modificationDuProfilText'>
|
<img src={a} className="imageDeProfilConfiguration imageDeProfil" onClick={() => setDisplayAdd(true)}/>
|
||||||
|
</button>
|
||||||
|
<div className='modificationDuProfilText alignementText'>
|
||||||
<span>Pseudo: </span>
|
<span>Pseudo: </span>
|
||||||
<span>Nom d'utilisateur:</span>
|
<span>Nom d'utilisateur:</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='modificationDuProfilText'>
|
<div>
|
||||||
|
<div className='modificationDuProfilText'>
|
||||||
<input
|
|
||||||
type="nomUtilisateur"
|
|
||||||
name="nomUtilisateur"
|
|
||||||
id="nomUtilisateur"
|
|
||||||
onChange={(e) => setNomUtilisateur (e.target.value)}
|
|
||||||
value={pseudo}
|
|
||||||
/>
|
|
||||||
<input
|
|
||||||
type="pseudo"
|
|
||||||
name="pseudo"
|
|
||||||
id="pseudo"
|
|
||||||
value={pseudo}
|
|
||||||
onChange={(e) => setPseudo (e.target.value)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<input className='inputConfiguration'
|
||||||
|
type="nomUtilisateur"
|
||||||
|
name="nomUtilisateur"
|
||||||
|
id="nomUtilisateur"
|
||||||
|
onChange={(e) => setNomUtilisateur (e.target.value)}
|
||||||
|
value={nomUtilisateur}
|
||||||
|
/>
|
||||||
|
<input className='inputConfiguration'
|
||||||
|
type="pseudo"
|
||||||
|
name="pseudo"
|
||||||
|
id="pseudo"
|
||||||
|
value={pseudo}
|
||||||
|
onChange={(e) => setPseudo (e.target.value)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<button className='buttonValidationChangements'>Valider</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 className='ligneHorizontal' >Acces au dossiers personnel</h2>
|
<h2 className='ligneHorizontal' >Acces au dossiers personnel</h2>
|
||||||
<div className='accesDossiersPerso'>
|
<div className='accesDossiersPerso'>
|
||||||
|
<div className='accesDossiersPersoValidation'>
|
||||||
<input type="checkbox" name='cocher' />
|
<input type="checkbox" name='cocher' />
|
||||||
<label for="cocher" class='textAccesDossiersPerso'>Cocher si oui</label>
|
<label for="cocher" class='textAccesDossiersPerso'>Cocher si oui</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div className='dossierPersonnel'>
|
||||||
|
<span>dossiers</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{displayAdd && (
|
||||||
|
<div className='popup-modificationProfil'>
|
||||||
|
<div className="modal">
|
||||||
|
<div className='imagesPopup'>
|
||||||
|
<img src={PP} className="imageDeProfilConfigurationPlus imageDeProfil"/>
|
||||||
|
<div className="imageDeProfilConfigurationPlus imageDeProfil profile-pic" >
|
||||||
|
<label className="-label" for="file">
|
||||||
|
<span class="camera"></span>
|
||||||
|
<span>Changer</span>
|
||||||
|
</label>
|
||||||
|
<input type="file" id="file" onChange={handleLoadFile}/>
|
||||||
|
<img src={PLUS} id="output" />
|
||||||
|
</div>
|
||||||
|
</div >
|
||||||
|
<div className='buttonPopup'>
|
||||||
|
<button onClick={() => setDisplayAdd(false)/*&&setUpdateImage(true)*/}>Retour</button>
|
||||||
|
<button /*onClick={} */>Valider</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ConfigurationDuProfil;
|
export default ConfigurationDuProfil;
|
@ -0,0 +1,45 @@
|
|||||||
|
|
||||||
|
.PolitiqueDeConfidentialiteText{
|
||||||
|
margin-top: 2%;
|
||||||
|
margin-left: 5%;
|
||||||
|
text-indent: 1%;
|
||||||
|
text-align: justify;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: $color-8;
|
||||||
|
border: 0.2px solid $color-5;
|
||||||
|
max-width:85% ;
|
||||||
|
min-width: 380px;
|
||||||
|
height: 550px;
|
||||||
|
|
||||||
|
p{
|
||||||
|
animation-duration: 2s;
|
||||||
|
animation-name: slide;
|
||||||
|
margin: 1.5%;
|
||||||
|
|
||||||
|
|
||||||
|
@keyframes slide {
|
||||||
|
from {
|
||||||
|
margin-top: 100%;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
margin-top: 0%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
#listeNotif{
|
|
||||||
margin-left: 10%;
|
|
||||||
}
|
|
@ -0,0 +1,11 @@
|
|||||||
|
#listeNotif{
|
||||||
|
margin: 2%;
|
||||||
|
margin-left: 8%;
|
||||||
|
padding:1%;
|
||||||
|
border-color: $color-5;
|
||||||
|
border-style:solid;
|
||||||
|
border-width: 0.3px;
|
||||||
|
min-width: 410px;
|
||||||
|
width: 84%;
|
||||||
|
background: $color-8;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
const UserModel = require("../models/user.model");
|
||||||
|
|
||||||
|
module.exports.addNotification = (userId, notification) => {
|
||||||
|
UserModel.findById(userId, (err, user) => {
|
||||||
|
if (err) {
|
||||||
|
console.log(err);
|
||||||
|
} else {
|
||||||
|
user.notif.push(notification);
|
||||||
|
user.save();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
Reference in new issue