13/01/22 à 20h

recette2
cherif 2023-01-13 20:16:14 +01:00
parent 87828d0ac1
commit d9d8746454
6 changed files with 166 additions and 41 deletions

View File

@ -19,6 +19,8 @@ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
import { RichTextEditor } from '@mantine/rte'; import { RichTextEditor } from '@mantine/rte';
import { Editor } from '@tinymce/tinymce-react'; import { Editor } from '@tinymce/tinymce-react';
import { IoArrowUndoCircle } from "react-icons/io5"; import { IoArrowUndoCircle } from "react-icons/io5";
import { GrUserAdmin, GrOrderedList } from "react-icons/gr";
import GestionAdministrative from "./GestionAdministrative"; import GestionAdministrative from "./GestionAdministrative";
@ -354,7 +356,7 @@ const AddClassManual = (props) => {
if (mylocaltraining.support) { if (mylocaltraining.support) {
setmytrainingsupport(mylocaltraining.support); setmytrainingsupport(mylocaltraining.support);
} }
else{ else {
setmytrainingsupport("n/a"); setmytrainingsupport("n/a");
} }
@ -911,28 +913,45 @@ const AddClassManual = (props) => {
]; ];
function retourList() {
props.closeTrainingForm();
}
return ( return (
<div className="addclassmanual"> <div className="addclassmanual">
<div className="div_row_ch">
<div className="row_block zone_retour_liste" onClick={retourList}>
<Button variant="contained" color="success" className="bton_retour_list">
Retour liste formations &nbsp; <GrOrderedList />
</Button>
</div>
<div className="row_block zone_gestion_admin">
<Button variant="contained" color="success" className="bton_gestion_admin"
onClick={(e) => {
e.preventDefault();
window.open(
"/GestionAdministrative/" + displayedinternalurl,
'_blank'
);
}}>
GESTION ADMINISTRATIVE &nbsp; <GrUserAdmin />
</Button>
</div>
<div style={{ "width": "100%", "textAlign": "right" }}>
<Button variant="contained" color="success" className="bton_inscris"
style={{
'borderRadius': "5rem", "width": "100%",
fontSize: "small", padding: "0.5rem",
"width": "60% !important", background: "#81BC3A"
}}
onClick={(e) => {
e.preventDefault();
window.open(
"/GestionAdministrative/" + displayedinternalurl,
'_blank'
);
}}>
GESTION ADMINISTRATIVE
</Button>
</div> </div>
<div className="training_data" onChange={DataUpdated}> <div className="training_data" onChange={DataUpdated}>
@ -1460,7 +1479,7 @@ const AddClassManual = (props) => {
</div> </div>
</div> </div>
{/* <div className="training_text"> {/* <div className="training_text">
<div className="plus_produit_desabled" onChange={DataUpdated}> <div className="plus_produit_desabled" onChange={DataUpdated}>
<div className="titre_training_text"> Date et lieu de formation</div> <div className="titre_training_text"> Date et lieu de formation</div>
<textarea style={{ "width": "100%", "resize": "none", "fontSize": "13px", "height": "150px" }} <textarea style={{ "width": "100%", "resize": "none", "fontSize": "13px", "height": "150px" }}

View File

@ -10,7 +10,7 @@ import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import Footer from "./Fotter"; import Footer from "./Fotter";
import tick_ko from "../mysy_img/tick_KO.png"; import tick_ko from "../mysy_img/tick_KO.png";
import { AiFillCloseCircle, } from "react-icons/ai"; import { AiFillCloseCircle, } from "react-icons/ai";
import parse from 'html-react-parser' import parse from 'html-react-parser'
import { BsEye, BsFileText } from "react-icons/bs"; import { BsEye, BsFileText } from "react-icons/bs";
@ -211,17 +211,17 @@ const DistplayPartnerTraningsPage = (props) => {
function Visualiser(event, cellValues) { function Visualiser(event, cellValues) {
window.open( window.open(
"/Display-Detail-formation/" + cellValues.row.internal_url , "/Display-Detail-formation/" + cellValues.row.internal_url,
'_blank' '_blank'
); );
} }
function handleClickManagement(event, cellValues){ function handleClickManagement(event, cellValues) {
window.open( window.open(
"/GestionAdministrative/" + cellValues.row.internal_url , "/GestionAdministrative/" + cellValues.row.internal_url,
'_blank' '_blank'
); );
} }
@ -442,10 +442,11 @@ const DistplayPartnerTraningsPage = (props) => {
*/} */}
{updatetraining && <div> {updatetraining && <div>
<div className='detail_training'> <div className='detail_training'>
<TrainingForm mytrainingclass={{ <TrainingForm mytrainingclass={{
'ref': reftrainingtoupdate, 'class_external_code': externalcodetraining_toupdate 'ref': reftrainingtoupdate, 'class_external_code': externalcodetraining_toupdate
}} ispending={props.ispending} currentpack={props.currentpack} /> }} ispending={props.ispending} currentpack={props.currentpack} closeTrainingForm={closeTrainingForm}/>
</div> </div>

View File

@ -940,6 +940,7 @@ function GestionAdministrative(props) {
setselectedCertif(); setselectedCertif();
seturlpreview_certif(); seturlpreview_certif();
setdisplay_detail_insc(); setdisplay_detail_insc();
setCreateSessionFormation_api();
var tab_date = []; var tab_date = [];
@ -1044,6 +1045,7 @@ function GestionAdministrative(props) {
function CreateSessionFormation() { function CreateSessionFormation() {
var form = new FormData(); var form = new FormData();
var nb_participant = "0"; var nb_participant = "0";
var prix_session;
if (mysession.length <= 0) { if (mysession.length <= 0) {
alert(" Vous devez choisir une session"); alert(" Vous devez choisir une session");
@ -1059,6 +1061,15 @@ function GestionAdministrative(props) {
return; return;
} }
prix_session = ""
if (document.getElementById("prix_session") && document.getElementById("prix_session").value != "") {
prix_session = document.getElementById("prix_session").value;
}
if (prix_session.trim() == "") {
alert(" Le prix de la session est vide");
return;
}
var presentiel = "0" var presentiel = "0"
presentiel = "" presentiel = ""
if (document.getElementById("presentiel") && document.getElementById("presentiel").value != "") { if (document.getElementById("presentiel") && document.getElementById("presentiel").value != "") {
@ -1121,6 +1132,7 @@ function GestionAdministrative(props) {
form.append("formation_session_id", mysession); form.append("formation_session_id", mysession);
form.append("date_debut", format(SessionstartDate, 'dd/MM/yyyy kk:mm:ss')); form.append("date_debut", format(SessionstartDate, 'dd/MM/yyyy kk:mm:ss'));
form.append("date_fin", format(SessionendDate, 'dd/MM/yyyy kk:mm:ss')); form.append("date_fin", format(SessionendDate, 'dd/MM/yyyy kk:mm:ss'));
form.append("prix_session", prix_session);
form.append("nb_participant", nb_participant); form.append("nb_participant", nb_participant);
form.append("presentiel", presentiel); form.append("presentiel", presentiel);
form.append("distantiel", distantiel); form.append("distantiel", distantiel);
@ -1149,6 +1161,7 @@ function GestionAdministrative(props) {
setCreateSessionFormation_result(res.data.message); setCreateSessionFormation_result(res.data.message);
setsessionChanged(false); setsessionChanged(false);
desableSessionFields(); desableSessionFields();
GetCurrentClass_trainingsession();
} }
else { else {
@ -1227,6 +1240,10 @@ function GestionAdministrative(props) {
if (mylocaltraining.nb_participant) if (mylocaltraining.nb_participant)
document.getElementsByName("nb_participant")[0].value = mylocaltraining.nb_participant; document.getElementsByName("nb_participant")[0].value = mylocaltraining.nb_participant;
document.getElementsByName("prix_session")[0].value = "";
if (mylocaltraining.prix_session)
document.getElementsByName("prix_session")[0].value = mylocaltraining.prix_session;
document.getElementsByName("distantiel")[0].value = ""; document.getElementsByName("distantiel")[0].value = "";
if (mylocaltraining.distantiel) if (mylocaltraining.distantiel)
document.getElementsByName("distantiel")[0].value = mylocaltraining.distantiel; document.getElementsByName("distantiel")[0].value = mylocaltraining.distantiel;
@ -1389,6 +1406,9 @@ function GestionAdministrative(props) {
document.getElementsByName("nb_participant")[0].disabled = true; document.getElementsByName("nb_participant")[0].disabled = true;
document.getElementsByName("nb_participant")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("nb_participant")[0].style.backgroundColor = "#ECEFF1";
document.getElementsByName("prix_session")[0].disabled = true;
document.getElementsByName("prix_session")[0].style.backgroundColor = "#ECEFF1";
document.getElementsByName("presentiel")[0].disabled = true; document.getElementsByName("presentiel")[0].disabled = true;
document.getElementsByName("presentiel")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("presentiel")[0].style.backgroundColor = "#ECEFF1";
@ -1430,6 +1450,10 @@ function GestionAdministrative(props) {
document.getElementsByName("nb_participant")[0].disabled = false; document.getElementsByName("nb_participant")[0].disabled = false;
document.getElementsByName("nb_participant")[0].style.backgroundColor = "#FFFFFF"; document.getElementsByName("nb_participant")[0].style.backgroundColor = "#FFFFFF";
document.getElementsByName("prix_session")[0].disabled = false;
document.getElementsByName("prix_session")[0].style.backgroundColor = "#FFFFFF";
document.getElementsByName("presentiel")[0].disabled = false; document.getElementsByName("presentiel")[0].disabled = false;
document.getElementsByName("presentiel")[0].style.backgroundColor = "#FFFFFF"; document.getElementsByName("presentiel")[0].style.backgroundColor = "#FFFFFF";
@ -1452,6 +1476,8 @@ function GestionAdministrative(props) {
document.getElementsByName("nb_participant")[0].value = ""; document.getElementsByName("nb_participant")[0].value = "";
document.getElementsByName("prix_session")[0].value = "";
document.getElementsByName("presentiel")[0].value = ""; document.getElementsByName("presentiel")[0].value = "";
document.getElementsByName("distantiel")[0].value = ""; document.getElementsByName("distantiel")[0].value = "";
@ -1469,7 +1495,7 @@ function GestionAdministrative(props) {
if (document.getElementsByName("formateur")[0]) if (document.getElementsByName("formateur")[0])
trainer = document.getElementsByName("formateur")[0].value; trainer = document.getElementsByName("formateur")[0].value;
if( trainer == ""){ if (trainer == "") {
alert(" Aucun formateur pour cette session "); alert(" Aucun formateur pour cette session ");
return; return;
} }
@ -1501,7 +1527,7 @@ function GestionAdministrative(props) {
if (document.getElementsByName("formateur")[0]) if (document.getElementsByName("formateur")[0])
trainer = document.getElementsByName("formateur")[0].value; trainer = document.getElementsByName("formateur")[0].value;
if( trainer == ""){ if (trainer == "") {
alert(" Aucun formateur pour cette session "); alert(" Aucun formateur pour cette session ");
return; return;
} }
@ -1810,6 +1836,7 @@ function GestionAdministrative(props) {
setliste_sessions_file_change_result(result['message']); setliste_sessions_file_change_result(result['message']);
setliste_sessions_file_change_api("true"); setliste_sessions_file_change_api("true");
GetCurrentClass_trainingsession(); GetCurrentClass_trainingsession();
} }
else { else {
setliste_sessions_file_change_message(result['message']); setliste_sessions_file_change_message(result['message']);
@ -2271,7 +2298,7 @@ function GestionAdministrative(props) {
{(JSON.parse(session).date_debut).substring(0, 10)} au {(JSON.parse(session).date_fin).substring(0, 10)} - {(JSON.parse(session).date_debut).substring(0, 10)} au {(JSON.parse(session).date_fin).substring(0, 10)} -
{(JSON.parse(session).distantiel) === "1" && " A Distance - "} {(JSON.parse(session).distantiel) === "1" && " A Distance - "}
{(JSON.parse(session).presentiel) === "1" && " En Présentiel - "+(JSON.parse(session).adresse)} &nbsp;{(JSON.parse(session).code_postal) } {(JSON.parse(session).presentiel) === "1" && " En Présentiel - " + (JSON.parse(session).adresse)} &nbsp;{(JSON.parse(session).code_postal)}
</option> </option>
@ -2469,6 +2496,21 @@ function GestionAdministrative(props) {
/> />
</div> </div>
<div className="session_caract"> Prix session <br />
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="prix_session"
id="prix_session"
type="number"
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "1", max: "1000", step: "1" }}
disabled={false}
className="disabled_style"
/>
</div>
<div className="div_row" style={{ "border": "None" }}> <div className="div_row" style={{ "border": "None" }}>
<div className="session_caract"> Date Debut des inscriptions * <div className="session_caract"> Date Debut des inscriptions *

View File

@ -767,7 +767,7 @@ function Inscription_Information(props) {
))} ))}
</select> </select>
</div> </div>
<div className="okUpdateData"><i> *Choisir "00-Inconnu" si vous ne le connaissez pas. </i> <div className="okUpdateData"><i> *Laisser "Choisir" si vous ne le connaissez pas. </i>
</div> </div>
</div> </div>

View File

@ -1375,7 +1375,66 @@
padding-left: 5px; padding-left: 5px;
} }
.div_row_ch{
width: 100%;
display: flex;
flex-direction: row;
align-items: flex-end;
padding: 0px;
border: #104277;
padding-bottom: 20px;
padding-top: 2rem;
height: 2rem;
text-transform: uppercase;
}
.row_block{
width: 50%;
}
.zone_gestion_admin{
border-radius: 5rem;
font-size: small;
text-align: right;
height: 2.5rem;
}
.bton_gestion_admin{
border-radius: 5rem;
font-size: small;
background: #81BC3A!important;
text-align: right;
height: 2.5rem;
width: 50%;
}
.zone_retour_liste{
border-radius: 5rem;
font-size: small;
text-align: left;
height: 2.5rem;
}
.bton_retour_list{
border-radius: 5rem;
font-size: small;
background: white!important;
text-align: left;
border: solid 1px;
height: 2.5rem;
width: 50%;
}
} }
// - end media
} }
.MuiMenuItem-root { .MuiMenuItem-root {

View File

@ -114,6 +114,7 @@
} }
.parter_div_filtrer_center { .parter_div_filtrer_center {
cursor: pointer;
border-width: 0.01rem; border-width: 0.01rem;
width: 50%; width: 50%;
border-radius: 1rem; border-radius: 1rem;
@ -299,6 +300,7 @@
} }
.parter_div_filtrer_center { .parter_div_filtrer_center {
cursor: pointer;
border-width: 0.01rem; border-width: 0.01rem;
width: 50%; width: 50%;
border-radius: 1rem; border-radius: 1rem;
@ -485,6 +487,7 @@
} }
.parter_div_filtrer_center { .parter_div_filtrer_center {
cursor: pointer;
border-width: 0.01rem; border-width: 0.01rem;
width: 50%; width: 50%;
border-radius: 1rem; border-radius: 1rem;
@ -672,6 +675,7 @@
} }
.parter_div_filtrer_center { .parter_div_filtrer_center {
cursor: pointer;
border-width: 0.01rem; border-width: 0.01rem;
width: 50%; width: 50%;
border-radius: 1rem; border-radius: 1rem;