02/02/2024 - 17h

recette2
cherif 2024-02-02 17:07:03 +01:00
parent 46f393c147
commit 8a2091d1ab
4 changed files with 315 additions and 494 deletions

View File

@ -383,6 +383,8 @@ const Config_Documents = (props) => {
const [p_one_detail_type_doc, setp_one_detail_type_doc] = useState("");
const [p_one_detail_duplicate, setp_one_detail_duplicate] = useState("");
const [p_one_detail_courrier_template_type_document_ref_interne, setp_one_detail_courrier_template_type_document_ref_interne] = useState("");
function clear_detail_fields() {
setp_detail_cible("");
@ -401,6 +403,9 @@ const Config_Documents = (props) => {
setp_one_detail_nom("");
setp_one_detail_ref_interne("");
setp_one_detail_sujet("");
setp_one_detail_courrier_template_type_document_ref_interne("");
setp_one_detail_duplicate("");
setp_one_detail_type_doc("");
setone_field_programme();
@ -703,6 +708,12 @@ const Config_Documents = (props) => {
setp_one_detail_ref_interne(mylocal_document.ref_interne);
}
if (mylocal_document.courrier_template_type_document_ref_interne) {
setp_one_detail_courrier_template_type_document_ref_interne(mylocal_document.courrier_template_type_document_ref_interne);
} else {
setp_one_detail_courrier_template_type_document_ref_interne("");
}
if (mylocal_document.sujet) {
setp_one_detail_sujet(mylocal_document.sujet);
@ -1025,6 +1036,13 @@ const Config_Documents = (props) => {
}
if (p_one_detail_courrier_template_type_document_ref_interne)
form.append("courrier_template_type_document_ref_interne", p_one_detail_courrier_template_type_document_ref_interne);
else {
form.append("courrier_template_type_document_ref_interne", "");
}
if (p_one_detail_duplicate)
form.append("duplicate", p_one_detail_duplicate);
@ -1592,7 +1610,7 @@ const Config_Documents = (props) => {
var node = {
"_id": local_id,
"id": localid,
"label": local_nom+" - "+local_type_doc+"",
"label": local_nom + " - " + local_type_doc + "",
"nom": local_nom,
"type_doc": local_type_doc,
@ -3066,7 +3084,7 @@ const Config_Documents = (props) => {
<div className="div_row_gauche"> Choisir le document à ajouter <br />
{/* <TextField
{/* <TextField
name="champ_table"
id="champ_table"
select
@ -3096,12 +3114,12 @@ const Config_Documents = (props) => {
disablePortal
name="champ_table"
id="champ_table"
options={New_Get_List_Personnalisable_Default_Document_result}
onChange={(event, value) => {
if (value && value._id) {
setselecte_defaul_doc_to_add(value._id);
}
}}

View File

@ -346,10 +346,11 @@ const DisplayPartnerSession = (props) => {
{ field: 'prenom', headerName: 'prenom', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'email', minWidth: 150, flex: 1, hideable: false, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: true, },
{ field: 'employeur', headerName: 'Employeur', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'opco', headerName: 'Centre Opco', minWidth: 100, flex: 1, maxWidth: 150, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', minWidth: 100, flex: 1, maxWidth: 150, hide: false, editable: true },
{ field: 'amount', headerName: 'Montant Formation', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', hideable: false, flex: 1, editable: true },
{ field: 'amount', headerName: 'Montant Formation', minWidth: 100, flex: 1, maxWidth: 150, type: 'number', hideable: false, flex: 1, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{
field: "update", headerName: 'Mise à jour',
renderCell: (cellValues) => {
@ -605,6 +606,7 @@ const DisplayPartnerSession = (props) => {
{ field: 'prenom', headerName: 'prenom', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'email', minWidth: 150, flex: 1, hideable: false, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: true, },
{ field: 'employeur', headerName: 'Employeur', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true },
{ field: 'opco', headerName: 'Centre Opco', minWidth: 100, flex: 1, maxWidth: 150, hide: false, editable: true },
{ field: 'modefinancement', headerName: 'Financement', minWidth: 100, flex: 1, maxWidth: 150, hide: false, editable: true },
@ -897,6 +899,8 @@ const DisplayPartnerSession = (props) => {
onClick={(event) => {
setsequence_gridline_id(cellValues.row.id);
setdisplay_detail_sequence("");
setp_detail_sequence_title(cellValues.row.sequence_title);
setselected_sequence_id(cellValues.row._id);
var date_du = new Date(moment(cellValues.row.sequence_start, "DD/MM/YYYY HH:mm"));
@ -2680,6 +2684,13 @@ const DisplayPartnerSession = (props) => {
{ "id": "2", "label": "En Cours", "value": "2" },
]
const New_status_inscription_add_with_annule = [
{ "id": "0", "label": "PréInscription", "value": "0" },
{ "id": "1", "label": "Inscription", "value": "1" },
{ "id": "2", "label": "En Cours", "value": "2" },
{ "id": "-1", "label": "Annule", "value": "-1" },
]
const New_civilite = [
{ "id": "Mme", "label": "Mme", "value": "Mme" },
{ "id": "M", "label": "M", "value": "M" },
@ -4977,6 +4988,12 @@ const DisplayPartnerSession = (props) => {
var email = cellValues.row.email;
var prenom = cellValues.row.prenom;
var opco = cellValues.row.opco;
var local_client_rattachement_id = cellValues.row.client_rattachement_id;
if (String(local_client_rattachement_id) === "undefined") {
local_client_rattachement_id = ""
}
if (String(opco) === "undefined") {
opco = ""
}
@ -4993,11 +5010,11 @@ const DisplayPartnerSession = (props) => {
}
UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, "", _id);
UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, "", _id, local_client_rattachement_id);
}
function UpdateStagiaireData(nom, prenom, email, status, price, opco, modefinancement, employeur, comment, object_id) {
function UpdateStagiaireData(nom, prenom, email, status, price, opco, modefinancement, employeur, comment, object_id, local_client_rattachement_id) {
setSendInscriptionCancell_api();
var form = new FormData();
@ -5019,7 +5036,7 @@ const DisplayPartnerSession = (props) => {
form.append("comment", comment);
form.append("_id", object_id);
form.append("client_rattachement_id", p_detail_client_rattachement_id);
form.append("client_rattachement_id", local_client_rattachement_id);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/UpdateStagiairetoClass/";
setLoading(true);
@ -5080,6 +5097,11 @@ const DisplayPartnerSession = (props) => {
modefinancement = ""
}
var local_client_rattachement_id = cellValues.row.client_rattachement_id;
if (String(local_client_rattachement_id) === "undefined") {
local_client_rattachement_id = ""
}
var status = "0";
var employeur = cellValues.row.employeur;
@ -5090,7 +5112,7 @@ const DisplayPartnerSession = (props) => {
var comment = "";
UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, comment, _id);
UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, comment, _id, local_client_rattachement_id);
}
function handleClick_refuse(event, cellValues) {
@ -5123,7 +5145,13 @@ const DisplayPartnerSession = (props) => {
employeur = ""
}
UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, motif_refus, _id);
var local_client_rattachement_id = cellValues.row.client_rattachement_id;
if (String(local_client_rattachement_id) === "undefined") {
local_client_rattachement_id = ""
}
UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, motif_refus, _id, local_client_rattachement_id);
}
@ -12809,6 +12837,7 @@ const DisplayPartnerSession = (props) => {
modefinancement: JSON.parse(item).modefinancement,
civilite: JSON.parse(item).civilite,
client_rattachement_nom: JSON.parse(item).client_rattachement_nom,
client_rattachement_id: JSON.parse(item).client_rattachement_id,
}
@ -13511,6 +13540,7 @@ const DisplayPartnerSession = (props) => {
modefinancement: JSON.parse(item).modefinancement,
civilite: JSON.parse(item).civilite,
client_rattachement_nom: JSON.parse(item).client_rattachement_nom,
client_rattachement_id: JSON.parse(item).client_rattachement_id,
}
))}
@ -13826,7 +13856,25 @@ const DisplayPartnerSession = (props) => {
</div>}
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> Statut<br />
<TextField
<Autocomplete
disablePortal
name="detail_status_inscript"
id="detail_status_inscript"
className="disabled_style"
options={New_status_inscription_add_with_annule}
onChange={(event, value) => {
if (value && value.value) {
setp_detail_status_inscrit(value.value);
setparticipant_data_changed("1");
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
{/*<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_status_inscript"
@ -13849,7 +13897,7 @@ const DisplayPartnerSession = (props) => {
<MenuItem value="0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Preinscrit &nbsp;</MenuItem>
<MenuItem value="-1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Annule &nbsp;</MenuItem>
<MenuItem value="2" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Encours &nbsp;</MenuItem>
</TextField>
</TextField>*/}
</div>}

View File

@ -52,6 +52,8 @@ import ToggleSwitch from "./ToggleSwitch";
import Autocomplete from '@mui/material/Autocomplete';
import { FcDownRight, FcRight, FcSearch, FcViewDetails, FcOpenedFolder } from "react-icons/fc";
import { MdOutlineVisibility } from "react-icons/md";
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
const DisplayPartnerStagiaires = (props) => {
const history = useHistory();
@ -99,11 +101,11 @@ const DisplayPartnerStagiaires = (props) => {
{ field: 'civilite', headerName: 'Civ.', minWidth: 70, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false },
{ field: 'nom', headerName: 'Nom', minWidth: 150, flex: 1, hide: false, editable: false, editable: false },
{ field: 'prenom', headerName: 'Prénom', minWidth: 150, flex: 1, hide: false, editable: false },
{ field: 'email', headerName: 'Email', minWidth: 200, flex: 1, hideable: false, editable: false },
{ field: 'employeur', headerName: 'Employeur', minWidth: 150, hide: true, editable: false },
{ field: 'client_nom', headerName: 'Client', minWidth: 150, flex: 1, hide: false, editable: false },
{ field: 'nom', headerName: 'Nom', minWidth: 200, flex: 1, hide: false, editable: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'prenom', headerName: 'Prénom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'email', headerName: 'Email', minWidth: 250, flex: 1, hideable: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'employeur', headerName: 'Employeur', minWidth: 200, hide: true, editable: false },
{ field: 'client_nom', headerName: 'Client', minWidth: 200, flex: 1, hide: false, editable: false , renderCell: (params) => <ExpandableCell_50 {...params} />,},
{
field: 'status', headerName: 'Statut', hide: false, width: datagrid_columns_size_model2,
valueFormatter: (params) => {
@ -429,6 +431,41 @@ const DisplayPartnerStagiaires = (props) => {
]
function ExpandableCell_50({ value }) {
const [expanded, setExpanded] = React.useState(false);
return (
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{expanded ? value : value.slice(0, 50)}&nbsp;
{value.length > 50 && (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<Link
type="button"
component="button"
sx={{ fontSize: 'inherit' }}
onClick={() => setExpanded(!expanded)}
>
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
</Link>
)}
</div>
);
}
function Display_Colunm_text({ value }) {
return (
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{value}&nbsp;
</div>
);
}
function handleClick_refuse(event, cellValues) {
// Recuperation du motif du refus :
var motif_refus = document.getElementById("motif_refus").value;
@ -3023,6 +3060,8 @@ const DisplayPartnerStagiaires = (props) => {
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
if (p_detail_session_class.length <= 0) {
alert(" Vous devez choisir une session");
return;
@ -3049,7 +3088,7 @@ const DisplayPartnerStagiaires = (props) => {
return;
}
if (!p_detail_civilite || String(p_detail_civilite).trim().length < 2) {
if (!p_detail_civilite || String(p_detail_civilite).trim() === "") {
alert("La civilité est invalide.");
return;
}
@ -4210,7 +4249,7 @@ const DisplayPartnerStagiaires = (props) => {
if (String(value) === "supprimer" || String(value) === "convention" || String(value) === "desactiver"
|| String(value) === "exporter") {
|| String(value) === "exporter") {
setactionmass_ftion_val(value);
}
else {
@ -5142,6 +5181,33 @@ const DisplayPartnerStagiaires = (props) => {
{ "id": "1", "label": "Supprimer", "value": "supprimer" },
]
const New_civilite = [
{ "id": "Mme", "label": "Mme", "value": "Mme" },
{ "id": "M", "label": "M", "value": "M" },
{ "id": "Neutre", "label": "Neutre", "value": "Neutre" },
]
const New_status_inscription_add_with_annule = [
{ "id": "0", "label": "PréInscription", "value": "0" },
{ "id": "1", "label": "Inscription", "value": "1" },
{ "id": "2", "label": "En Cours", "value": "2" },
{ "id": "-1", "label": "Annule", "value": "-1" },
]
const New_type_apprenant = [
{ "id": "0", "label": "Autre", "value": "0" },
{ "id": "1", "label": "Salariés", "value": "1" },
{ "id": "2", "label": "Apprentis", "value": "2" },
{ "id": "3", "label": "Particuliers", "value": "3" },
{ "id": "4", "label": "Rech. Emploi", "value": "4" },
]
return (
<div className="displaypartnerstagiaire">
{isLoading && <div className="loader-container">
@ -5158,7 +5224,7 @@ const DisplayPartnerStagiaires = (props) => {
<DialogContent className="DialogContent_width">
<div className="div_row_dialog">
<div className="div_row_gauche_dialog_session" style={{ "textAlign": 'left' }}>
Civilite
</div>
@ -6479,7 +6545,7 @@ const DisplayPartnerStagiaires = (props) => {
onRowDoubleClick={(newSelectionModel) => {
///setuserimgclassprofil("");
setselected_row_data_json_age('');
setgridline_id(newSelectionModel.row.id);
setselected_id_status(newSelectionModel.row.status);
@ -6555,7 +6621,8 @@ const DisplayPartnerStagiaires = (props) => {
}
}}
getEstimatedRowHeight={() => 200}
getRowHeight={() => "auto"}
/>
</Box>
@ -6569,28 +6636,28 @@ const DisplayPartnerStagiaires = (props) => {
<nav >Traitement en masse </nav>
&nbsp;
<Autocomplete
disablePortal
id="combo-box-demo"
className="block_en_mass_select"
fullWidth
options={New_Option}
onChange={(event, value) => {
if (value && value.value) {
if( String(value.value) === "supprimer"
|| String(value.value) === "convention" || String(value.value) === "exporter") {
setactionmass_ftion_val(value.value);
}
else {
setactionmass_ftion_val();
disablePortal
id="combo-box-demo"
className="block_en_mass_select"
fullWidth
options={New_Option}
onChange={(event, value) => {
if (value && value.value) {
if (String(value.value) === "supprimer"
|| String(value.value) === "convention" || String(value.value) === "exporter") {
setactionmass_ftion_val(value.value);
}
else {
setactionmass_ftion_val();
}
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
/>
{/*<TextField
@ -6632,18 +6699,18 @@ const DisplayPartnerStagiaires = (props) => {
<div className="gest_content">
{' '}
{String(actionmass_ftion_val) === "supprimer" &&
<font color="red"> Confirmer la <b> suppression </b> en masse pour {selectionModel.length} lignes.
</font>}
<font color="red"> Confirmer la <b> suppression </b> en masse pour {selectionModel.length} lignes.
</font>}
{String(actionmass_ftion_val) === "exporter" &&
<font> Confirmer l' <b> export </b> en masse pour {selectionModel.length} lignes.
</font>}
<font> Confirmer l' <b> export </b> en masse pour {selectionModel.length} lignes.
</font>}
{String(actionmass_ftion_val) === "convention" &&
<font> Confirmer l' <b> édition des conventions </b> en masse pour {selectionModel.length} lignes.
</font>}
<font> Confirmer l' <b> édition des conventions </b> en masse pour {selectionModel.length} lignes.
</font>}
</div>
<div className="gest_actions">
<div style={{ "width": "45%", "float": "left" }}>
@ -6717,7 +6784,7 @@ const DisplayPartnerStagiaires = (props) => {
<Button variant="outlined" ref={myRef} onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_session' name='detail_session'>Détail Participant</Button>
{/* <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button>
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absence' name='absence'>Absence </Button> */}
<Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>
{String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>}
</div>}
@ -6858,7 +6925,25 @@ const DisplayPartnerStagiaires = (props) => {
</div>*/}
<div className="session_caract"> <b> Civilité </b> <br />
<TextField
<Autocomplete
disablePortal
name="one_civilite_part"
id="one_civilite_part"
className="disabled_style enable_style"
options={New_civilite}
onChange={(event, value) => {
if (value && value.value) {
setp_one_civilite_part(value.value);
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
{/* <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="one_civilite_part"
@ -6881,7 +6966,7 @@ const DisplayPartnerStagiaires = (props) => {
<MenuItem value="Mme" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Mme. &nbsp;</MenuItem>
<MenuItem value="M." style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >M. &nbsp;</MenuItem>
<MenuItem value="Neutre" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Neutre&nbsp;&nbsp;</MenuItem>
</TextField>
</TextField>*/}
</div>
@ -7069,8 +7154,25 @@ const DisplayPartnerStagiaires = (props) => {
/>
</div>
<div className="session_caract"> Statut Inscription *<br />
<TextField
<div className="session_caract"> Statut Inscription <br />
<Autocomplete
disablePortal
name="one_status_part"
id="one_status_part"
className="disabled_style enable_style"
options={New_status_inscription_add_with_annule}
onChange={(event, value) => {
if (value && value.value) {
setp_one_status_part(value.value);
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
{/*<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
select
@ -7094,10 +7196,10 @@ const DisplayPartnerStagiaires = (props) => {
{option.label} &nbsp; <br />
</MenuItem>
))}
</TextField>
</TextField>*/}
</div>
<div className="session_caract"> Client a <br />
<div className="session_caract"> Client <br />
<Autocomplete
disablePortal
@ -7120,7 +7222,27 @@ const DisplayPartnerStagiaires = (props) => {
</div>
<div className="session_caract"> Type apprenant <br />
<TextField
<Autocomplete
disablePortal
name="one_detail_type_apprenant"
id="one_detail_type_apprenant"
className="disabled_style"
options={New_type_apprenant}
onChange={(event, value) => {
if (value && value._id) {
setp_one_detail_type_apprenant(value._id);
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
{/*<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="one_detail_type_apprenant"
@ -7144,7 +7266,7 @@ const DisplayPartnerStagiaires = (props) => {
<MenuItem value="3" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Particuliers &nbsp;</MenuItem>
<MenuItem value="4" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Rech. Emploi &nbsp;</MenuItem>
</TextField>
</TextField>*/}
</div>
{/* -- début champs specifiques **/}
@ -7463,35 +7585,28 @@ const DisplayPartnerStagiaires = (props) => {
</div>}
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> Type apprenant <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> Type apprenant<br />
<Autocomplete
disablePortal
name="detail_type_apprenant"
id="detail_type_apprenant"
select
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_type_apprenant}
onChange={(e) => {
//setp_detail_client_rattachement_id(e.target.value);
setp_detail_type_apprenant(e.target.value);
setparticipant_data_changed("1");
options={New_type_apprenant}
value={New_type_apprenant.filter((val) => val.value === String(p_detail_type_apprenant))[0].label}
onChange={(event, value) => {
if (value && value.id) {
setp_detail_type_apprenant(value.id);
setparticipant_data_changed("1");
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
}
/>
>
<MenuItem value="0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Autre &nbsp;</MenuItem>
<MenuItem value="1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Salariés &nbsp;</MenuItem>
<MenuItem value="2" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Apprentis &nbsp;</MenuItem>
<MenuItem value="3" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Particuliers &nbsp;</MenuItem>
<MenuItem value="4" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Rech. Emploi &nbsp;</MenuItem>
</TextField>
</div>}
{String(participant_data_edit_mode) !== "1" && <div className="session_caract"> Type apprenant <br />
@ -7528,58 +7643,55 @@ const DisplayPartnerStagiaires = (props) => {
</div>}
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> Statut<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> Statut <br />
<Autocomplete
disablePortal
name="detail_status_inscript"
id="detail_status_inscript"
select
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_detail_status_inscrit}
onChange={(e) => {
setp_detail_status_inscrit(e.target.value);
setparticipant_data_changed("1");
}
}
>
<MenuItem value="1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Inscrit &nbsp;&nbsp;</MenuItem>
<MenuItem value="0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Preinscrit &nbsp;</MenuItem>
<MenuItem value="-1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Annule &nbsp;</MenuItem>
<MenuItem value="2" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Encours &nbsp;</MenuItem>
</TextField>
options={New_status_inscription_add_with_annule}
value={New_status_inscription_add_with_annule.filter((val) => val.value === String(p_detail_status_inscrit))[0].label}
onChange={(event, value) => {
if (value && value.value) {
setp_detail_status_inscrit(value.value);
setparticipant_data_changed("1");
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
</div>}
{String(participant_data_edit_mode) === "1" && <div className="session_caract"> <b> Civilité </b> <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
<Autocomplete
disablePortal
name="detail_civilite"
id="detail_civilite"
InputLabelProps={{
shrink: true,
}}
select
disabled={false}
className="disabled_style"
value={p_detail_civilite}
onChange={(e) => {
setp_detail_civilite(e.target.value);
setparticipant_data_changed("1");
}
}
value={New_civilite.filter((val) => val.value === String(p_detail_civilite))[0].label}
options={New_civilite}
onChange={(event, value) => {
if (value && value.value) {
setp_detail_civilite(value.value);
setparticipant_data_changed("1");
console.log(" change civilite value.value = ", value.value)
}
}}
renderInput={(params) => <TextField {...params} label="" />
}
/>
>
<MenuItem value="Mme" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Mme. &nbsp;</MenuItem>
<MenuItem value="M." style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >M. &nbsp;</MenuItem>
<MenuItem value="Neutre" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Neutre&nbsp;&nbsp;</MenuItem>
</TextField>
</div>}
{String(participant_data_edit_mode) !== "1" && <div className="session_caract"> <b> Civilité </b> <br />
@ -8092,13 +8204,13 @@ const DisplayPartnerStagiaires = (props) => {
</div>
{String(p_detail_apprenant_id).trim().length <= 0 && <div className="tuteur_field" style={{ "cursor": "pointer" }} onClick={(e) => {
setquel_tuteur("1");
setDialog_tuteur_1_open(true);
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
setquel_tuteur("1");
setDialog_tuteur_1_open(true);
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
</div>}
</div>}
@ -8196,11 +8308,11 @@ const DisplayPartnerStagiaires = (props) => {
</div>
{String(p_detail_apprenant_id).trim().length <= 0 && <div className="tuteur_field" style={{ "cursor": "pointer" }} onClick={(e) => {
setquel_tuteur("2");
setDialog_tuteur_1_open(true);
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
setquel_tuteur("2");
setDialog_tuteur_1_open(true);
}}> Voir plus <RiMoreFill /> <FcEditImage style={{ "fontSize": "large" }} />
</div>}
</div>}
</div>
</div>
</div>
@ -8605,366 +8717,9 @@ const DisplayPartnerStagiaires = (props) => {
</div>}
{/*String(submenu) === "sessions" && selected_code_session && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<div className="session_data">
<div className="session_caract"> Formation <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="myclass_title"
id="myclass_title"
text
InputLabelProps={{
shrink: true,
}}
disabled={true}
className="disabled_style enable_style"
value={p_myclass_title}
/>
</div>
<div className="session_caract"> Code Session<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="code_session"
id="code_session"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_code_session}
/>
</div>
<div className="session_caract">Session à la demande* <br />
<TextField
name="session_ondemande"
id="session_ondemande"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style enable_style"
/>
</div>
<div className="session_caract">Statut * <br />
<TextField
name="session_status_not_change_font"
id="session_status_not_change_font"
value={p_session_status_label}
className="disabled_style enable_style"
style={{ "background": "#D2E6AA" }}
sx={{
backgroundColor: '#ffd60a',
border: '3px solid #001d3d',
}}
InputLabelProps={{
sx: {
color: '#003566',
textTransform: 'capitalize',
},
}}
disabled={false}
inputProps={{
sx: {
color: 'black',
paddingLeft: '15px',
//fontSize: '20px',
},
}}
/>
</div>
<div className="session_caract">Etape *<br />
<TextField
name="session_etape"
id="session_etape"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style enable_style"
value={p_session_etape_label}
/>
</div>
<div className="session_caract">
Date Debut
<TextField
name="sessiondatedebut"
id="sessiondatedebut"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style"
value={SessionstartDate}
/>
</div>
<div className="session_caract"> Date Fin
<TextField
name="sessiondatefin"
id="sessiondatefin"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style"
value={SessionendDate}
/>
</div>
<div className="session_caract"> Date début des inscriptions *
<TextField
name="sessiondatedebutinscription"
id="sessiondatedebutinscription"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style"
value={SessionstartDateInscription}
/>
</div>
<div className="session_caract"> Date Fin des inscriptions *
<TextField
name="sessiondatefininscription"
id="sessiondatefininscription"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style"
value={SessionendDateInscription}
/>
</div>
<div className="session_caract">Présentiel *<br />
<TextField
name="presentiel"
id="presentiel"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style"
value={p_session_presentiel_label}
/>
</div>
<div className="session_caract">A distance* <br />
<TextField
name="distantiel"
id="distantiel"
text
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "0", max: "1", step: "1" }}
disabled={false}
className="disabled_style"
value={p_session_distance_label}
/>
</div>
<div className="session_caract"> Adresse<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="adresse"
id="adresse"
text
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_adresse}
/>
</div>
<div className="session_caract"> Code postal<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="code_postal"
id="code_postal"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_code_postal}
/>
</div>
<div className="session_caract"> Ville<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="ville"
id="ville"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_ville}
/>
</div>
<div className="session_caract"> Pays<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="pays"
id="pays"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_pays}
/>
</div>
<div className="session_caract"> Formateur<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="formateur"
id="formateur"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_formateur}
/>
</div>
<div className="session_caract"> Code Formation LMS
<i> (le code créé dans le LMS) </i>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="lms_class_code"
id="lms_class_code"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
value={p_lms_class_code}
/>
</div>
<div className="session_caract"> Nombre participants *<br />
<TextField sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="nb_participant"
id="nb_participant"
type="number"
InputLabelProps={{
shrink: true,
}}
inputProps={{ min: "1", max: "1000", step: "1" }}
disabled={false}
className="disabled_style"
value={p_nb_participant}
/>
</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"
value={p_prix_session}
/>
</div>
</div>
</div>*/}
{/*String(submenu) === "absence" && String(display_detail_absence) === "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<Module_Absence attendee_email={selectedattendeeemail}
inscription_id={selected_id}
related_collection={"inscription"}
read_access={props.read_access}
write_access={props.write_access} />
</div>*/}
{String(submenu) === "historique" && String(display_detail_historique) === "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
{String(submenu) === "historique" && String(display_detail_historique) === "1" && String(addOneParticipant) !== "1" && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
<Module_Historique_Action related_collection="inscription"
related_collection_recid={selected_id}

View File

@ -276,7 +276,7 @@ const Module_Editique = (props) => {
var nom_fichier_cmd = "Convention.zip";
if (String(selected_convention_id).trim() === "") {
if (!selected_convention_id || String(selected_convention_id).trim() === "") {
alert(" Vous devez choisir un modèle de document ");
return;
}
@ -995,7 +995,7 @@ const Module_Editique = (props) => {
>
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "50rem" }}>
<DialogContent className="DialogContent_width" style={{ "minHeight": "5rem" }}>
<DialogContentText>
@ -1079,7 +1079,7 @@ const Module_Editique = (props) => {
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message} - {action_server_type_doc}
{Dialog_1_message}
</DialogContentText>
@ -1406,7 +1406,7 @@ const Module_Editique = (props) => {
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
<DialogContentText>
{Dialog_1_message} - {action_server_type_doc}
{Dialog_1_message}
</DialogContentText>
<div className="session_caract_Dialog" > Type Document<br />
@ -1722,7 +1722,7 @@ const Module_Editique = (props) => {
<div className="div_row" style={{ "background": "#e8e6e6", "marginLeft": "5px", "marginRight": "5px" }}>
<div style={{ "width": "58%", "float": "left", "marginLeft": "5px", "marginRight": "5px", "borderRight": "3mm ridge rgba(211, 220, 50, .6)" }}>
<div style={{ "width": "58%", "float": "left", "marginLeft": "5px", "marginRight": "5px", }}>
Action Editique <br />
<div style={{ "width": "100%", "float": "left" }}>
{Getall_Editable_Document_By_Partner_By_Collection_result &&
@ -1761,7 +1761,7 @@ const Module_Editique = (props) => {
}
}}>
{(JSON.parse(document).courrier_template_ref_interne)}
{(JSON.parse(document).courrier_template_nom)}
</div>
{String(JSON.parse(document).has_history_event) === "1" &&
@ -1791,7 +1791,7 @@ const Module_Editique = (props) => {
</div>
<div style={{ "width": "40%", "float": "right", }}>
<div style={{ "width": "40%", "float": "right", "padding": "10px", "borderLeft": "3mm ridge rgba(211, 220, 50, .6)"}}>
Détail <Button onClick={handleExpandClick}>
{expanded.length === 0 ? 'Voir tout' : 'Réduire'}
</Button>