recette2
parent
6296939079
commit
417dac1f03
|
@ -1392,8 +1392,8 @@ const AddClassManual = (props) => {
|
|||
className="disabled_style"
|
||||
>
|
||||
{support_training_list.map((option) => (
|
||||
<MenuItem key={option.value} value={option.value} >
|
||||
{option.label} <br />
|
||||
<MenuItem key={option.value} value={option.value} style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", }}>
|
||||
{option.label}
|
||||
</MenuItem>
|
||||
))}
|
||||
</TextField>
|
||||
|
@ -1415,7 +1415,7 @@ const AddClassManual = (props) => {
|
|||
value={mytrainingdomaine}
|
||||
>
|
||||
{Get_List_Domaines_result && Get_List_Domaines_result.map((option) => (
|
||||
<MenuItem key={option} value={option}>
|
||||
<MenuItem key={option} value={option} style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", }}>
|
||||
{option} <br />
|
||||
</MenuItem>
|
||||
))}
|
||||
|
@ -1437,7 +1437,7 @@ const AddClassManual = (props) => {
|
|||
value={mytrainingmetier}
|
||||
>
|
||||
{Get_List_Metiers_result && Get_List_Metiers_result.map((option) => (
|
||||
<MenuItem key={option} value={option}>
|
||||
<MenuItem key={option} value={option} style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", }}>
|
||||
{option} <br />
|
||||
</MenuItem>
|
||||
))}
|
||||
|
|
|
@ -1430,10 +1430,11 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/AddStagiairetoClass/";
|
||||
|
||||
setLoading(true);
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
setLoading(false);
|
||||
//console.log(" In One_Create_Participant res.data.status = " + res.data.status);
|
||||
//console.log(" In One_Create_Participant res.data.message r_class = " + res.data.message);
|
||||
|
||||
|
@ -1441,13 +1442,15 @@ const DisplayPartnerSession = (props) => {
|
|||
setOne_Create_Participant_api("true");
|
||||
setOne_Create_Participant_result(res.data.message);
|
||||
|
||||
alert(" Le participant a été correctement ajouté");
|
||||
|
||||
setaddOneParticipant("0");
|
||||
//setreduction_session("1");
|
||||
GetListePreinscrit(selected_session_id, selected_internal_url);
|
||||
GetListeInscrit(selected_session_id, selected_internal_url);
|
||||
|
||||
submenu_inscrit();
|
||||
One_clearParticipantFields();
|
||||
alert(" Le participant a été correctement ajouté");
|
||||
|
||||
} else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + res.data.message);
|
||||
|
@ -1459,7 +1462,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
setLoading(false);
|
||||
console.warn('One_Create_Participant : Not good man :( = ' + error);
|
||||
setOne_Create_Participant_api("false");
|
||||
|
||||
|
@ -1498,6 +1501,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
function One_annuleAdd_Participant() {
|
||||
One_clearParticipantFields();
|
||||
setaddOneParticipant("0");
|
||||
var myelement;
|
||||
|
||||
|
@ -2285,6 +2289,36 @@ const DisplayPartnerSession = (props) => {
|
|||
setp_one_session_etape_label();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function One_clearParticipantFields() {
|
||||
|
||||
if (document.getElementsByName("one_nom_part")[0])
|
||||
document.getElementsByName("one_nom_part")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_prenom_part")[0])
|
||||
document.getElementsByName("one_prenom_part")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_email_part")[0])
|
||||
document.getElementsByName("one_email_part")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_phone_part")[0])
|
||||
document.getElementsByName("one_phone_part")[0].value = "";
|
||||
|
||||
if (document.getElementsByName("one_status_part")[0])
|
||||
document.getElementsByName("one_status_part")[0].value = "";
|
||||
|
||||
|
||||
|
||||
setp_one_nom_part();
|
||||
setp_one_prenom_part();
|
||||
setp_one_email_part();
|
||||
setp_one_phone_part();
|
||||
setp_one_status_part();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [is_lms_class_code, setis_lms_class_code] = useState();
|
||||
|
@ -5012,7 +5046,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
<MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session </MenuItem>
|
||||
<MenuItem value="class_external_code" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Code Formation (code externe) </MenuItem>
|
||||
<MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation </MenuItem>
|
||||
<MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation </MenuItem>
|
||||
|
||||
</TextField>
|
||||
</div>
|
||||
|
@ -6500,7 +6534,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
{String(addOneParticipant) === "1" && <div className="div_row session_data" style={{ "border": "None", "backgroundColor": "#F0F0F0" }}>
|
||||
<div className="titre1"> Ajout d'un nouveau participant a la session <u> {selected_code_session} </u> de la formation <u> {selected_class_title} </u></div>
|
||||
<div className="titre1"> Ajout d'un nouveau participant à la session <u> {selected_code_session} </u> de la formation <u> {selected_class_title} </u></div>
|
||||
|
||||
<div className="session_caract"> Nom *<br />
|
||||
<TextField
|
||||
|
|
|
@ -226,7 +226,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
const [ismobilephone_columns_hide, setismobilephone_columns_hide] = useState(false);
|
||||
|
||||
const [datagrid_columns_size_model1, setdatagrid_columns_size_model1] = useState(200);
|
||||
const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(80);
|
||||
const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(120);
|
||||
|
||||
const columns = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
|
@ -234,12 +234,12 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
{ field: 'lms_class_code', headerName: 'lms_class_code', hide: true },
|
||||
{ field: 'zone_diffusion', headerName: 'zone_diffusion', hide: true },
|
||||
{ field: 'internal_url', headerName: 'internal_url', hide: true },
|
||||
{ field: 'external_code', headerName: 'Code Formation', width: datagrid_columns_size_model1, hideable: false, resizable: true },
|
||||
{ field: 'title', headerName: 'Titre', width: datagrid_columns_size_model1, hideable: false, },
|
||||
{ field: 'external_code', headerName: 'Code Formation', flex:1, hideable: false, resizable: true },
|
||||
{ field: 'title', headerName: 'Titre', flex: 1, hideable: false, },
|
||||
{ field: 'domain', headerName: 'Domaine', width: datagrid_columns_size_model1, hideable: true, },
|
||||
{ field: 'metier', headerName: 'Métier', width: datagrid_columns_size_model1, hideable: true, hide: true },
|
||||
{ field: 'url', headerName: 'lien', width: datagrid_columns_size_model1, hideable: true, hide: true },
|
||||
{ field: 'description', headerName: 'Description', width: datagrid_columns_size_model1, hide: ismobilephone_columns_hide, resizable: true, flex: 1 },
|
||||
{ field: 'description', headerName: 'Description', hide: true, resizable: true, with:1 },
|
||||
|
||||
{ field: 'price', headerName: 'Prix', width: datagrid_columns_size_model2, align: "center", resizable: true, hide: ismobilephone_columns_hide },
|
||||
{
|
||||
|
@ -309,13 +309,13 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
},
|
||||
|
||||
{
|
||||
field: "push_to_lms", headerName: 'Push Elearning', width: datagrid_columns_size_model2,
|
||||
field: "push_to_lms", headerName: 'E-learning Creation' , width: 150,
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<nav>
|
||||
<nav style={{ "textAlign":"center"}}>
|
||||
<Popup
|
||||
trigger={
|
||||
<Button style={{ "marginLeft": "auto", "marginRight": "auto", "cursor": "pointer" }}
|
||||
<Button style={{ "marginLeft": "auto", "marginRight": "auto", "cursor": "pointer" , "textAlign":"center"}}
|
||||
|
||||
onClick={(event) => {
|
||||
handlepush_to_lms(event, cellValues);
|
||||
|
|
|
@ -161,6 +161,8 @@ const Formation = (props) => {
|
|||
getClassImage();
|
||||
GetCurrentClass_trainingsession();
|
||||
|
||||
GetCurrentClass_trainingsession_cities();
|
||||
|
||||
// Verifier si le metier est geré
|
||||
if (props.formation.metier) {
|
||||
if (!liste_metier.includes(props.formation.metier)) {
|
||||
|
@ -212,6 +214,39 @@ const Formation = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState();
|
||||
const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState();
|
||||
const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState();
|
||||
function GetCurrentClass_trainingsession_cities(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("class_internal_url", props.formation.internal_url);
|
||||
|
||||
form.append("token", stored_partner);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "false") {
|
||||
//console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status);
|
||||
//console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message);
|
||||
setGetCurrentClass_trainingsession_cities_api("true");
|
||||
setGetCurrentClass_trainingsession_cities_result(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGetCurrentClass_trainingsession_cities_api("false");
|
||||
setGetCurrentClass_trainingsession_cities_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error);
|
||||
setGetCurrentClass_trainingsession_cities_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<div className="formation">
|
||||
|
@ -370,23 +405,18 @@ const Formation = (props) => {
|
|||
{parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))}
|
||||
|
||||
</div>
|
||||
{GetCurrentClass_result && GetCurrentClass_result.length > 0 &&
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.length > 0 &&
|
||||
<nav style={{"width":"100%", "float":"left", "textAlign":"left", "color": "#619E31"}}>
|
||||
<nav style={{"width":"auto", "float":"left"}}> <CiLocationOn className="icone_location" /> </nav>
|
||||
|
||||
{GetCurrentClass_result && GetCurrentClass_result.slice(0, 5).map((formation) => (
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.slice(0, 5).map((formation_ville) => (
|
||||
<nav style={{"width":"auto", "float":"left"}}>
|
||||
|
||||
|
||||
{(JSON.parse(formation).distantiel) === "1" &&
|
||||
|
||||
<b> A Distance </b>
|
||||
{formation_ville &&
|
||||
|
||||
}
|
||||
|
||||
{(JSON.parse(formation).distantiel) !== "1" && (JSON.parse(formation).ville) &&
|
||||
|
||||
<b> - {(JSON.parse(formation).ville).substring(0, 20)} </b>
|
||||
<b> - {formation_ville.replaceAll('"', '').substring(0, 20)} </b>
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -657,7 +657,7 @@ function Inscription_Information(props) {
|
|||
String(action).toLocaleLowerCase() === "information" &&
|
||||
<div className="okUpdateData">
|
||||
|
||||
Votre demande d'information été prise en compte.<br />
|
||||
Votre demande d'information a été prise en compte.<br />
|
||||
Merci.
|
||||
</div>}
|
||||
|
||||
|
|
Loading…
Reference in New Issue