17/11/2023 - 16h

recette2
cherif 2023-11-17 16:04:30 +01:00
parent 200a14ea23
commit ed7f18091e
9 changed files with 392 additions and 125 deletions

View File

@ -254,7 +254,7 @@ const AddClassManual = (props) => {
//document.getElementsByName("description2")[0].value = ""; //document.getElementsByName("description2")[0].value = "";
document.getElementsByName("distentiel")[0].value = ""; document.getElementsByName("distentiel")[0].value = "";
document.getElementsByName("price")[0].value = ""; document.getElementsByName("price")[0].value = "";
document.getElementsByName("domaine")[0].value = ""; document.getElementsByName("domaine")[0].value = "";
@ -1520,8 +1520,8 @@ const AddClassManual = (props) => {
/> />
</div> </div>
<div className="training_caract"> <div className="training_caract">
<TextField <TextField
required required
name="formateur_id" name="formateur_id"
@ -1876,11 +1876,12 @@ const AddClassManual = (props) => {
rows_champs_specifics.map((champ_spec) => ( rows_champs_specifics.map((champ_spec) => (
<div className="training_caract"> <div className="training_caract">
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name} id={JSON.parse(champ_spec).field_name}
label={JSON.parse(champ_spec).field_label} label={JSON.parse(champ_spec).field_label}
type="text" type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputLabelProps={{ InputLabelProps={{
shrink: true, shrink: true,
}} }}
@ -1890,7 +1891,25 @@ const AddClassManual = (props) => {
change_champs_spec_handle(e.target.value); change_champs_spec_handle(e.target.value);
//setEmployee_data_changed("1"); //setEmployee_data_changed("1");
}} }}
/> />}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
label={JSON.parse(champ_spec).field_label}
type="text"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
//setEmployee_data_changed("1");
}}
/>}
</div> </div>
))} ))}

View File

@ -20,7 +20,7 @@ import participants from "../mysy_img/participants.png";
import fileDownload from 'js-file-download' import fileDownload from 'js-file-download'
import Popup from 'reactjs-popup'; import Popup from 'reactjs-popup';
import 'reactjs-popup/dist/index.css'; import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc"; import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcAlarmClock } from "react-icons/fc";
import DatePicker from "react-datepicker"; import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css"; import "react-datepicker/dist/react-datepicker.css";
import { format } from 'date-fns' import { format } from 'date-fns'
@ -43,6 +43,8 @@ import { Fab } from "@material-ui/core";
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io"; import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai"; import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
import ToggleSwitch from "./ToggleSwitch";
const DisplayPartnerSession = (props) => { const DisplayPartnerSession = (props) => {
const history = useHistory(); const history = useHistory();
const [submenu, setsubmenu] = useState(""); const [submenu, setsubmenu] = useState("");
@ -117,7 +119,7 @@ const DisplayPartnerSession = (props) => {
{ field: 'id', headerName: 'id', hide: true }, { field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true }, { field: '_id', headerName: '_id', hide: true },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true }, { field: 'class_internal_url', headerName: 'class_internal_url', hide: true },
{ field: 'code_session', headerName: 'Code session', hide: false, flex: 1 }, { field: 'code_session', headerName: 'Code session', hide: false, flex: 1, minWidth: 150 },
{ {
field: 'statut', headerName: 'Statut', hide: true, width: datagrid_columns_size_model2, field: 'statut', headerName: 'Statut', hide: true, width: datagrid_columns_size_model2,
valueFormatter: (params) => { valueFormatter: (params) => {
@ -134,7 +136,7 @@ const DisplayPartnerSession = (props) => {
field: 'etape', headerName: 'Etape', hide: false, width: datagrid_columns_size_model2, field: 'etape', headerName: 'Etape', hide: false, width: datagrid_columns_size_model2,
}, },
{ field: 'class_external_code', headerName: 'Code Formation', align: "center", hideable: true, flex: 1, hide: false, }, { field: 'class_external_code', headerName: 'Code Formation', align: "center", hideable: true, flex: 1, hide: false, minWidth: 150 },
{ field: 'date_debut', headerName: 'Debut', hide: false, width: datagrid_columns_size_model2, }, { field: 'date_debut', headerName: 'Debut', hide: false, width: datagrid_columns_size_model2, },
{ field: 'date_fin', headerName: 'Fin', hideable: false, width: datagrid_columns_size_model2, }, { field: 'date_fin', headerName: 'Fin', hideable: false, width: datagrid_columns_size_model2, },
{ {
@ -186,6 +188,7 @@ const DisplayPartnerSession = (props) => {
{ field: 'prix_session', headerName: 'Prix', width: datagrid_columns_size_model2, align: "center", }, { field: 'prix_session', headerName: 'Prix', width: datagrid_columns_size_model2, align: "center", },
{ field: 'title', headerName: 'Formation', width: datagrid_columns_size_model1, align: "center", hide: true, hideable: true, }, { field: 'title', headerName: 'Formation', width: datagrid_columns_size_model1, align: "center", hide: true, hideable: true, },
{ field: 'domaine', headerName: 'Domaine', width: datagrid_columns_size_model1, align: "center", hide: true, hideable: true, }, { field: 'domaine', headerName: 'Domaine', width: datagrid_columns_size_model1, align: "center", hide: true, hideable: true, },
{ field: 'published', headerName: 'publié', width: datagrid_columns_size_model1, align: "center", hide: true, hideable: true, },
{ field: 'duration', headerName: 'Durée', width: datagrid_columns_size_model2, align: "center", }, { field: 'duration', headerName: 'Durée', width: datagrid_columns_size_model2, align: "center", },
{ {
@ -1155,7 +1158,7 @@ const DisplayPartnerSession = (props) => {
const [addOneSession, setaddOneSession] = useState(""); const [addOneSession, setaddOneSession] = useState("");
function submenu_add_one_session() { function submenu_add_one_session() {
setaddOneSession("1"); setaddOneSession("1");
setEdite_session("0"); setEdite_session("0");
@ -5877,7 +5880,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
className="displaypartnersession" className="displaypartnersession"
> >
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width"> <DialogContent className="DialogContent_width">
<DialogContentText> <DialogContentText>
{Dialog_2_message} {Dialog_2_message}
@ -5889,7 +5892,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
Etape Etape
</div> </div>
{rowss && String(session_selected_row_id).length > 0 && <div className="div_row_droite_dialog_session" style={{ "textAlign": 'right' }}> {rowss && String(session_selected_row_id).length > 0 && <div className="div_row_droite_dialog_session" style={{ "textAlign": 'right' }}>
{JSON.parse(rowss[session_selected_row_id]).etape} <FcAlarmClock /> {JSON.parse(rowss[session_selected_row_id]).session_etape}
</div>} </div>}
</div> </div>
@ -5975,6 +5978,24 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
</div>} </div>}
</div> </div>
<div className="div_row_dialog">
<div className="div_row_gauche_dialog_session" style={{ "textAlign": 'left' }}>
Publié
</div>
{rowss && String(session_selected_row_id).length > 0 && <div className="div_row_droite_dialog_session" style={{ "textAlign": 'right' }}>
<ToggleSwitch id="toggleSwitch" name="toggleSwitch" checked={JSON.parse(rowss[session_selected_row_id]).class_published} />
</div>}
</div>
<div className="div_row_dialog">
<div className="div_row_gauche_dialog_session" style={{ "textAlign": 'left' }}>
Exclu BPF
</div>
{rowss && String(session_selected_row_id).length > 0 && <div className="div_row_droite_dialog_session" style={{ "textAlign": 'right' }}>
<ToggleSwitch id="toggleSwitch" name="toggleSwitch" checked={JSON.parse(rowss[session_selected_row_id]).is_bpf} />
</div>}
</div>
@ -6290,6 +6311,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
duration: JSON.parse(item).duration_concat, duration: JSON.parse(item).duration_concat,
class_external_code: JSON.parse(item).class_external_code, class_external_code: JSON.parse(item).class_external_code,
prix_session: JSON.parse(item).prix_session, prix_session: JSON.parse(item).prix_session,
published: JSON.parse(item).class_published,
} }
))} ))}
@ -6304,8 +6326,6 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
//handleClick_edit_session_From_Line(newSelectionModel.row.id); //handleClick_edit_session_From_Line(newSelectionModel.row.id);
setsession_selected_row_id(newSelectionModel.row.id); setsession_selected_row_id(newSelectionModel.row.id);
setDialog_2_message(String(JSON.parse(rowss[newSelectionModel.row.id]).title)); setDialog_2_message(String(JSON.parse(rowss[newSelectionModel.row.id]).title));
setDialog_2_open(true); setDialog_2_open(true);
@ -7268,33 +7288,57 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
<div className="div_row"> <div className="div_row">
<hr /> <hr />
</div> </div>
<div className="div_row" style={{ "padding": "5px" }}> Vos champs spécifiques<br /> <div className="div_row" style={{ "padding": "5px" }}> Vos champs spécifiques <br />
{rows_champs_specifics && {rows_champs_specifics &&
rows_champs_specifics.map((champ_spec) => ( rows_champs_specifics.map((champ_spec) => (
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br /> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
InputLabelProps={{ {String(JSON.parse(champ_spec).field_type) === "float" &&
shrink: true, <TextField
}} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputLabelProps={{
shrink: true,
}}
className="disabled_style" className="disabled_style"
onChange={(e) => { onChange={(e) => {
change_champs_spec_handle(e.target.value); change_champs_spec_handle(e.target.value);
// setEmployee_data_changed("1"); // setEmployee_data_changed("1");
}} }}
//onChange={change_champs_spec_handle} />}
{String(JSON.parse(champ_spec).field_type) === "string" &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
type="text"
InputLabelProps={{
shrink: true,
}}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
// setEmployee_data_changed("1");
}}
/>}
/>
</div> </div>
))} ))}
@ -7888,26 +7932,47 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br /> <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" &&
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} <TextField
required sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name={JSON.parse(champ_spec).field_name} required
id={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
InputLabelProps={{ InputLabelProps={{
shrink: true, shrink: true,
}} }}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
className="disabled_style enable_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
// setEmployee_data_changed("1");
}}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" &&
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
InputLabelProps={{
shrink: true,
}}
className="disabled_style enable_style" className="disabled_style enable_style"
onChange={(e) => { onChange={(e) => {
change_champs_spec_handle(e.target.value); change_champs_spec_handle(e.target.value);
// setEmployee_data_changed("1"); // setEmployee_data_changed("1");
}} }}
//onChange={change_champs_spec_handle}
/>}
/>
</div> </div>
))} ))}

View File

@ -77,12 +77,12 @@ const DisplayPartnerStagiaires = (props) => {
const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(80); const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(80);
const columns = [ const columns = [
{ field: '_id', headerName: '_id', hide: true, editable: false}, { field: '_id', headerName: '_id', hide: true, editable: false },
{ field: 'session_id', headerName: 'session_id', hide: true, editable: false}, { field: 'session_id', headerName: 'session_id', hide: true, editable: false },
{ field: 'id', headerName: 'id', hide: true }, { field: 'id', headerName: 'id', hide: true },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, editable: false}, { field: 'class_internal_url', headerName: 'class_internal_url', hide: true, editable: false },
{ field: 'email', headerName: 'email', width: 150, hideable: false,editable: false }, { field: 'email', headerName: 'email', width: 150, hideable: false, editable: false },
{ field: 'nom', headerName: 'nom', width: 150, hide: false, editable: false, editable: false }, { field: 'nom', headerName: 'nom', width: 150, hide: false, editable: false, editable: false },
{ field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: false }, { field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: false },
{ field: 'employeur', headerName: 'Employeur', width: 150, hide: true, editable: false }, { field: 'employeur', headerName: 'Employeur', width: 150, hide: true, editable: false },
@ -101,8 +101,8 @@ const DisplayPartnerStagiaires = (props) => {
return "???"; return "???";
}, },
}, },
{ field: 'code_session', headerName: 'Code session', hideable: true, editable: false}, { field: 'code_session', headerName: 'Code session', hideable: true, editable: false },
{ field: 'title', headerName: 'Formation', width: datagrid_columns_size_model1, align: "center", hideable: true, editable: false}, { field: 'title', headerName: 'Formation', width: datagrid_columns_size_model1, align: "center", hideable: true, editable: false },
{ {
field: 'distantiel', headerName: 'Distantiel', hideable: false, width: datagrid_columns_size_model2, field: 'distantiel', headerName: 'Distantiel', hideable: false, width: datagrid_columns_size_model2,
valueFormatter: (params) => { valueFormatter: (params) => {
@ -126,10 +126,10 @@ const DisplayPartnerStagiaires = (props) => {
}, },
}, },
{ field: 'domaine', headerName: 'Domaine', width: datagrid_columns_size_model2, align: "center", hide: true, hideable: true, editable: false}, { field: 'domaine', headerName: 'Domaine', width: datagrid_columns_size_model2, align: "center", hide: true, hideable: true, editable: false },
{ field: 'date_debut', headerName: 'Du', width: datagrid_columns_size_model1, hideable: true, editable: false}, { field: 'date_debut', headerName: 'Du', width: datagrid_columns_size_model1, hideable: true, editable: false },
{ field: 'date_fin', headerName: 'Au', width: datagrid_columns_size_model1, hideable: true, editable: false}, { field: 'date_fin', headerName: 'Au', width: datagrid_columns_size_model1, hideable: true, editable: false },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true, editable: false}, { field: 'class_internal_url', headerName: 'class_internal_url', hide: true, editable: false },
{ {
field: "Detail", headerName: 'Voir detail', field: "Detail", headerName: 'Voir detail',
renderCell: (cellValues) => { renderCell: (cellValues) => {
@ -325,7 +325,7 @@ const DisplayPartnerStagiaires = (props) => {
} }
}, },
{ {
field: "Imprimer", headerName: 'Imprimer detail', field: "Imprimer", headerName: 'Imprimer detail',
renderCell: (cellValues) => { renderCell: (cellValues) => {
@ -4271,8 +4271,8 @@ const DisplayPartnerStagiaires = (props) => {
onRowDoubleClick={(newSelectionModel) => { onRowDoubleClick={(newSelectionModel) => {
handleClick_edit_session_From_Line(newSelectionModel.row.id); handleClick_edit_session_From_Line(newSelectionModel.row.id);
}} }}
rowsPerPageOptions={[10]} rowsPerPageOptions={[10]}
disableSelectionOnClick disableSelectionOnClick
@ -4753,8 +4753,30 @@ const DisplayPartnerStagiaires = (props) => {
rows_champs_specifics.map((champ_spec) => ( rows_champs_specifics.map((champ_spec) => (
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
InputLabelProps={{
shrink: true,
}}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
setparticipant_data_changed("1");
}}
//onChange={change_champs_spec_handle}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -4768,12 +4790,13 @@ const DisplayPartnerStagiaires = (props) => {
className="disabled_style" className="disabled_style"
onChange={(e) => { onChange={(e) => {
change_champs_spec_handle(e.target.value); change_champs_spec_handle(e.target.value);
//setEmployee_data_changed("1"); setparticipant_data_changed("1");
}} }}
//onChange={change_champs_spec_handle} //onChange={change_champs_spec_handle}
/> />}
</div> </div>
))} ))}
@ -5304,7 +5327,29 @@ const DisplayPartnerStagiaires = (props) => {
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
InputLabelProps={{
shrink: true,
}}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
setparticipant_data_changed("1");
}}
//onChange={change_champs_spec_handle}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -5323,7 +5368,8 @@ const DisplayPartnerStagiaires = (props) => {
//onChange={change_champs_spec_handle} //onChange={change_champs_spec_handle}
/> />}
</div> </div>
))} ))}

View File

@ -115,25 +115,25 @@ const Employes = (props) => {
{ field: 'profil', headerName: 'profil', width: 150, hide: false, }, { field: 'profil', headerName: 'profil', width: 150, hide: false, },
{ field: 'fonction', headerName: 'Fonction', width: 150, hide: false, }, { field: 'fonction', headerName: 'Fonction', width: 150, hide: false, },
{ {
field: "Detail", headerName: 'Voir detail', field: "Detail", headerName: 'Voir detail',
renderCell: (cellValues) => { renderCell: (cellValues) => {
return ( return (
<Button <Button
onClick={(event) => { onClick={(event) => {
handleClick_edit_employee_From_Line(cellValues.row.id); handleClick_edit_employee_From_Line(cellValues.row.id);
}} }}
> >
<FcViewDetails /> <FcViewDetails />
</Button> </Button>
); );
} }
}, },
{ {
field: "delete", headerName: 'Supprimer', field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => { renderCell: (cellValues) => {
@ -4216,8 +4216,8 @@ const Employes = (props) => {
onRowDoubleClick={(newSelectionModel) => { onRowDoubleClick={(newSelectionModel) => {
handleClick_edit_employee_From_Line(newSelectionModel.row.id); handleClick_edit_employee_From_Line(newSelectionModel.row.id);
}} }}
rowsPerPageOptions={[10]} rowsPerPageOptions={[10]}
disableSelectionOnClick disableSelectionOnClick
@ -4830,7 +4830,29 @@ const Employes = (props) => {
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br /> <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputLabelProps={{
shrink: true,
}}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
setEmployee_data_changed("1");
}}
//onChange={change_champs_spec_handle}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -4849,7 +4871,8 @@ const Employes = (props) => {
//onChange={change_champs_spec_handle} //onChange={change_champs_spec_handle}
/> />}
</div> </div>
))} ))}
@ -5467,7 +5490,29 @@ const Employes = (props) => {
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br /> <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputLabelProps={{
shrink: true,
}}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle(e.target.value);
setEmployee_data_changed("1");
}}
//onChange={change_champs_spec_handle}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -5486,7 +5531,8 @@ const Employes = (props) => {
//onChange={change_champs_spec_handle} //onChange={change_champs_spec_handle}
/> />}
</div> </div>
))} ))}

View File

@ -6674,7 +6674,26 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br /> <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputLabelProps={{
shrink: true,
}}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle_session(e.target.value);
// setEmployee_data_changed("1");
}}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -6690,10 +6709,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
change_champs_spec_handle_session(e.target.value); change_champs_spec_handle_session(e.target.value);
// setEmployee_data_changed("1"); // setEmployee_data_changed("1");
}} }}
//onChange={change_champs_spec_handle} />}
/>
</div> </div>
))} ))}
@ -7440,7 +7457,26 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<br /> <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputLabelProps={{
shrink: true,
}}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle_session(e.target.value);
// setEmployee_data_changed("1");
}}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -7454,12 +7490,10 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
className="disabled_style" className="disabled_style"
onChange={(e) => { onChange={(e) => {
change_champs_spec_handle_session(e.target.value); change_champs_spec_handle_session(e.target.value);
IssessionChanged(); // setEmployee_data_changed("1");
}} }}
//onChange={change_champs_spec_handle} />}
/>
</div> </div>
))} ))}
@ -8747,7 +8781,29 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
<div className="session_caract"> {JSON.parse(champ_spec).field_label} <br /> <div className="session_caract"> {JSON.parse(champ_spec).field_label} <br />
<TextField {String(JSON.parse(champ_spec).field_type) === "float" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
InputLabelProps={{
shrink: true,
}}
type="number"
inputProps={{ min: "1", max: "999999", step: "1" }}
className="disabled_style"
onChange={(e) => {
change_champs_spec_handle_stagiaire(e.target.value);
setparticipant_data_changed("1");
}}
//onChange={change_champs_spec_handle}
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
@ -8766,7 +8822,8 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
//onChange={change_champs_spec_handle} //onChange={change_champs_spec_handle}
/> />}
</div> </div>
))} ))}

View File

@ -759,16 +759,16 @@ function Inscription_Information(props) {
for (let i = 0; i < rows_champs_specifics.length; i++) { for (let i = 0; i < rows_champs_specifics.length; i++) {
var field_name = JSON.parse(rows_champs_specifics[i]).field_name; var field_name = JSON.parse(rows_champs_specifics[i]).field_name;
var field_type = JSON.parse(rows_champs_specifics[i]).field_type; var field_type = JSON.parse(rows_champs_specifics[i]).field_type;
var field_label = JSON.parse(rows_champs_specifics[i]).field_label; var field_label = JSON.parse(rows_champs_specifics[i]).field_label;
var is_mandatory = JSON.parse(rows_champs_specifics[i]).is_mandatory; var is_mandatory = JSON.parse(rows_champs_specifics[i]).is_mandatory;
if (document.getElementsByName(String(field_name))[0]) { if (document.getElementsByName(String(field_name))[0]) {
var field_value = document.getElementsByName(String(field_name))[0].value; var field_value = document.getElementsByName(String(field_name))[0].value;
var new_val = { 'field_name': field_name, 'field_value': field_value, 'field_type':field_type, 'field_label':field_label, 'is_mandatory':is_mandatory } var new_val = { 'field_name': field_name, 'field_value': field_value, 'field_type': field_type, 'field_label': field_label, 'is_mandatory': is_mandatory }
var johnIndex = findIndexByProperty(spec_field_updated_values, 'field_name', field_name); var johnIndex = findIndexByProperty(spec_field_updated_values, 'field_name', field_name);
if (johnIndex > -1) { if (johnIndex > -1) {
spec_field_updated_values[johnIndex] = new_val; spec_field_updated_values[johnIndex] = new_val;
@ -961,22 +961,46 @@ function Inscription_Information(props) {
{rows_champs_specifics && {rows_champs_specifics &&
rows_champs_specifics.filter((spec_field) => JSON.parse(spec_field).is_public === "1").map((champ_spec) => ( rows_champs_specifics.filter((spec_field) => JSON.parse(spec_field).is_public === "1").map((champ_spec) => (
<TextField <div>
{String(JSON.parse(champ_spec).field_type) === "float" && <TextField
name={JSON.parse(champ_spec).field_name} name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name} id={JSON.parse(champ_spec).field_name}
label={JSON.parse(champ_spec).field_label} label={JSON.parse(champ_spec).field_label}
className="texte_area" className="texte_area"
sx={{ m: 1, width: '48%' }} sx={{ m: 1, width: '48%' }}
InputProps={{ type="number"
startAdornment: ( inputProps={{ min: "1", max: "999999", step: "1" }}
<InputAdornment position="start"> InputProps={{
<AssignmentSharpIcon /> startAdornment: (
</InputAdornment> <InputAdornment position="start">
), <AssignmentSharpIcon />
}} </InputAdornment>
variant="standard" ),
/> }}
variant="standard"
/>}
{String(JSON.parse(champ_spec).field_type) === "string" && <TextField
name={JSON.parse(champ_spec).field_name}
id={JSON.parse(champ_spec).field_name}
label={JSON.parse(champ_spec).field_label}
className="texte_area"
inputProps={{ min: "1", max: "999999", step: "1" }}
InputProps={{
startAdornment: (
<InputAdornment position="start">
<AssignmentSharpIcon />
</InputAdornment>
),
}}
variant="standard"
/>}
</div>
))} ))}

View File

@ -431,7 +431,7 @@ const Module_Agenda = (props) => {
setagenda_owner_name(nom_prenom); setagenda_owner_name(nom_prenom);
if (String(p_filtre1) === "ressource_humaine") if (String(p_filtre1) === "ressource_humaine")
setagenda_owner_type("Eployé"); setagenda_owner_type("Employé");
else if (String(p_filtre1) === "ressource_materielle") else if (String(p_filtre1) === "ressource_materielle")
setagenda_owner_type("Materiel"); setagenda_owner_type("Materiel");
@ -459,7 +459,10 @@ const Module_Agenda = (props) => {
const [events, setEvents] = useState([]); const [events, setEvents] = useState([]);
const handleSelect = (info) => { const handleSelect = (info) => {
if( String(selected_employee_id).length < 2 ){
alert(" Vous devez choisir un employé ou un materiel");
return;
}
if (String(props.write_access) !== "1") { if (String(props.write_access) !== "1") {
// Pas d'acces en ecriture. // Pas d'acces en ecriture.
return; return;
@ -506,6 +509,10 @@ const Module_Agenda = (props) => {
const handleEventClick = (arg) => { const handleEventClick = (arg) => {
if( String(selected_employee_id).length < 2 ){
alert(" Vous devez choisir un employé ou un materiel");
return;
}
setp_detail_title(arg.event.title) setp_detail_title(arg.event.title)
setp_detail_start(arg.event.start) setp_detail_start(arg.event.start)
@ -599,6 +606,10 @@ const Module_Agenda = (props) => {
var local_related_collection = p_filtre1; var local_related_collection = p_filtre1;
if( String(selected_employee_id).length < 2 ){
alert(" Vous devez choisir un employé ou un materiel");
return;
}
if (moment(endDate) <= moment(startDate)) { if (moment(endDate) <= moment(startDate)) {
alert(" Les dates de début et de fin sont incohérentes"); alert(" Les dates de début et de fin sont incohérentes");

View File

@ -277,8 +277,6 @@ const Partner_Configuration_Session_Steps = (props) => {
if (document.getElementsByName("detail_config_point")[0]) { if (document.getElementsByName("detail_config_point")[0]) {
console.log(" bbb");
document.getElementsByName("detail_config_point")[0].disabled = true; document.getElementsByName("detail_config_point")[0].disabled = true;
document.getElementsByName("detail_config_point")[0].style.backgroundColor = "#ECEFF1"; document.getElementsByName("detail_config_point")[0].style.backgroundColor = "#ECEFF1";
} }

View File

@ -1857,7 +1857,7 @@
border-width: 0.01rem; border-width: 0.01rem;
width: 100%; width: 100%;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
border-radius: 1rem; border-radius: 2rem;
} }
.div_row_gauche { .div_row_gauche {
@ -2456,6 +2456,7 @@
.div_row_gauche_dialog_session { .div_row_gauche_dialog_session {
width: 30%; width: 30%;
float: left; float: left;
font-weight: 700;
} }
.div_row_droite_dialog_session { .div_row_droite_dialog_session {