19/11/22 - 13h30

recette2
cherif 2022-11-19 13:24:07 +01:00
parent 98c0867146
commit 13813ece42
6 changed files with 226 additions and 46 deletions

View File

@ -32,6 +32,7 @@ import Recherche_new from "./pages/recherche_new";
import Recherche_old from "./pages/recherche"; import Recherche_old from "./pages/recherche";
import UserSignFirst from "./pages/usersigninfirst"; import UserSignFirst from "./pages/usersigninfirst";
import GestionAdministrative from "./components/GestionAdministrative"; import GestionAdministrative from "./components/GestionAdministrative";
import Emargement from "./pages/emargementOk";
function App() { function App() {
@ -84,6 +85,7 @@ function App() {
<Route path="/Recherche_new/:type/:categorie" exact component={Recherche_new} /> <Route path="/Recherche_new/:type/:categorie" exact component={Recherche_new} />
<Route path="/Recherche_old/" exact component={Recherche_old} /> <Route path="/Recherche_old/" exact component={Recherche_old} />
<Route path="/Connexion-utilisateur-0/" exact component={UserSignFirst} /> <Route path="/Connexion-utilisateur-0/" exact component={UserSignFirst} />
<Route path="/Emargement/" exact component={Emargement} />
<Route component={NotFound} /> <Route component={NotFound} />
</Switch> </Switch>

View File

@ -37,12 +37,12 @@ function GestionAdministrative(props) {
const columns_preinscrit = [ const columns_preinscrit = [
{ field: 'id', headerName: 'id', hide: true }, { field: 'id', headerName: 'id', hide: true },
{ field: 'email', headerName: 'email', width: 200, hideable: false, flex: 1 }, { field: 'email', headerName: 'email', width: 200, hideable: false, flex: 1 },
{ field: 'nom', headerName: 'nom', width: 200, hide: false, editable: true }, { field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true },
{ field: 'prenom', headerName: 'prenom', width: 200, hide: false, editable: true }, { field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: true },
{ field: 'employeur', headerName: 'Employeur', width: 200, hide: false, editable: true }, { field: 'employeur', headerName: 'Employeur', width: 200, hide: false, editable: true },
{ field: 'opco', headerName: 'Centre Opco', width: 200, hide: false, editable: true }, { field: 'opco', headerName: 'Centre Opco', width: 150, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', width: 200, hide: false, editable: true }, { field: 'modefinancement', headerName: 'Financement', width: 150, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', width: 200, type: 'number', hideable: false, flex: 1, editable: true }, { field: 'amount', headerName: 'Montant Formation', width: 150, type: 'number', hideable: false, flex: 1, editable: true },
{ {
field: "update", headerName: 'Mise à jour', field: "update", headerName: 'Mise à jour',
renderCell: (cellValues) => { renderCell: (cellValues) => {
@ -191,13 +191,13 @@ function GestionAdministrative(props) {
const columns_inscrit = [ const columns_inscrit = [
{ field: 'id', headerName: 'id', hide: true }, { field: 'id', headerName: 'id', hide: true },
{ field: 'email', headerName: 'email s', width: 200, hideable: false, flex: 1, minWidth: 150, maxWidth: 300 }, { field: 'email', headerName: 'emails', width: 200, hideable: false, flex: 1, minWidth: 150, maxWidth: 300 },
{ field: 'nom', headerName: 'nom', width: 200, hide: false, editable: true, resizable: true }, { field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true, resizable: true },
{ field: 'prenom', headerName: 'prenom', width: 200, hide: false, editable: true }, { field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: true },
{ field: 'employeur', headerName: 'Employeur', width: 200, hide: false, editable: true }, { field: 'employeur', headerName: 'Employeur', width: 200, hide: false, editable: true },
{ field: 'opco', headerName: 'Centre Opco', width: 200, hide: false, editable: true }, { field: 'opco', headerName: 'Centre Opco', width: 150, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', width: 200, hide: false, editable: true }, { field: 'modefinancement', headerName: 'Financement', width: 150, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', width: 200, type: 'number', hideable: false, flex: 1, editable: true }, { field: 'amount', headerName: 'Montant Formation', width: 150, type: 'number', hideable: false, flex: 1, editable: true },
{ {
field: "sendmail", headerName: 'Email Confirmation', field: "sendmail", headerName: 'Email Confirmation',
renderCell: (cellValues) => { renderCell: (cellValues) => {
@ -266,12 +266,12 @@ function GestionAdministrative(props) {
const columns_list_emargement = [ const columns_list_emargement = [
{ field: 'id', headerName: 'id', hide: true }, { field: 'id', headerName: 'id', hide: true },
{ field: 'date', headerName: 'date', width: 200, hideable: false, flex: 1 }, { field: 'date', headerName: 'date', width: 100, hideable: false, flex: 1 },
{ field: 'email', headerName: 'email', width: 200, hideable: false, flex: 1 }, { field: 'email', headerName: 'email', width: 250, hideable: false, flex: 1 },
{ field: 'nom', headerName: 'nom', width: 200, hide: false, editable: true }, { field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true },
{ field: 'prenom', headerName: 'prenom', width: 200, hide: false, editable: false }, { field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: false },
{ field: 'matin', headerName: 'Matin', width: 200, hide: false, editable: true, type: 'boolean', }, { field: 'matin', headerName: 'Matin', width: 100, hide: false, editable: true, type: 'boolean', },
{ field: 'apresmidi', headerName: 'Apres midi', width: 200, hide: false, editable: true, type: 'boolean', }, { field: 'apresmidi', headerName: 'Apres midi', width: 100, hide: false, editable: true, type: 'boolean', },
{ {
field: "valide", headerName: 'Valider', field: "valide", headerName: 'Valider',
renderCell: (cellValues) => { renderCell: (cellValues) => {
@ -1164,12 +1164,12 @@ function GestionAdministrative(props) {
function GetSelectedRowsEmargement() { function GetSelectedRowsEmargement() {
var tab_tmp = [] var tab_tmp = []
for (var i = 0; i < selectionModel_emarg.length; i++) { for (var i = 0; i < selectionModel_emarg.length; i++) {
var myid = parseInt(String(selectionModel_emarg[i])); var myid = parseInt(String(selectionModel_emarg[i]));
tab_tmp.push(JSON.parse(rowss_emarg[myid])._id); tab_tmp.push(JSON.parse(rowss_emarg[myid])._id);
} }
setselectedemargement(tab_tmp); setselectedemargement(tab_tmp);
return tab_tmp; return tab_tmp;
@ -1180,6 +1180,11 @@ function GestionAdministrative(props) {
const [ActionMassListEmargement_result, setActionMassListEmargement_result] = useState(); const [ActionMassListEmargement_result, setActionMassListEmargement_result] = useState();
function ActionMassListEmargement(e) { function ActionMassListEmargement(e) {
if( selectionModel_emarg.length <= 0 ){
alert(" Selectionnez un enregistrement pour envoyer la demande d'emargement");
return;
}
var actionenmasse = "" var actionenmasse = ""
if (document.getElementById("actionmass_emarge")) { if (document.getElementById("actionmass_emarge")) {
actionenmasse = document.getElementById("actionmass_emarge").value; actionenmasse = document.getElementById("actionmass_emarge").value;
@ -1187,8 +1192,8 @@ function GestionAdministrative(props) {
var liste_emargement_id = GetSelectedRowsEmargement(); var liste_emargement_id = GetSelectedRowsEmargement();
console.log("liste_formation = "+liste_emargement_id); console.log("liste_formation = " + liste_emargement_id);
var form = new FormData(); var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart'); const stored_cookie = getCookie('tokenmysypart');
@ -1216,9 +1221,7 @@ function GestionAdministrative(props) {
}) })
alert(" envoi des emargements");
if (String(actionenmasse) === String("depublier")) { if (String(actionenmasse) === String("depublier")) {
@ -1770,15 +1773,14 @@ function GestionAdministrative(props) {
{String(submenu) === String("emargement") && <div className="detail_class_submenu_data" style={{ "border": "None" }}> {String(submenu) === String("emargement") && <div className="detail_class_submenu_data" style={{ "border": "None" }}>
<div className="div_row">
<div className="div_row_gauche"> <div className="div_row" style={{"textAlign":"right","marginTop":"0.5rem"}}>
<Button variant="contained" onClick={CreateListEmargement}>Initaliser la liste emargement</Button> <Button className="bton_emarge" onClick={CreateListEmargement}>Initaliser la liste emargement</Button>
<Button className="bton_emarge" onClick={DownloadListEmargement}>Imprimer la liste emargement</Button>
<Button className="bton_emarge" onClick={ActionMassListEmargement}>Envoyer les demandes d'emargement</Button><br />
</div> </div>
<div className="div_row_droite">
<Button variant="contained" onClick={DownloadListEmargement}>Imprimer la liste emargement</Button>
</div>
</div>
{String(CreateListEmargement_api) === "true" && <div className="okUpdateData"> {String(CreateListEmargement_api) === "true" && <div className="okUpdateData">
La liste d'emargement a été créée La liste d'emargement a été créée
</div>} </div>}
@ -1787,15 +1789,25 @@ function GestionAdministrative(props) {
{CreateListEmargement_message} {CreateListEmargement_message}
</div>} </div>}
{String(ActionMassListEmargement_api) === "true" && <div className="okUpdateData">
Les demandes d'emargement ont bien été envoyées
</div>}
{String(ActionMassListEmargement_api) === "false" && <div className="koUpdateData">
{CreateListEmargement_message}
</div>}
<div style={{ height: 500, width: '100%' }}> <div style={{ height: 500, width: '100%' }}>
<DataGrid <DataGrid
checkboxSelection checkboxSelection
onSelectionModelChange={(newSelectionModel_emarg) => { onSelectionModelChange={(newSelectionModel_emarg) => {
setSelectionModel_emarg(newSelectionModel_emarg); setSelectionModel_emarg(newSelectionModel_emarg);
console.log("ch selected--" + newSelectionModel_emarg); console.log("ch selected--" + newSelectionModel_emarg);
}} }}
selectionModel={selectionModel_emarg} selectionModel={selectionModel_emarg}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText} localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={rowss_emarg.map((item, index) => ( rows={rowss_emarg.map((item, index) => (
@ -1826,9 +1838,9 @@ function GestionAdministrative(props) {
<br /> <br />
<Button variant="contained" onClick={ActionMassListEmargement}>formations choisi</Button><br /> <Button className="bton_emarge" onClick={ActionMassListEmargement}>Envoyer les demandes d'emargement</Button><br />
</div> </div>
</div>} </div>}

BIN
src/mysy_img/Ok_PNG.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

60
src/pages/emargementOk.js Normal file
View File

@ -0,0 +1,60 @@
import React, { useState, useEffect } from "react";
import Navigation from "../components/Navigation";
import bannerimg2 from "./../mysy_img/MYSY-LOGO-BLUE.png";
import ok_png from "./../mysy_img/Ok_PNG.png";
import { Helmet } from "react-helmet";
import Footer from "./../components/Fotter";
import Header from "./../components/Header";
const EmargementOk = () => {
const [tempo, settempo] = useState(".");
setInterval(check, 2300);
window.setTimeout(function () {
window.location.href = process.env.REACT_APP_BASE_URL
}, 7000);
function check() {
var val = tempo + " .";
//alert(" val = "+val);
settempo(val);
}
return (
<div className="notfound">
<div>
<Navigation />
</div>
<Helmet>
<title>MySy Training, Emargement</title>
<meta name="description" content="Nous sommes une base de données uniquement dediée aux formations et tutoriels" />
<meta name="robots" content="index,follow" />
<meta name="title" content="Trouver des Formations.Acces libre.Qualité top" />
<link rel="canonical" href={`${process.env.REACT_APP_BASE_URL}` + "/Emargement"} />
</Helmet>
<Header />
<div className="div_mobile">
<div className="nom_prenom"> Votre demande d'emargement bien été prise en compte <img src={ok_png} className="img_ok"/> </div>
<div className="nom_prenom">
<div>
Vous allez etre redirigé vers le moteur de recherche dans quelques secondes. {tempo}
</div>
</div>
</div>
<div className="pieddepage">
<Footer />
</div>
</div>
)
}
export default EmargementOk;

View File

@ -98,6 +98,7 @@
background-color: #104277; background-color: #104277;
color: white; color: white;
} }
.detail_class_submenu:focus { .detail_class_submenu:focus {
//border: 3px dotted green; //border: 3px dotted green;
background-color: #104277; background-color: #104277;
@ -157,7 +158,7 @@
border-radius: 10px; border-radius: 10px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.session_caract { .session_caract {
@ -275,6 +276,7 @@
background-color: #104277; background-color: #104277;
color: white; color: white;
} }
.detail_class_submenu:focus { .detail_class_submenu:focus {
//border: 3px dotted green; //border: 3px dotted green;
background-color: #104277; background-color: #104277;
@ -336,7 +338,7 @@
border-radius: 10px; border-radius: 10px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.session_caract { .session_caract {
@ -454,6 +456,7 @@
background-color: #104277; background-color: #104277;
color: white; color: white;
} }
.detail_class_submenu:focus { .detail_class_submenu:focus {
//border: 3px dotted green; //border: 3px dotted green;
background-color: #104277; background-color: #104277;
@ -515,7 +518,7 @@
border-radius: 10px; border-radius: 10px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.session_caract { .session_caract {
@ -633,6 +636,7 @@
background-color: #104277; background-color: #104277;
color: white; color: white;
} }
.detail_class_submenu:focus { .detail_class_submenu:focus {
//border: 3px dotted green; //border: 3px dotted green;
background-color: #104277; background-color: #104277;
@ -694,7 +698,7 @@
border-radius: 10px; border-radius: 10px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.session_caract { .session_caract {
@ -724,8 +728,17 @@
padding-bottom: 5px !important; padding-bottom: 5px !important;
} }
.css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset{ .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset {
border-color: white !important; border-color: white !important;
border-radius: 20px !important; border-radius: 20px !important;
} }
}
.bton_emarge {
border-radius: 5rem;
font-size: small;
padding: 0.5rem;
background: rgb(129, 188, 58);
margin-left: 5px;
margin-right: 5px;
}
}

View File

@ -19,6 +19,10 @@
margin-right: auto; margin-right: auto;
} }
.img_ok {
width: 5%;
}
.containerBox { .containerBox {
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -63,6 +67,31 @@
color: red; color: red;
font-style: italic; font-style: italic;
} }
.div_mobile {
position: relative;
top: 7rem;
z-index: 1;
width: 98%;
height: 100%;
margin: 0.3rem;
margin-left: auto;
margin-right: auto;
}
.pieddepage {
z-index: 50;
width: 100%;
float: left;
margin-top: 10rem;
@media only screen and (min-height: 801px) {
margin-top: 35rem;
}
}
} }
@media only screen and (min-width: 601px) and (max-width: 991px) { @media only screen and (min-width: 601px) and (max-width: 991px) {
@ -129,6 +158,35 @@
color: red; color: red;
font-style: italic; font-style: italic;
} }
.img_ok {
width: 5%;
}
.div_mobile {
position: absolute;
top: 11rem;
z-index: 1;
width: 100%;
}
.pieddepage {
z-index: 50;
width: 100%;
float: left;
margin-top: 2rem;
@media only screen and (min-height: 1000px) { /* Ipaid */
margin-top: 40rem;
}
@media only screen and (min-height: 1101px) { /* Ipad Air */
margin-top: 60rem;
}
}
} }
@media only screen and (min-width: 992px) and (max-width: 1199px) { @media only screen and (min-width: 992px) and (max-width: 1199px) {
@ -196,6 +254,30 @@
color: red; color: red;
font-style: italic; font-style: italic;
} }
.img_ok {
width: 5%;
}
.div_mobile {
position: absolute;
top: 11rem;
z-index: 1;
width: 100%;
}
.pieddepage {
z-index: 50;
width: 100%;
float: left;
margin-top: 20rem;
@media only screen and (min-height: 1000px) {
margin-top: 30rem;
}
}
} }
@media only screen and (min-width: 1200px) { @media only screen and (min-width: 1200px) {
@ -240,6 +322,7 @@
border-radius: 1rem; border-radius: 1rem;
text-align: left; text-align: left;
} }
.div_row_droite { .div_row_droite {
float: right; float: right;
//border:0px solid black; //border:0px solid black;
@ -263,10 +346,10 @@
font-style: italic; font-style: italic;
} }
.div_mobile { .div_mobile {
position: absolute; position: absolute;
top: 15rem; top: 11rem;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
} }
@ -275,9 +358,19 @@
z-index: 50; z-index: 50;
width: 100%; width: 100%;
float: left; float: left;
//margin-top: 5rem; margin-top: 40rem;
margin-top: calc(100vh - 5%);
@media only screen and (min-height: 901px) {
margin-top: 18rem;
}
@media only screen and (min-height: 1201px) {
margin-top: 28rem;
}
} }
.img_ok {
max-width: 5%;
}
} }
} }