qsd
parent
e67c1b0fc5
commit
29da61b65a
File diff suppressed because it is too large
Load Diff
|
@ -2383,6 +2383,135 @@ const DisplayPartnerSession = (props) => {
|
|||
setGetall_TrainingSession_api("true");
|
||||
setGetall_TrainingSession_result(res.data.message);
|
||||
setRows(res.data.message);
|
||||
|
||||
|
||||
var new_data2 = [];
|
||||
|
||||
var timeline_item = [];
|
||||
var timeline_grp = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_code_session = JSON.parse(x).code_session;
|
||||
var local_titre = JSON.parse(x).titre;
|
||||
var local_date_debut = JSON.parse(x).date_debut;
|
||||
var local_date_fin = JSON.parse(x).date_fin;
|
||||
var local_session_etape = JSON.parse(x).session_etape;
|
||||
var local_is_session_alert = JSON.parse(x).is_session_alert;
|
||||
var local_invoiced_statut = JSON.parse(x).invoiced_statut;
|
||||
var local_session_alert_message = JSON.parse(x).session_alert_message;
|
||||
var local_session_class_id = JSON.parse(x).class_id;
|
||||
var local_class_lms_class_code = JSON.parse(x).class_lms_class_code;
|
||||
|
||||
var local_archive = JSON.parse(x).archive;
|
||||
|
||||
var local_session_nb_participant = JSON.parse(x).nb_participant;
|
||||
var local_session_nb_inscrit = JSON.parse(x).nb_inscrit;
|
||||
var local_session_taux_remplissage = String(parseFloat(String(JSON.parse(x).taux_remplissage)).toFixed(2));
|
||||
|
||||
// console.log(" ### local_session_taux_remplissage == ", local_session_taux_remplissage);
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_code_session,
|
||||
"code_session": local_code_session,
|
||||
"titre": local_titre,
|
||||
"date_debut": local_date_debut,
|
||||
"date_fin": local_date_fin,
|
||||
"session_etape": local_session_etape,
|
||||
"is_session_alert": local_is_session_alert,
|
||||
"invoiced_statut": local_invoiced_statut,
|
||||
"session_alert_message": local_session_alert_message,
|
||||
"class_id": local_session_class_id,
|
||||
"class_lms_class_code": local_class_lms_class_code,
|
||||
"nb_participant": local_session_nb_participant,
|
||||
"nb_inscrit": local_session_nb_inscrit,
|
||||
"taux_remplissage": local_session_taux_remplissage,
|
||||
"archive": local_archive,
|
||||
};
|
||||
new_data2.push(node);
|
||||
setTaskStatus(new_data2);
|
||||
|
||||
|
||||
/** Pour le timeline Groupe */
|
||||
var node_timeline_grp = {
|
||||
'id': local_id,
|
||||
'title': local_code_session,
|
||||
'is_session_alert': local_is_session_alert
|
||||
}
|
||||
timeline_grp.push(node_timeline_grp);
|
||||
|
||||
// Determination de la couleur background selon le taux de remplissage
|
||||
var bg_color = "";
|
||||
if (parseFloat(local_session_taux_remplissage) < 0.3)
|
||||
bg_color = "#ffb343";
|
||||
else if (parseFloat(local_session_taux_remplissage) >= 0.3 && parseFloat(local_session_taux_remplissage) <= 0.6)
|
||||
bg_color = "#ececa3";
|
||||
else if (parseFloat(local_session_taux_remplissage) > 0.6)
|
||||
bg_color = "#a5c90f";
|
||||
|
||||
|
||||
/** Pour le timeline Item */
|
||||
var node_timeline_item = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"group": local_id,
|
||||
"label": local_code_session,
|
||||
"code_session": local_code_session,
|
||||
"titre": local_titre,
|
||||
"date_debut": local_date_debut,
|
||||
"date_fin": local_date_fin,
|
||||
"session_etape": local_session_etape,
|
||||
"archive": local_archive,
|
||||
"is_session_alert": local_is_session_alert,
|
||||
"invoiced_statut": local_invoiced_statut,
|
||||
"session_alert_message": local_session_alert_message,
|
||||
"class_id": local_session_class_id,
|
||||
"title": local_code_session + " - " + local_date_debut + " au " + local_date_fin + " -- " + parseFloat(local_session_taux_remplissage) * 100 + '%',
|
||||
"start_time": moment(local_date_debut, "DD/MM/YYYY"),
|
||||
"end_time": moment(local_date_fin, "DD/MM/YYYY").add(1, 'days'),
|
||||
"canMove": false,
|
||||
itemProps: {
|
||||
style: {
|
||||
color: "black",
|
||||
background: String(bg_color)
|
||||
}
|
||||
}
|
||||
};
|
||||
timeline_item.push(node_timeline_item);
|
||||
|
||||
|
||||
|
||||
});
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code_session": "",
|
||||
"titre": "",
|
||||
"date_debut": "",
|
||||
"date_fin": "",
|
||||
"session_etape": "",
|
||||
"is_session_alert": "",
|
||||
"invoiced_statut": "",
|
||||
"session_alert_message": "",
|
||||
"class_id": "",
|
||||
"archive": "",
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0) {
|
||||
setNew_Getall_TrainingSession_result(new_data2);
|
||||
setNew_Getall_TrainingSession_result_Timeline_Item(timeline_item);
|
||||
setNew_Getall_TrainingSession_result_Timeline_Group(timeline_grp);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
setGetall_TrainingSession_api("false");
|
||||
|
|
|
@ -1201,7 +1201,7 @@ const Employes = (props) => {
|
|||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" La mise à jour a été correctement faite.");
|
||||
setalert_type("success");
|
||||
|
||||
setscope_changed("");
|
||||
}
|
||||
else {
|
||||
setUpdate_user_Scope_access_api("false");
|
||||
|
@ -6959,6 +6959,8 @@ const Employes = (props) => {
|
|||
};
|
||||
|
||||
|
||||
const [scope_changed, setscope_changed] = React.useState("");
|
||||
|
||||
return (
|
||||
<div className="employes">
|
||||
|
||||
|
@ -11204,10 +11206,15 @@ const Employes = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "paddingRight": "10px" }}> zzz
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "paddingRight": "10px" }}>
|
||||
<Tooltip className="tooltip_css" id="scope" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="scope" data-tooltip-html="Par exemple l'utilisateur ne peut voir que les données liées à la formation 'f01' ">
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Périmetre d'accès <FcInfo /> </h3>
|
||||
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Périmetre d'accès <FcInfo /> </nav>
|
||||
</a>
|
||||
|
||||
{New_GetCurrentPartnerClass_result && New_GetCurrentPartnerClass_result.length > 0 && <div className="session_caract" > <b>Liste formations </b> <br />
|
||||
|
@ -11220,6 +11227,7 @@ const Employes = (props) => {
|
|||
|
||||
multiple
|
||||
onChange={(event, newValue) => {
|
||||
setscope_changed("1");
|
||||
setscope_class([
|
||||
...fixedVal_scope_class,
|
||||
...newValue.filter((i) => fixedVal_scope_class.indexOf(i) === -1),
|
||||
|
@ -11247,13 +11255,14 @@ const Employes = (props) => {
|
|||
|
||||
multiple
|
||||
onChange={(event, newValue) => {
|
||||
setscope_changed("1");
|
||||
setscope_session([
|
||||
...fixedVal_scope_session,
|
||||
...newValue.filter((i) => fixedVal_scope_session.indexOf(i) === -1),
|
||||
]);
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
||||
value={scope_session}
|
||||
options={New_Getall_TrainingSession_Without_Scope_Action_result}
|
||||
|
@ -11271,6 +11280,14 @@ const Employes = (props) => {
|
|||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
{String(scope_changed) === "1" && <div className="parter_div_filtrer_row">
|
||||
<div className="koUpdateData" style={{ "color": "orange", "textAlign": "center" }}> /!\ Pensez à enregistrer les modifications</div>
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
||||
|
@ -11282,7 +11299,12 @@ const Employes = (props) => {
|
|||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }} >
|
||||
<Button variant="contained" className="bton_annule" onClick={Fermer_nouvelle_Affectation_Fields}>Annuler
|
||||
<Button variant="contained" className="bton_annule"
|
||||
onClick={() => {
|
||||
setscope_changed("");
|
||||
Get_Given_User_Access_Scope();
|
||||
}}
|
||||
>Annuler
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -39,8 +39,6 @@ import {
|
|||
FcEngineering
|
||||
} from "react-icons/fc";
|
||||
|
||||
import { SlClose } from "react-icons/sl";
|
||||
|
||||
import CircleNotificationsIcon from '@mui/icons-material/CircleNotifications';
|
||||
import { FcInspection } from "react-icons/fc";
|
||||
|
||||
|
@ -50,6 +48,7 @@ import { BiPurchaseTag } from "react-icons/bi";
|
|||
|
||||
import { BsTools } from "react-icons/bs";
|
||||
|
||||
import DisplayPartnerPromotion from "./DisplayPartnerPromotion";
|
||||
import DisplayPartnerSession from "./DisplayPartnerSession";
|
||||
import DisplayPartnerStagiaires from "./DisplayPartnerStagiaires";
|
||||
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
|
||||
|
@ -487,7 +486,7 @@ const Partner = (props) => {
|
|||
"dashbord_inscriptions", "mes_salles", "mes_opportunites", "config_formulaires", "dashbord_factures", "mes_ue",
|
||||
"domaine_categorie_metier", "config_formation_initiale", "note_evaluation", "groupe_apprenant",
|
||||
"part_produit_service", "config_document_super_admin", "tous_mes_document", "equipe_team",
|
||||
"jurys"]
|
||||
"jurys", "mes_promotions"]
|
||||
|
||||
|
||||
if (action && list_menu.includes(action)) {
|
||||
|
@ -940,7 +939,6 @@ const Partner = (props) => {
|
|||
function DiplaySessionList(event) {
|
||||
var security_retval = check_user_acces_right("session", "read");
|
||||
|
||||
|
||||
if (security_retval === 1) {
|
||||
setmenu("mes_sessions");
|
||||
setapiexcelimportmessage();
|
||||
|
@ -954,6 +952,23 @@ const Partner = (props) => {
|
|||
}
|
||||
}
|
||||
|
||||
function DiplayPromotionList(event) {
|
||||
var security_retval = check_user_acces_right("session", "read");
|
||||
|
||||
if (security_retval === 1) {
|
||||
setmenu("mes_promotions");
|
||||
setapiexcelimportmessage();
|
||||
setformation_file_name();
|
||||
history.push("/Partner/mes_promotions");
|
||||
document.body.style.backgroundColor = "#ffffff";
|
||||
|
||||
inactive_active_menu_header("my_promotion");
|
||||
} else {
|
||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour accéder à la gestion des sessions");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Display_note_evaluation_func(event) {
|
||||
var security_retval = check_user_acces_right("note_evaluation", "read");
|
||||
|
||||
|
@ -1756,7 +1771,7 @@ const Partner = (props) => {
|
|||
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Warning</DialogTitle>
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Warning</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
<ImWarning /> {Dialog_1_message}
|
||||
|
@ -1971,11 +1986,19 @@ const Partner = (props) => {
|
|||
|
||||
<div>
|
||||
<Sidebar className="my_sidebar">
|
||||
{String(menu) !== "mes_sessions" && <Menu className="my_menu bck_menu_seul" id="my_session" name="my_session" onClick={DiplaySessionList} > <CoPresentIcon className="icone_menu" color={"secondary"} /> PROMOTIONS </Menu>}
|
||||
{String(menu) === "mes_sessions" && <Menu className="my_menu bck_menu_seul_selected" id="my_session" name="my_session" onClick={DiplaySessionList} > <CoPresentIcon className="icone_menu" color={"secondary"} /> PROMOTIONS </Menu>}
|
||||
{String(menu) !== "mes_sessions" && <Menu className="my_menu bck_menu_seul" id="my_session" name="my_session" onClick={DiplaySessionList} > <CoPresentIcon className="icone_menu" color={"secondary"} /> SESSIONS </Menu>}
|
||||
{String(menu) === "mes_sessions" && <Menu className="my_menu bck_menu_seul_selected" id="my_session" name="my_session" onClick={DiplaySessionList} > <CoPresentIcon className="icone_menu" color={"secondary"} /> SESSIONS </Menu>}
|
||||
</Sidebar>
|
||||
</div>
|
||||
|
||||
{String(formation_initiale) === "1" && <div>
|
||||
<Sidebar className="my_sidebar">
|
||||
{String(menu) !== "mes_promotions" && <Menu className="my_menu bck_menu_seul" id="my_promotion" name="my_promotion" onClick={DiplayPromotionList} > <CoPresentIcon className="icone_menu" color={"secondary"} /> PROMOTIONS </Menu>}
|
||||
{String(menu) === "mes_promotions" && <Menu className="my_menu bck_menu_seul_selected" id="my_promotion" name="my_promotion" onClick={DiplayPromotionList} > <CoPresentIcon className="icone_menu" color={"secondary"} /> PROMOTIONS </Menu>}
|
||||
</Sidebar>
|
||||
</div>}
|
||||
|
||||
|
||||
{String(formation_initiale) === "1" &&
|
||||
<div>
|
||||
<Sidebar className="my_sidebar">
|
||||
|
@ -2340,7 +2363,7 @@ const Partner = (props) => {
|
|||
read_access={check_user_acces_right("materiel", "read")}
|
||||
write_access={check_user_acces_right("materiel", "write")}
|
||||
check_user_acces_right={check_user_acces_right}
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -2519,6 +2542,24 @@ const Partner = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
{String(menu) === "mes_promotions" &&
|
||||
<div className="div_droite">
|
||||
|
||||
<DisplayPartnerPromotion
|
||||
conntected_account_id={conntected_account_id}
|
||||
conntected_employee_id={conntected_employee_id}
|
||||
formation_initiale={formation_initiale}
|
||||
object_key={orderid}
|
||||
class_internal_url={packs}
|
||||
read_access={check_user_acces_right("session", "read")}
|
||||
write_access={check_user_acces_right("session", "write")}
|
||||
check_user_acces_right={check_user_acces_right} reduce={"0"} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(menu) === "mes_employes" &&
|
||||
<div className="div_droite">
|
||||
<Employes conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("employe", "read")} write_access={check_user_acces_right("employe", "write")}
|
||||
|
@ -2611,7 +2652,7 @@ const Partner = (props) => {
|
|||
<Apprenant conntected_employee_id={conntected_employee_id} object_key={orderid} subdata={packs}
|
||||
read_access={check_user_acces_right("stagiaire", "read")} write_access={check_user_acces_right("stagiaire", "write")}
|
||||
check_user_acces_right={check_user_acces_right}
|
||||
formation_initiale={formation_initiale} />
|
||||
formation_initiale={formation_initiale} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -2868,18 +2909,28 @@ const Partner = (props) => {
|
|||
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_9" />
|
||||
<a data-tooltip-id="tooltip_id_9" data-tooltip-html="PROMOTIONS">
|
||||
<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_selected" onClick={DiplaySessionList} ><FcFlowChart className="icone_menu" /> </div>}
|
||||
</a>
|
||||
<hr className="my_hr" />
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_901" />
|
||||
{String(formation_initiale) === "1" && <a data-tooltip-id="tooltip_id_901" data-tooltip-html="PROMOTIONS">
|
||||
{String(menu) !== "mes_promotions" && <div className="sousmenu" onClick={DiplayPromotionList} > <FcFlowChart className="icone_menu" /> </div>}
|
||||
{String(menu) === "mes_promotions" && <div className="sousmenu_selected" onClick={DiplayPromotionList} ><FcFlowChart className="icone_menu" /> </div>}
|
||||
<hr className="my_hr" />
|
||||
</a>}
|
||||
|
||||
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_906" />
|
||||
{String(formation_initiale) === "1" && <a data-tooltip-id="tooltip_id_906" data-tooltip-html="JURYS">
|
||||
{String(menu) !== "jurys" && <div className="sousmenu" onClick={Display_jurys_func} > <RocketIcon className="icone_menu" /> </div>}
|
||||
{String(menu) === "jurys" && <div className="sousmenu_selected" onClick={Display_jurys_func} ><RocketIcon className="icone_menu" /> </div>}
|
||||
<hr className="my_hr" />
|
||||
</a>}
|
||||
<hr className="my_hr" />
|
||||
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_907" />
|
||||
{String(formation_initiale) === "1" && <a data-tooltip-id="tooltip_id_907" data-tooltip-html="NOTES & EVALUATIONS">
|
||||
|
@ -3133,8 +3184,8 @@ const Partner = (props) => {
|
|||
<div className="div_droite div_droite_ralonge">
|
||||
|
||||
<Jury ispending={partnerstatus} currentpack={partnerPackService} conntected_employee_id={conntected_employee_id}
|
||||
class_external_code={orderid}
|
||||
class_internal_url={packs}
|
||||
class_external_code={orderid}
|
||||
class_internal_url={packs}
|
||||
formation_initiale={formation_initiale}
|
||||
read_access={check_user_acces_right("materiel", "read")}
|
||||
write_access={check_user_acces_right("materiel", "write")}
|
||||
|
@ -3312,6 +3363,19 @@ const Partner = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
{String(menu) === "mes_sessions" &&
|
||||
<div className="div_droite div_droite_ralonge">
|
||||
|
||||
<DisplayPartnerPromotion
|
||||
conntected_account_id={conntected_account_id}
|
||||
formation_initiale={formation_initiale}
|
||||
conntected_employee_id={conntected_employee_id} object_key={orderid} class_internal_url={packs}
|
||||
read_access={check_user_acces_right("session", "read")} write_access={check_user_acces_right("session", "write")}
|
||||
check_user_acces_right={check_user_acces_right} reduce={"1"} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(menu) === "mes_employes" &&
|
||||
<div className="div_droite div_droite_ralonge">
|
||||
<Employes conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("employe", "read")}
|
||||
|
@ -3402,8 +3466,8 @@ const Partner = (props) => {
|
|||
|
||||
<Apprenant conntected_employee_id={conntected_employee_id} object_key={orderid} subdata={packs}
|
||||
read_access={check_user_acces_right("stagiaire", "read")} write_access={check_user_acces_right("stagiaire", "write")}
|
||||
check_user_acces_right={check_user_acces_right}
|
||||
formation_initiale={formation_initiale}/>
|
||||
check_user_acces_right={check_user_acces_right}
|
||||
formation_initiale={formation_initiale} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue