recette2
cherif 2024-07-16 14:27:22 +02:00
parent 19a86a86db
commit 3838a87879
13 changed files with 726 additions and 207 deletions

View File

@ -31,7 +31,7 @@ const DisplayClassV2 = (props) => {
return (
<div>
<h2> on y arrive Affichage detaillé d'une formation </h2>
<h2> on y arrive Affichage détaillé d'une formation </h2>
<li className="displayclass">

View File

@ -3538,7 +3538,7 @@ const DisplayPartnerSession = (props) => {
GetListeEmargement(selected_session_id, selected_internal_url);
setretval_ch("1");
alert(" La mise à jour été correctement faite.")
alert(" La mise à jour a été correctement faite.")
}
else {
setDeleteStagiaireData_api("false");
@ -3747,7 +3747,7 @@ const DisplayPartnerSession = (props) => {
setparticipant_data_changed();
setparticipant_data_edit_mode();
GetAttendee_Data(p_detail_mail, selected_session_id);
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
@ -4967,6 +4967,10 @@ const DisplayPartnerSession = (props) => {
const [p_session_etape_label, setp_session_etape_label] = useState();
const [nb_valide_inscription_entreprise, setnb_valide_inscription_entreprise] = useState("");
const [nb_valide_inscription_individuelle, setnb_valide_inscription_individuelle] = useState("");
const [GetCurrentSession_id, setGetCurrentSession_id] = useState();
const [GetCurrentSession_api, setGetCurrentSession_api] = useState();
@ -4991,7 +4995,7 @@ const DisplayPartnerSession = (props) => {
if (String(res.data.status) === "true") {
//console.log(" In GetCurrentSession res.data.status = " + res.data.status);
//console.log(" In GetCurrentSession res.data.message r_class = " + res.data.message);
console.log(" In GetCurrentSession res.data.message r_class = " + res.data.message);
//console.log(" In GetCurrentSession res.data.message len = " + String(res.data.message).length);
setLoading(false);
@ -5027,6 +5031,17 @@ const DisplayPartnerSession = (props) => {
}
if( mylocaltraining.nb_valide_inscription_entreprise){
setnb_valide_inscription_entreprise(mylocaltraining.nb_valide_inscription_entreprise);
}else{
setnb_valide_inscription_entreprise("");
}
if( mylocaltraining.nb_valide_inscription_individuelle){
setnb_valide_inscription_individuelle(mylocaltraining.nb_valide_inscription_individuelle);
}else{
setnb_valide_inscription_individuelle("");
}
if (mylocaltraining.date_debut) {
var date_du = new Date(moment(mylocaltraining.date_debut, "DD/MM/YYYY HH:mm:ss"));
@ -5693,7 +5708,7 @@ const DisplayPartnerSession = (props) => {
GetListeEmargement(selected_session_id, selected_internal_url);
setretval_ch("1");
alert(" La mise à jour été correctement faite.")
alert(" La mise à jour a été correctement faite.")
}
else {
setUpdateStagiaireData_api("false");
@ -19879,6 +19894,9 @@ const DisplayPartnerSession = (props) => {
submenu_evaluation={submenu_evaluation_session}
submenu_attestation={submenu_attestation}
submenu_q_positionnement={submenu_q_positionnement}
nb_valide_inscription_entreprise = {nb_valide_inscription_entreprise}
nb_valide_inscription_individuelle = {nb_valide_inscription_individuelle}
selected_session_invoiced_statut = {selected_session_invoiced_statut}
/>

View File

@ -775,7 +775,7 @@ const DisplayPartnerStagiaires = (props) => {
setselected_code_session('');
setsubmenu('');
alert(" La mise à jour été correctement faite.")
alert(" La mise à jour a été correctement faite.")
}
else {
setDeleteStagiaireData_api("false");
@ -4072,7 +4072,7 @@ const DisplayPartnerStagiaires = (props) => {
setparticipant_data_changed();
setparticipant_data_edit_mode();
GetAttendee_Data(p_detail_mail, p_detail_session_class_id, selected_internal_url);
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
@ -4143,7 +4143,7 @@ const DisplayPartnerStagiaires = (props) => {
setparticipant_data_changed();
setparticipant_data_edit_mode();
GetAttendee_Data(p_detail_mail, p_detail_session_class_id, selected_internal_url);
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
//myRef_head.current.scrollIntoView({ behavior: "smooth" });

View File

@ -202,7 +202,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setDelete_Given_UE_api("true");
setDelete_Given_UE_result(res.data.message);
Getall_Parter_Unite_Enseignement();
alert(" La mise à jour été correctement faite.")
alert(" La mise à jour a été correctement faite.")
}
else {
setDelete_Given_UE_api("false");

View File

@ -46,6 +46,8 @@ import Header from "./Header";
import Footer from "./Fotter";
import { FcInfo } from "react-icons/fc";
import { Document, Page } from 'react-pdf'
import SignatureCanvas from 'react-signature-canvas';
function ESign() {
@ -140,14 +142,18 @@ function ESign() {
form.append("secret_key_signature", selected_e_doc_secret);
form.append("email_destinataire", selected_e_doc_email);
form.append("signature_img_selected", userimgclassprofil);
if (isimgclassSelectedfile )
if (isimgclassSelectedfile)
form.append('signature_img', isimgclassSelected);
else
form.append('signature_img', "");
console.log(" isimgclassSelected #### = ", isimgclassSelected);
setLoading(true);
axios.post(myurl, form).then(res => {
@ -263,6 +269,13 @@ function ESign() {
const [userimgclassprofil, setuserimgclassprofil] = useState();
const [userimgclassprofilchanged, setuserimgclassprofilchanged] = useState("");
function reader(file, callback) {
const fr = new FileReader();
fr.onload = () => callback(null, fr.result);
fr.onerror = (err) => callback(err);
fr.readAsDataURL(file);
}
const imglogoclasschangeHandler = (event) => {
@ -284,17 +297,112 @@ function ESign() {
setisimgclassSelected(event.target.files[0]);
setisimgclassSelectedfile(true);
setuserimgclassprofil(URL.createObjectURL(event.target.files[0]));
//setuserimgclassprofil(URL.createObjectURL(event.target.files[0]));
setuserimgclassprofilchanged("1");
reader(event.target.files[0], (err, res) => {
//console.log(res); // Base64 `data:image/...` String result.
setuserimgclassprofil(res);
});
};
const [isimgclassSaved, setisimgclassSaved] = useState("");
const [isimgclassSaved_message, setisimgclassSaved_message] = useState("");
const [Dialog_SIGN_MANUSCRITE_open, setDialog_SIGN_MANUSCRITE_open] = React.useState(false);
const Dialog_SIGN_MANUSCRITE_handleClose = () => {
//alert(" Utiliser le bouton 'fermer' ");
//setOpen(false);
};
const Dialog_SIGN_MANUSCRITE_handleClose_buton = () => {
setDialog_SIGN_MANUSCRITE_open(false);
};
const signatureCanvasRef = useRef(null);
// API method examples
const checkIfEmpty = () => {
const isEmpty = signatureCanvasRef.current.isEmpty();
if (signatureCanvasRef) {
setuserimgclassprofil(signatureCanvasRef.current.toDataURL());
setisimgclassSelected(signatureCanvasRef.current.toDataURL())
}
setuserimgclassprofilchanged("1");
Dialog_SIGN_MANUSCRITE_handleClose_buton();
};
const clearCanvas = () => {
signatureCanvasRef.current.clear();
};
return (
<div className="esign">
{/* POUR SIGNATURE MANUSCRITE */}
<Dialog
open={Dialog_SIGN_MANUSCRITE_open}
onClose={Dialog_SIGN_MANUSCRITE_handleClose}
className="esign"
>
<DialogTitle>Signature Manuscrite </DialogTitle>
<DialogContent className="DialogContent_width">
<div style={{ width: "100%" }}>
<SignatureCanvas ref={signatureCanvasRef} style={{ "border": "solid 1px red" }} penColor="blue"
canvasProps={{
width: 315,
height: 200,
style: { border: "1px solid black", borderRadius: "10px" },
}} />
</div>
<div style={{ width: "100%", marginLeft: 'auto', marginRight: 'auto', width: 315 }}>
<nav className="bton_supprime_image_class" style={{ width: '100%' }} onClick={(e) => {
clearCanvas();
}}>Effacer </nav>
</div>
</DialogContent>
<DialogActions>
<div className="div_row">
<div className="div_row_gauche">
<Button onClick={checkIfEmpty} className="bton_enreg_dialog">Valider &nbsp;</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Dialog_SIGN_MANUSCRITE_handleClose_buton} className="bton_annule_dialog" >Annuler</Button>
</div>
</div>
</DialogActions>
</Dialog>
{/* FIN POUR SIGNATURE MANUSCRITE */}
{/* POUR SIGNATURE E-DOCUMENT */}
<Dialog
open={Dialog_SIGN_VALIDATION_open}
@ -551,7 +659,10 @@ function ESign() {
</nav>}
<Button variant="contained" className="bton_image_class" onClick={(e) => {
setDialog_SIGN_MANUSCRITE_open(true);
}}>Signer manuellement
</Button>
{isimgclassSelected && String(isimgclassSaved) === "0" && <nav className="koUpdateData"> {isimgclassSaved_message}</nav>}
</div>

View File

@ -418,7 +418,7 @@ function Emarge_QR_Code() {
reader(event.target.files[0], (err, res) => {
console.log(res); // Base64 `data:image/...` String result.
//console.log(res); // Base64 `data:image/...` String result.
setuserimgclassprofil(res);
});
@ -717,7 +717,7 @@ function Emarge_QR_Code() {
<nav style={{ "fontSize": "2rem", "marginBottom": "1rem", "fontWeight": "700" }}> Guide d'utilisation : </nav><br />
<nav>Pour vous permettre démarger électroniquement, MySy Training Technology met à disposition ce module. </nav>
<nav style={{ "fontSize": "2rem", "marginBottom": "1rem", "marginTop": "1rem", "fontWeight": "700" }}> Comment ça marche : </nav>
<nav style={{ "fontSize": "16px", "marginBottom": "0.8rem" }}> étape 1 Vous accédez au document d'émargement à laide votre adresse email </nav>
<nav style={{ "fontSize": "16px", "marginBottom": "0.8rem" }}> étape 1 Vous accédez au document d'émargement à laide de votre adresse email </nav>
<nav style={{ "fontSize": "16px", "marginBottom": "0.8rem" }}> étape 2 Apres louverture du document, le système affichera la liste des séquences à émarger </nav>
<nav style={{ "fontSize": "16px", "marginBottom": "0.8rem" }}> étape 3 Sélectionnez les lignes laide de la case à cocher qui se trouve à gauche du tableau</nav>
<nav style={{ "fontSize": "16px", "marginBottom": "0.8rem" }}> étape 4 Ajoutez limage (fichier png) de votre signature manuelle (cette action est optionnelle)</nav>

View File

@ -2240,7 +2240,7 @@ const Employes = (props) => {
setemployee_data_edit_mode("");
Get_Employee_Data(selected_id);
//setgridline_id('');
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
if (document.getElementById('myRef_head')) {
@ -4002,7 +4002,7 @@ const Employes = (props) => {
Getall_Employee_Affectation(selected_id);
setSelectionModel_affectations([]);
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
if (document.getElementById('myRef_affectation')) {
// myRef.current.scrollIntoView({ behavior: "smooth" });
@ -4217,7 +4217,7 @@ const Employes = (props) => {
setUpdate_user_access_right_Data_api("true");
setUpdate_user_access_right_Data_result(res.data.message);
setacces_right_data_edit_mode();
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
}
else {

View File

@ -572,7 +572,7 @@ function GestionAdministrative(props) {
GetListePreinscrit(mysession);
setretval_ch("1");
alert(" La mise à jour été correctement faite.")
alert(" La mise à jour a été correctement faite.")
}
else {
setDeleteStagiaireData_api("false");
@ -993,7 +993,7 @@ function GestionAdministrative(props) {
GetListeEmargement(mysession);
GetListeEvaluation(mysession);
setretval_ch("1");
alert(" La mise à jour été correctement faite.")
alert(" La mise à jour a été correctement faite.")
}
else {
setUpdateStagiaireData_api("false");
@ -5562,7 +5562,7 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
GetAttendee_Data_from_line_id(selected_id);
GetCurrentClass_trainingsession()
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
}
else {

View File

@ -2006,7 +2006,7 @@ const Materiel_Salle = (props) => {
});
}
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
}
else {
@ -2248,7 +2248,7 @@ const Materiel_Salle = (props) => {
setSelectionModel_affectations([]);
setgridline_affectation_id('');
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
if (document.getElementById('myRef_new_affectation')) {
var divh = document.getElementById('myRef_new_affectation').offsetTop;

View File

@ -1724,7 +1724,7 @@ const Materiels = (props) => {
});
}
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
}
else {
@ -1944,7 +1944,7 @@ const Materiels = (props) => {
setSelectionModel_affectations([]);
setgridline_affectation_id('');
alert(" La mise à jour été correctement faite.");
alert(" La mise à jour a été correctement faite.");
if (document.getElementById('myRef_new_affectation')) {
var divh = document.getElementById('myRef_new_affectation').offsetTop;

View File

@ -1802,7 +1802,7 @@ const Module_Editique = (props) => {
{/* FIN Dialog pour gerer les CONVOCATION_STAGIAIRE */}
{/* Dialog pour gerer les conventions */}
{/* Dialog pour gerer les CONVENTIONS */}
<Dialog
open={Dialog_convention_open}
onClose={Dialog_convention_handleClose}
@ -1842,7 +1842,8 @@ const Module_Editique = (props) => {
</div>
{String(partner_digital_signature_status) === "1" && String(selected_convention_type) === "email" && <div className="session_caract_Dialog" >
{String(partner_digital_signature_status) === "1" && String(selected_convention_type) === "email" &&
String(Dialog_1_message) === "CONVENTION_STAGIAIRE_ENTREPRISE" && <div className="session_caract_Dialog" >
<div className="session_caract_Dialog" >
<Tooltip className="tooltip_css" id="tooltip_signat_dig" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_signat_dig" data-tooltip-html="Utiliser la fonctionnalité de signature électronique pour ce document ">
@ -1868,7 +1869,9 @@ const Module_Editique = (props) => {
</div>}
{String(partner_digital_signature_status) !== "1" && String(selected_convention_type) === "email" && <div className="session_caract_Dialog" > Signature Digiale <br />
{String(partner_digital_signature_status) !== "1" && String(selected_convention_type) === "email" && String(Dialog_1_message) === "CONVENTION_STAGIAIRE_ENTREPRISE" &&
<div className="session_caract_Dialog" > Signature Digiale <br />
<div className="session_caract_Dialog" >
<Tooltip className="tooltip_css" id="tooltip_signat_dig" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="tooltip_signat_dig" data-tooltip-html="Nous ne disposez pas de l'option de signature électronique ">
@ -2094,7 +2097,7 @@ const Module_Editique = (props) => {
</DialogActions>
</Dialog>
{/* FIN Dialog pour gerer les conventions */}
{/* FIN Dialog pour gerer les CONVENTIONS */}
{/* Dialog pour gerer les Q_POSITIONNEMENT */}
@ -2205,10 +2208,258 @@ const Module_Editique = (props) => {
{Getall_Editable_Document_By_Partner_By_Collection_result &&
Getall_Editable_Document_By_Partner_By_Collection_result.map((document) => (
<div className="div_row" style={{ "height": "3rem", "marginLeft": "5px", "marginRight": "5px" }}>
<div>
{String(props.selected_session_invoiced_statut) !== "1" && String(props.selected_session_invoiced_statut) !== "2" &&
String(JSON.parse(document).courrier_template_ref_interne) !== "CONVENTION_STAGIAIRE_INDIVIDUELLE"
&& String(props.nb_valide_inscription_individuelle) === "0" && String(props.nb_valide_inscription_entreprise) !== "0" && <div className="div_row" style={{ "height": "3rem", "marginLeft": "5px", "marginRight": "5px" }}>
<div className="bton_action_server" style={{ width: "45%", float: "left", height: "2.5rem", paddingTop: "10px" }} onClick={(e) => {
<div className="bton_action_server" style={{ width: "45%", float: "left", height: "2.5rem", paddingTop: "10px" }}
onClick={(e) => {
setaction_server_to_run(String(JSON.parse(document).server_action_name))
//setaction_server_type_doc(String(JSON.parse(document).courrier_template_type_doc))
setaction_server_nom_doc(String(JSON.parse(document).courrier_template_nom))
setaction_server_ref_interne_doc(String(JSON.parse(document).courrier_template_ref_interne))
Action_Server(String(JSON.parse(document).server_action_name));
setaction_server_type_doc_ref_interne(JSON.parse(document).courrier_template_ref_interne);
setDialog_1_message(String(JSON.parse(document).courrier_template_ref_interne))
if (String(JSON.parse(document).courrier_template_ref_interne) === "CONVENTION_STAGIAIRE_ENTREPRISE") {
// Verifier que la date de la session n'est pas passée
var date_eval = new Date(moment(session_date_debut, "DD/MM/YYYY"));
var diff = date_eval.getTime() - Date.now();
if (diff <= 0) {
setMSG_INFO_TEXT("Cette session a déjà commencé. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
}
else if (String(is_session_invoiced) === "2") {
setMSG_INFO_TEXT("Cette session a déjà été facturée. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
} else {
Get_List_Stagiaire_Conventions(String(JSON.parse(document).courrier_template_ref_interne), String(JSON.parse(document).courrier_template_nom), String(JSON.parse(document).courrier_template_type_doc)
);
setDialog_convention_open(true);
}
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "EMARGEMENT_FORMATION") {
// setDialog_EMARGEMENT_FORMATION_open(true);
props.submenu_emargement();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "ATTESTATION_FORMATION") {
//setDialog_ATTESTATION_FORMATION_open(true);
props.submenu_attestation();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "CONVOCATION_STAGIAIRE") {
// Verifier que la date de la session n'est pas passée
var date_eval = new Date(moment(session_date_debut, "DD/MM/YYYY"));
var diff = date_eval.getTime() - Date.now();
if (diff <= 0) {
setMSG_INFO_TEXT("Cette session a déjà commencé. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
}
else if (String(is_session_invoiced) === "2") {
setMSG_INFO_TEXT("Cette session a déjà été facturée. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
} else {
Get_List_Stagiaire_Convocations(String(JSON.parse(document).courrier_template_ref_interne), String(JSON.parse(document).courrier_template_nom), String(JSON.parse(document).courrier_template_type_doc)
);
setDialog_CONVOCATION_STAGIAIRE_open(true);
}
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "CONF_INSCRIPTION") {
setDialog_CONF_INSCRIPTION_open(true);
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "EVAL_FORMATION") {
//setDialog_EVALUATION_FORMATION_open(true);
props.submenu_evaluation();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "QUESTION_POSITIONNEMENT") {
//setDialog_Q_POSITIONNEMENT_open(true);
props.submenu_q_positionnement();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "FACTURATION_SESSION") {
setDialog_FACTURATION_FORMATION_open(true);
}
}}>
{(JSON.parse(document).courrier_template_nom)}
</div>
<div style={{ display: "inline-block", width: "15%", textAlign: "left", paddingLeft: "0.5rem", "float": "left", height: "2.5rem", }}>
<ToggleSwitch_v3_mysy id="toggleSwitch" name="toggleSwitch" checked={false} mysy_type={(JSON.parse(document).statut_completude)} style={{ height: "1.5rem" }} />
</div>
</div>}
{String(props.selected_session_invoiced_statut) !== "1" && String(props.selected_session_invoiced_statut) !== "2" &&
String(JSON.parse(document).courrier_template_ref_interne) !== "CONVENTION_STAGIAIRE_ENTREPRISE"
&& String(props.nb_valide_inscription_entreprise) === "0" && String(props.nb_valide_inscription_individuelle) !== "0" && <div className="div_row" style={{ "height": "3rem", "marginLeft": "5px", "marginRight": "5px" }}>
<div className="bton_action_server" style={{ width: "45%", float: "left", height: "2.5rem", paddingTop: "10px" }}
onClick={(e) => {
setaction_server_to_run(String(JSON.parse(document).server_action_name))
//setaction_server_type_doc(String(JSON.parse(document).courrier_template_type_doc))
setaction_server_nom_doc(String(JSON.parse(document).courrier_template_nom))
setaction_server_ref_interne_doc(String(JSON.parse(document).courrier_template_ref_interne))
Action_Server(String(JSON.parse(document).server_action_name));
setaction_server_type_doc_ref_interne(JSON.parse(document).courrier_template_ref_interne);
setDialog_1_message(String(JSON.parse(document).courrier_template_ref_interne))
if (String(JSON.parse(document).courrier_template_ref_interne) === "CONVENTION_STAGIAIRE_INDIVIDUELLE") {
// Verifier que la date de la session n'est pas passée
var date_eval = new Date(moment(session_date_debut, "DD/MM/YYYY"));
var diff = date_eval.getTime() - Date.now();
if (diff <= 0) {
setMSG_INFO_TEXT("Cette session a déjà commencé. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
}
else if (String(is_session_invoiced) === "2") {
setMSG_INFO_TEXT("Cette session a déjà été facturée. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
} else {
Get_List_Stagiaire_Conventions(String(JSON.parse(document).courrier_template_ref_interne), String(JSON.parse(document).courrier_template_nom), String(JSON.parse(document).courrier_template_type_doc)
);
setDialog_convention_open(true);
}
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "EMARGEMENT_FORMATION") {
// setDialog_EMARGEMENT_FORMATION_open(true);
props.submenu_emargement();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "ATTESTATION_FORMATION") {
//setDialog_ATTESTATION_FORMATION_open(true);
props.submenu_attestation();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "CONVOCATION_STAGIAIRE") {
// Verifier que la date de la session n'est pas passée
var date_eval = new Date(moment(session_date_debut, "DD/MM/YYYY"));
var diff = date_eval.getTime() - Date.now();
if (diff <= 0) {
setMSG_INFO_TEXT("Cette session a déjà commencé. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
}
else if (String(is_session_invoiced) === "2") {
setMSG_INFO_TEXT("Cette session a déjà été facturée. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
} else {
Get_List_Stagiaire_Convocations(String(JSON.parse(document).courrier_template_ref_interne), String(JSON.parse(document).courrier_template_nom), String(JSON.parse(document).courrier_template_type_doc)
);
setDialog_CONVOCATION_STAGIAIRE_open(true);
}
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "CONF_INSCRIPTION") {
setDialog_CONF_INSCRIPTION_open(true);
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "EVAL_FORMATION") {
//setDialog_EVALUATION_FORMATION_open(true);
props.submenu_evaluation();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "QUESTION_POSITIONNEMENT") {
//setDialog_Q_POSITIONNEMENT_open(true);
props.submenu_q_positionnement();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "FACTURATION_SESSION") {
setDialog_FACTURATION_FORMATION_open(true);
}
}}>
{(JSON.parse(document).courrier_template_nom)}
</div>
<div style={{ display: "inline-block", width: "15%", textAlign: "left", paddingLeft: "0.5rem", "float": "left", height: "2.5rem", }}>
<ToggleSwitch_v3_mysy id="toggleSwitch" name="toggleSwitch" checked={false} mysy_type={(JSON.parse(document).statut_completude)} style={{ height: "1.5rem" }} />
</div>
</div>}
{String(props.selected_session_invoiced_statut) !== "1" && String(props.selected_session_invoiced_statut) !== "2" &&
String(props.nb_valide_inscription_entreprise) !== "0" && String(props.nb_valide_inscription_individuelle) !== "0" && <div className="div_row" style={{ "height": "3rem", "marginLeft": "5px", "marginRight": "5px" }}>
<div className="bton_action_server" style={{ width: "45%", float: "left", height: "2.5rem", paddingTop: "10px" }}
onClick={(e) => {
setaction_server_to_run(String(JSON.parse(document).server_action_name))
//setaction_server_type_doc(String(JSON.parse(document).courrier_template_type_doc))
@ -2232,9 +2483,6 @@ const Module_Editique = (props) => {
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
@ -2337,6 +2585,157 @@ const Module_Editique = (props) => {
</div>
</div>}
{String(props.selected_session_invoiced_statut) !== "1" && String(props.selected_session_invoiced_statut) !== "2" &&
String(props.nb_valide_inscription_entreprise) === "0" && String(props.nb_valide_inscription_individuelle) === "0" && <div className="div_row" style={{ "height": "3rem", "marginLeft": "5px", "marginRight": "5px" }}>
<div className="bton_action_server" style={{ width: "45%", float: "left", height: "2.5rem", paddingTop: "10px" }}
onClick={(e) => {
setMSG_INFO_TEXT("Aucune inscription validée.")
setDialog_MSG_INFO_open(true);
return;
}}>
{(JSON.parse(document).courrier_template_nom)}
</div>
<div style={{ display: "inline-block", width: "15%", textAlign: "left", paddingLeft: "0.5rem", "float": "left", height: "2.5rem", }}>
<ToggleSwitch_v3_mysy id="toggleSwitch" name="toggleSwitch" checked={false} mysy_type={(JSON.parse(document).statut_completude)} style={{ height: "1.5rem" }} />
</div>
</div>}
{/*** Cas d'une sesson facturée */}
{(String(props.selected_session_invoiced_statut) === "1" || String(props.selected_session_invoiced_statut) === "2") &&
<div className="div_row" style={{ "height": "3rem", "marginLeft": "5px", "marginRight": "5px" }}>
<div className="bton_action_server" style={{ width: "45%", float: "left", height: "2.5rem", paddingTop: "10px" }}
onClick={(e) => {
setaction_server_to_run(String(JSON.parse(document).server_action_name))
//setaction_server_type_doc(String(JSON.parse(document).courrier_template_type_doc))
setaction_server_nom_doc(String(JSON.parse(document).courrier_template_nom))
setaction_server_ref_interne_doc(String(JSON.parse(document).courrier_template_ref_interne))
Action_Server(String(JSON.parse(document).server_action_name));
setaction_server_type_doc_ref_interne(JSON.parse(document).courrier_template_ref_interne);
setDialog_1_message(String(JSON.parse(document).courrier_template_ref_interne))
if (String(JSON.parse(document).courrier_template_ref_interne) === "CONVENTION_STAGIAIRE_ENTREPRISE" ||
String(JSON.parse(document).courrier_template_ref_interne) === "CONVENTION_STAGIAIRE_INDIVIDUELLE") {
// Verifier que la date de la session n'est pas passée
var date_eval = new Date(moment(session_date_debut, "DD/MM/YYYY"));
var diff = date_eval.getTime() - Date.now();
if (diff <= 0) {
setMSG_INFO_TEXT("Cette session a déjà commencé. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
}
else if (String(is_session_invoiced) === "2") {
setMSG_INFO_TEXT("Cette session a déjà été facturée. Il n'est plus possible d'éditer une convention")
setDialog_MSG_INFO_open(true);
} else {
Get_List_Stagiaire_Conventions(String(JSON.parse(document).courrier_template_ref_interne), String(JSON.parse(document).courrier_template_nom), String(JSON.parse(document).courrier_template_type_doc)
);
setDialog_convention_open(true);
}
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "EMARGEMENT_FORMATION") {
// setDialog_EMARGEMENT_FORMATION_open(true);
props.submenu_emargement();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "ATTESTATION_FORMATION") {
//setDialog_ATTESTATION_FORMATION_open(true);
props.submenu_attestation();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "CONVOCATION_STAGIAIRE") {
// Verifier que la date de la session n'est pas passée
var date_eval = new Date(moment(session_date_debut, "DD/MM/YYYY"));
var diff = date_eval.getTime() - Date.now();
if (diff <= 0) {
setMSG_INFO_TEXT("Cette session a déjà commencé. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
return;
}
if (String(is_session_invoiced) === "1") {
setMSG_INFO_TEXT("Cette session est en cours de facturation. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
}
else if (String(is_session_invoiced) === "2") {
setMSG_INFO_TEXT("Cette session a déjà été facturée. Il n'est plus possible d'éditer une convocation")
setDialog_MSG_INFO_open(true);
} else {
Get_List_Stagiaire_Convocations(String(JSON.parse(document).courrier_template_ref_interne), String(JSON.parse(document).courrier_template_nom), String(JSON.parse(document).courrier_template_type_doc)
);
setDialog_CONVOCATION_STAGIAIRE_open(true);
}
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "CONF_INSCRIPTION") {
setDialog_CONF_INSCRIPTION_open(true);
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "EVAL_FORMATION") {
//setDialog_EVALUATION_FORMATION_open(true);
props.submenu_evaluation();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "QUESTION_POSITIONNEMENT") {
//setDialog_Q_POSITIONNEMENT_open(true);
props.submenu_q_positionnement();
}
else if (String(JSON.parse(document).courrier_template_ref_interne) === "FACTURATION_SESSION") {
setDialog_FACTURATION_FORMATION_open(true);
}
}}>
{(JSON.parse(document).courrier_template_nom)}
</div>
<div style={{ display: "inline-block", width: "15%", textAlign: "left", paddingLeft: "0.5rem", "float": "left", height: "2.5rem", }}>
<ToggleSwitch_v3_mysy id="toggleSwitch" name="toggleSwitch" checked={false} mysy_type={(JSON.parse(document).statut_completude)} style={{ height: "1.5rem" }} />
</div>
</div>}
</div>

View File

@ -157,24 +157,7 @@ const Partner_Commande = (props) => {
{ field: 'order_header_date_expiration', headerName: 'Date Expiration', minWidth: 150, hide: false, editable: false },
/* {
field: "Detail", headerName: 'Voir detail',
renderCell: (cellValues) => {
return (
<Button
onClick={(event) => {
Display_Detail_Employe(event, cellValues);
}}
>
<FcViewDetails />
</Button>
);
}
},*/
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
@ -250,6 +233,7 @@ const Partner_Commande = (props) => {
{ field: 'order_line_formation_duration', headerName: 'Durée', width: 80, hide: false, editable: false },
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false },
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false },
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false },
{ field: 'order_header_id', headerName: 'Id_Entete', hide: true, editable: false },
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false },
{ field: 'order_line_type', headerName: 'Type', width: 100, hide: false, editable: false },
@ -273,7 +257,7 @@ const Partner_Commande = (props) => {
},
},
{
field: "Detail", headerName: 'Voir detail',
field: "Detail", headerName: 'Voir détail',
renderCell: (cellValues) => {
return (
@ -450,6 +434,9 @@ const Partner_Commande = (props) => {
setp_add_line_session_code(String(cellValues.row.order_line_session_code));
setp_add_line_order_line_type_article(String(cellValues.row.order_line_type_article));
setarticle_formation_ou_produit(String(cellValues.row.order_line_type_article));
console.log(" String(cellValues.row.order_line_type_article = ", String(cellValues.row.order_line_type_article));
Get_Given_Line_Of_Partner_Order_Line_Data(order_line_id, order_internal_ref);
@ -3966,7 +3953,7 @@ const Partner_Commande = (props) => {
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("order_header_id", selected_id);
form.append("order_header_status", setp_new_raison_cloture);
form.append("order_header_status", p_new_raison_cloture);
form.append("closure_reason", setp_new_comment_raison_cloture);
@ -4141,7 +4128,7 @@ const Partner_Commande = (props) => {
<DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<DialogContentText>
{Dialog_1_message}
Envoi devis par email
</DialogContentText>
@ -4256,9 +4243,7 @@ const Partner_Commande = (props) => {
<DialogContent>
{/*p_add_line_item = {p_add_line_item} <br/> */}
{selected_order_line_id && String(selected_order_line_id).length > 3 && <div>
deja choisi
</div>}
{(!selected_order_line_id || String(selected_order_line_id).length < 3) &&
@ -5611,27 +5596,14 @@ const Partner_Commande = (props) => {
</Button>
<br />
{session_file_name && <nav><i>{session_file_name}</i></nav>}
{String(liste_sessions_file_change_api) === String("true") && <nav className="okUpdateData"> Les commandes/devis ont été correctement importés</nav>}
{String(liste_sessions_file_change_api) === String("false") && <nav className="koUpdateData"> {liste_sessions_file_change_message} </nav>}
<input type="file"
accept=".csv"
ref={hiddenFileInput_session}
style={{ display: 'none' }}
name="liste_sessions_file"
onChange={liste_sessions_file_change}
/>
<a href='/sample/template_import_employes.csv' download>Télécharger un fichier modèle</a>
</div>
</div>
<div className="div_row" ref={myRef} id="myRef"> &nbsp;</div>
{String(submenu) === "detail_order" && String(add_One_Order) !== "1" && <div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
<nav style={{ "fontSize": "22px", "fontWeight": '600' }}> {selected_order_header_type} <i> {order_internal_ref} </i>: Affichage detaillé </nav>
<nav style={{ "fontSize": "22px", "fontWeight": '600' }}> {selected_order_header_type} <i> {order_internal_ref} </i>: Affichage détaillé </nav>
<div>
<div className="session_data">
@ -6732,7 +6704,7 @@ const Partner_Commande = (props) => {
}
{String(p_detail_header_statut_label).toLowerCase() === "en cours" &&
String(p_detail_header_type).toLowerCase() === "commande" && <Button variant="outlined" onClick={Make_Order_Ready_To_Invoice} className="detail_class_submenu bton_add_sous_menu_cmd_gauche bton_put_to_invoice" > Pret pour Facturation </Button>
String(p_detail_header_type).toLowerCase() === "commande" && <Button variant="outlined" onClick={Make_Order_Ready_To_Invoice} className="detail_class_submenu bton_add_sous_menu_cmd_gauche bton_put_to_invoice" > Prêt pour Facturation </Button>
}
@ -6915,15 +6887,11 @@ const Partner_Commande = (props) => {
<div style={{ "border": "None" }}>
<nav onClick={Ajouter_une_ligne_article} style={{ "fontSize": "18px", "fontWeight": '600', "marginLeft": "10px", "marginTop": "10px", "cursor": "pointer" }}
className="bton_add_line"> <Button> Ajouter une formation
&nbsp; <FcAddDatabase style={{ "fontSize": "medium" }} />
</Button>
</nav>
<nav onClick={Ajouter_une_ligne_article} style={{ "fontSize": "18px", "fontWeight": '600', "marginLeft": "10px", "marginTop": "10px", "cursor": "pointer" }}
className="bton_add_line"> <Button> Ajouter 1 Produit/Service
className="bton_add_line"> <Button> Ajouter 1 article
&nbsp; <FcAddDatabase style={{ "fontSize": "medium" }} />
</Button>
</nav>
<div style={{ height: 550, width: '100%', paddingRight: '1px' }}>
&nbsp;
<Box
@ -7006,6 +6974,7 @@ const Partner_Commande = (props) => {
order_line_comment: JSON.parse(item).order_line_comment,
order_line_formation_external_code: JSON.parse(item).order_line_formation_external_code,
order_line_type_article: JSON.parse(item).order_line_type_article,
order_line_montant_hors_taxes: JSON.parse(item).order_line_montant_hors_taxes,
}
))}

View File

@ -277,6 +277,9 @@ const Partner_Facture = (props) => {
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false },
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false },
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false },
{ field: 'order_header_id', headerName: 'Id_Entete', hide: true, editable: false },
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false },
{ field: 'order_line_type', headerName: 'Type', width: 100, hide: false, editable: false },
@ -697,8 +700,8 @@ const Partner_Facture = (props) => {
var mylocal_order = JSON.parse(res.data.message);
if (mylocal_order.order_line_formation) {
setp_add_line_item(mylocal_order.order_line_formation);
if (mylocal_order.title) {
setp_add_line_item(mylocal_order.title);
}
@ -742,41 +745,57 @@ const Partner_Facture = (props) => {
if (mylocal_order.order_line_tax_amount) {
setp_add_line_item_taxe_amount(mylocal_order.order_line_tax_amount);
} else {
setp_add_line_item_taxe_amount("");
}
if (mylocal_order.order_line_type_reduction) {
setp_add_line_item_type_reduction(mylocal_order.order_line_type_reduction);
} else {
setp_add_line_item_type_reduction("");
}
if (mylocal_order.order_line_type_valeur) {
setp_add_line_item_reduction_value(mylocal_order.order_line_type_valeur);
} else {
setp_add_line_item_reduction_value("");
}
if (mylocal_order.order_line_type) {
setp_add_line_item_type(mylocal_order.order_line_type);
} else {
setp_add_line_item_type("");
}
if (mylocal_order.order_line_status) {
setp_add_line_item_status(mylocal_order.order_line_status);
} else {
setp_add_line_item_status("");
}
if (mylocal_order.order_line_comment) {
setp_add_line_item_comment(mylocal_order.order_line_comment);
} else {
setp_add_line_item_comment("");
}
if (mylocal_order.title) {
setp_add_line_item_title(mylocal_order.title);
} else {
setp_add_line_item_title("");
}
if (mylocal_order.order_line_montant_hors_taxes) {
setp_add_line_item_total_amount_ht(mylocal_order.order_line_montant_hors_taxes);
} else {
setp_add_line_item_total_amount_ht("");
}
@ -787,6 +806,8 @@ const Partner_Facture = (props) => {
if (mylocal_order.duration_concat) {
setp_add_line_item_duration_concat(mylocal_order.duration_concat);
} else {
setp_add_line_item_duration_concat("");
}
@ -1071,7 +1092,7 @@ const Partner_Facture = (props) => {
if (res.data.message.length > 0) {
var mylocal_order = JSON.parse(res.data.message);
// zzzzz
if (mylocal_order.invoice_header_ref_interne)
setp_detail_header_invoice_header_ref_interne(mylocal_order.invoice_header_ref_interne);
@ -2431,7 +2452,6 @@ const Partner_Facture = (props) => {
<div className="session_caract_Dialog" > Prix Unitaire
<TextField
margin="dense"
id="ref_article_unit_price"
name="ref_article_unit_price"
@ -2445,21 +2465,22 @@ const Partner_Facture = (props) => {
/>
</div>
<div className="session_caract_Dialog" > Taux TVA
<div className="session_caract_Dialog" > Taxe
<TextField
margin="dense"
id="ref_article_taux_tva"
name="ref_article_taux_tva"
//label="Prix Unitaire"
//label="Prix Unitaire" zzz
fullWidth
//variant="standard"
//value={partner_taux_tva}
value={p_add_line_item_taxe_amount}
disabled
type="text"
type="number"
//type="number"
/>
</div>
@ -2805,7 +2826,7 @@ const Partner_Facture = (props) => {
onChange={(event, value) => {
if (value && value.value) {
setp_filtre1(value.value);
}else{
} else {
setp_filtre1("");
}
@ -3223,7 +3244,7 @@ const Partner_Facture = (props) => {
<div className="div_row" ref={myRef} id="myRef" > &nbsp;</div>
{String(display_detail_invoice) === "1" &&
<div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
<nav style={{ "fontSize": "22px", "fontWeight": '600' }}> Facture <i> {invoice_internal_ref} </i>: Affichage detaillé </nav>
<nav style={{ "fontSize": "22px", "fontWeight": '600' }}> Facture <i> {invoice_internal_ref} </i>: Affichage détaillé </nav>
<div className="session_data">
<div className="div_row" style={{ "textAlign": "right", "paddingTop": "10px" }}>
@ -4176,6 +4197,7 @@ const Partner_Facture = (props) => {
order_line_formation_duration: JSON.parse(item).duration_concat,
order_line_comment: JSON.parse(item).order_line_comment,
order_line_formation_external_code: JSON.parse(item).order_line_formation_external_code,
order_line_montant_hors_taxes: JSON.parse(item).order_line_montant_hors_taxes,
}
))}