sds
parent
0c9c8d4493
commit
1b58661790
|
@ -357,7 +357,7 @@ const DisplayPartnerSession = (props) => {
|
|||
const columns_preinscrit = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'civilite', headerName: 'Civ.', minWidth: 100, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'civilite', headerName: 'Civ.', minWidth: 100, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'prenom', headerName: 'prenom', minWidth: 150, flex: 1, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'email', headerName: 'email', minWidth: 150, flex: 1, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
@ -618,8 +618,10 @@ const DisplayPartnerSession = (props) => {
|
|||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'civilite', headerName: 'Civ.', minWidth: 70, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false },
|
||||
{ field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, hide: false, editable: false,
|
||||
renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{
|
||||
field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, hide: false, editable: false,
|
||||
renderCell: (params) => <ExpandableCell_50 {...params} />,
|
||||
},
|
||||
{ field: 'prenom', headerName: 'prenom', minWidth: 150, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'email', headerName: 'email', minWidth: 150, flex: 1, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
@ -3103,7 +3105,8 @@ const DisplayPartnerSession = (props) => {
|
|||
const value = event.target.value;
|
||||
|
||||
|
||||
if (String(value) === "confirmation" || String(value) === "impression" || String(value) === "annule inscription") {
|
||||
if (String(value) === "confirmation" || String(value) === "impression" || String(value) === "annule inscription" ||
|
||||
String(value) === "facturer") {
|
||||
setactionmass_insc_val(value);
|
||||
}
|
||||
else {
|
||||
|
@ -3240,41 +3243,121 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
async function actionmass_insc_Traitemet() {
|
||||
|
||||
var liste_formation = GetSelectedRows_Insc_Ids();
|
||||
for (var i = 0; i < liste_formation.length; i++) {
|
||||
|
||||
if (String(actionmass_insc_val) === "facturer") {
|
||||
|
||||
|
||||
|
||||
setDialog_FACTURATION_FORMATION_open(true);
|
||||
GetListeInscrit(selected_session_id, selected_internal_url);
|
||||
|
||||
|
||||
var line = JSON.parse(rowss_insc[liste_formation[i]]);
|
||||
//console.log(" line = ", line);
|
||||
var email = line.email;
|
||||
//console.log(" Traitement de email = ", email);
|
||||
if (String(actionmass_insc_val) === "confirmation") {
|
||||
} else {
|
||||
var liste_formation = GetSelectedRows_Insc_Ids();
|
||||
for (var i = 0; i < liste_formation.length; i++) {
|
||||
|
||||
SendInscriptionConfirmation(email);
|
||||
} else if (String(actionmass_insc_val) === "impression") {
|
||||
|
||||
//console.log(" impress mail = ", email);
|
||||
DownloadAttendeeDetail_one(email);
|
||||
var line = JSON.parse(rowss_insc[liste_formation[i]]);
|
||||
//console.log(" line = ", line);
|
||||
var email = line.email;
|
||||
//console.log(" Traitement de email = ", email);
|
||||
if (String(actionmass_insc_val) === "confirmation") {
|
||||
|
||||
} else if (String(actionmass_insc_val) === "annule inscription") {
|
||||
SendInscriptionConfirmation(email);
|
||||
} else if (String(actionmass_insc_val) === "impression") {
|
||||
|
||||
//console.log(" impress mail = ", email);
|
||||
SendInscriptionCancell(email);
|
||||
//console.log(" impress mail = ", email);
|
||||
DownloadAttendeeDetail_one(email);
|
||||
|
||||
} else if (String(actionmass_insc_val) === "annule inscription") {
|
||||
|
||||
//console.log(" impress mail = ", email);
|
||||
SendInscriptionCancell(email);
|
||||
|
||||
}
|
||||
|
||||
|
||||
await sleep(5);
|
||||
|
||||
}
|
||||
|
||||
await sleep(5);
|
||||
setSelectionModel_insc([]);
|
||||
setactionmass_insc_val();
|
||||
GetListePreinscrit(selected_session_id, selected_internal_url);
|
||||
|
||||
GetListeEmargement(selected_session_id, selected_internal_url);
|
||||
}
|
||||
|
||||
setSelectionModel_insc([]);
|
||||
setactionmass_insc_val();
|
||||
GetListePreinscrit(selected_session_id, selected_internal_url);
|
||||
GetListeInscrit(selected_session_id, selected_internal_url);
|
||||
GetListeEmargement(selected_session_id, selected_internal_url);
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [Invoice_Session_Formation_By_Selected_Inscrit_api, setInvoice_Session_Formation_By_Selected_Inscrit_api] = useState();
|
||||
const [Invoice_Session_Formation_By_Selected_Inscrit_message, setInvoice_Session_Formation_By_Selected_Inscrit_message] = useState();
|
||||
const [Invoice_Session_Formation_By_Selected_Inscrit_result, setInvoice_Session_Formation_By_Selected_Inscrit_result] = useState([]);
|
||||
function Invoice_Session_Formation_By_Selected_Inscrit(event) {
|
||||
var form = new FormData();
|
||||
|
||||
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']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
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("courrier_template_id", "64fde469da3a50338b92fb83");
|
||||
|
||||
form.append("email_test", "");
|
||||
form.append("email_production", "");
|
||||
|
||||
console.log(" #### form = ", form);
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Facture_From_Session_By_Inscription_Id/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
setLoading(false);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Invoice_Session_Formation_By_Selected_Inscrit res.data.status = " + res.data.status);
|
||||
//console.log(" In Invoice_Session_Formation_By_Selected_Inscrit res.data.message r_class = " + res.data.message);
|
||||
setInvoice_Session_Formation_By_Selected_Inscrit_api("true");
|
||||
setInvoice_Session_Formation_By_Selected_Inscrit_result(res.data.message);
|
||||
|
||||
alert(res.data.message);
|
||||
|
||||
}
|
||||
else {
|
||||
setInvoice_Session_Formation_By_Selected_Inscrit_api("false");
|
||||
setInvoice_Session_Formation_By_Selected_Inscrit_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Invoice_Session_Formation_By_Selected_Inscrit = ', error);
|
||||
setInvoice_Session_Formation_By_Selected_Inscrit_api("false");
|
||||
alert(" Impossible lancer la facturation de la session");
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const sleep = (milliseconds) => {
|
||||
return new Promise(resolve => setTimeout(resolve, milliseconds))
|
||||
}
|
||||
|
@ -4478,6 +4561,12 @@ const DisplayPartnerSession = (props) => {
|
|||
if (p_one_myclass_title) {
|
||||
one_myclass_title = p_one_myclass_title;
|
||||
}
|
||||
|
||||
if (!p_one_code_session || p_one_code_session.trim() == "") {
|
||||
alert(" Vous devez définir un code session ");
|
||||
return;
|
||||
}
|
||||
|
||||
if (one_myclass_title.trim() == "") {
|
||||
alert(" Vous devez choisir une formation ");
|
||||
return;
|
||||
|
@ -9484,6 +9573,18 @@ const DisplayPartnerSession = (props) => {
|
|||
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
|
||||
]
|
||||
|
||||
|
||||
|
||||
const [Dialog_FACTURATION_FORMATION_open, setDialog_FACTURATION_FORMATION_open] = React.useState(false);
|
||||
const Dialog_FACTURATION_FORMATION_handleClose = () => {
|
||||
|
||||
};
|
||||
|
||||
const Dialog_FACTURATION_FORMATION_handleClose_buton = () => {
|
||||
setDialog_FACTURATION_FORMATION_open(false);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="displaypartnersession">
|
||||
|
||||
|
@ -10382,6 +10483,65 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</Dialog>
|
||||
|
||||
{/* Dialog pour gerer les FACTURATION_FORMATION */}
|
||||
<Dialog
|
||||
open={Dialog_FACTURATION_FORMATION_open}
|
||||
onClose={Dialog_FACTURATION_FORMATION_handleClose}
|
||||
className="displaypartnersession"
|
||||
>
|
||||
|
||||
<DialogTitle>MySy Information</DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "10rem" }}>
|
||||
<DialogContentText>
|
||||
<div style={{ "textAlign": "left" }}>
|
||||
En confirmation cette action, toute la session de formation sera facturée.
|
||||
|
||||
Verifier les informations
|
||||
|
||||
<ul>
|
||||
|
||||
<li> Prix de session </li>
|
||||
<li> Données client </li>
|
||||
<li> etc </li>
|
||||
</ul>
|
||||
avant de lancer la facturation.
|
||||
</div>
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
|
||||
<Button onClick={(e) => {
|
||||
|
||||
if (String(selected_session_id).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(" Continuez la facturation?");
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Dialog_FACTURATION_FORMATION_handleClose_buton();
|
||||
Invoice_Session_Formation_By_Selected_Inscrit();
|
||||
|
||||
|
||||
}}
|
||||
className="bton_enreg_dialog">Facturer </Button>
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_FACTURATION_FORMATION_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
</Dialog>
|
||||
|
||||
{/* FIN Dialog pour gerer les FACTURATION_FORMATION */}
|
||||
|
||||
<h3> Vos sessions de formation </h3>
|
||||
|
||||
<div>
|
||||
|
@ -10389,7 +10549,7 @@ const DisplayPartnerSession = (props) => {
|
|||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<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
|
||||
name="filtre1"
|
||||
id="filtre1"
|
||||
|
@ -10412,7 +10572,7 @@ const DisplayPartnerSession = (props) => {
|
|||
/>}
|
||||
|
||||
|
||||
{/* <TextField
|
||||
{/* <TextField
|
||||
name="filtre1"
|
||||
label="Choisir un champ"
|
||||
select
|
||||
|
@ -10437,7 +10597,7 @@ const DisplayPartnerSession = (props) => {
|
|||
<div className="div_row_droite texte_area_filter_value" >
|
||||
{p_filtre1 &&
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, fontSize:"10px"}}
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, fontSize: "10px" }}
|
||||
required
|
||||
name="filtre1_value"
|
||||
id="filtre1_value"
|
||||
|
@ -10491,7 +10651,7 @@ const DisplayPartnerSession = (props) => {
|
|||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<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
|
||||
name="filtre2"
|
||||
id="filtre2"
|
||||
|
@ -14723,6 +14883,7 @@ const DisplayPartnerSession = (props) => {
|
|||
<option value="confirmation">Renvoyer une confirmation</option>
|
||||
<option value="impression">Imprimer fiches</option>
|
||||
<option value="annule inscription">Annuler inscription</option>
|
||||
<option value="facturer">Facturer</option>
|
||||
|
||||
</select>
|
||||
|
||||
|
@ -16183,8 +16344,8 @@ const DisplayPartnerSession = (props) => {
|
|||
{String(submenu) === String("editique") && <div style={{ "border": "None" }}>
|
||||
|
||||
<Module_Editique conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
|
||||
related_collection_recid={selected_session_id} GetListeInscrit={GetListeInscrit}
|
||||
internal_url={selected_internal_url}/>
|
||||
related_collection_recid={selected_session_id} GetListeInscrit={GetListeInscrit}
|
||||
internal_url={selected_internal_url} />
|
||||
|
||||
|
||||
</div>}
|
||||
|
|
|
@ -1180,16 +1180,16 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
<div className="carte_visite">
|
||||
<div className="main_div">
|
||||
<div className="ch_div_gauche" style={{ "borderRight": "5px solid gray", "borderRadius": "0px" }}>
|
||||
<div className="ch_div_gauche" style={{ "borderRight": "5px solid gray", "borderRadius": "0px", "width":'25%' }}>
|
||||
<br />
|
||||
<img classname="img" src="http://88.170.110.220/img/MYSY-LOGO-BLUE.png" alt="Mysy Training Logo"
|
||||
style={{ "maxWidth": "30%", "marginTop": "2rem" }} />
|
||||
<img classname="img" src="https://img.mysy-training.com/MYSY-LOGO-BLUE.png" alt="Mysy Training Logo"
|
||||
style={{ "maxWidth": "50%", "marginTop": "2rem" }} />
|
||||
<br />
|
||||
|
||||
<div className="div_nom">
|
||||
<div className="div_nom" style={{"fontSize":'25px'}}>
|
||||
Cherif BALDE<br />
|
||||
</div>
|
||||
<div className="div_function">
|
||||
<div className="div_function" style={{"fontSize":'25px'}}>
|
||||
Directeur
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1199,7 +1199,7 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
</div>
|
||||
|
||||
<div className="ch_div_droite div_coordonnees" style={{ "paddingRight": "3rem" }}>
|
||||
<div className="ch_div_droite div_coordonnees" style={{ "paddingRight": "3rem", "lineHeight":'3rem', "fontSize":'20px' }}>
|
||||
<div> <ImMobile2 /> +337 69 20 39 45</div>
|
||||
<div> <ImOffice /> +331 77 00 38 57</div>
|
||||
<div> <BsMailbox /> cbalde@mysy-training.com</div>
|
||||
|
@ -1211,7 +1211,108 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
|
||||
</div>
|
||||
|
||||
<div className="div_row">
|
||||
|
||||
<div className="carte_visite">
|
||||
<div className="main_div">
|
||||
<div className="ch_div_gauche" style={{ "borderRight": "5px solid gray", "borderRadius": "0px", "width":'25%' }}>
|
||||
<br />
|
||||
<img classname="img" src="https://img.mysy-training.com/MYSY-LOGO-BLUE.png" alt="Mysy Training Logo"
|
||||
style={{ "maxWidth": "50%", "marginTop": "2rem" }} />
|
||||
<br />
|
||||
|
||||
<div className="div_nom" style={{"fontSize":'25px'}}>
|
||||
Matthieu BOIFFARD<br />
|
||||
</div>
|
||||
<div className="div_function" style={{"fontSize":'25px'}}>
|
||||
Responsable Commercial
|
||||
</div>
|
||||
</div>
|
||||
<div className="ch_div_centre">
|
||||
<hr className="myhr" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="ch_div_droite div_coordonnees" style={{ "paddingRight": "3rem", "lineHeight":'3rem', "fontSize":'20px' }}>
|
||||
<div> <ImMobile2 /> +336 67 45 99 64</div>
|
||||
<div> <ImOffice /> +331 77 00 38 57</div>
|
||||
<div> <BsMailbox /> mboiffard@mysy-training.com</div>
|
||||
<div> <ImHome /> https://www.mysy-training.com/</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="carte_visite">
|
||||
<div className="main_div">
|
||||
<div className="ch_div_gauche" style={{ "borderRight": "5px solid gray", "borderRadius": "0px", "width":'25%' }}>
|
||||
<br />
|
||||
<img classname="img" src="https://img.mysy-training.com/MYSY-LOGO-BLUE.png" alt="Mysy Training Logo"
|
||||
style={{ "maxWidth": "50%", "marginTop": "2rem" }} />
|
||||
<br />
|
||||
|
||||
<div className="div_nom" style={{"fontSize":'25px'}}>
|
||||
Aicha BARRY<br />
|
||||
</div>
|
||||
<div className="div_function" style={{"fontSize":'25px'}}>
|
||||
Directrice Administration & Relation Client
|
||||
</div>
|
||||
</div>
|
||||
<div className="ch_div_centre">
|
||||
<hr className="myhr" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="ch_div_droite div_coordonnees" style={{ "paddingRight": "3rem", "lineHeight":'3rem', "fontSize":'20px' }}>
|
||||
<div> <ImMobile2 /> +336 16 08 80 48</div>
|
||||
<div> <ImOffice /> +331 77 00 38 57</div>
|
||||
<div> <BsMailbox /> mboiffard@mysy-training.com</div>
|
||||
<div> <ImHome /> https://www.mysy-training.com/</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="carte_visite">
|
||||
<div className="main_div">
|
||||
<div className="ch_div_gauche" style={{ "borderRight": "5px solid gray", "borderRadius": "0px" }}>
|
||||
<br />
|
||||
<img classname="img" src="https://img.mysy-training.com/MYSY-LOGO-BLUE.png" alt="Mysy Training Logo"
|
||||
style={{ "maxWidth": "30%", "marginTop": "2rem" }} />
|
||||
<br />
|
||||
|
||||
<div className="div_nom">
|
||||
Matthieu BOIFFARD<br />
|
||||
</div>
|
||||
<div className="div_function">
|
||||
Responsable Commercial
|
||||
</div>
|
||||
</div>
|
||||
<div className="ch_div_centre">
|
||||
<hr className="myhr" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="ch_div_droite div_coordonnees" style={{ "paddingRight": "3rem", "lineHeight":'3rem', "fontSize":'20px' }}>
|
||||
<div> <ImMobile2 /> +336 67 45 99 64</div>
|
||||
<div> <ImOffice /> +331 77 00 38 57</div>
|
||||
<div> <BsMailbox /> mboiffard@mysy-training.com</div>
|
||||
<div> <ImHome /> https://www.mysy-training.com/</div>
|
||||
<div> <ImWhatsapp /> +337 69 20 39 45</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/*
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@
|
|||
color: rgb(10, 42, 77);
|
||||
background-color: white;
|
||||
padding-top: 1rem !important;
|
||||
line-height: 2.5rem !important;
|
||||
line-height: 3rem;
|
||||
}
|
||||
|
||||
.myhr {
|
||||
|
|
Loading…
Reference in New Issue