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

View File

@ -37,12 +37,12 @@ function GestionAdministrative(props) {
const columns_preinscrit = [
{ field: 'id', headerName: 'id', hide: true },
{ field: 'email', headerName: 'email', width: 200, hideable: false, flex: 1 },
{ field: 'nom', headerName: 'nom', width: 200, hide: false, editable: true },
{ field: 'prenom', headerName: 'prenom', width: 200, hide: false, editable: true },
{ field: 'nom', headerName: 'nom', width: 150, 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: 'opco', headerName: 'Centre Opco', width: 200, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', width: 200, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', width: 200, type: 'number', hideable: false, flex: 1, editable: true },
{ field: 'opco', headerName: 'Centre Opco', width: 150, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', width: 150, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', width: 150, type: 'number', hideable: false, flex: 1, editable: true },
{
field: "update", headerName: 'Mise à jour',
renderCell: (cellValues) => {
@ -191,13 +191,13 @@ function GestionAdministrative(props) {
const columns_inscrit = [
{ field: 'id', headerName: 'id', hide: true },
{ field: 'email', headerName: 'email s', width: 200, hideable: false, flex: 1, minWidth: 150, maxWidth: 300 },
{ field: 'nom', headerName: 'nom', width: 200, hide: false, editable: true, resizable: true },
{ field: 'prenom', headerName: 'prenom', width: 200, hide: false, editable: true },
{ field: 'email', headerName: 'emails', width: 200, hideable: false, flex: 1, minWidth: 150, maxWidth: 300 },
{ field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true, resizable: true },
{ field: 'prenom', headerName: 'prenom', width: 150, 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: 'modefinancement', headerName: 'Financement', width: 200, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', width: 200, type: 'number', hideable: false, flex: 1, editable: true },
{ field: 'opco', headerName: 'Centre Opco', width: 150, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', width: 150, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', width: 150, type: 'number', hideable: false, flex: 1, editable: true },
{
field: "sendmail", headerName: 'Email Confirmation',
renderCell: (cellValues) => {
@ -266,12 +266,12 @@ function GestionAdministrative(props) {
const columns_list_emargement = [
{ field: 'id', headerName: 'id', hide: true },
{ field: 'date', headerName: 'date', 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: 'prenom', headerName: 'prenom', width: 200, hide: false, editable: false },
{ field: 'matin', headerName: 'Matin', width: 200, hide: false, editable: true, type: 'boolean', },
{ field: 'apresmidi', headerName: 'Apres midi', width: 200, hide: false, editable: true, type: 'boolean', },
{ field: 'date', headerName: 'date', width: 100, hideable: false, flex: 1 },
{ field: 'email', headerName: 'email', width: 250, hideable: false, flex: 1 },
{ field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true },
{ field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: false },
{ field: 'matin', headerName: 'Matin', width: 100, hide: false, editable: true, type: 'boolean', },
{ field: 'apresmidi', headerName: 'Apres midi', width: 100, hide: false, editable: true, type: 'boolean', },
{
field: "valide", headerName: 'Valider',
renderCell: (cellValues) => {
@ -1180,6 +1180,11 @@ function GestionAdministrative(props) {
const [ActionMassListEmargement_result, setActionMassListEmargement_result] = useState();
function ActionMassListEmargement(e) {
if( selectionModel_emarg.length <= 0 ){
alert(" Selectionnez un enregistrement pour envoyer la demande d'emargement");
return;
}
var actionenmasse = ""
if (document.getElementById("actionmass_emarge")) {
actionenmasse = document.getElementById("actionmass_emarge").value;
@ -1187,7 +1192,7 @@ function GestionAdministrative(props) {
var liste_emargement_id = GetSelectedRowsEmargement();
console.log("liste_formation = "+liste_emargement_id);
console.log("liste_formation = " + liste_emargement_id);
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
@ -1216,8 +1221,6 @@ function GestionAdministrative(props) {
})
alert(" envoi des emargements");
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" }}>
<div className="div_row">
<div className="div_row_gauche">
<Button variant="contained" onClick={CreateListEmargement}>Initaliser la liste emargement</Button>
</div>
<div className="div_row_droite">
<Button variant="contained" onClick={DownloadListEmargement}>Imprimer la liste emargement</Button>
</div>
<div className="div_row" style={{"textAlign":"right","marginTop":"0.5rem"}}>
<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>
{String(CreateListEmargement_api) === "true" && <div className="okUpdateData">
La liste d'emargement a été créée
</div>}
@ -1787,6 +1789,16 @@ function GestionAdministrative(props) {
{CreateListEmargement_message}
</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%' }}>
<DataGrid
checkboxSelection
@ -1826,7 +1838,7 @@ function GestionAdministrative(props) {
<br />
<Button variant="contained" onClick={ActionMassListEmargement}>formations choisi</Button><br />
<Button className="bton_emarge" onClick={ActionMassListEmargement}>Envoyer les demandes d'emargement</Button><br />

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;
color: white;
}
.detail_class_submenu:focus {
//border: 3px dotted green;
background-color: #104277;
@ -275,6 +276,7 @@
background-color: #104277;
color: white;
}
.detail_class_submenu:focus {
//border: 3px dotted green;
background-color: #104277;
@ -454,6 +456,7 @@
background-color: #104277;
color: white;
}
.detail_class_submenu:focus {
//border: 3px dotted green;
background-color: #104277;
@ -633,6 +636,7 @@
background-color: #104277;
color: white;
}
.detail_class_submenu:focus {
//border: 3px dotted green;
background-color: #104277;
@ -724,8 +728,17 @@
padding-bottom: 5px !important;
}
.css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset{
.css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset {
border-color: white !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;
}
.img_ok {
width: 5%;
}
.containerBox {
position: relative;
display: inline-block;
@ -63,6 +67,31 @@
color: red;
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) {
@ -129,6 +158,35 @@
color: red;
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) {
@ -196,6 +254,30 @@
color: red;
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) {
@ -240,6 +322,7 @@
border-radius: 1rem;
text-align: left;
}
.div_row_droite {
float: right;
//border:0px solid black;
@ -266,7 +349,7 @@
.div_mobile {
position: absolute;
top: 15rem;
top: 11rem;
z-index: 1;
width: 100%;
}
@ -275,9 +358,19 @@
z-index: 50;
width: 100%;
float: left;
//margin-top: 5rem;
margin-top: calc(100vh - 5%);
margin-top: 40rem;
@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%;
}
}
}