07/05/2024 - 17h30
parent
558b3ac142
commit
069d10da2d
|
@ -717,6 +717,10 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
Get_List_Domaines();
|
||||||
|
Get_List_Metiers();
|
||||||
|
Get_List_Categorie();
|
||||||
|
|
||||||
Get_Partner_Object_Specific_Fields("myclass");
|
Get_Partner_Object_Specific_Fields("myclass");
|
||||||
Getall_Training_Employee_No_Filter();
|
Getall_Training_Employee_No_Filter();
|
||||||
Get_List_Niveau_Formation();
|
Get_List_Niveau_Formation();
|
||||||
|
@ -730,8 +734,7 @@ const AddClassManual = (props) => {
|
||||||
setfield_datelieu("");
|
setfield_datelieu("");
|
||||||
setfield_zone_diffusion("");
|
setfield_zone_diffusion("");
|
||||||
setmyApiResponse();
|
setmyApiResponse();
|
||||||
Get_List_Domaines();
|
|
||||||
Get_List_Metiers();
|
|
||||||
|
|
||||||
|
|
||||||
fillfield();
|
fillfield();
|
||||||
|
@ -1009,7 +1012,7 @@ const AddClassManual = (props) => {
|
||||||
//console.log(" ### mylocaltraining.domaine = ", mylocaltraining.domaine);
|
//console.log(" ### mylocaltraining.domaine = ", mylocaltraining.domaine);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
setmytrainingdomaine("-");
|
setmytrainingdomaine("");
|
||||||
|
|
||||||
|
|
||||||
if (mylocaltraining.metier) {
|
if (mylocaltraining.metier) {
|
||||||
|
@ -1017,7 +1020,15 @@ const AddClassManual = (props) => {
|
||||||
//console.log(" ### mylocaltraining.metier = ", mylocaltraining.metier);
|
//console.log(" ### mylocaltraining.metier = ", mylocaltraining.metier);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
setmytrainingmetier("-");
|
setmytrainingmetier("");
|
||||||
|
|
||||||
|
|
||||||
|
if (mylocaltraining.categorie) {
|
||||||
|
setmytrainingcategorie(mylocaltraining.categorie);
|
||||||
|
//console.log(" ### mylocaltraining.metier = ", mylocaltraining.metier);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
setmytrainingcategorie("");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1061,14 +1072,23 @@ const AddClassManual = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementsByName("lms_class_code")[0].value = "";
|
document.getElementsByName("lms_class_code")[0].value = "";
|
||||||
|
|
||||||
if (mylocaltraining.lms_class_code) {
|
if (mylocaltraining.lms_class_code) {
|
||||||
//document.getElementsByName("lms_class_code")[0].value = mylocaltraining.lms_class_code;
|
//document.getElementsByName("lms_class_code")[0].value = mylocaltraining.lms_class_code;
|
||||||
setp_detail_lms_class_code(mylocaltraining.note);
|
setp_detail_lms_class_code(mylocaltraining.lms_class_code);
|
||||||
} else {
|
} else {
|
||||||
setp_detail_lms_class_code("");
|
setp_detail_lms_class_code("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (mylocaltraining.version) {
|
||||||
|
//document.getElementsByName("lms_class_code")[0].value = mylocaltraining.lms_class_code;
|
||||||
|
setp_detail_version_catalogue(mylocaltraining.version);
|
||||||
|
} else {
|
||||||
|
setp_detail_version_catalogue("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
document.getElementsByName("class_inscription_url")[0].value = "";
|
document.getElementsByName("class_inscription_url")[0].value = "";
|
||||||
if (mylocaltraining.class_inscription_url) {
|
if (mylocaltraining.class_inscription_url) {
|
||||||
//document.getElementsByName("class_inscription_url")[0].value = mylocaltraining.class_inscription_url;
|
//document.getElementsByName("class_inscription_url")[0].value = mylocaltraining.class_inscription_url;
|
||||||
|
@ -1212,20 +1232,22 @@ const AddClassManual = (props) => {
|
||||||
var presentiel = mypresence;
|
var presentiel = mypresence;
|
||||||
var distentiel = mydistance;
|
var distentiel = mydistance;
|
||||||
var domaine = mytrainingdomaine;
|
var domaine = mytrainingdomaine;
|
||||||
if (String(domaine).trim() === "-") {
|
|
||||||
domaine = ""
|
|
||||||
}
|
|
||||||
var mypublier = mypublished;
|
var mypublier = mypublished;
|
||||||
var niveau_ftion = p_class_level;
|
var niveau_ftion = p_class_level;
|
||||||
var price = document.getElementsByName("price")[0].value;
|
var price = document.getElementsByName("price")[0].value;
|
||||||
var duree = document.getElementsByName("duree")[0].value;
|
var duree = document.getElementsByName("duree")[0].value;
|
||||||
var url = document.getElementsByName("url")[0].value;
|
var url = document.getElementsByName("url")[0].value;
|
||||||
var lms_class_code = document.getElementsByName("lms_class_code")[0].value;
|
var lms_class_code = p_detail_lms_class_code;
|
||||||
var class_inscription_url = document.getElementsByName("class_inscription_url")[0].value;
|
var class_inscription_url = document.getElementsByName("class_inscription_url")[0].value;
|
||||||
|
|
||||||
var mymetier = mytrainingmetier;
|
var mymetier = mytrainingmetier;
|
||||||
if (String(mymetier).trim() === "-") {
|
|
||||||
mymetier = ""
|
|
||||||
}
|
var mycategorie = mytrainingcategorie;
|
||||||
|
var version = p_detail_version_catalogue;
|
||||||
|
|
||||||
|
|
||||||
var mynote = document.getElementsByName("note")[0].value;
|
var mynote = document.getElementsByName("note")[0].value;
|
||||||
var localmycpf = mycpf;
|
var localmycpf = mycpf;
|
||||||
var mycertif = mycertif;
|
var mycertif = mycertif;
|
||||||
|
@ -1424,6 +1446,9 @@ const AddClassManual = (props) => {
|
||||||
formData.append('internal_url', displayedinternalurl);
|
formData.append('internal_url', displayedinternalurl);
|
||||||
formData.append('zone_diffusion', "");
|
formData.append('zone_diffusion', "");
|
||||||
formData.append('metier', mymetier);
|
formData.append('metier', mymetier);
|
||||||
|
formData.append('categorie', mycategorie);
|
||||||
|
formData.append('version', version);
|
||||||
|
|
||||||
formData.append('note', mynote);
|
formData.append('note', mynote);
|
||||||
|
|
||||||
formData.append('published', mypublier);
|
formData.append('published', mypublier);
|
||||||
|
@ -1521,8 +1546,99 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [mytrainingcategorie, setmytrainingcategorie] = useState("");
|
||||||
|
|
||||||
const [mytrainingmetier, setmytrainingmetier] = useState("-");
|
const [New_Get_List_Categorie_result, setNew_Get_List_Categorie_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_List_Categorie_api, setGet_List_Categorie_api] = useState();
|
||||||
|
const [Get_List_Categorie_message, setGet_List_Categorie_message] = useState();
|
||||||
|
const [Get_List_Categorie_result, setGet_List_Categorie_result] = useState();
|
||||||
|
function Get_List_Categorie() {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_Categorie/";
|
||||||
|
setLoading(true);
|
||||||
|
fetch(myurl,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: form,
|
||||||
|
})
|
||||||
|
.then((data) => data.json())
|
||||||
|
.then((data) => {
|
||||||
|
setLoading(false);
|
||||||
|
// console.log(' IN Get_List_Categorie Success:', data['message'], "data['status'] = ", data['status']);
|
||||||
|
|
||||||
|
if (String(data['status']) === String("true")) {
|
||||||
|
setGet_List_Categorie_api("true");
|
||||||
|
setGet_List_Categorie_result(data['message']);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = data['message'].map((x) => {
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_class_domaine_id = JSON.parse(x).class_domaine_id;
|
||||||
|
var local_class_domaine_nom = JSON.parse(x).class_domaine_nom;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": localid,
|
||||||
|
"_id": local_id,
|
||||||
|
"label": local_nom,
|
||||||
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
"class_domaine_id": local_class_domaine_id,
|
||||||
|
"class_domaine_nom": local_class_domaine_nom,
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"label": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"class_domaine_id": "",
|
||||||
|
"class_domaine_nom": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Get_List_Categorie_result(new_data2);
|
||||||
|
//console.log(" ### new_data2 ", new_data2);
|
||||||
|
//console.log(" ### setNew_Get_List_Categorie_result ", New_Get_List_Categorie_result);
|
||||||
|
} else {
|
||||||
|
setNew_Get_List_Categorie_result([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_List_Categorie_api("false");
|
||||||
|
setGet_List_Categorie_message(data['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.error('Error Get_List_Categorie :', error);
|
||||||
|
setGet_List_Categorie_api("false");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [mytrainingmetier, setmytrainingmetier] = useState("");
|
||||||
|
|
||||||
const [New_Get_List_Metiers_result, setNew_Get_List_Metiers_result] = useState([]);
|
const [New_Get_List_Metiers_result, setNew_Get_List_Metiers_result] = useState([]);
|
||||||
|
|
||||||
|
@ -1531,7 +1647,10 @@ const AddClassManual = (props) => {
|
||||||
const [Get_List_Metiers_result, setGet_List_Metiers_result] = useState();
|
const [Get_List_Metiers_result, setGet_List_Metiers_result] = useState();
|
||||||
function Get_List_Metiers() {
|
function Get_List_Metiers() {
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_List_all_metier_formation/";
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_class_metier/";
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
fetch(myurl,
|
fetch(myurl,
|
||||||
{
|
{
|
||||||
|
@ -1554,25 +1673,45 @@ const AddClassManual = (props) => {
|
||||||
//---
|
//---
|
||||||
var localid = JSON.parse(x).id;
|
var localid = JSON.parse(x).id;
|
||||||
var local_id = JSON.parse(x)._id;
|
var local_id = JSON.parse(x)._id;
|
||||||
var local_metier = JSON.parse(x).metier;
|
var local_nom = JSON.parse(x).nom;
|
||||||
var local_domaine = JSON.parse(x).domaine;
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_class_domaine_id = JSON.parse(x).class_domaine_id;
|
||||||
|
var local_class_domaine_nom = JSON.parse(x).class_domaine_nom;
|
||||||
|
|
||||||
|
|
||||||
//---
|
//---
|
||||||
var node = {
|
var node = {
|
||||||
"id": localid,
|
"id": localid,
|
||||||
"label": local_metier,
|
"_id": local_id,
|
||||||
"metier": local_metier,
|
"label": local_nom,
|
||||||
"domaine": local_domaine,
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
"class_domaine_id": local_class_domaine_id,
|
||||||
|
"class_domaine_nom": local_class_domaine_nom,
|
||||||
|
|
||||||
};
|
};
|
||||||
new_data2.push(node);
|
new_data2.push(node);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"label": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"class_domaine_id": "",
|
||||||
|
"class_domaine_nom": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
if (new_data2.length > 0) {
|
if (new_data2.length > 0) {
|
||||||
setNew_Get_List_Metiers_result(new_data2);
|
setNew_Get_List_Metiers_result(new_data2);
|
||||||
//console.log(" ### new_data2 ", new_data2);
|
//console.log(" ### new_data2 ", new_data2);
|
||||||
//console.log(" ### setNew_Get_List_Metiers_result ", New_Get_List_Metiers_result);
|
//console.log(" ### setNew_Get_List_Metiers_result ", New_Get_List_Metiers_result);
|
||||||
|
} else {
|
||||||
|
setNew_Get_List_Metiers_result([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1601,7 +1740,7 @@ const AddClassManual = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const [mytrainingdomaine, setmytrainingdomaine] = useState("-");
|
const [mytrainingdomaine, setmytrainingdomaine] = useState("");
|
||||||
|
|
||||||
const [New_Get_List_Domaines_result, setNew_Get_List_Domaines_result] = useState([]);
|
const [New_Get_List_Domaines_result, setNew_Get_List_Domaines_result] = useState([]);
|
||||||
|
|
||||||
|
@ -1610,7 +1749,11 @@ const AddClassManual = (props) => {
|
||||||
const [Get_List_Domaines_result, setGet_List_Domaines_result] = useState();
|
const [Get_List_Domaines_result, setGet_List_Domaines_result] = useState();
|
||||||
function Get_List_Domaines() {
|
function Get_List_Domaines() {
|
||||||
var form = new FormData();
|
var form = new FormData();
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_List_domaine_formation_JSON/";
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_domaine/";
|
||||||
|
|
||||||
fetch(myurl,
|
fetch(myurl,
|
||||||
{
|
{
|
||||||
|
@ -1629,25 +1772,44 @@ const AddClassManual = (props) => {
|
||||||
const new_data = data['message'].map((x) => {
|
const new_data = data['message'].map((x) => {
|
||||||
|
|
||||||
//---
|
//---
|
||||||
var localid = x.id;
|
var localid = JSON.parse(x).id;
|
||||||
var local_domaine = x.domaine;
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
|
||||||
|
|
||||||
//---
|
//---
|
||||||
var node = {
|
var node = {
|
||||||
"id": localid,
|
"id": localid,
|
||||||
"label": local_domaine,
|
"_id": local_id,
|
||||||
"domaine": local_domaine,
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
"label": local_nom,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
new_data2.push(node);
|
new_data2.push(node);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (new_data2.length > 0)
|
var node = {
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"label": "",
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
setNew_Get_List_Domaines_result(new_data2);
|
setNew_Get_List_Domaines_result(new_data2);
|
||||||
|
|
||||||
|
// console.log(" ## new_data2 = ", new_data2);
|
||||||
|
// console.log(" ## New_Get_List_Domaines_result = ", New_Get_List_Domaines_result);
|
||||||
|
} else {
|
||||||
|
setNew_Get_List_Domaines_result([])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setGet_List_Domaines_api("false");
|
setGet_List_Domaines_api("false");
|
||||||
|
@ -2631,6 +2793,10 @@ const AddClassManual = (props) => {
|
||||||
const [p_detail_duree, setp_detail_duree] = useState("");
|
const [p_detail_duree, setp_detail_duree] = useState("");
|
||||||
const [p_detail_url, setp_detail_url] = useState("");
|
const [p_detail_url, setp_detail_url] = useState("");
|
||||||
const [p_detail_lms_class_code, setp_detail_lms_class_code] = useState("");
|
const [p_detail_lms_class_code, setp_detail_lms_class_code] = useState("");
|
||||||
|
|
||||||
|
const [p_detail_version_catalogue, setp_detail_version_catalogue] = useState("");
|
||||||
|
|
||||||
|
|
||||||
const [p_detail_class_inscription_url, setp_detail_class_inscription_url] = useState("");
|
const [p_detail_class_inscription_url, setp_detail_class_inscription_url] = useState("");
|
||||||
const [p_detail_class_banner_img_url, setp_detail_class_banner_img_url] = useState("");
|
const [p_detail_class_banner_img_url, setp_detail_class_banner_img_url] = useState("");
|
||||||
const [p_detail_note, setp_detail_note] = useState("");
|
const [p_detail_note, setp_detail_note] = useState("");
|
||||||
|
@ -2745,6 +2911,29 @@ const AddClassManual = (props) => {
|
||||||
return new Promise(resolve => setTimeout(resolve, milliseconds))
|
return new Promise(resolve => setTimeout(resolve, milliseconds))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const filter_New_Get_List_Metiers_result = () => {
|
||||||
|
|
||||||
|
var local_tab = New_Get_List_Metiers_result.filter((data) => data.class_domaine_id === String(String(mytrainingdomaine).trim()))
|
||||||
|
console.log(" ### local_tab = ", local_tab);
|
||||||
|
|
||||||
|
local_tab.push({
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"label": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"class_domaine_id": "",
|
||||||
|
"class_domaine_nom": "",
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(" ### local_tab 2 = ", local_tab);
|
||||||
|
|
||||||
|
return local_tab;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="addclassmanual">
|
<div className="addclassmanual">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -2970,7 +3159,7 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
{String(props.formation_initiale) !== "1" &&
|
{String(props.formation_initiale) !== "1" &&
|
||||||
<div className="div_row" style={{ "border": "None", "marginLeft": '10px' }} ref={myRef}>
|
<div className="div_row" style={{ "border": "None", "marginLeft": '10px' }} ref={myRef}>
|
||||||
<Button variant="outlined" onClick={submenu_detail_formation} className="detail_class_submenu" id='detail_formation' name='detail_formation'>Détail Formation</Button>
|
<Button variant="outlined" onClick={submenu_detail_formation} className="detail_class_submenu" id='detail_formation' name='detail_formation'>Détail Formation</Button>
|
||||||
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
|
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
|
||||||
</div>}
|
</div>}
|
||||||
<br />
|
<br />
|
||||||
|
@ -3350,9 +3539,12 @@ const AddClassManual = (props) => {
|
||||||
if (value && value._id) {
|
if (value && value._id) {
|
||||||
setp_formateur_id(value._id);
|
setp_formateur_id(value._id);
|
||||||
setp_formateur_label(value.label)
|
setp_formateur_label(value.label)
|
||||||
|
|
||||||
DataUpdated();
|
DataUpdated();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setp_formateur_id("");
|
||||||
|
setp_formateur_label("")
|
||||||
|
DataUpdated();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3383,6 +3575,10 @@ const AddClassManual = (props) => {
|
||||||
setmycpf_label(value.label);
|
setmycpf_label(value.label);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setmycpf("");
|
||||||
|
setmycpf_label("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3408,6 +3604,10 @@ const AddClassManual = (props) => {
|
||||||
setmycertif_label(value.label);
|
setmycertif_label(value.label);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setmycertif("");
|
||||||
|
setmycertif_label("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3434,6 +3634,10 @@ const AddClassManual = (props) => {
|
||||||
setp_class_level_label(value.description)
|
setp_class_level_label(value.description)
|
||||||
DataUpdated();
|
DataUpdated();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setp_class_level("");
|
||||||
|
setp_class_level_label("")
|
||||||
|
DataUpdated();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3454,11 +3658,15 @@ const AddClassManual = (props) => {
|
||||||
value={mypublished_label}
|
value={mypublished_label}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.value) {
|
if (value && value.value) {
|
||||||
console.log(" value = ", value);
|
// console.log(" value = ", value);
|
||||||
setmypublished(value.value);
|
setmypublished(value.value);
|
||||||
setmypublished_label(value.label);
|
setmypublished_label(value.label);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setmypublished("");
|
||||||
|
setmypublished_label("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3480,12 +3688,13 @@ const AddClassManual = (props) => {
|
||||||
value={mypresence_label}
|
value={mypresence_label}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.value) {
|
if (value && value.value) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setmypresence(value.value);
|
setmypresence(value.value);
|
||||||
setmypresence_label(value.label);
|
setmypresence_label(value.label);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
} else {
|
||||||
|
setmypresence("");
|
||||||
|
setmypresence_label("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3512,7 +3721,10 @@ const AddClassManual = (props) => {
|
||||||
setmydistance_label(value.label);
|
setmydistance_label(value.label);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setmydistance("");
|
||||||
|
setmydistance_label("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3541,6 +3753,10 @@ const AddClassManual = (props) => {
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
setmytrainingsupport_label(value.label)
|
setmytrainingsupport_label(value.label)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setmytrainingsupport("");
|
||||||
|
setdatamodification("1");
|
||||||
|
setmytrainingsupport_label("")
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3551,9 +3767,7 @@ const AddClassManual = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{New_Get_List_Domaines_result && New_Get_List_Domaines_result.length > 0 && <div className="training_caract">
|
||||||
|
|
||||||
<div className="training_caract">
|
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
disablePortal
|
disablePortal
|
||||||
|
|
||||||
|
@ -3561,15 +3775,19 @@ const AddClassManual = (props) => {
|
||||||
id="domaine"
|
id="domaine"
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
options={New_Get_List_Domaines_result}
|
options={New_Get_List_Domaines_result}
|
||||||
value={mytrainingdomaine}
|
|
||||||
|
value={New_Get_List_Domaines_result.filter((data) => (data)._id === String(mytrainingdomaine))[0].label}
|
||||||
|
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.domaine) {
|
if (value && value._id) {
|
||||||
setmytrainingdomaine(value.domaine);
|
setmytrainingdomaine(value._id);
|
||||||
setmytrainingmetier("-");
|
setmytrainingmetier("");
|
||||||
|
setmytrainingcategorie("");
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
} else {
|
} else {
|
||||||
setmytrainingdomaine("-");
|
setmytrainingdomaine("");
|
||||||
setmytrainingmetier("-");
|
setmytrainingmetier("");
|
||||||
|
setmytrainingcategorie("");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3577,34 +3795,43 @@ const AddClassManual = (props) => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{mytrainingdomaine && String(mytrainingdomaine).trim() !== "-" && <div className="training_caract">
|
|
||||||
<Autocomplete
|
|
||||||
disablePortal
|
|
||||||
|
|
||||||
name="metier"
|
|
||||||
id="metier"
|
|
||||||
className="disabled_style"
|
|
||||||
options={New_Get_List_Metiers_result.filter((local_mymanager) => local_mymanager.domaine === String(String(mytrainingdomaine).trim()))}
|
|
||||||
value={mytrainingmetier}
|
|
||||||
onChange={(event, value) => {
|
|
||||||
|
|
||||||
|
|
||||||
if (value && value.metier) {
|
|
||||||
|
|
||||||
setmytrainingmetier(value.metier);
|
|
||||||
setdatamodification("1");
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} label="Métier" />
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
{(!mytrainingdomaine || String(mytrainingdomaine).trim().length <= 0 || String(mytrainingdomaine).trim() === "-") && <div className="training_caract">
|
|
||||||
|
{New_Get_List_Metiers_result && New_Get_List_Metiers_result.length > 0 && mytrainingdomaine &&
|
||||||
|
<div className="training_caract">
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
|
||||||
|
name="metier"
|
||||||
|
id="metier"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_Get_List_Metiers_result.filter((data) => data.class_domaine_id === String(String(mytrainingdomaine).trim()))}
|
||||||
|
|
||||||
|
value={New_Get_List_Metiers_result.filter((data) => (data)._id === String(mytrainingmetier))[0].label}
|
||||||
|
|
||||||
|
|
||||||
|
onChange={(event, value) => {
|
||||||
|
|
||||||
|
if (value && value._id) {
|
||||||
|
setmytrainingmetier(value._id);
|
||||||
|
setdatamodification("1");
|
||||||
|
} else {
|
||||||
|
setmytrainingmetier("");
|
||||||
|
setdatamodification("1");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="Métier " />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{(!mytrainingdomaine || String(mytrainingdomaine).trim().length <= 0 || String(mytrainingdomaine).trim() === "") && <div className="training_caract">
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
disablePortal
|
disablePortal
|
||||||
|
|
||||||
|
@ -3616,10 +3843,13 @@ const AddClassManual = (props) => {
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
|
|
||||||
|
|
||||||
if (value && value.metier) {
|
if (value && value._id) {
|
||||||
|
|
||||||
setmytrainingmetier(value.metier);
|
setmytrainingmetier(value.metier);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
} else {
|
||||||
|
setmytrainingmetier("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3631,6 +3861,72 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{New_Get_List_Categorie_result && New_Get_List_Categorie_result.length > 0 && mytrainingdomaine &&
|
||||||
|
<div className="training_caract">
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
|
||||||
|
name="categorie"
|
||||||
|
id="categorie"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_Get_List_Categorie_result.filter((data) => data.class_domaine_id === String(String(mytrainingdomaine).trim()))}
|
||||||
|
|
||||||
|
value={New_Get_List_Categorie_result.filter((data) => (data)._id === String(mytrainingcategorie))[0].label}
|
||||||
|
|
||||||
|
|
||||||
|
onChange={(event, value) => {
|
||||||
|
|
||||||
|
if (value && value._id) {
|
||||||
|
setmytrainingcategorie(value._id);
|
||||||
|
setdatamodification("1");
|
||||||
|
} else {
|
||||||
|
setmytrainingcategorie("");
|
||||||
|
setdatamodification("1");
|
||||||
|
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="Catégorie" />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{(!mytrainingdomaine || String(mytrainingdomaine).trim().length <= 0 || String(mytrainingdomaine).trim() === "") && <div className="training_caract">
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
|
||||||
|
name="categorie"
|
||||||
|
id="categorie"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_Get_List_Categorie_result}
|
||||||
|
value={mytrainingcategorie}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
|
||||||
|
|
||||||
|
if (value && value._id) {
|
||||||
|
|
||||||
|
setmytrainingcategorie(value.metier);
|
||||||
|
setdatamodification("1");
|
||||||
|
} else {
|
||||||
|
setmytrainingcategorie("");
|
||||||
|
setdatamodification("1");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="Catégorie" />
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="training_caract">
|
<div className="training_caract">
|
||||||
<TextField
|
<TextField
|
||||||
name="price"
|
name="price"
|
||||||
|
@ -3681,10 +3977,11 @@ const AddClassManual = (props) => {
|
||||||
value={mytrainingdurationunit}
|
value={mytrainingdurationunit}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.value) {
|
if (value && value.value) {
|
||||||
|
|
||||||
setmytrainingdurationunit(value.value);
|
setmytrainingdurationunit(value.value);
|
||||||
setdatamodification("1");
|
setdatamodification("1");
|
||||||
|
} else {
|
||||||
|
setmytrainingdurationunit("");
|
||||||
|
setdatamodification("1");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -3801,6 +4098,24 @@ const AddClassManual = (props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="training_caract">
|
||||||
|
<TextField
|
||||||
|
name="lms_class_code"
|
||||||
|
label="Version Catalogue"
|
||||||
|
type="text"
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
|
disabled={false}
|
||||||
|
className="disabled_style"
|
||||||
|
value={p_detail_version_catalogue}
|
||||||
|
onChange={(e) => {
|
||||||
|
setp_detail_version_catalogue(e.target.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* -- début champs specifiques **/}
|
{/* -- début champs specifiques **/}
|
||||||
<div className="div_row" style={{ "border": 'none' }}>
|
<div className="div_row" style={{ "border": 'none' }}>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -44,7 +44,7 @@ import { PiDotsThree } from "react-icons/pi";
|
||||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||||
|
|
||||||
const DistplayPartnerTraningsPage = (props) => {
|
const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const [myApiResponse, setmyApiResponse] = useState("false");
|
const [myApiResponse, setmyApiResponse] = useState("false");
|
||||||
const filters = [
|
const filters = [
|
||||||
|
@ -67,7 +67,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
const changeHandler2 = (event) => {
|
const changeHandler2 = (event) => {
|
||||||
|
|
||||||
|
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
Closecreatetraining();
|
Closecreatetraining();
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
|
@ -158,8 +158,8 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
});
|
});
|
||||||
alert(result['message']);
|
alert(result['message']);
|
||||||
setformation_file_name("");
|
setformation_file_name("");
|
||||||
|
|
||||||
console.log(" 000000000000000&")
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -407,18 +407,25 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
{ field: 'duration_unit', headerName: 'duration_unit', hide: true, Width: 0, editable: false, },
|
{ field: 'duration_unit', headerName: 'duration_unit', hide: true, Width: 0, editable: false, },
|
||||||
{ field: 'duration_in_hour', headerName: 'duration_in_hour', hide: true, Width: 0, editable: false, },
|
{ field: 'duration_in_hour', headerName: 'duration_in_hour', hide: true, Width: 0, editable: false, },
|
||||||
{ field: 'currency', headerName: 'currency', hide: true, Width: 0, editable: false, },
|
{ field: 'currency', headerName: 'currency', hide: true, Width: 0, editable: false, },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ field: 'zone_diffusion', headerName: 'zone_diffusion', hide: true, maxWidth: 1, editable: false, },
|
{ field: 'zone_diffusion', headerName: 'zone_diffusion', hide: true, maxWidth: 1, editable: false, },
|
||||||
{ field: 'internal_url', headerName: 'internal_url', hide: true, editable: false, },
|
{ field: 'internal_url', headerName: 'internal_url', hide: true, editable: false, },
|
||||||
{ field: 'external_code', headerName: 'Code Formation', minWidth: 150, flex: 1, maxWidth: 250, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
{ field: 'external_code', headerName: 'Code Formation', minWidth: 150, flex: 1, maxWidth: 250, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'title', headerName: 'Titre', minWidth: 300, flex: 1, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
{ field: 'title', headerName: 'Titre', minWidth: 300, flex: 1, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
||||||
{ field: 'domain', headerName: 'Domaine', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
{ field: 'domain', headerName: 'Domaine', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
||||||
{ field: 'metier', headerName: 'Métier', minWidth: 50, flex: 1, maxWidth: 150, hideable: true, hide: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
{ field: 'metier', headerName: 'Métier', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, hide: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
||||||
|
|
||||||
|
{ field: 'categorie', headerName: 'Catégorie', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, hide: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
||||||
|
|
||||||
|
|
||||||
{ field: 'nb_session_formation', headerName: 'Nb Session', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", renderCell: (params) => <Display_Colunm_text {...params} />, },
|
{ field: 'nb_session_formation', headerName: 'Nb Session', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center", renderCell: (params) => <Display_Colunm_text {...params} />, },
|
||||||
{ field: 'url', headerName: 'lien', minWidth: 20, hideable: true, hide: true, editable: false, },
|
{ field: 'url', headerName: 'lien', minWidth: 20, hideable: true, hide: true, editable: false, },
|
||||||
{ field: 'description', headerName: 'Description', hide: true, resizable: true, minWidth: 250, maxWidth: 300, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
{ field: 'description', headerName: 'Description', hide: true, resizable: true, minWidth: 250, maxWidth: 300, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
|
|
||||||
|
{ field: 'version', headerName: 'Version Catalogue', hide: true, minWidth: 100, maxWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'price', headerName: 'Prix', minWidth: 50, flex: 1, maxWidth: 100, align: "center", resizable: true, hide: ismobilephone_columns_hide, editable: false,
|
field: 'price', headerName: 'Prix', minWidth: 50, flex: 1, maxWidth: 100, align: "center", resizable: true, hide: ismobilephone_columns_hide, editable: false,
|
||||||
renderCell: (params) => <Display_Colunm_text {...params} />,
|
renderCell: (params) => <Display_Colunm_text {...params} />,
|
||||||
|
@ -1099,8 +1106,274 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [New_Get_List_Domaines_result, setNew_Get_List_Domaines_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_List_Domaines_api, setGet_List_Domaines_api] = useState();
|
||||||
|
const [Get_List_Domaines_message, setGet_List_Domaines_message] = useState();
|
||||||
|
const [Get_List_Domaines_result, setGet_List_Domaines_result] = useState();
|
||||||
|
function Get_List_Domaines() {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_domaine/";
|
||||||
|
|
||||||
|
fetch(myurl,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: form,
|
||||||
|
})
|
||||||
|
.then((data) => data.json())
|
||||||
|
.then((data) => {
|
||||||
|
//console.log(' IN Get_List_Domaines Success:', data['message'], "data['status'] = ", data['status']);
|
||||||
|
|
||||||
|
if (String(data['status']) === String("true")) {
|
||||||
|
setGet_List_Domaines_api("true");
|
||||||
|
setGet_List_Domaines_result(data['message']);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = data['message'].map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": localid,
|
||||||
|
"_id": local_id,
|
||||||
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
"label": local_nom,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
var node = {
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"label": "",
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Get_List_Domaines_result(new_data2);
|
||||||
|
|
||||||
|
// console.log(" ## new_data2 = ", new_data2);
|
||||||
|
// console.log(" ## New_Get_List_Domaines_result = ", New_Get_List_Domaines_result);
|
||||||
|
} else {
|
||||||
|
setNew_Get_List_Domaines_result([])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_List_Domaines_api("false");
|
||||||
|
setGet_List_Domaines_message(data['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('Error Get_List_Domaines :', error);
|
||||||
|
setGet_List_Domaines_api("false");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const [New_Get_List_Metiers_result, setNew_Get_List_Metiers_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_List_Metiers_api, setGet_List_Metiers_api] = useState();
|
||||||
|
const [Get_List_Metiers_message, setGet_List_Metiers_message] = useState();
|
||||||
|
const [Get_List_Metiers_result, setGet_List_Metiers_result] = useState();
|
||||||
|
function Get_List_Metiers() {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_class_metier/";
|
||||||
|
setLoading(true);
|
||||||
|
fetch(myurl,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: form,
|
||||||
|
})
|
||||||
|
.then((data) => data.json())
|
||||||
|
.then((data) => {
|
||||||
|
setLoading(false);
|
||||||
|
// console.log(' IN Get_List_Metiers Success:', data['message'], "data['status'] = ", data['status']);
|
||||||
|
|
||||||
|
if (String(data['status']) === String("true")) {
|
||||||
|
setGet_List_Metiers_api("true");
|
||||||
|
setGet_List_Metiers_result(data['message']);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = data['message'].map((x) => {
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_class_domaine_id = JSON.parse(x).class_domaine_id;
|
||||||
|
var local_class_domaine_nom = JSON.parse(x).class_domaine_nom;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": localid,
|
||||||
|
"_id": local_id,
|
||||||
|
"label": local_nom,
|
||||||
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
"class_domaine_id": local_class_domaine_id,
|
||||||
|
"class_domaine_nom": local_class_domaine_nom,
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"label": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"class_domaine_id": "",
|
||||||
|
"class_domaine_nom": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Get_List_Metiers_result(new_data2);
|
||||||
|
//console.log(" ### new_data2 ", new_data2);
|
||||||
|
//console.log(" ### setNew_Get_List_Metiers_result ", New_Get_List_Metiers_result);
|
||||||
|
} else {
|
||||||
|
setNew_Get_List_Metiers_result([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_List_Metiers_api("false");
|
||||||
|
setGet_List_Metiers_message(data['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.error('Error Get_List_Metiers :', error);
|
||||||
|
setGet_List_Metiers_api("false");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const [New_Get_List_Categorie_result, setNew_Get_List_Categorie_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_List_Categorie_api, setGet_List_Categorie_api] = useState();
|
||||||
|
const [Get_List_Categorie_message, setGet_List_Categorie_message] = useState();
|
||||||
|
const [Get_List_Categorie_result, setGet_List_Categorie_result] = useState();
|
||||||
|
function Get_List_Categorie() {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_Categorie/";
|
||||||
|
setLoading(true);
|
||||||
|
fetch(myurl,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: form,
|
||||||
|
})
|
||||||
|
.then((data) => data.json())
|
||||||
|
.then((data) => {
|
||||||
|
setLoading(false);
|
||||||
|
// console.log(' IN Get_List_Categorie Success:', data['message'], "data['status'] = ", data['status']);
|
||||||
|
|
||||||
|
if (String(data['status']) === String("true")) {
|
||||||
|
setGet_List_Categorie_api("true");
|
||||||
|
setGet_List_Categorie_result(data['message']);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = data['message'].map((x) => {
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
var local_code = JSON.parse(x).code;
|
||||||
|
var local_class_domaine_id = JSON.parse(x).class_domaine_id;
|
||||||
|
var local_class_domaine_nom = JSON.parse(x).class_domaine_nom;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": localid,
|
||||||
|
"_id": local_id,
|
||||||
|
"label": local_nom,
|
||||||
|
"nom": local_nom,
|
||||||
|
"code": local_code,
|
||||||
|
"class_domaine_id": local_class_domaine_id,
|
||||||
|
"class_domaine_nom": local_class_domaine_nom,
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"id": "",
|
||||||
|
"_id": "",
|
||||||
|
"label": "",
|
||||||
|
"nom": "",
|
||||||
|
"code": "",
|
||||||
|
"class_domaine_id": "",
|
||||||
|
"class_domaine_nom": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Get_List_Categorie_result(new_data2);
|
||||||
|
//console.log(" ### new_data2 ", new_data2);
|
||||||
|
//console.log(" ### setNew_Get_List_Categorie_result ", New_Get_List_Categorie_result);
|
||||||
|
} else {
|
||||||
|
setNew_Get_List_Categorie_result([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_List_Categorie_api("false");
|
||||||
|
setGet_List_Categorie_message(data['message']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.error('Error Get_List_Categorie :', error);
|
||||||
|
setGet_List_Categorie_api("false");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const [ismobilephone, setismobilephone] = useState();
|
const [ismobilephone, setismobilephone] = useState();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
Get_List_Domaines();
|
||||||
|
Get_List_Metiers();
|
||||||
|
Get_List_Categorie();
|
||||||
|
|
||||||
Get_Partner_Object_Specific_Fields("myclass");
|
Get_Partner_Object_Specific_Fields("myclass");
|
||||||
|
|
||||||
//GetAllClass();
|
//GetAllClass();
|
||||||
|
@ -1623,12 +1896,12 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
<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,
|
||||||
'class_id':classidtrainingtoupdate
|
'class_id': classidtrainingtoupdate
|
||||||
|
|
||||||
|
}} ispending={props.ispending} currentpack={props.currentpack} closeTrainingForm={closeTrainingForm}
|
||||||
|
rows_champs_specifics={rows_champs_specifics}
|
||||||
|
formation_initiale={props.formation_initiale}
|
||||||
|
|
||||||
}} ispending={props.ispending} currentpack={props.currentpack} closeTrainingForm={closeTrainingForm}
|
|
||||||
rows_champs_specifics={rows_champs_specifics}
|
|
||||||
formation_initiale={props.formation_initiale}
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1753,27 +2026,27 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
{p_filtre2 &&
|
{p_filtre2 &&
|
||||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||||
<div className="div_row_gauche texte_area_filter">
|
<div className="div_row_gauche texte_area_filter">
|
||||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||||
disablePortal
|
disablePortal
|
||||||
name="filtre2"
|
name="filtre2"
|
||||||
id="filtre2"
|
id="filtre2"
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre2))[0].label}
|
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre2))[0].label}
|
||||||
options={New_Option_Filter}
|
options={New_Option_Filter}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.value) {
|
if (value && value.value) {
|
||||||
setp_filtre2(value.value);
|
setp_filtre2(value.value);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
|
||||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
|
||||||
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
/>}
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>}
|
||||||
{/*<TextField
|
{/*<TextField
|
||||||
name="filtre2"
|
name="filtre2"
|
||||||
label="Choisir un champ"
|
label="Choisir un champ"
|
||||||
|
@ -1853,29 +2126,29 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||||
<div className="div_row_gauche texte_area_filter">
|
<div className="div_row_gauche texte_area_filter">
|
||||||
|
|
||||||
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
{New_Option_Filter && New_Option_Filter.length > 0 && <Autocomplete
|
||||||
disablePortal
|
disablePortal
|
||||||
name="filtre3"
|
name="filtre3"
|
||||||
id="filtre3"
|
id="filtre3"
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre3))[0].label}
|
value={New_Option_Filter.filter((data) => (data).value === String(p_filtre3))[0].label}
|
||||||
options={New_Option_Filter}
|
options={New_Option_Filter}
|
||||||
onChange={(event, value) => {
|
onChange={(event, value) => {
|
||||||
if (value && value.value) {
|
if (value && value.value) {
|
||||||
setp_filtre3(value.value);
|
setp_filtre3(value.value);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}}
|
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
|
||||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
|
||||||
|
|
||||||
/>
|
|
||||||
}
|
}
|
||||||
/>}
|
|
||||||
|
|
||||||
{/* <TextField
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>}
|
||||||
|
|
||||||
|
{/* <TextField
|
||||||
name="filtre3"
|
name="filtre3"
|
||||||
label="Choisir un champ"
|
label="Choisir un champ"
|
||||||
select
|
select
|
||||||
|
@ -2008,7 +2281,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DataGrid
|
{New_Get_List_Domaines_result && <DataGrid
|
||||||
checkboxSelection
|
checkboxSelection
|
||||||
|
|
||||||
onSelectionModelChange={(newSelectionModel) => {
|
onSelectionModelChange={(newSelectionModel) => {
|
||||||
|
@ -2026,9 +2299,16 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
zone_diffusion: JSON.parse(item).zone_diffusion_str,
|
zone_diffusion: JSON.parse(item).zone_diffusion_str,
|
||||||
external_code: JSON.parse(item).external_code,
|
external_code: JSON.parse(item).external_code,
|
||||||
title: parse((JSON.parse(item).title).replace(/(<([^>]+)>)/ig, '')),
|
title: parse((JSON.parse(item).title).replace(/(<([^>]+)>)/ig, '')),
|
||||||
domain: JSON.parse(item).domaine,
|
|
||||||
metier: JSON.parse(item).metier,
|
domain: New_Get_List_Domaines_result.filter((data) => (data)._id === String(JSON.parse(item).domaine))[0].label,
|
||||||
|
|
||||||
|
metier: New_Get_List_Metiers_result.filter((data) => (data)._id === String(JSON.parse(item).metier))[0].label,
|
||||||
|
|
||||||
|
categorie: New_Get_List_Categorie_result.filter((data) => (data)._id === String(JSON.parse(item).categorie))[0].label,
|
||||||
|
|
||||||
|
|
||||||
url: JSON.parse(item).url,
|
url: JSON.parse(item).url,
|
||||||
|
|
||||||
price: JSON.parse(item).price,
|
price: JSON.parse(item).price,
|
||||||
description: parse((JSON.parse(item).description).replace(/(<([^>]+)>)/ig, '')),
|
description: parse((JSON.parse(item).description).replace(/(<([^>]+)>)/ig, '')),
|
||||||
published: JSON.parse(item).published,
|
published: JSON.parse(item).published,
|
||||||
|
@ -2039,7 +2319,10 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
presentiel: JSON.parse(item).presentiel.presentiel,
|
presentiel: JSON.parse(item).presentiel.presentiel,
|
||||||
distanciel: JSON.parse(item).presentiel.distantiel,
|
distanciel: JSON.parse(item).presentiel.distantiel,
|
||||||
cible: JSON.parse(item).pourqui,
|
cible: JSON.parse(item).pourqui,
|
||||||
currecny: JSON.parse(item).currecny,
|
currency: JSON.parse(item).currecny,
|
||||||
|
|
||||||
|
version: JSON.parse(item).version,
|
||||||
|
|
||||||
nb_session_formation: JSON.parse(item).nb_session_formation,
|
nb_session_formation: JSON.parse(item).nb_session_formation,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2104,7 +2387,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
sx={datagridSx}
|
sx={datagridSx}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>}
|
||||||
</Box>
|
</Box>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2253,8 +2536,8 @@ const DistplayPartnerTraningsPage = (props) => {
|
||||||
style={{ display: 'none' }}
|
style={{ display: 'none' }}
|
||||||
name="liste_formation_file"
|
name="liste_formation_file"
|
||||||
onChange={handleSubmission}
|
onChange={handleSubmission}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button variant="outlined" onClick={Createtraining}
|
<Button variant="outlined" onClick={Createtraining}
|
||||||
|
|
|
@ -35,7 +35,8 @@ import {
|
||||||
FcList, FcCurrencyExchange,
|
FcList, FcCurrencyExchange,
|
||||||
FcFeedback, FcKey, FcVideoCall, FcSettings,
|
FcFeedback, FcKey, FcVideoCall, FcSettings,
|
||||||
FcBusinesswoman, FcServices, FcCollect, FcCandleSticks, FcKindle,
|
FcBusinesswoman, FcServices, FcCollect, FcCandleSticks, FcKindle,
|
||||||
FcFlowChart, FcReading, FcFinePrint, FcCancel, FcCalendar, FcOrgUnit
|
FcFlowChart, FcReading, FcFinePrint, FcCancel, FcCalendar, FcOrgUnit,
|
||||||
|
FcEngineering
|
||||||
} from "react-icons/fc";
|
} from "react-icons/fc";
|
||||||
import { PiStudent } from "react-icons/pi";
|
import { PiStudent } from "react-icons/pi";
|
||||||
|
|
||||||
|
@ -1496,8 +1497,8 @@ const Partner = (props) => {
|
||||||
{String(menu) !== "mes_ue" && <MenuItem onClick={DiplayPartner_UE} className="sousmenu" icon={<FcOrgUnit className="icone_menu" />}> UNIT. ENSEI. </MenuItem>}
|
{String(menu) !== "mes_ue" && <MenuItem onClick={DiplayPartner_UE} className="sousmenu" icon={<FcOrgUnit className="icone_menu" />}> UNIT. ENSEI. </MenuItem>}
|
||||||
{String(menu) === "mes_ue" && <MenuItem onClick={DiplayPartner_UE} className="sousmenu_selected" icon={<FcOrgUnit className="icone_menu" />}> UNIT. ENSEI. </MenuItem>}
|
{String(menu) === "mes_ue" && <MenuItem onClick={DiplayPartner_UE} className="sousmenu_selected" icon={<FcOrgUnit className="icone_menu" />}> UNIT. ENSEI. </MenuItem>}
|
||||||
|
|
||||||
{String(menu) !== "domaine_categorie_metier" && <MenuItem onClick={DiplayPartner_Domaine_Categorie_Metier} className="sousmenu" icon={<FcOrgUnit className="icone_menu" />}> CARACTERISTIQUES </MenuItem>}
|
{String(menu) !== "domaine_categorie_metier" && <MenuItem onClick={DiplayPartner_Domaine_Categorie_Metier} className="sousmenu" icon={<FcEngineering className="icone_menu" />}> CARACTERISTIQUES </MenuItem>}
|
||||||
{String(menu) === "domaine_categorie_metier" && <MenuItem onClick={DiplayPartner_Domaine_Categorie_Metier} className="sousmenu_selected" icon={<FcOrgUnit className="icone_menu" />}> CARACTERISTIQUES </MenuItem>}
|
{String(menu) === "domaine_categorie_metier" && <MenuItem onClick={DiplayPartner_Domaine_Categorie_Metier} className="sousmenu_selected" icon={<FcEngineering className="icone_menu" />}> CARACTERISTIQUES </MenuItem>}
|
||||||
|
|
||||||
</SubMenu>
|
</SubMenu>
|
||||||
|
|
||||||
|
@ -2197,6 +2198,15 @@ const Partner = (props) => {
|
||||||
<hr className="my_hr" />
|
<hr className="my_hr" />
|
||||||
|
|
||||||
|
|
||||||
|
<Tooltip className="tooltip_css" id="tooltip_id_82" />
|
||||||
|
<a data-tooltip-id="tooltip_id_82" data-tooltip-html="CARACTERISTIQUES">
|
||||||
|
{String(menu) !== "domaine_categorie_metier" && <div className="sousmenu" onClick={DiplayPartner_Domaine_Categorie_Metier} > <FcEngineering className="icone_menu" /> </div>}
|
||||||
|
{String(menu) === "domaine_categorie_metier" && <div className="sousmenu_selected" onClick={DiplayPartner_Domaine_Categorie_Metier} ><FcEngineering className="icone_menu" /> </div>}
|
||||||
|
</a>
|
||||||
|
<hr className="my_hr" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Tooltip className="tooltip_css" id="tooltip_id_9" />
|
<Tooltip className="tooltip_css" id="tooltip_id_9" />
|
||||||
<a data-tooltip-id="tooltip_id_9" data-tooltip-html="SESSIONS">
|
<a data-tooltip-id="tooltip_id_9" data-tooltip-html="SESSIONS">
|
||||||
{String(menu) !== "mes_sessions" && <div className="sousmenu" onClick={DiplaySessionList} > <FcFlowChart className="icone_menu" /> </div>}
|
{String(menu) !== "mes_sessions" && <div className="sousmenu" onClick={DiplaySessionList} > <FcFlowChart className="icone_menu" /> </div>}
|
||||||
|
|
|
@ -1456,8 +1456,6 @@ const Partner_Configuration_Technique = (props) => {
|
||||||
form.append("token", stored_cookie);
|
form.append("token", stored_cookie);
|
||||||
form.append("_id", type_client_id);
|
form.append("_id", type_client_id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Client_Type/";
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Client_Type/";
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
@ -2324,7 +2322,7 @@ const Partner_Configuration_Technique = (props) => {
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
{/*** Type Client */}
|
||||||
<Dialog
|
<Dialog
|
||||||
open={Dialog_type_client_1_open}
|
open={Dialog_type_client_1_open}
|
||||||
onClose={Dialog_type_client_1_handleClose}
|
onClose={Dialog_type_client_1_handleClose}
|
||||||
|
@ -2398,6 +2396,9 @@ const Partner_Configuration_Technique = (props) => {
|
||||||
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
{/*** Fin Type Client */}
|
||||||
|
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
open={Dialog_site_ftion_1_open}
|
open={Dialog_site_ftion_1_open}
|
||||||
onClose={Dialog_site_ftion_1_handleClose}
|
onClose={Dialog_site_ftion_1_handleClose}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue