30/05/2024 - 21h
parent
10fb098757
commit
6d598f3bd1
|
@ -2445,11 +2445,6 @@ const CRM_Opportunite = (props) => {
|
||||||
|
|
||||||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
||||||
|
|
||||||
{<Button variant="outlined" onClick={"submenu_import_materiel"} className="detail_class_submenu bton_import_excel"
|
|
||||||
id='menu_import_participant' name='menu_import_participant'>Importer Opportunités Excel
|
|
||||||
<img src={excel_icone} alt="ajout csv" className="icon_excel" />
|
|
||||||
</Button>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
<Button variant="outlined" onClick={submenu_add_one_crm_opport}
|
<Button variant="outlined" onClick={submenu_add_one_crm_opport}
|
||||||
|
@ -2531,11 +2526,6 @@ const CRM_Opportunite = (props) => {
|
||||||
|
|
||||||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
||||||
|
|
||||||
{<Button variant="outlined" onClick={"submenu_import_materiel"} className="detail_class_submenu bton_import_excel"
|
|
||||||
id='menu_import_participant' name='menu_import_participant'>Importer Opportunités Excel
|
|
||||||
<img src={excel_icone} alt="ajout csv" className="icon_excel" />
|
|
||||||
</Button>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
<Button variant="outlined" onClick={submenu_add_one_crm_opport}
|
<Button variant="outlined" onClick={submenu_add_one_crm_opport}
|
||||||
|
|
|
@ -74,6 +74,9 @@ import FormLabel from '@mui/material/FormLabel';
|
||||||
import allLocales from '@fullcalendar/core/locales-all'
|
import allLocales from '@fullcalendar/core/locales-all'
|
||||||
import listPlugin from '@fullcalendar/list';
|
import listPlugin from '@fullcalendar/list';
|
||||||
import multiMonthPlugin from '@fullcalendar/multimonth'
|
import multiMonthPlugin from '@fullcalendar/multimonth'
|
||||||
|
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
|
||||||
|
import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
||||||
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
|
|
||||||
|
|
||||||
const Module_Selection_Evaluation_Apprenants = (props) => {
|
const Module_Selection_Evaluation_Apprenants = (props) => {
|
||||||
|
@ -282,7 +285,7 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
|
||||||
.then((data) => data.json())
|
.then((data) => data.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
console.log(' GetListeInscrit : Success:', data['message'], "data['status'] = ", data['status']);
|
//console.log(' GetListeInscrit : Success:', data['message'], "data['status'] = ", data['status']);
|
||||||
setGetListePreinscrit_insc_result(data['message']);
|
setGetListePreinscrit_insc_result(data['message']);
|
||||||
|
|
||||||
if (String(data['status']) === String("true")) {
|
if (String(data['status']) === String("true")) {
|
||||||
|
@ -420,6 +423,317 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [New_Get_List_UE_From_Class_Id_result, setNew_Get_List_UE_From_Class_Id_result] = useState([]);
|
||||||
|
|
||||||
|
const [Get_List_UE_From_Class_Id_api, setGet_List_UE_From_Class_Id_api] = useState();
|
||||||
|
const [Get_List_UE_From_Class_Id_message, setGet_List_UE_From_Class_Id_message] = useState();
|
||||||
|
const [Get_List_UE_From_Class_Id_result, setGet_List_UE_From_Class_Id_result] = useState();
|
||||||
|
function Get_List_UE_From_Class_Id(local_class_id) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("class_id", local_class_id);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_Of_Given_Class/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Get_List_UE_From_Class_Id res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Get_List_UE_From_Class_Id res.data.message r_class = " + res.data.message);
|
||||||
|
setGet_List_UE_From_Class_Id_api("true");
|
||||||
|
setGet_List_UE_From_Class_Id_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = res.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_titre = JSON.parse(x).titre;
|
||||||
|
|
||||||
|
var local_class_id = JSON.parse(x).class_id;
|
||||||
|
var local_internal_url = JSON.parse(x).internal_url;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": local_id,
|
||||||
|
"id": localid,
|
||||||
|
"label": local_code,
|
||||||
|
"code": local_code,
|
||||||
|
"titre": local_titre,
|
||||||
|
"class_id": local_class_id,
|
||||||
|
"internal_url": local_internal_url,
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
/* var node = {
|
||||||
|
"_id": "",
|
||||||
|
"id": "",
|
||||||
|
"label": "",
|
||||||
|
"code": "",
|
||||||
|
"titre": "",
|
||||||
|
"class_id": "",
|
||||||
|
"internal_url": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);*/
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Get_List_UE_From_Class_Id_result(new_data2);
|
||||||
|
// console.log("### setNew_Get_List_UE_From_Class_Id_result = ", new_data2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_List_UE_From_Class_Id_api("false");
|
||||||
|
setGet_List_UE_From_Class_Id_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Get_List_UE_From_Class_Id = ', error);
|
||||||
|
setGet_List_UE_From_Class_Id_api("false");
|
||||||
|
alert(" Impossible de recuperer la liste des UE de la formation");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [New_Getall_Class_List_Evalution_result, setNew_Getall_Class_List_Evalution_result] = useState([]);
|
||||||
|
|
||||||
|
const [Getall_Class_List_Evalution_api, setGetall_Class_List_Evalution_api] = useState();
|
||||||
|
const [Getall_Class_List_Evalution_message, setGetall_Class_List_Evalution_message] = useState();
|
||||||
|
const [Getall_Class_List_Evalution_result, setGetall_Class_List_Evalution_result] = useState([]);
|
||||||
|
function Getall_Class_List_Evalution(local_class_id) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("class_id", local_class_id);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Class_Evaluation/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Getall_Class_List_Evalution res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Getall_Class_List_Evalution res.data.message r_class = " + res.data.message);
|
||||||
|
setGetall_Class_List_Evalution_api("true");
|
||||||
|
setGetall_Class_List_Evalution_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = res.data.message.map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_class_id = JSON.parse(x).class_id;
|
||||||
|
var local_class_ue_id = JSON.parse(x).class_ue_id;
|
||||||
|
var local_class_ue_code = JSON.parse(x).class_ue_code;
|
||||||
|
var local_type_evaluation_id = JSON.parse(x).type_evaluation_id;
|
||||||
|
var local_type_evaluation_code = JSON.parse(x).type_evaluation_code;
|
||||||
|
var local_max_note = JSON.parse(x).max_note;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": local_id,
|
||||||
|
"id": localid,
|
||||||
|
"label": local_type_evaluation_code + "-" + local_class_ue_code,
|
||||||
|
"class_id": local_class_id,
|
||||||
|
"class_ue_id": local_class_ue_id,
|
||||||
|
"class_ue_code": local_class_ue_code,
|
||||||
|
"type_evaluation_id": local_type_evaluation_id,
|
||||||
|
"type_evaluation_code": local_type_evaluation_code,
|
||||||
|
"max_note": local_max_note,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
/* var node = {
|
||||||
|
"_id": "",
|
||||||
|
"id": "",
|
||||||
|
"label": "",
|
||||||
|
"class_id": "",
|
||||||
|
"class_ue_id": "",
|
||||||
|
"class_ue_code": "",
|
||||||
|
"type_evaluation_id": "",
|
||||||
|
"type_evaluation_code": "",
|
||||||
|
"max_note": "",
|
||||||
|
|
||||||
|
};
|
||||||
|
new_data2.push(node);*/
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Getall_Class_List_Evalution_result(new_data2);
|
||||||
|
//console.log(" setNew_Getall_Class_List_Evalution_result = ", new_data2);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGetall_Class_List_Evalution_api("false");
|
||||||
|
setGetall_Class_List_Evalution_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Getall_Class_List_Evalution = ', error);
|
||||||
|
setGetall_Class_List_Evalution_api("false");
|
||||||
|
alert(" Impossible de recuperer la liste des évaluations de la formatio");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const [New_Get_Inscrit_List_UE_result, setNew_Get_Inscrit_List_UE_result] = useState([]);
|
||||||
|
const [tab_inscrit_ue_id, settab_inscrit_ue_id] = useState([]);
|
||||||
|
|
||||||
|
const [Get_Inscrit_List_UE_api, setGet_Inscrit_List_UE_api] = useState();
|
||||||
|
const [Get_Inscrit_List_UE_message, setGet_Inscrit_List_UE_message] = useState();
|
||||||
|
const [Get_Inscrit_List_UE_result, setGet_Inscrit_List_UE_result] = useState();
|
||||||
|
function Get_Inscrit_List_UE(local_inscription_id) {
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("inscription_id", local_inscription_id);
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Inscrit_List_EU/";
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Get_Inscrit_List_UE res.data.status = " + res.data.status);
|
||||||
|
// console.log(" In Get_Inscrit_List_UE res.data.message r_class = " + res.data.message);
|
||||||
|
setGet_Inscrit_List_UE_api("true");
|
||||||
|
setGet_Inscrit_List_UE_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
|
||||||
|
var tab_tmp = []
|
||||||
|
const new_data = res.data.message.map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_class_id = JSON.parse(x).class_id;
|
||||||
|
var local_class_eu_id = JSON.parse(x).class_eu_id;
|
||||||
|
var local_ue_code = JSON.parse(x).code;
|
||||||
|
var local_ue_titre = JSON.parse(x).titre;
|
||||||
|
|
||||||
|
|
||||||
|
tab_tmp.push(local_class_eu_id);
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": local_id,
|
||||||
|
"id": localid,
|
||||||
|
"label": local_ue_code,
|
||||||
|
"class_id": local_class_id,
|
||||||
|
"class_eu_id": local_class_eu_id,
|
||||||
|
"ue_code": local_ue_code,
|
||||||
|
"ue_titre": local_ue_titre,
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
// return {"_id": " + str(local_id) + ", "label": " + local_courrier_template_ref_interne + '" , "courrier_template_ref_interne": "' + local_courrier_template_ref_interne + '", "nom_champ_technique": "' + local_nom_champ_technique + '", "nom_champ_fonctionel": "' + local_nom_champ_fonctionel + '","valide": "1" };
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": "",
|
||||||
|
"id": "",
|
||||||
|
"label": "",
|
||||||
|
"class_id": "",
|
||||||
|
"class_eu_id": "",
|
||||||
|
"ue_code": "",
|
||||||
|
"ue_titre": "",
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
|
||||||
|
|
||||||
|
if (new_data2.length > 0) {
|
||||||
|
setNew_Get_Inscrit_List_UE_result(new_data2);
|
||||||
|
settab_inscrit_ue_id(tab_tmp);
|
||||||
|
|
||||||
|
if (New_Getall_Class_List_Evalution_result && New_Getall_Class_List_Evalution_result.length > 0) {
|
||||||
|
|
||||||
|
var local_defaultValue = New_Getall_Class_List_Evalution_result.filter((data) => {
|
||||||
|
if (tab_inscrit_evaluation_ue_id.includes(String(data.type_evaluation_id))) {
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
setinscription_list_ue_eval(local_defaultValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGet_Inscrit_List_UE_api("false");
|
||||||
|
setGet_Inscrit_List_UE_message(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Get_Inscrit_List_UE = ', error);
|
||||||
|
setGet_Inscrit_List_UE_api("false");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const [tab_inscrit_evaluation_ue_id, settab_inscrit_evaluation_ue_id] = useState([]);
|
||||||
|
|
||||||
|
const [inscription_list_ue, setinscription_list_ue] = useState([]);
|
||||||
|
const [inscription_list_ue_eval, setinscription_list_ue_eval] = useState([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
|
||||||
|
Get_List_UE_From_Class_Id(props.class_id);
|
||||||
|
Getall_Class_List_Evalution(props.class_id);
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const icon = <CheckBoxOutlineBlankIcon fontSize="small" />;
|
||||||
|
const checkedIcon = <CheckBoxIcon fontSize="small" />;
|
||||||
|
|
||||||
|
const [ueChanged, setueChanged] = useState("");
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="moduleselectionevaluationapprenants">
|
<div className="moduleselectionevaluationapprenants">
|
||||||
|
|
||||||
|
@ -536,7 +850,61 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{/*
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="session_caract"> <b>Unite D'enseignement </b> <br />
|
||||||
|
{New_Get_List_UE_From_Class_Id_result && New_Get_List_UE_From_Class_Id_result.length > 0 &&
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
multiple
|
||||||
|
name="detail_ue"
|
||||||
|
id="detail_ue"
|
||||||
|
//className="disabled_style"
|
||||||
|
disablePortal
|
||||||
|
disableCloseOnSelect
|
||||||
|
getOptionLabel={(option) => option.label}
|
||||||
|
|
||||||
|
options={New_Get_List_UE_From_Class_Id_result}
|
||||||
|
defaultValue={New_Get_List_UE_From_Class_Id_result.filter((data) => {
|
||||||
|
if (tab_inscrit_ue_id.includes(String(data._id))) {
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
})}
|
||||||
|
|
||||||
|
renderOption={(props, option, { selected }) => (
|
||||||
|
<li {...props}>
|
||||||
|
<Checkbox
|
||||||
|
icon={icon}
|
||||||
|
checkedIcon={checkedIcon}
|
||||||
|
style={{ marginRight: 8 }}
|
||||||
|
checked={selected}
|
||||||
|
/>
|
||||||
|
{option.label}
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
// style={{ width: 500 }}
|
||||||
|
|
||||||
|
onChange={(event, value) => {
|
||||||
|
setinscription_list_ue(value)
|
||||||
|
setueChanged("1");
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une UE "
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
*/}
|
||||||
<div className="div_row" ref={myRef_head} id="myRef_head" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
<div className="div_row" ref={myRef_head} id="myRef_head" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||||
|
|
||||||
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||||
|
@ -777,16 +1145,9 @@ const Module_Selection_Evaluation_Apprenants = (props) => {
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
|
||||||
<Button variant="outlined" onClick={"planifier_one_evaluation"}
|
|
||||||
className="detail_class_submenu bton_add_session"
|
|
||||||
id='menu_import_participant' name='menu_import_participant'>Ajout 1 participant
|
|
||||||
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue