07/04/2026 - 14h
parent
ade87579c6
commit
048971b250
|
|
@ -6970,7 +6970,7 @@ const DisplayPartnerSession = (props) => {
|
|||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
|
@ -16096,7 +16096,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }}
|
||||
id="draggable-dialog-title"> Modalités d'organisation</DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "10rem" }}>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
</DialogContentText>
|
||||
|
|
@ -16117,7 +16117,7 @@ const DisplayPartnerSession = (props) => {
|
|||
disabled={Boolean(parseInt(selected_inscription_invoice_status))}
|
||||
style={{
|
||||
border: "1px solid gainsboro", width: '99%', padding: '2px',
|
||||
maxHeight: '10rem', height: '5rem', minHeight: '5rem', marginBottom: '3rem'
|
||||
maxHeight: '10rem', height: '6rem', minHeight: '5rem', marginBottom: '3rem'
|
||||
}}
|
||||
value={p_session_mode_animation_detail_organisation}
|
||||
onChange={(e) => {
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ function Emarge_QR_Code() {
|
|||
|
||||
}
|
||||
else if (String(res.data.status) === String("Err_Connexion")) {
|
||||
alert('Erreur: ' + res.data.message);
|
||||
alert( res.data.message);
|
||||
history.push("/Connexion");
|
||||
return;
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ function Emarge_QR_Code() {
|
|||
setLoading(false);
|
||||
console.warn('get_E_Document ee: Not good man :( = ', error);
|
||||
setget_E_Document_api("false");
|
||||
get_E_Document_message(" Impossible de recuperer le E-Document")
|
||||
// get_E_Document_message(" Impossible de recuperer le E-Document")
|
||||
})
|
||||
|
||||
}
|
||||
|
|
@ -706,7 +706,7 @@ function Emarge_QR_Code() {
|
|||
>
|
||||
|
||||
{!erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Authentification </DialogTitle>}
|
||||
{erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> Authentification - <font color="red"> Identifiants invalides </font></DialogTitle>}
|
||||
{erreur_recup_e_doc && <DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> <font color="red"> {erreur_recup_e_doc} </font></DialogTitle>}
|
||||
<DialogContent className="DialogContent_width" style={{ minWidth: "300px" }}>
|
||||
|
||||
|
||||
|
|
@ -788,7 +788,7 @@ function Emarge_QR_Code() {
|
|||
</div>}
|
||||
|
||||
|
||||
<h3 style={{ fontFamily: 'DM Sans', paddingTop: '1rem' }}> Emargement électronique </h3>
|
||||
<h3 style={{ fontFamily: 'DM Sans', paddingTop: '1rem' , background:'#ebf1f4', marginBottom:'0px'}}> Emargement électronique </h3>
|
||||
|
||||
<div className="div_row" style={{ fontFamily: 'DM Sans' }}>
|
||||
<div className="block_guide_line" style={{ fontFamily: 'DM Sans' }} >
|
||||
|
|
@ -955,8 +955,12 @@ function Emarge_QR_Code() {
|
|||
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
||||
<div className="div_row_gauche" style={{ "textAlign": 'left' }}>
|
||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||
Signature_E_Document(1);
|
||||
}}>J'etais présent
|
||||
</Button>
|
||||
|
||||
<Popup
|
||||
{/*<Popup
|
||||
trigger={
|
||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||
Signature_E_Document(1);
|
||||
|
|
@ -1007,7 +1011,7 @@ function Emarge_QR_Code() {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
</Popup>*/}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import TextField from '@mui/material/TextField';
|
||||
|
||||
import { FcRegisteredTrademark } from "react-icons/fc";
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
|
|
@ -8,7 +8,7 @@ import { getCookie } from 'react-use-cookie';
|
|||
import { useHistory } from "react-router-dom";
|
||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
|
||||
import fileDownload from 'js-file-download';
|
||||
import { FcViewDetails, FcInfo } from "react-icons/fc";
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
|
|
@ -968,6 +968,8 @@ const Module_Session_Planification = (props) => {
|
|||
const [p_detail_sequence_session_id, setp_detail_sequence_session_id] = useState("");
|
||||
const [p_detail_sequence_volume_theorique, setp_detail_sequence_volume_theorique] = useState("");
|
||||
|
||||
const [p_detail_sequence_last_emargement_request_date, setp_detail_sequence_last_emargement_request_date] = useState("");
|
||||
|
||||
const [p_detail_sequence_obligatoire, setp_detail_sequence_obligatoire] = useState("");
|
||||
|
||||
const [p_detail_justified, setp_detail_justified] = useState(false);
|
||||
|
|
@ -1612,7 +1614,11 @@ const Module_Session_Planification = (props) => {
|
|||
|
||||
var local_obligatoire = JSON.parse(x).obligatoire;
|
||||
|
||||
var local_last_emargement_request_date = ""
|
||||
if (JSON.parse(x).last_emargement_request_date) {
|
||||
local_last_emargement_request_date = JSON.parse(x).last_emargement_request_date;
|
||||
|
||||
}
|
||||
|
||||
// Si il n'y pas de relief avec le groupe d'apprenant, on va introduire un relief avec la notion de présentiel et distantiel
|
||||
if (local_session_color === "" && local_mode_animation === "1") {
|
||||
|
|
@ -1646,6 +1652,7 @@ const Module_Session_Planification = (props) => {
|
|||
"local_ue_planif_line_id": local_session_ue_planif_line_id,
|
||||
"tab_grp_apprenant_ids": local_tab_grp_apprenant_ids,
|
||||
"liste_groupe_code": local_liste_groupe_code,
|
||||
"local_last_emargement_request_date": local_last_emargement_request_date,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
|
@ -1758,7 +1765,11 @@ const Module_Session_Planification = (props) => {
|
|||
// sequence en distantiel, on va mettre un code couleur
|
||||
local_session_color = "#4ea860"
|
||||
}
|
||||
var local_last_emargement_request_date = ""
|
||||
if (JSON.parse(x).last_emargement_request_date) {
|
||||
local_last_emargement_request_date = JSON.parse(x).last_emargement_request_date;
|
||||
|
||||
}
|
||||
|
||||
//---
|
||||
var node = {
|
||||
|
|
@ -1784,6 +1795,7 @@ const Module_Session_Planification = (props) => {
|
|||
"local_ue_planif_line_id": local_session_ue_planif_line_id,
|
||||
"tab_grp_apprenant_ids": local_tab_grp_apprenant_ids,
|
||||
"liste_groupe_code": local_liste_groupe_code,
|
||||
"local_last_emargement_request_date": local_last_emargement_request_date,
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
|
@ -2624,7 +2636,7 @@ const Module_Session_Planification = (props) => {
|
|||
setGetall_List_Sequence_Ressource_result([]);
|
||||
setselectionModel_sequence([]);
|
||||
|
||||
// console.log(" ### arg.event.extendedProps = ", arg.event.extendedProps);
|
||||
// console.log(" ### arg.event.extendedProps = ", arg.event.extendedProps);
|
||||
|
||||
//console.log(" ### arg.event.extendedProps.local_type = ", arg.event.extendedProps.local_type);
|
||||
|
||||
|
|
@ -2738,6 +2750,12 @@ const Module_Session_Planification = (props) => {
|
|||
else
|
||||
setp_detail_sequence_volume_theorique("");
|
||||
|
||||
if (arg.event.extendedProps.local_last_emargement_request_date) {
|
||||
setp_detail_sequence_last_emargement_request_date(arg.event.extendedProps.local_last_emargement_request_date);
|
||||
}
|
||||
else
|
||||
setp_detail_sequence_last_emargement_request_date("");
|
||||
|
||||
|
||||
|
||||
if (arg.event.extendedProps.local_agenda) {
|
||||
|
|
@ -2785,6 +2803,11 @@ const Module_Session_Planification = (props) => {
|
|||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
const New_Option_Type_Emargement = [
|
||||
{ "id": "qr_code", "label": "QR Code", "value": "qr_code" },
|
||||
{ "id": "email", "label": "eMail", "value": "email" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
const datagridSx = {
|
||||
borderRadius: 2,
|
||||
|
|
@ -3950,6 +3973,110 @@ const Module_Session_Planification = (props) => {
|
|||
const fixedVal_grp_apprenant = [];
|
||||
const [val_grp_apprenant, setval_grp_apprenant] = useState([...fixedVal_grp_apprenant]);
|
||||
|
||||
const [Dialog_EMARGEMENT_message, setDialog_EMARGEMENT_message] = React.useState(false);
|
||||
const [Dialog_EMARGEMENT_open, setDialog_EMARGEMENT_open] = React.useState(false);
|
||||
|
||||
function Close_Dialog_EMARGEMENT() {
|
||||
setDialog_EMARGEMENT_open(false);
|
||||
setselected_type_emargement("qr_code");
|
||||
setemargement_time_valide("-1");
|
||||
|
||||
}
|
||||
|
||||
const [selected_type_emargement, setselected_type_emargement] = useState("qr_code");
|
||||
const [emargement_time_valide, setemargement_time_valide] = useState("-1");
|
||||
|
||||
const [Init_And_Send_QR_Code_Emargement_api, setInit_And_Send_QR_Code_Emargement_api] = useState();
|
||||
const [Init_And_Send_QR_Code_Emargement_message, setInit_And_Send_QR_Code_Emargement_message] = useState();
|
||||
const [Init_And_Send_QR_Code_Emargement_result, setInit_And_Send_QR_Code_Emargement_result] = useState();
|
||||
const Init_And_Send_QR_Code_Emargement = event => {
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Init_Emargement_And_Create_QR_Code_From_Inscription/" + stored_cookie + "/" + selected_session_id + "/" + selected_sequence_id + "/" + emargement_time_valide;
|
||||
|
||||
var nom_fichier_cmd = "Emargement_QR_Code.png";
|
||||
setLoading(true);
|
||||
axios.get(url, { responseType: 'blob', },)
|
||||
.then((res) => {
|
||||
setLoading(false);
|
||||
//console.log(" In Export_Dashbord_to_CSV res.data = " + res.data);
|
||||
if (String(res.data) === String("false")) {
|
||||
alert("Impossible de générer le QR code (2) ");
|
||||
} else {
|
||||
fileDownload(res.data, nom_fichier_cmd);
|
||||
Close_Dialog_EMARGEMENT();
|
||||
|
||||
}
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', error);
|
||||
alert(" Impossible de générer le QR code ")
|
||||
|
||||
});
|
||||
|
||||
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
|
||||
const [Init_And_Send_Email_Emargement_api, setInit_And_Send_Email_Emargement_api] = useState();
|
||||
const [Init_And_Send_Email_Emargement_message, setInit_And_Send_Email_Emargement_message] = useState();
|
||||
const [Init_And_Send_Email_Emargement_result, setInit_And_Send_Email_Emargement_result] = useState();
|
||||
const Init_And_Send_Email_Emargement = event => {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("tab_sequence_ids", selected_sequence_id);
|
||||
form.append("qr_time_valide", emargement_time_valide);
|
||||
|
||||
|
||||
//console.log(" form == ", form);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Init_Emargement_And_Send_Email_Code_From_Inscription/";
|
||||
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Init_And_Send_Email_Emargement res.data.status = " + res.data.status);
|
||||
//console.log(" In Init_And_Send_Email_Emargement res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setInit_And_Send_Email_Emargement_api("true");
|
||||
setInit_And_Send_Email_Emargement_result(res.data.message);
|
||||
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
Close_Dialog_EMARGEMENT();
|
||||
}
|
||||
else {
|
||||
setInit_And_Send_Email_Emargement_api("false");
|
||||
setInit_And_Send_Email_Emargement_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('UpdateStagiaireData : Not good man :( Init_And_Send_Email_Emargement = ' + error);
|
||||
setInit_And_Send_Email_Emargement_api("false");
|
||||
alert(" Impossible d'envoyer les demandes d'émargement par email");
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="modulesessionplanification">
|
||||
|
|
@ -3970,6 +4097,140 @@ const Module_Session_Planification = (props) => {
|
|||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
|
||||
{/*** Dialog ajout EMARGEMENT */}
|
||||
|
||||
<Dialog
|
||||
open={Dialog_EMARGEMENT_open}
|
||||
//onClose={Dialog_EMARGEMENT_handleClose}
|
||||
|
||||
|
||||
static
|
||||
onClose={() => null}
|
||||
|
||||
PaperProps={{
|
||||
className: classes.paper, // Apply the paper style
|
||||
style: {
|
||||
overflowY: 'unset',
|
||||
position: 'absolute',
|
||||
top: position_h_myRef_seq_calendrier_01,
|
||||
margin: "2px",
|
||||
maxWidth: 'unset'
|
||||
},
|
||||
}}
|
||||
disableRestoreFocus
|
||||
hideBackdrop={true}
|
||||
disableScrollLock
|
||||
classes={{
|
||||
paper: classes.dialog
|
||||
}}
|
||||
|
||||
PaperComponent={PaperComponent}
|
||||
aria-labelledby="draggable-dialog-title"
|
||||
|
||||
className="displaypartnersession mysy_MuiPaper-root"
|
||||
disableEnforceFocus={true}
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title">
|
||||
Emargement
|
||||
</DialogTitle>
|
||||
<DialogContent className="DialogContent_width">
|
||||
|
||||
{p_detail_sequence_last_emargement_request_date.length > 5 && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
/!\ Une demande d'émargement a déjà été enregistrée le <b> {p_detail_sequence_last_emargement_request_date}.</b> <br />
|
||||
En effectuant une nouvelle demande, tous les émargements non validés seront réinitialisés.
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > <b> Type d'émargement </b><br />
|
||||
{New_Option_Type_Emargement && New_Option_Type_Emargement.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="fields_emargement_type"
|
||||
id="fields_emargement_type"
|
||||
// className="disabled_style"
|
||||
value={New_Option_Type_Emargement.filter((data) => (data).value === String(selected_type_emargement))[0].label}
|
||||
options={New_Option_Type_Emargement}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value.value) {
|
||||
setselected_type_emargement(value.value);
|
||||
|
||||
} else {
|
||||
setselected_type_emargement("");
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog"> <b> Durée de valididé (min) </b> <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_model_nom"
|
||||
id="event_dialog_model_nom"
|
||||
type="number"
|
||||
InputProps={{ inputProps: { min: -1, max: 9999 } }}
|
||||
|
||||
|
||||
fullWidth
|
||||
|
||||
value={emargement_time_valide}
|
||||
onChange={(e) => {
|
||||
setemargement_time_valide(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
|
||||
<Button onClick={(date) => {
|
||||
if (selected_type_emargement === "qr_code") {
|
||||
Init_And_Send_QR_Code_Emargement();
|
||||
} else if (selected_type_emargement === "email") {
|
||||
Init_And_Send_Email_Emargement()
|
||||
} else {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez selectionner un type d'émargement ");
|
||||
setalert_type("error");
|
||||
}
|
||||
}}
|
||||
className="bton_enreg_dialog">Créer </Button>
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Close_Dialog_EMARGEMENT} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<IconButton
|
||||
autoFocus
|
||||
onClick={Close_Dialog_EMARGEMENT}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
</Dialog>
|
||||
{/*** Fin ajout Dialog EMARGEMENT */}
|
||||
|
||||
|
||||
|
||||
{/*** Dialog ajout RECORD MODEL PLANNING */}
|
||||
|
||||
|
|
@ -6034,9 +6295,26 @@ const Module_Session_Planification = (props) => {
|
|||
{String(selected_sequence_id).length > 3 &&
|
||||
<Button variant="outlined" onClick={submenu_sequence_ressource} className="detail_class_submenu" id='dialog_detail_seq_ressource'
|
||||
name='dialog_detail_seq_ressource'>Ressources</Button>}
|
||||
|
||||
{String(selected_sequence_id).length > 3 && val_grp_apprenant.length > 0 &&
|
||||
<Button variant="outlined" className="detail_class_submenu" id='dialog_detail_seq_ressource'
|
||||
name='dialog_detail_seq_ressource'
|
||||
onClick={() => {
|
||||
setselected_type_emargement("qr_code");
|
||||
setemargement_time_valide("-1");
|
||||
setDialog_EMARGEMENT_open(true);
|
||||
}}
|
||||
>Emargement {p_detail_sequence_last_emargement_request_date.length > 5 &&
|
||||
<span> <Tooltip className="tooltip_css" id="tooltip_last_emargement" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="tooltip_last_emargement" data-tooltip-html={"Dernière demande d'émargement : " + `${p_detail_sequence_last_emargement_request_date}`}>
|
||||
<FcInfo />
|
||||
</a></span>}
|
||||
</Button>}
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
{String(submenu_seq_dialog) === "dialog_ressource" && <div>
|
||||
|
||||
|
||||
|
|
@ -6433,33 +6711,6 @@ const Module_Session_Planification = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
{/*<div className="session_caract_Dialog" style={{ width: '50%' }}> Groupe apprenants
|
||||
|
||||
{New_Getall_Partner_Groupe_Inscrit_result && New_Getall_Partner_Groupe_Inscrit_result.length > 0 && <Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_grp_apprenant"
|
||||
id="event_dialog_grp_apprenant"
|
||||
|
||||
fullWidth
|
||||
value={New_Getall_Partner_Groupe_Inscrit_result.filter((data) => (data)._id === String(p_detail_sequence_groupe_apprenant_id))[0].label}
|
||||
options={New_Getall_Partner_Groupe_Inscrit_result}
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_detail_sequence_groupe_apprenant_id(value._id);
|
||||
} else {
|
||||
setp_detail_sequence_groupe_apprenant_id("");
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} placeholder="Choisir une option " />
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>*/}
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: '50%' }}> Groupe apprenants
|
||||
|
||||
{New_Getall_Partner_Groupe_Inscrit_result && New_Getall_Partner_Groupe_Inscrit_result.length > 0 && <Autocomplete
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue