21/01/23 - 17h30

recette2
cherif 2023-01-21 17:39:53 +01:00
parent 8bc86a7bf2
commit 0285813f0e
4 changed files with 175 additions and 65 deletions

View File

@ -55,6 +55,7 @@ const AddClassManual = (props) => {
const value = event.target.value;
setmydistance(value);
setdatamodification("1");
}
@ -63,6 +64,7 @@ const AddClassManual = (props) => {
const value = event.target.value;
setmytrainingsupport(value);
setdatamodification("1");
}
@ -71,6 +73,7 @@ const AddClassManual = (props) => {
const value = event.target.value;
setmycpf(value);
setdatamodification("1");
}
@ -79,6 +82,7 @@ const AddClassManual = (props) => {
const value = event.target.value;
setmycertif(value);
setdatamodification("1");
}
@ -86,12 +90,16 @@ const AddClassManual = (props) => {
const name = event.target.name;
const value = event.target.value;
setmypresence(value);
setdatamodification("1");
}
const handleChangePublished = (event) => {
const value = event.target.value;
setmypublished(value);
setdatamodification("1");
}
@ -519,10 +527,6 @@ const AddClassManual = (props) => {
}
var my_date_lieu = "";
// Verification si il y a plus de 3 mot clés separés par des ";"
const words = mots_cle.split(';');
if (words.length > 3) {
@ -582,7 +586,7 @@ const AddClassManual = (props) => {
formData.append('zone_diffusion', zone_de_diffusion);
formData.append('metier', mymetier);
formData.append('note', mynote);
formData.append('date_lieu', my_date_lieu);
formData.append('published', mypublier);
formData.append('cpf', mycpf);
@ -848,9 +852,6 @@ const AddClassManual = (props) => {
}
function change_date_lieu() {
setfield_datelieu(document.getElementById("datelieu_v2").value)
}
function change_zone_diffsion() {
setfield_zone_diffusion(document.getElementById("zone_diffusion_v2").value)
@ -920,7 +921,7 @@ const AddClassManual = (props) => {
return (
<div className="addclassmanual">
{String(props.mytrainingclass.ref).trim() !== "" && <div className="div_row_ch">
{String(props.mytrainingclass.ref).trim() !== "" && <div className="div_row_ch">
@ -955,6 +956,7 @@ const AddClassManual = (props) => {
</div>}
<div className="training_data" onChange={DataUpdated}>
<div className="training_caract">
<TextField
required
@ -1127,10 +1129,6 @@ const AddClassManual = (props) => {
</div>
<div className="training_caract">
<TextField
required
@ -1241,8 +1239,75 @@ const AddClassManual = (props) => {
/>
</div>
</div>
<div style={{ "width": "100%" }}>
{String(datamodification) === String("1") && <div className="parter_div_filtrer_row">
<div className="koUpdateData" style={{ "color": "orange", "textAlign": "center" }}> /!\ Pensez à enregistrer les modifications</div>
</div>}
{String(props.ispending) === String("0") && <div className="parter_div_filtrer_row">
{(String(datamodification) === String("1") || String(editor_tochange) === String("1")) && <div className="parter_div_filtrer_row_gauche" >
<Button variant="contained" onClick={RecordTraining} startIcon={<AiTwotoneSave />} className="bton_enreg2">ENREGISTRER LA FORMATION </Button>
</div>
}
{/*String(datamodification) === String("0") && <div className="parter_div_filtrer_row_gauche" >
<Button variant="contained" onClick={"ModifTraining"} startIcon={<AiTwotoneEdit />}>MODIFIER </Button>
</div>
*/ }
{String(datamodification) !== String("1") && String(editor_tochange) !== String("1") && <div className="parter_div_filtrer_row_droite" >
<Button variant="contained" onClick={DeleteClass} startIcon={<DeleteIcon />} className="bton_suppr2"> SUPPRIMER LA FORMATION </Button>
</div>
}
{(String(datamodification) === String("1") || String(editor_tochange) === String("1")) && <div className="parter_div_filtrer_row_droite" >
<Button variant="contained" onClick={UndoModif} startIcon={<IoArrowUndoCircle />} className="bton_suppr2"> ANNULER LES MODIFICATIONS </Button>
</div>}
</div>}
{String(props.ispending) !== String("0") && <div className="parter_div_filtrer_row">
{String(datamodification) === String("1") && <div className="parter_div_filtrer_row_gauche bton_enreg2" onClick={alertactivecompte} >
<AiTwotoneSave />ENREGISTRER
</div>
}
{String(datamodification) === String("0") && <div className="parter_div_filtrer_row_gauche" onClick={alertactivecompte}>
<AiTwotoneEdit />MODIFICATION
</div>
}
<div className="parter_div_filtrer_row_droite" >
<Button variant="outlined" color="error" onClick={alertactivecompte} startIcon={<DeleteIcon />} className="bton_suppr2"> Supprimer </Button>
</div>
</div>}
{String(myApiResponse) === String("true") && importmessage &&
<div className="parter_div_filtrer_row okUpdateData">
{importmessage}
</div>}
{String(myApiResponse) === String("false") &&
<div className="parter_div_filtrer_row koUpdateData">
{importmessage}
</div>}
</div>
<div className="training_data">

View File

@ -431,11 +431,11 @@ function CheckOut(props) {
function Ordervalidation() {
//alert(" confirmation ok");
if( String(nb_formations) === "0" ){
if (String(nb_formations) === "0") {
alert(" Vous devez choisir un nombre de formation ");
document.getElementById('div_nb_formation').style.color = "red" ;
document.getElementById('div_ttc').style.color = "red" ;
document.getElementById('div_nb_formation').style.color = "red";
document.getElementById('div_ttc').style.color = "red";
return;
}
@ -838,11 +838,17 @@ function CheckOut(props) {
const change_nb_formations = event => {
let valeur = event.target.value
//console.log(" valeur , ", valeur);
setnb_formations( event.target.value);
document.getElementById('div_nb_formation').style.color = "#104277" ;
document.getElementById('div_ttc').style.color = "#104277" ;
let valeur = event.target.value;
if (String(props.packs).toLowerCase() === String("decouverte")) {
setnb_formations("1");
}
else {
setnb_formations(event.target.value);
}
document.getElementById('div_nb_formation').style.color = "#104277";
document.getElementById('div_ttc').style.color = "#104277";
}
@ -898,10 +904,11 @@ function CheckOut(props) {
</div>
<div style={{ "width": "90%" }} id="div_nb_formation">
<div style={{ "width": "90%" }} id="div_nb_formation" className="mob_heigh">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
Nombre de formations :
</div>
{(String(props.packs).toLowerCase() !== String("decouverte")) &&
<div style={{ "textAlign": "right", "width": "50%", "float": "left" }}>
<input
value={nb_formations}
@ -909,9 +916,16 @@ function CheckOut(props) {
type="number"
min="1"
max="50"
style={{"textAlign":"center"}}
className="nb_ftion"
/>
</div>
}
{(String(props.packs).toLowerCase() === String("decouverte")) &&
<div style={{ "textAlign": "right", "width": "50%", "float": "left" }}>
1
</div>
}
</div>
@ -937,7 +951,7 @@ function CheckOut(props) {
</div>
<div style={{ "width": "90%" }} id="div_ttc">
<div style={{ "width": "90%" }} id="div_ttc">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
Total TTC :
</div>

View File

@ -166,16 +166,21 @@
.bton_suppr2 {
background: transparent;
color: red;
padding-left: 5px;
padding-right: 5px;
border-radius: 5rem;
font-size: small;
text-align: right;
height: 2.5rem;
width: 80%;
}
.bton_enreg2 {
background: green;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
text-align: right;
height: 2.5rem;
width: 80%;
color: white;
padding-left: 5px;
padding-right: 5px;
}
.tips_img_class {
@ -512,21 +517,21 @@
.bton_suppr2 {
background: transparent;
color: red;
padding-left: 10px;
padding-right: 10px;
border-radius: 5px;
padding-top: 5px;
padding-bottom: 5px;
border-radius: 5rem;
font-size: small;
text-align: right;
height: 2.5rem;
width: 80%;
}
.bton_enreg2 {
background: green;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
text-align: right;
height: 2.5rem;
width: 80%;
color: white;
padding-left: 10px;
padding-right: 10px;
border-radius: 5px;
padding-top: 5px;
padding-bottom: 5px;
}
.tips_img_class {
@ -703,6 +708,7 @@
text-align: right;
height: 2.5rem;
width: 80%;
color: white;
}
@ -922,21 +928,21 @@
.bton_suppr2 {
background: transparent;
color: red;
padding-left: 15px;
padding-right: 15px;
border-radius: 5px;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 5rem;
font-size: small;
text-align: right;
height: 2.5rem;
width: 60%;
}
.bton_enreg2 {
background: green;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
text-align: right;
height: 2.5rem;
width: 60%;
color: white;
padding-left: 15px;
padding-right: 15px;
border-radius: 5px;
padding-top: 10px;
padding-bottom: 10px;
}
.tips_img_class {
@ -1114,6 +1120,7 @@
text-align: right;
height: 2.5rem;
width: 60%;
color: white;
}
@ -1335,21 +1342,21 @@
.bton_suppr2 {
background: transparent;
color: red;
padding-left: 15px;
padding-right: 15px;
border-radius: 5px;
padding-top: 10px;
padding-bottom: 10px;
border-radius: 5rem;
font-size: small;
text-align: right;
height: 2.5rem;
width: 50%;
}
.bton_enreg2 {
background: green;
border-radius: 5rem;
font-size: small;
background: #81BC3A !important;
text-align: right;
height: 2.5rem;
width: 50%;
color: white;
padding-left: 15px;
padding-right: 15px;
border-radius: 5px;
padding-top: 10px;
padding-bottom: 10px;
}
.tips_img_class {
@ -1530,6 +1537,7 @@
text-align: right;
height: 2.5rem;
width: 50%;
color: white;
}

View File

@ -162,6 +162,15 @@
color: white;
width: 90%;
}
.nb_ftion{
text-align: center;
width: 40%;
}
.mob_heigh{
height: 5rem;
}
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
@ -319,6 +328,10 @@
color: white;
width: 80%;
}
.nb_ftion{
text-align: center;
width: 40%;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
@ -476,6 +489,11 @@
width: 80%;
}
.nb_ftion{
text-align: center;
width: 30%;
}
}
@media only screen and (min-width: 1200px) {
@ -649,9 +667,14 @@
scroll-behavior: smooth;
}
.nb_ftion{
text-align: center;
width: 20%;
}
}
// End media
}