diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js
index 3022c81..d29ce18 100644
--- a/src/components/DisplayPartnerSession.js
+++ b/src/components/DisplayPartnerSession.js
@@ -188,33 +188,6 @@ const DisplayPartnerSession = (props) => {
const [externalcodetraining_toupdate, setexternalcodetraining_toupdate] = useState();
const [updatetraining, setupdatetraining] = useState(false);
- function Clearselectedfilt1() {
- setselectedfilt1("");
- }
-
- function selectedFilter1(event) {
- setselectedfilt1(event.value);
- }
-
- function selectedFilter2(event) {
- setselectedfilt2(event.value);
- }
-
- function selectedFilter3(event) {
- setselectedfilt3(event.value);
- }
-
- function CancelFiltre2(event) {
- setselectedfilt2("");
- }
-
- function CancelFiltre3(event) {
- setselectedfilt3("");
- }
-
- function closeTrainingForm() {
- setupdatetraining(false);
- }
const [selectedtraining, setselectedtraining] = useState([])
@@ -282,14 +255,14 @@ const DisplayPartnerSession = (props) => {
{ field: 'id', headerName: 'id', hide: true, disableExport: true, },
{ field: '_id', headerName: '_id', hide: true, disableExport: true, },
{ field: 'class_id', headerName: 'class_id', hide: true, disableExport: true, },
+ { field: 'class_lms_class_code', headerName: 'class_lms_class_code', hide: true, disableExport: true, },
{ field: 'is_bpf', headerName: 'is_bpf', hide: true, },
+
{ field: 'session_alert_message', headerName: 'session_alert_message', hide: true },
{ field: 'class_internal_url', headerName: 'class_internal_url', hide: true },
{
field: 'is_session_alert', headerName: '', hide: false, Width: 50, flex: 1,
-
-
renderCell: (cellValues) => {
return (
@@ -403,10 +376,8 @@ const DisplayPartnerSession = (props) => {
{ field: 'qty_in_quotation', headerName: 'Place Non validé ', with: 150, align: "center", hide: false, renderCell: (params) =>
, },
{ field: 'qty_in_quotation_list_quotation', headerName: 'List Devis ', with: 150, align: "center", hide: false, renderCell: (params) =>
, },
-
{ field: 'site_formation_nom', headerName: 'Site Ftion', with: 150, align: "center", hide: false, renderCell: (params) =>
, },
-
{
field: 'invoiced_statut', headerName: 'Facturé', minWidth: 100, flex: 1, maxWidth: 150, hide: false, editable: false,
renderCell: (cellValues) => {
@@ -424,8 +395,6 @@ const DisplayPartnerSession = (props) => {
},
},
-
-
{ field: 'duration', headerName: 'Durée', minWidth: datagrid_columns_size_model2, align: "center", hide: true, renderCell: (params) =>
, },
{
field: "Detail", headerName: 'Voir détail', disableExport: true,
@@ -569,7 +538,7 @@ const DisplayPartnerSession = (props) => {
{ field: 'nom', headerName: 'nom', minWidth: 200, flex: 1, hide: false, editable: true, renderCell: (params) =>
, },
{ field: 'prenom', headerName: 'prenom', minWidth: 200, flex: 1, hide: false, editable: true, renderCell: (params) =>
, },
{ field: 'email', headerName: 'email', minWidth: 200, flex: 1, flex: 1, renderCell: (params) =>
, },
- { field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) =>
, },
+ { field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) =>
, },
{ field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: true, },
{
@@ -667,66 +636,66 @@ const DisplayPartnerSession = (props) => {
}
},
- /* {
- field: "valide", headerName: 'Valider',
- renderCell: (cellValues) => {
- return (
-
-
{
- handleClick_accept(event, cellValues);
- }}
- >
-
-
- }
- modal
- nested
- position="center center"
- >
- {close => (
-
-
- ×
-
-
MySy Information
-
- {' '}
-
- En confirmant cette opération, l'inscription du stagiaire sera définitivement validée.
- Il (le stagiaire) sera automatiquement notifié par email de la validation de son inscription.
- Le stagiaire passera de l'onglet "préinscrit" vers l'onglet "inscription".
-
-
-
- {
- handleClick_accept(event, cellValues);
- //console.log('modal closed ');
- close();
- }}> Valider
-
-
-
- {
- //console.log('modal closed ');
- close();
- }}
- >
- Annuler
-
-
-
-
- )}
-
-
- );
- }
- },*/
+ /* {
+ field: "valide", headerName: 'Valider',
+ renderCell: (cellValues) => {
+ return (
+
+
{
+ handleClick_accept(event, cellValues);
+ }}
+ >
+
+
+ }
+ modal
+ nested
+ position="center center"
+ >
+ {close => (
+
+
+ ×
+
+
MySy Information
+
+ {' '}
+
+ En confirmant cette opération, l'inscription du stagiaire sera définitivement validée.
+ Il (le stagiaire) sera automatiquement notifié par email de la validation de son inscription.
+ Le stagiaire passera de l'onglet "préinscrit" vers l'onglet "inscription".
+
+
+
+ {
+ handleClick_accept(event, cellValues);
+ //console.log('modal closed ');
+ close();
+ }}> Valider
+
+
+
+ {
+ //console.log('modal closed ');
+ close();
+ }}
+ >
+ Annuler
+
+
+
+
+ )}
+
+
+ );
+ }
+ },*/
/*{
field: "refuse", headerName: 'Refuser',
@@ -792,66 +761,66 @@ const DisplayPartnerSession = (props) => {
);
}
},*/
- /* {
- field: "delete", headerName: 'Supprimer',
- renderCell: (cellValues) => {
- return (
-
-
{
- handleClick_delete(event, cellValues);
- }}
- >
-
-
- }
- modal
- nested
- position="center center"
- >
- {close => (
-
-
- ×
-
-
MySy Information
-
- {' '}
-
- En confirmant cette opération, la préinscription du stagiaire sera définitivement supprimée .
-
-
-
-
- {
- handleClick_delete(event, cellValues);
- //console.log('modal closed ');
- close();
- }}> Valider
-
-
-
- {
- //console.log('modal closed ');
- close();
- }}
- >
- Annuler
-
-
-
-
- )}
-
-
-
- );
- }
- },*/
+ /* {
+ field: "delete", headerName: 'Supprimer',
+ renderCell: (cellValues) => {
+ return (
+
+
{
+ handleClick_delete(event, cellValues);
+ }}
+ >
+
+
+ }
+ modal
+ nested
+ position="center center"
+ >
+ {close => (
+
+
+ ×
+
+
MySy Information
+
+ {' '}
+
+ En confirmant cette opération, la préinscription du stagiaire sera définitivement supprimée .
+
+
+
+
+ {
+ handleClick_delete(event, cellValues);
+ //console.log('modal closed ');
+ close();
+ }}> Valider
+
+
+
+ {
+ //console.log('modal closed ');
+ close();
+ }}
+ >
+ Annuler
+
+
+
+
+ )}
+
+
+
+ );
+ }
+ },*/
{
field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center",
renderCell: (cellValues) => {
@@ -1219,16 +1188,27 @@ const DisplayPartnerSession = (props) => {
]
+ const [is_lms_class, setis_lms_class] = useState("1");
+
+ const options_menu_vertical_with_lms = [
+ '',
+ 'Renvoyer Conf.',
+ 'Env. Code LMS',
+ 'Fin Accès LMS',
+ 'Annuler Insc.',
+ ];
+
const options_menu_vertical = [
'',
'Renvoyer Conf.',
'Annuler Insc.',
-
];
+
const ITEM_HEIGHT = 48;
const [anchorEl, setAnchorEl] = React.useState(null);
const open = Boolean(anchorEl);
+
const handleClick_option_button_vertical = (event) => {
setAnchorEl(event.currentTarget);
};
@@ -1253,6 +1233,9 @@ const DisplayPartnerSession = (props) => {
const columns_inscrit = [
{ field: 'id', headerName: 'id', hide: true },
{ field: '_id', headerName: '_id', hide: true },
+ { field: 'lms_class_code', headerName: 'lms_class_code', hide: true, },
+ { field: 'lms_user_id', headerName: 'lms_user_id', hide: true, },
+ { field: 'lms_account_expiration_date', headerName: 'lms_account_expiration_date', hide: true, },
{ field: 'has_invoice_split', headerName: 'has_invoice_split', hide: true },
{
@@ -1283,7 +1266,7 @@ const DisplayPartnerSession = (props) => {
},
{ field: 'prenom', headerName: 'prenom', minWidth: 200, flex: 1, hide: false, editable: false, renderCell: (params) =>
, },
{ field: 'email', headerName: 'email', minWidth: 200, flex: 1, renderCell: (params) =>
, },
- { field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true, renderCell: (params) =>
, },
+ { field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: false, renderCell: (params) =>
, },
{ field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: false, },
@@ -1328,7 +1311,10 @@ const DisplayPartnerSession = (props) => {
onClick={(event) => {
if (String(cellValues.row.client_rattachement_id) === String(cellValues.row.client_facture)) {
- alert(" Le client facturé est le même que client. Aucun partage à faire");
+ // alert(" Le client facturé est le même que client. Aucun partage à faire");
+ setdisplay_alert_mysy("1");
+ setalert_message("Le client facturé est le même que client. Aucun partage à faire");
+ setalert_type("error");
return;
}
setselected_inscription_id(cellValues.row._id);
@@ -1527,13 +1513,51 @@ const DisplayPartnerSession = (props) => {
},
}}
>
- {options_menu_vertical.map((option) => (
+ {selected_class_lms_code && String(selected_class_lms_code).length > "1" && options_menu_vertical_with_lms.map((option) => (
{
//handleClose_option_button_vertical(e, option);
setAnchorEl(null);
+
+ if (option && String(option) === "Renvoyer Conf.") {
+
+ handleClick_resend_conf_mail(e, working_cellValues);
+ }
+
+ else if (option && String(option) === "Annuler Insc.") {
+
+ setdialogOpen_supp(true);
+ }
+
+ else if (option && String(option) === "Env. Code LMS") {
+
+ Resend_LMS_Credentials_With_Args(String(working_cellValues.row.email));
+ }
+ else if (option && String(option) === "Fin Accès LMS") {
+ if (working_cellValues.row.lms_account_expiration_date && String(working_cellValues.row.lms_account_expiration_date).length > 5)
+ setlms_acces_date_end(working_cellValues.row.lms_account_expiration_date);
+
+ if (working_cellValues.row._id && String(working_cellValues.row._id).length > 5)
+ setinscrit_selected_id(working_cellValues.row._id);
+
+ setDialog_MAJ_Acces_LMS_open(true);
+ }
+
+ }}
+ >
+ {option}
+
+ ))}
+
+ {(!selected_class_lms_code || String(selected_class_lms_code).length <= "1") && options_menu_vertical.map((option) => (
+
{
+
+
+ //handleClose_option_button_vertical(e, option);
+ setAnchorEl(null);
+
if (option && String(option) === "Renvoyer Conf.") {
handleClick_resend_conf_mail(e, working_cellValues);
@@ -1544,15 +1568,14 @@ const DisplayPartnerSession = (props) => {
setdialogOpen_supp(true);
}
- else if (option && String(option) === "Accès E-Learning") {
- setdialogOpen_push_lms(true);
- }
+
}}
>
{option}
))}
+
{/*** GESTION Dialog menu item pour suppression */}
@@ -2181,6 +2204,7 @@ const DisplayPartnerSession = (props) => {
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_session_nb_participant = JSON.parse(x).nb_participant;
var local_session_nb_inscrit = JSON.parse(x).nb_inscrit;
@@ -2202,6 +2226,7 @@ const DisplayPartnerSession = (props) => {
"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,
@@ -2366,6 +2391,7 @@ const DisplayPartnerSession = (props) => {
GetListeEmargement(cellValues.row._id, cellValues.row.class_internal_url);
}
+ const [inscrit_selected_id, setinscrit_selected_id] = useState("");
const [session_selected_row_id, setsession_selected_row_id] = useState("");
const [session_selected_class_id, setsession_selected_class_id] = useState("");
@@ -2503,6 +2529,7 @@ const DisplayPartnerSession = (props) => {
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_session_nb_participant = JSON.parse(x).nb_participant;
var local_session_nb_inscrit = JSON.parse(x).nb_inscrit;
@@ -2522,7 +2549,7 @@ const DisplayPartnerSession = (props) => {
"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,
@@ -2593,6 +2620,7 @@ const DisplayPartnerSession = (props) => {
"invoiced_statut": "",
"session_alert_message": "",
"class_id": "",
+ "class_lms_class_code": "",
};
new_data2.push(node);
@@ -3316,6 +3344,8 @@ const DisplayPartnerSession = (props) => {
Getall_Partner_Site_Formation();
// Getall_Parter_Session_Steps();
+ Getall_Partner_Digital_Sign_Status();
+
let windowWidth = window.innerWidth;
if (windowWidth < 1001) {
setdatagrid_columns_size_model2(50);
@@ -3754,6 +3784,8 @@ const DisplayPartnerSession = (props) => {
const [selected_internal_url, setselected_internal_url] = useState();
const [selected_class_title, setselected_class_title] = useState();
+ const [selected_class_lms_code, setselected_class_lms_code] = useState();
+
const [selected_session_invoiced_statut, setselected_session_invoiced_statut] = useState("");
@@ -4786,12 +4818,22 @@ const DisplayPartnerSession = (props) => {
async function actionmass_insc_Traitemet() {
-
if (String(actionmass_insc_val) === "facturer") {
setDialog_FACTURATION_FORMATION_open(true);
} else if (String(actionmass_insc_val) === "acceslms") {
setDialog_MAJ_Acces_LMS_open(true);
}
+ else if (String(actionmass_insc_val) === "convocation") {
+ setDialog_1_message("CONVOCATION_STAGIAIRE");
+ setDialog_CONVOCATION_STAGIAIRE_open(true);
+ }
+
+ else if (String(actionmass_insc_val) === "convention_entreprise") {
+ setDialog_1_message("CONVENTION_STAGIAIRE_ENTREPRISE");
+ setDialog_convention_open(true);
+ }
+
+
else if (String(actionmass_insc_val) === "emarg_qr_code") {
@@ -4953,7 +4995,7 @@ const DisplayPartnerSession = (props) => {
form.append("end_date", lms_acces_date_end);
- console.log(" #### Update_lms_account_expiration_date_By_Selected_Inscrit form = ", form);
+ // console.log(" #### Update_lms_account_expiration_date_By_Selected_Inscrit form = ", form);
@@ -4996,6 +5038,69 @@ const DisplayPartnerSession = (props) => {
})
}
+ const [Update_lms_account_expiration_date_for_given_Inscrit_id_api, setUpdate_lms_account_expiration_date_for_given_Inscrit_id_api] = useState();
+ const [Update_lms_account_expiration_date_for_given_Inscrit_id_message, setUpdate_lms_account_expiration_date_for_given_Inscrit_id_message] = useState();
+ const [Update_lms_account_expiration_date_for_given_Inscrit_id_result, setUpdate_lms_account_expiration_date_for_given_Inscrit_id_result] = useState([]);
+ function Update_lms_account_expiration_date_for_given_Inscrit_id(inscrit_id) {
+ var form = new FormData();
+
+ var tab_my_inscription_ids = []
+
+ tab_my_inscription_ids.push(inscrit_id);
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("session_id", selected_session_id);
+ form.append("tab_inscription_ids", tab_my_inscription_ids);
+ form.append("end_date", lms_acces_date_end);
+
+
+ // console.log(" #### Update_lms_account_expiration_date_for_given_Inscrit_id form = ", form);
+
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_LMS_Inscrition_End_Date/";
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In Update_lms_account_expiration_date_for_given_Inscrit_id res.data.status = " + res.data.status);
+ //console.log(" In Update_lms_account_expiration_date_for_given_Inscrit_id res.data.message r_class = " + res.data.message);
+ setUpdate_lms_account_expiration_date_for_given_Inscrit_id_api("true");
+ setUpdate_lms_account_expiration_date_for_given_Inscrit_id_result(res.data.message);
+ GetListeInscrit(selected_session_id, selected_internal_url);
+
+ Dialog_MAJ_Acces_LMS_handleClose_buton();
+
+ // alert(res.data.message);
+ setdisplay_alert_mysy("1");
+ setalert_message(res.data.message);
+ setalert_type("success");
+
+ setinscrit_selected_id("");
+
+ }
+ else {
+ setUpdate_lms_account_expiration_date_for_given_Inscrit_id_api("false");
+ setUpdate_lms_account_expiration_date_for_given_Inscrit_id_message(res.data.message);
+ // alert(res.data.message);
+ setdisplay_alert_mysy("1");
+ setalert_message(res.data.message);
+ setalert_type("error");
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Update_lms_account_expiration_date_for_given_Inscrit_id = ', error);
+ setUpdate_lms_account_expiration_date_for_given_Inscrit_id_api("false");
+ alert(" Impossible de mettre à jour la date");
+ })
+ }
+
+
const sleep = (milliseconds) => {
return new Promise(resolve => setTimeout(resolve, milliseconds))
@@ -8006,6 +8111,72 @@ const DisplayPartnerSession = (props) => {
}
+
+ const [Resend_LMS_Credentials_With_Args_api, setResend_LMS_Credentials_With_Args_api] = useState();
+ const [Resend_LMS_Credentials_With_Args_result, setResend_LMS_Credentials_With_Args_result] = useState();
+ const [Resend_LMS_Credentials_With_Args_message, setResend_LMS_Credentials_With_Args_message] = useState();
+ function Resend_LMS_Credentials_With_Args(user_email,) {
+
+ clean_old_messages();
+ const formData = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+
+ formData.append("token", stored_cookie);
+ formData.append("session_id", selected_session_id);
+ formData.append("email", user_email);
+ formData.append("class_internal_url", selected_internal_url);
+ //console.log("token = " + stored_cookie);
+ setLoading(true);
+ fetch(
+ process.env.REACT_APP_API_URL + "myclass/api/LMS_Credential_Sending_mail/",
+ {
+ method: 'POST',
+ body: formData,
+ }
+ )
+ .then((response) => response.json())
+ .then((result) => {
+ setLoading(false);
+ if (String(result['status']) === String("true")) {
+ //console.log('Success:', result['message']);
+ setResend_LMS_Credentials_With_Args_result(result['message']);
+ setResend_LMS_Credentials_With_Args_api("true");
+ // alert(" Les identifiants de connexion ont été correctement envoyés")
+ setdisplay_alert_mysy("1");
+ setalert_message("Les identifiants de connexion ont été correctement envoyés");
+ setalert_type("success");
+
+
+ } else if (String(result['status']) === String("Err_Connexion")) {
+ alert('Erreur: ' + result['message']);
+ history.push("/Connexion");
+ }
+
+ else {
+ setResend_LMS_Credentials_With_Args_message(result['message']);
+ setResend_LMS_Credentials_With_Args_api("false");
+ setdisplay_alert_mysy("1");
+ setalert_message(result['message']);
+ setalert_type("error");
+
+ }
+
+ })
+ .catch((error) => {
+ setLoading(false);
+ console.error('Error:', error);
+ setResend_LMS_Credentials_With_Args_api("false");
+
+ setdisplay_alert_mysy("1");
+ setalert_message("Impossible d'envoyer les identifiants de connexion");
+ setalert_type("error");
+ });
+
+ };
+
+
+
const [Resend_LMS_Credentials_api, setResend_LMS_Credentials_api] = useState();
const [Resend_LMS_Credentials_result, setResend_LMS_Credentials_result] = useState();
const [Resend_LMS_Credentials_message, setResend_LMS_Credentials_message] = useState();
@@ -11393,12 +11564,8 @@ const DisplayPartnerSession = (props) => {
settab_convention_pieces_jointes_result(new_tmp);
- console.log(" tab_convention_pieces_jointes_result = ", tab_convention_pieces_jointes_result)
-
-
+ //console.log(" tab_convention_pieces_jointes_result = ", tab_convention_pieces_jointes_result)
return;
-
-
};
const [tab_convention_pieces_jointes_result, settab_convention_pieces_jointes_result] = useState([]);
@@ -11444,55 +11611,33 @@ const DisplayPartnerSession = (props) => {
const [Get_List_Stagiaire_Conventions_api, setGet_List_Stagiaire_Conventions_api] = useState();
const [Get_List_Stagiaire_Conventions_message, setGet_List_Stagiaire_Conventions_message] = useState();
const [Get_List_Stagiaire_Conventions_result, setGet_List_Stagiaire_Conventions_result] = useState();
- function Get_List_Stagiaire_Conventions(event) {
+ function Get_List_Stagiaire_Conventions(ref_interne, nom, type_doc, courrier_template_type_document_ref_interne) {
var form = new FormData();
- form.append("class_internal_url", selected_internal_url);
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
- //form.append("inscription_id", selected_id);
+ form.append("type_doc", type_doc);
+ form.append("courrier_template_type_document_ref_interne", courrier_template_type_document_ref_interne);
- var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Conventions_Stagiaire/";
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Conventions_Stagiaire_With_Filter/";
setLoading(true);
+
axios.post(myurl, form).then(res => {
+ //console.log(" In Get_List_Stagiaire_Conventions res.data.status = " + res.data.status);
+ //console.log(" In Get_List_Stagiaire_Conventions res.data.message r_class = " + res.data.message);
setLoading(false);
if (String(res.data.status) === String("true")) {
- //console.log(" In Get_List_Stagiaire_Conventions res.data.status = " + res.data.status);
- //console.log(" In Get_List_Stagiaire_Conventions res.data.message r_class = " + res.data.message);
+
setGet_List_Stagiaire_Conventions_api("true");
setGet_List_Stagiaire_Conventions_result(res.data.message);
var new_data2 = [];
- var node = {
- "_id": "default_pdf",
- "id": "default_pdf",
- "label": "PDF par default",
- "ref_interne": "",
- "nom": "",
- "sujet": "",
- "type_doc": "",
- "cible": "",
- "joint_pdf": "",
- };
- new_data2.push(node);
-
- var node2 = {
- "_id": "default_mail",
- "id": "default_mail",
- "label": "Email par default",
- "ref_interne": "",
- "nom": "",
- "sujet": "",
- "type_doc": "",
- "cible": "",
- "joint_pdf": "",
-
- };
- new_data2.push(node2);
const new_data = res.data.message.map((x) => {
//---
@@ -11534,6 +11679,7 @@ const DisplayPartnerSession = (props) => {
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("error");
+
}
}).catch((error) => {
@@ -11553,6 +11699,23 @@ const DisplayPartnerSession = (props) => {
var form = new FormData();
+ var tab_my_inscription_ids = []
+ for (var i = 0; i < selectionModel_insc.length; i++) {
+
+ var local_id = parseInt(selectionModel_insc[i]);
+ var myid = JSON.parse(String(rowss_insc[local_id]));
+ tab_my_inscription_ids.push(myid['_id']);
+ }
+
+
+ if (String(selected_convention_id).trim() === "") {
+ // alert(" Vous devez choisir un document");
+ setdisplay_alert_mysy("1");
+ setalert_message(" Vous devez choisir un document");
+ setalert_type("error");
+ return;
+ }
+
form.append("class_internal_url", selected_internal_url);
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
@@ -11560,6 +11723,15 @@ const DisplayPartnerSession = (props) => {
form.append("courrier_template_id", selected_convention_id);
form.append("email_test", selected_convention_email_test);
form.append("email_production", selected_convention_email_destinataire_prod);
+ form.append("tab_ids", tab_my_inscription_ids);
+
+ if (local_partner_digital_signature_status === true) {
+ form.append("request_digital_signature", "1");
+ } else {
+ form.append("request_digital_signature", "0");
+ }
+
+
// pièce jointe
form.append("file_business_object", "");
@@ -11572,27 +11744,33 @@ const DisplayPartnerSession = (props) => {
//form.append("File", list_files);
- var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convention_From_Session_By_Email/";
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convention_From_Session_For_Selected_Inscrit_By_Email/";
if (String(selected_convention_id) === "default_mail") {
// Il s'agit d'envoyer les convention par defaut de type mail
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convention_From_Session_By_Email/";
}
+ //console.log(" ### myurl = ", myurl);
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
+ //console.log(" In Send_Stagiaire_Conventions_By_Email res.data.status = " + res.data.status);
+ //console.log(" In Send_Stagiaire_Conventions_By_Email res.data.message r_class = " + res.data.message);
+
if (String(res.data.status) === String("true")) {
- //console.log(" In Send_Stagiaire_Conventions_By_Email res.data.status = " + res.data.status);
- //console.log(" In Send_Stagiaire_Conventions_By_Email res.data.message r_class = " + res.data.message);
setSend_Stagiaire_Conventions_By_Email_api("true");
setSend_Stagiaire_Conventions_By_Email_result(res.data.message);
+ Getall_Editable_Document_By_Partner_By_Collection();
+
// alert(res.data.message);
setdisplay_alert_mysy("1");
setalert_message(res.data.message);
setalert_type("success");
Dialog_convention_handleClose_buton()
+ setSelectionModel_insc([])
+ setactionmass_insc_val("");
}
else {
setSend_Stagiaire_Conventions_By_Email_api("false");
@@ -11607,28 +11785,34 @@ const DisplayPartnerSession = (props) => {
setLoading(false);
console.warn('Not good man :( Send_Stagiaire_Conventions_By_Email = ', error);
setSend_Stagiaire_Conventions_By_Email_api("false");
- alert("Impossible d'envoyer la convention par email");
+ setdisplay_alert_mysy("1");
+ setalert_message("Impossible d'envoyer la convention par email");
+ setalert_type("error");
+
+ // alert("Impossible d'envoyer la convention par email");
//setmyApimyApiMessage("")
})
}
-
function Download_Session_Conventions_PDF() {
const stored_cookie = getCookie('tokenmysypart');
var nom_fichier_cmd = "Convention.zip";
+ var tab_my_inscription_ids = []
+ for (var i = 0; i < selectionModel_insc.length; i++) {
+ var local_id = parseInt(selectionModel_insc[i]);
- var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convention_From_Session_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convention_id;
-
-
-
- if (String(selected_convention_id) === "default_pdf") {
- // Il s'agit d'envoyer les convention par defaut de type mail
- url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convention_From_Session_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convention_id;
+ var myid = JSON.parse(String(rowss_insc[local_id]));
+ tab_my_inscription_ids.push(myid['_id']);
}
+ var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convention_From_Session_For_Selected_Inscrit_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convention_id + "/" + tab_my_inscription_ids;
+ console.log(" ### tab_my_inscription_ids = ", tab_my_inscription_ids);
+ console.log(" ### url = ", url);
+
+
//console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_session_id = ", selected_session_id, " --- selected_convention_id =", selected_convention_id);
setLoading(true);
@@ -11639,13 +11823,21 @@ const DisplayPartnerSession = (props) => {
if (String(res.data) === String("false")) {
alert("Impossible de télécharger la convention (2) ");
} else {
- fileDownload(res.data, nom_fichier_cmd)
+ fileDownload(res.data, nom_fichier_cmd);
+ setSelectionModel_insc([]);
+ setactionmass_insc_val("");
}
}).catch((error) => {
setLoading(false);
console.error('Error:', error);
- alert(" Impossible de télécharger la convention ")
+
+ setdisplay_alert_mysy("1");
+ setalert_message(" Impossible de télécharger la convention");
+ setalert_type("error");
+
+
+ // alert(" Impossible de télécharger la convention ")
});
@@ -11658,6 +11850,12 @@ const DisplayPartnerSession = (props) => {
var form = new FormData();
+
+ if (String(selected_convention_id).trim() === "") {
+ alert(" Vous devez choisir un document");
+ return;
+ }
+
form.append("class_internal_url", selected_internal_url);
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
@@ -11697,7 +11895,7 @@ const DisplayPartnerSession = (props) => {
setLoading(false);
// console.log(" In Send_Stagiaire_Conventions_By_Email_Test res.data.status = " + result['status']);
- // console.log(" In Send_Stagiaire_Conventions_By_Email_Test res.data.message r_class = " + result['message']);
+ //console.log(" In Send_Stagiaire_Conventions_By_Email_Test res.data.message r_class = " + result['message']);
if (String(result['status']) === String("true")) {
setSend_Stagiaire_Conventions_By_Email_Test_api("true");
@@ -11707,7 +11905,6 @@ const DisplayPartnerSession = (props) => {
setdisplay_alert_mysy("1");
setalert_message(result['message']);
setalert_type("success");
-
Dialog_convention_handleClose_buton()
}
else {
@@ -11796,7 +11993,7 @@ const DisplayPartnerSession = (props) => {
let new_myArray = myArray.filter(file => file.name !== String(doc_to_del_name));
- console.log(" new_myArray = ", new_myArray);
+ // console.log(" new_myArray = ", new_myArray);
var new_tab = []
@@ -12160,6 +12357,8 @@ const DisplayPartnerSession = (props) => {
{ "id": "annule inscription", "label": "Annuler inscription", "value": "annule inscription" },
{ "id": "facturer", "label": "Facturer", "value": "facturer" },
{ "id": "acceslms", "label": "Acces E-Learning", "value": "acceslms" },
+ { "id": "convocation", "label": "ConvoCation", "value": "convocation" },
+ { "id": "convention_entreprise", "label": "ConVention Entreprise", "value": "convention_entreprise" },
]
const New_Option_PreInscription = [
@@ -13527,6 +13726,364 @@ const DisplayPartnerSession = (props) => {
const Dialog_MAJ_Acces_LMS_handleClose_buton = () => {
setDialog_MAJ_Acces_LMS_open(false);
};
+
+
+
+ const [Dialog_CONVOCATION_STAGIAIRE_open, setDialog_CONVOCATION_STAGIAIRE_open] = React.useState(false);
+ const Dialog_CONVOCATION_STAGIAIRE_handleClose = () => {
+ //alert(" Utiliser le bouton 'fermer' ");
+ //setOpen(false);
+ };
+
+ const Dialog_CONVOCATION_STAGIAIRE_handleClose_buton = () => {
+ setDialog_CONVOCATION_STAGIAIRE_open(false);
+ };
+
+ /******** Gestion Convocation par choix unitaire */
+
+ const New_Option_Type_Document = [
+ { "id": "email", "label": "Email", "value": "email" },
+ { "id": "pdf", "label": "PDF", "value": "pdf" },
+ ]
+
+ const [New_Get_List_Stagiaire_Convocations_result, setNew_Get_List_Stagiaire_Convocations_result] = useState([]);
+
+ const [Get_List_Stagiaire_Convocations_api, setGet_List_Stagiaire_Convocations_api] = useState();
+ const [Get_List_Stagiaire_Convocations_message, setGet_List_Stagiaire_Convocations_message] = useState();
+ const [Get_List_Stagiaire_Convocations_result, setGet_List_Stagiaire_Convocations_result] = useState();
+ function Get_List_Stagiaire_Convocations(ref_interne, nom, type_doc, courrier_template_type_document_ref_interne) {
+
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("type_doc", type_doc);
+ form.append("courrier_template_type_document_ref_interne", courrier_template_type_document_ref_interne);
+
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Convocations_Stagiaire_With_Filter/";
+ setLoading(true);
+
+
+ axios.post(myurl, form).then(res => {
+ //console.log(" In Get_List_Stagiaire_Convocations res.data.status = " + res.data.status);
+ //console.log(" In Get_List_Stagiaire_Convocations res.data.message r_class = " + res.data.message);
+ setLoading(false);
+ if (String(res.data.status) === String("true")) {
+
+
+ setGet_List_Stagiaire_Convocations_api("true");
+ setGet_List_Stagiaire_Convocations_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_ref_interne = JSON.parse(x).ref_interne;
+ var local_nom = JSON.parse(x).nom;
+ var local_sujet = JSON.parse(x).sujet;
+ var local_type_doc = JSON.parse(x).type_doc;
+ var local_cible = JSON.parse(x).cible;
+ var local_joint_pdf = JSON.parse(x).joint_pdf;
+
+
+
+ //---
+ var node = {
+ "_id": local_id,
+ "id": localid,
+ "label": local_nom,
+ "ref_interne": local_ref_interne,
+ "nom": local_nom,
+ "sujet": local_sujet,
+ "type_doc": local_type_doc,
+ "cible": local_cible,
+ "joint_pdf": local_joint_pdf,
+
+ };
+ new_data2.push(node);
+ });
+
+ if (new_data2.length > 0)
+ setNew_Get_List_Stagiaire_Convocations_result(new_data2);
+
+ }
+ else {
+ setGet_List_Stagiaire_Convocations_api("false");
+ setGet_List_Stagiaire_Convocations_message(res.data.message);
+ // alert(res.data.message);
+ setdisplay_alert_mysy("1");
+ setalert_message(res.data.message);
+ setalert_type("error");
+
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Get_List_Stagiaire_Convocations = ', error);
+ setGet_List_Stagiaire_Convocations_api("false");
+ alert("Impossible de récupérer les modèles de convocations");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+ const [action_server_ref_interne_doc, setaction_server_ref_interne_doc] = useState("");
+ const [action_server_nom_doc, setaction_server_nom_doc] = useState("");
+
+ const [Send_Stagiaire_Convocations_By_Email_api, setSend_Stagiaire_Convocations_By_Email_api] = useState();
+ const [Send_Stagiaire_Convocations_By_Email_message, setSend_Stagiaire_Convocations_By_Email_message] = useState();
+ const [Send_Stagiaire_Convocations_By_Email_result, setSend_Stagiaire_Convocations_By_Email_result] = useState();
+ function Send_Stagiaire_Convocations_By_Email(event) {
+
+ var form = new FormData();
+ var tab_my_inscription_ids = []
+ for (var i = 0; i < selectionModel_insc.length; i++) {
+
+ var local_id = parseInt(selectionModel_insc[i]);
+ var myid = JSON.parse(String(rowss_insc[local_id]));
+ tab_my_inscription_ids.push(myid['_id']);
+ }
+
+ if (String(selected_convention_id).trim() === "") {
+ // alert(" Vous devez choisir un document");
+ setdisplay_alert_mysy("1");
+ setalert_message("Vous devez choisir un document");
+ setalert_type("error");
+ return;
+ }
+
+ form.append("class_internal_url", selected_internal_url);
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("session_id", selected_session_id);
+ form.append("courrier_template_id", selected_convention_id);
+ form.append("email_test", selected_convention_email_test);
+ form.append("email_production", selected_convention_email_destinataire_prod);
+ form.append("tab_ids", tab_my_inscription_ids);
+
+
+ // pièce jointe
+ form.append("file_business_object", "");
+ var list_files = new FormData();
+
+ for (let i = 0; i < tab_convention_pieces_jointes_result.length; i++) {
+ form.append('File', tab_convention_pieces_jointes_result[i]);
+
+ }
+ //form.append("File", list_files);
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convocation_From_Session_For_Selected_Inscrit_By_Email/";
+ if (String(selected_convention_id) === "default_mail") {
+ // Il s'agit d'envoyer les convention par defaut de type mail
+ myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convocation_From_Session_By_Email/";
+ }
+
+ //console.log(" ### myurl = ", myurl);
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+ setLoading(false);
+ //console.log(" In Send_Stagiaire_Convocations_By_Email res.data.status = " + res.data.status);
+ //console.log(" In Send_Stagiaire_Convocations_By_Email res.data.message r_class = " + res.data.message);
+
+ if (String(res.data.status) === String("true")) {
+ setSend_Stagiaire_Convocations_By_Email_api("true");
+ setSend_Stagiaire_Convocations_By_Email_result(res.data.message);
+
+ Getall_Editable_Document_By_Partner_By_Collection();
+ // alert(res.data.message);
+ setdisplay_alert_mysy("1");
+ setalert_message(res.data.message);
+ setalert_type("success");
+
+ setSelectionModel_insc([]);
+ setactionmass_insc_val("");
+ Dialog_convention_handleClose_buton();
+ }
+ else {
+ setSend_Stagiaire_Convocations_By_Email_api("false");
+ setSend_Stagiaire_Convocations_By_Email_message(res.data.message);
+ // alert(res.data.message);
+ setdisplay_alert_mysy("1");
+ setalert_message(res.data.message);
+ setalert_type("error");
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Send_Stagiaire_Convocations_By_Email = ', error);
+ setSend_Stagiaire_Convocations_By_Email_api("false");
+ alert("Impossible d'envoyer la convocation par email");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+ function Download_Session_Convocation_PDF() {
+
+ const stored_cookie = getCookie('tokenmysypart');
+
+ var nom_fichier_cmd = "Convocation.zip";
+
+ if (String(selected_convention_id).trim() === "") {
+ setdisplay_alert_mysy("1");
+ setalert_message("Vous devez choisir un modèle de document ");
+ setalert_type("error");
+
+ return;
+ }
+
+ var tab_my_inscription_ids = []
+ for (var i = 0; i < selectionModel_insc.length; i++) {
+ //console.log(" ### SelectionModel_insc[i] = ", selectionModel_insc[i]);
+
+ var local_id = parseInt(selectionModel_insc[i]);
+ //console.log(" ### local_id = ",local_id);
+
+ var myid = JSON.parse(String(rowss_insc[local_id]));
+ //var line = JSON.parse(rowss[myid]);
+
+ //console.log(" ### myid = ",myid);
+
+ tab_my_inscription_ids.push(myid['_id']);
+ }
+
+ var url = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convocation_From_Session_For_Selected_Inscrit_By_PDF/" + stored_cookie + "/" + selected_session_id + "/" + selected_convention_id + "/" + tab_my_inscription_ids;
+
+
+ //console.log(" ### url = ", url);
+
+ //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_session_id = ", selected_session_id, " --- selected_convention_id =", selected_convention_id);
+ setLoading(true);
+ axios.get(url, { responseType: 'blob', },)
+ .then((res) => {
+ setLoading(false);
+ //console.log(" In Download_Stagiaire_Conventions_PDF res.data = " + res.data);
+ if (String(res.data) === String("false")) {
+ alert("Impossible de télécharger la convocation (2) ");
+ } else {
+ fileDownload(res.data, nom_fichier_cmd);
+ Getall_Editable_Document_By_Partner_By_Collection();
+ setSelectionModel_insc([]);
+ setactionmass_insc_val("");
+
+ }
+ }).catch((error) => {
+ setLoading(false);
+ console.error('Error:', error);
+ alert(" Impossible de télécharger la convocation ")
+
+ });
+
+ }
+
+
+ const [Getall_Editable_Document_By_Partner_By_Collection_api, setGetall_Editable_Document_By_Partner_By_Collection_api] = useState();
+ const [Getall_Editable_Document_By_Partner_By_Collection_message, setGetall_Editable_Document_By_Partner_By_Collection_message] = useState();
+ const [Getall_Editable_Document_By_Partner_By_Collection_result, setGetall_Editable_Document_By_Partner_By_Collection_result] = useState([]);
+ function Getall_Editable_Document_By_Partner_By_Collection(event) {
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("related_collection", "session_formation");
+ form.append("related_collection_recid", selected_session_id);
+ form.append("session_id", selected_session_id);
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Editable_Document_By_Partner_By_Collection/";
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In Getall_Editable_Document_By_Partner_By_Collection res.data.status = " + res.data.status);
+ //console.log(" In Getall_Editable_Document_By_Partner_By_Collection res.data.message r_class = " + res.data.message);
+ setGetall_Editable_Document_By_Partner_By_Collection_api("true");
+ setGetall_Editable_Document_By_Partner_By_Collection_result(res.data.message);
+
+
+ }
+ else {
+ setGetall_Editable_Document_By_Partner_By_Collection_api("false");
+ setGetall_Editable_Document_By_Partner_By_Collection_message(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Getall_Editable_Document_By_Partner_By_Collection = ', error);
+ setGetall_Editable_Document_By_Partner_By_Collection_api("false");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+
+ /***** Fin gestion convocation par choix unitaire */
+
+ /***** Début gestion Convention par choix unitaire */
+ const [partner_digital_signature_status, setpartner_digital_signature_status] = useState("0");
+ const [local_partner_digital_signature_status, setlocal_partner_digital_signature_status] = useState(false);
+
+ const [Getall_Partner_Digital_Sign_Status_api, setGetall_Partner_Digital_Sign_Status_api] = useState();
+ const [Getall_Partner_Digital_Sign_Status_message, setGetall_Partner_Digital_Sign_Status_message] = useState();
+ const [Getall_Partner_Digital_Sign_Status_result, setGetall_Partner_Digital_Sign_Status_result] = useState([]);
+ function Getall_Partner_Digital_Sign_Status(event) {
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Is_Partnair_Has_Digital_Signature/";
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In Getall_Partner_Digital_Sign_Status res.data.status = " + res.data.status);
+ //console.log(" In Getall_Partner_Digital_Sign_Status res.data.message r_class = " + res.data.message);
+ setGetall_Partner_Digital_Sign_Status_api("true");
+ setGetall_Partner_Digital_Sign_Status_result(res.data.message);
+
+
+ if (JSON.parse(res.data.message).config_name && JSON.parse(res.data.message).config_value) {
+
+
+ if (String(JSON.parse(res.data.message).config_name) === "signature_digital" &&
+ String(JSON.parse(res.data.message).config_value) === "1") {
+ setpartner_digital_signature_status("1");
+ setlocal_partner_digital_signature_status(true);
+
+ }
+ }
+ }
+ else {
+ setGetall_Partner_Digital_Sign_Status_api("false");
+ setGetall_Partner_Digital_Sign_Status_message(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Getall_Partner_Digital_Sign_Status = ', error);
+ setGetall_Partner_Digital_Sign_Status_api("false");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+
+
+ /***** Fin gestion Convention par choix unitaire */
+
+
+
return (
@@ -13545,6 +14102,663 @@ const DisplayPartnerSession = (props) => {
}
{/*** FIN Affichage des messages d'alerte*/}
+ {/* Dialog pour gerer les CONVENTIONS ENTREPRISE*/}
+
null}
+
+ PaperProps={{
+
+
+ className: classes.paper, // Apply the paper style
+ style: {
+ overflowY: 'unset',
+ position: 'absolute',
+ top: '7rem',
+ margin: "2px",
+ },
+ }}
+ hideBackdrop={true}
+ disableScrollLock
+ classes={{
+ paper: classes.dialog
+ }}
+
+ PaperComponent={PaperComponent}
+ aria-labelledby="draggable-dialog-title"
+
+ >
+
+
+
+
+ {Dialog_1_message}
+
+
+
+
+ Type Document
+
{
+ if (value && value.value) {
+ setselected_convention_type(value.value);
+
+ Get_List_Stagiaire_Conventions(action_server_ref_interne_doc, action_server_nom_doc,
+ String(value.value), Dialog_1_message);
+ }
+ }}
+ renderInput={(params) =>
+ }
+ />
+
+
+
+ {String(partner_digital_signature_status) === "1" && String(selected_convention_type) === "email" &&
+ String(Dialog_1_message) === "CONVENTION_STAGIAIRE_ENTREPRISE" && }
+
+ {String(partner_digital_signature_status) !== "1" && String(selected_convention_type) === "email" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_ENTREPRISE" &&
+ Signature Digiale
+
+
+
+
}
+
+ {(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && Choisir une convention
+
{
+ if (value && value._id) {
+
+ setselected_convention_id(value._id);
+
+ if (String(value._id) === "default_mail") {
+ setselected_convention_type("email");
+ }
+ else if (String(value._id) === "default_pdf") {
+ setselected_convention_type("pdf");
+ } else {
+ var result2 = Get_List_Stagiaire_Conventions_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
+ setselected_convention_type(JSON.parse(result2).type_doc);
+ }
+ settab_convention_pieces_jointes_result([]);
+ }
+ }}
+
+ renderInput={(params) =>
+ }
+ />
+
+ }
+
+
+
+ {String(selected_convention_type) === "email" &&
+
+
+ Adresse email de test
+
+ {
+ setselected_convention_email_test(e.target.value);
+ }
+ }
+ />
+
+
+ {String(selected_convention_type) === "email" &&
{
+
+ if (selected_convention_email_test) {
+ var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
+ if (!selected_convention_email_test.match(validRegex)) {
+ // alert("L'adresse email de test est invalide.");
+ setdisplay_alert_mysy("1");
+ setalert_message("L'adresse email de test est invalide.");
+ setalert_type("error");
+
+ return;
+ }
+ Send_Stagiaire_Conventions_By_Email_Test();
+ } else {
+ // alert("L'adresse email de test est invalide.");
+ setdisplay_alert_mysy("1");
+ setalert_message("L'adresse email de test est invalide.");
+ setalert_type("error")
+ }
+
+
+
+ }} > Test }
+
+ }
+
+
+
+ {String(selected_convention_type) === "email" &&
+ String(actionmass_ftion_val) !== String("convention") && Email destinaitaire
+ {
+ setselected_convention_email_destinataire_prod(e.target.value);
+ }
+ }
+ />
+
+
+ }
+
+
+
+ {String(selected_convention_type) === "email" &&
+
+
+
+
+
+
+
+ Pièces jointes Convention
+
+
+
+
+
+
+
+
+
+
+ Ajouter un fichier
+
+
+
+
+
+
+
+
+
+ {tab_convention_pieces_jointes_result &&
+
+
+ Liste des pièces jointes
+ {
+ {tab_convention_pieces_jointes_result && tab_convention_pieces_jointes_result.map((val) => (
+
+ {
+ Delete_Convention_Attached_Doc(e);
+ }}
+ name={val.name} id={val.name}> Supprimer {val.name}
+
+
+
+ ))}
+
}
+
+
}
+
+
+
+
+
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {String(selected_convention_type) === "email" && {
+
+ if (String(selected_convention_email_test).length > 2) {
+ // On alerte juste l'utilisateur que l'email de test n'est pas vide, juste au cas ou il aurait cliqué par erreur sur l'envoie.
+ const response = window.confirm(" Vous allez envoyer la convention au destinaitaire final. Continuer ?");
+ if (!response) {
+ return;
+ }
+ }
+
+ Dialog_convention_handleClose_buton();
+ Send_Stagiaire_Conventions_By_Email();
+
+ }}
+ className="bton_enreg_dialog">Envoyer mail }
+
+
+ {String(selected_convention_type) === "pdf" &&
+ {
+
+ Dialog_convention_handleClose_buton();
+ Download_Session_Conventions_PDF();
+ }}
+ >Télécharger }
+
+
+
+
+ Fermer
+
+
+
+
+
+
+ {/* FIN Dialog pour gerer les CONVENTIONS ENTREPRISE*/}
+
+
+ {/* Dialog pour gerer les CONVOCATION_STAGIAIRE */}
+
null}
+
+ PaperProps={{
+ className: classes.paper, // Apply the paper style
+ style: {
+ overflowY: 'unset',
+ position: 'absolute',
+ top: '7rem',
+ margin: "2px",
+ },
+ }}
+ hideBackdrop={true}
+ disableScrollLock
+ classes={{
+ paper: classes.dialog
+ }}
+
+ PaperComponent={PaperComponent}
+ aria-labelledby="draggable-dialog-title"
+
+ >
+
+ MySy Information
+
+
+ {Dialog_1_message}
+
+
+
+ Type Document
+
+
{
+ if (value && value.value) {
+ setselected_convention_type(value.value);
+ Get_List_Stagiaire_Convocations(action_server_ref_interne_doc, action_server_nom_doc,
+ String(value.value), Dialog_1_message);
+
+ }
+ }}
+ renderInput={(params) =>
+ }
+ />
+
+
+
+
+
+ {(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") && Choisir une convocation
+
{
+ if (value && value._id) {
+
+ setselected_convention_id(value._id);
+
+ if (String(value._id) === "default_mail") {
+ setselected_convention_type("email");
+ }
+ else if (String(value._id) === "default_pdf") {
+ setselected_convention_type("pdf");
+ } else {
+ var result2 = Get_List_Stagiaire_Convocations_result.filter((local_mymanager) => JSON.parse(local_mymanager)._id === String(value._id))
+ setselected_convention_type(JSON.parse(result2).type_doc);
+ }
+ settab_convention_pieces_jointes_result([]);
+ }
+ }}
+
+ renderInput={(params) =>
+ }
+ />
+
+ }
+
+ {String(selected_convention_type) === "email" && Type Document
+
+
+
+ {String(selected_convention_type) === "email" && {
+
+ if (selected_convention_email_test) {
+ var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
+ if (!selected_convention_email_test.match(validRegex)) {
+ alert("L'adresse email de test est invalide.");
+ return;
+ }
+ Send_Stagiaire_Conventions_By_Email_Test();
+ } else {
+ alert("L'adresse email de test est invalide.");
+ }
+
+
+
+ }} > Test }
+
+
}
+
+ {String(selected_convention_type) === "pdf" && Type Document
+
+
+
+
+
}
+
+
+ {String(selected_convention_type) === "email" &&
+ }
+
+
+
+ {String(selected_convention_type) === "email" &&
+ String(actionmass_ftion_val) !== String("convention") && Email destinaitaire
+ {
+ setselected_convention_email_destinataire_prod(e.target.value);
+ }
+ }
+ />
+
+
+ }
+
+
+
+ {String(selected_convention_type) === "email" &&
+
+
+
+
+
+
+
+ Pièces jointes Convention
+
+
+
+
+
+
+
+
+
+
+ Ajouter un fichier
+
+
+
+
+
+
+
+
+
+ {tab_convention_pieces_jointes_result &&
+
+
+ Liste des pièces jointes
+ {
+ {tab_convention_pieces_jointes_result && tab_convention_pieces_jointes_result.map((val) => (
+
+ {
+ Delete_Convention_Attached_Doc(e);
+ }}
+ name={val.name} id={val.name}> Supprimer {val.name}
+
+
+
+ ))}
+
}
+
+
}
+
+
+
+
+
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {String(selected_convention_type) === "email" && {
+
+ if (String(selected_convention_email_test).length > 2) {
+ // On alerte juste l'utilisateur que l'email de test n'est pas vide, juste au cas ou il aurait cliqué par erreur sur l'envoie.
+ const response = window.confirm(" Vous allez envoyer la convention au destinaitaire final. Continuer ?");
+ if (!response) {
+ return;
+ }
+ }
+
+ Send_Stagiaire_Convocations_By_Email();
+ Dialog_CONVOCATION_STAGIAIRE_handleClose_buton();
+
+ }}
+ className="bton_enreg_dialog">Envoyer mail }
+
+
+ {String(selected_convention_type) === "pdf" &&
+ {
+ Download_Session_Convocation_PDF();
+ Dialog_CONVOCATION_STAGIAIRE_handleClose_buton();
+ }}
+ >Télécharger }
+
+
+
+
+ Fermer
+
+
+
+
+
+
+ {/* FIN Dialog pour gerer les CONVOCATION_STAGIAIRE */}
+
+
+
{/* Dialog pour gerer les MAJ_Acces_LMS */}
{
MySy Information
-
- En confirmation cette action, vous allez modifier la data de validité des acces à la plateforme de E-Learning.
-
+ {inscrit_selected_id && String(inscrit_selected_id).length > 5 &&
+
+ En confirmation cette action, vous allez modifier la data de validité des acces à la plateforme de E-Learning pour l'apprenant :
+ {working_cellValues.row.prenom} {working_cellValues.row.nom}
+
}
+
+ {(!inscrit_selected_id || String(inscrit_selected_id).length <= 5) &&
+
+ En confirmation cette action, vous allez modifier la data de validité des acces à la plateforme de E-Learning
+
}
Date de fin acces E-Learning
@@ -13623,11 +14844,17 @@ const DisplayPartnerSession = (props) => {
{
Dialog_MAJ_Acces_LMS_handleClose_buton();
- Update_lms_account_expiration_date_By_Selected_Inscrit();
+ if (inscrit_selected_id && String(inscrit_selected_id).length > 5) {
+ Update_lms_account_expiration_date_for_given_Inscrit_id(inscrit_selected_id);
+ }
+ else {
+ Update_lms_account_expiration_date_By_Selected_Inscrit();
+ }
}}
- className="bton_enreg_dialog">Facturer
+ className="bton_enreg_dialog"> Mettre à jour
+
Fermer
@@ -13669,9 +14896,16 @@ const DisplayPartnerSession = (props) => {
if (String(selected_session_invoiced_statut) !== "1" && String(selected_session_invoiced_statut) !== "2") {
setp_detail_emargement_comment(e.target.value);
} else if (String(selected_session_invoiced_statut) === "1") {
- alert(" La session est en cours de facturation ")
+ setdisplay_alert_mysy("1");
+ setalert_message("La session est en cours de facturation");
+ setalert_type("error");
+
+ // alert(" La session est en cours de facturation ")
} else if (String(selected_session_invoiced_statut) === "2") {
- alert(" La session est déjà facturée ")
+ setdisplay_alert_mysy("1");
+ setalert_message("La session est déjà facturée");
+ setalert_type("error");
+ // alert(" La session est déjà facturée ")
}
}
}
@@ -15915,11 +17149,7 @@ const DisplayPartnerSession = (props) => {
PaperComponent={PaperComponent}
aria-labelledby="draggable-dialog-title"
-
-
- >
-
- Ajout ressource
+ > Ajout ressource
{Dialog_seq_ressource_1_message}
@@ -16125,7 +17355,7 @@ const DisplayPartnerSession = (props) => {
-
+ {/*
{
-
+*/}
{/* Dialog pour gerer les FACTURATION_FORMATION */}
{
session_alert_message: JSON.parse(item).session_alert_message,
is_bpf: JSON.parse(item).is_bpf,
class_id: JSON.parse(item).class_id,
+ class_lms_class_code: JSON.parse(item).class_lms_class_code
}
@@ -16969,6 +18200,8 @@ const DisplayPartnerSession = (props) => {
setsequence_gridline_id("");
+ setinscrit_selected_id("");
+
setaddOneSession("0");
setEdite_session("0");
setsessionChanged(false);
@@ -16976,6 +18209,9 @@ const DisplayPartnerSession = (props) => {
setselected_session_id(newSelectionModel.row._id);
+ setselected_class_lms_code(newSelectionModel.row.class_lms_class_code);
+
+
setsession_selected_row_id(newSelectionModel.row.id);
setsession_selected_class_id(newSelectionModel.row.class_id);
@@ -18737,24 +19973,7 @@ const DisplayPartnerSession = (props) => {
/>
- {/* setp_detail_is_bpf(e.target.value)}
- >
- Oui
- Non
- */}
}
@@ -18857,26 +20076,7 @@ const DisplayPartnerSession = (props) => {
}
/>
- {/*
{
- setp_session_status(e.target.value);
- IssessionChanged();
- }
- }
- >
- Inactif
- Actif
- */}
+
}
{!edit_session_form && String(p_session_status) === "1" &&