30/07/2024 - 12h
parent
ce7a684bcf
commit
3e6bdb7f4c
|
@ -806,7 +806,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
onClick={(event) => {
|
||||
|
||||
if( String(cellValues.row.client_rattachement_id) === String(cellValues.row.client_facture)){
|
||||
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");
|
||||
return;
|
||||
}
|
||||
|
@ -1065,7 +1065,7 @@ const DisplayPartnerSession = (props) => {
|
|||
<Button
|
||||
|
||||
onClick={(event) => {
|
||||
// handleClick_valide_emargement(event, cellValues); zzz
|
||||
|
||||
|
||||
setp_detail_emargement_comment(cellValues.row.comment);
|
||||
|
||||
|
@ -2978,7 +2978,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
// Gestion du statut d'inscription
|
||||
if( String(myinscript_status) === ""){
|
||||
if (String(myinscript_status) === "") {
|
||||
alert(" Vous devez choisir un statut d'inscription ");
|
||||
}
|
||||
|
||||
|
@ -3134,7 +3134,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
const New_status_inscription_add = [
|
||||
{ "id": "0", "label": "PréInscription", "value": "0" },
|
||||
// { "id": "1", "label": "Inscription", "value": "1" },
|
||||
// { "id": "1", "label": "Inscription", "value": "1" },
|
||||
{ "id": "2", "label": "En Cours", "value": "2" },
|
||||
]
|
||||
|
||||
|
@ -5032,15 +5032,15 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
}
|
||||
|
||||
if( mylocaltraining.nb_valide_inscription_entreprise){
|
||||
if (mylocaltraining.nb_valide_inscription_entreprise) {
|
||||
setnb_valide_inscription_entreprise(mylocaltraining.nb_valide_inscription_entreprise);
|
||||
}else{
|
||||
} else {
|
||||
setnb_valide_inscription_entreprise("");
|
||||
}
|
||||
|
||||
if( mylocaltraining.nb_valide_inscription_individuelle){
|
||||
if (mylocaltraining.nb_valide_inscription_individuelle) {
|
||||
setnb_valide_inscription_individuelle(mylocaltraining.nb_valide_inscription_individuelle);
|
||||
}else{
|
||||
} else {
|
||||
setnb_valide_inscription_individuelle("");
|
||||
}
|
||||
|
||||
|
@ -7718,8 +7718,12 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
async function actionmass_ftion_Traitemet() {
|
||||
|
||||
|
||||
var liste_session = GetSelectedRowsSession();
|
||||
// zzzzz
|
||||
var liste_session = ""
|
||||
if (display_session_with_alert && display_session_with_alert === true)
|
||||
liste_session = GetSelectedRowsSession_filtered_on_alert();
|
||||
else
|
||||
liste_session = GetSelectedRowsSession();
|
||||
|
||||
//console.log(" liste_formation = ", liste_formation);
|
||||
//console.log(" actionmass_ftion_val = ", actionmass_ftion_val);
|
||||
|
@ -7761,6 +7765,24 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
}
|
||||
|
||||
|
||||
function GetSelectedRowsSession_filtered_on_alert() {
|
||||
///alert(" les lignes slected sont : " + selectionModel + " nb item = " + selectionModel.length);
|
||||
//const selectedRowsData = selectionModel.map((id) => rowss.find((row) => row.id === id));
|
||||
//console.log(rowss[0]);
|
||||
var tab_tmp = []
|
||||
for (var i = 0; i < selectionModel.length; i++) {
|
||||
var myid = parseInt(String(selectionModel[i]));
|
||||
var line = JSON.parse(rowss.filter((data) => (JSON.parse(data)).is_session_alert === "1")[myid]);
|
||||
tab_tmp.push(line._id);
|
||||
//console.log(rowss[myid]['external_code']);
|
||||
}
|
||||
setselectedtraining(tab_tmp);
|
||||
return tab_tmp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [Delete_LIST_Session_Formation_api, setDelete_LIST_Session_Formation_api] = useState();
|
||||
const [Delete_LIST_Session_Formation_message, setDelete_LIST_Session_Formation_message] = useState();
|
||||
const [Delete_LIST_Session_Formation_result, setDelete_LIST_Session_Formation_result] = useState();
|
||||
|
@ -9146,31 +9168,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
}
|
||||
|
||||
function ConfirmInitListEmargement() {
|
||||
confirmAlert({
|
||||
message: "Confirmez la (re)initialisation de la liste d'emargement ? Toutes les confirmations seront perdues",
|
||||
|
||||
buttons: [
|
||||
{
|
||||
label: 'Oui',
|
||||
onClick: () => { CreateListEmargement() }
|
||||
},
|
||||
{
|
||||
label: 'Non',
|
||||
onClick: () => { return }
|
||||
|
||||
}
|
||||
],
|
||||
closeOnEscape: false,
|
||||
closeOnClickOutside: false,
|
||||
keyCodeForClose: [8, 32],
|
||||
willUnmount: () => { },
|
||||
afterClose: () => { },
|
||||
onClickOutside: () => { },
|
||||
onKeypress: () => { },
|
||||
onKeypressEscape: () => { },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Modele_Emargement_result, setNew_Get_List_Modele_Emargement_result] = useState([]);
|
||||
|
@ -9341,32 +9339,6 @@ const DisplayPartnerSession = (props) => {
|
|||
});
|
||||
}
|
||||
|
||||
function ConfirmEnvoiListEmargement() {
|
||||
confirmAlert({
|
||||
message: "Confirmez l'envoi des demandes d'emargement aux participants",
|
||||
|
||||
buttons: [
|
||||
{
|
||||
label: 'Oui',
|
||||
onClick: () => { ActionMassListEmargement() }
|
||||
},
|
||||
{
|
||||
label: 'Non',
|
||||
onClick: () => { return }
|
||||
|
||||
}
|
||||
],
|
||||
closeOnEscape: false,
|
||||
closeOnClickOutside: false,
|
||||
keyCodeForClose: [8, 32],
|
||||
willUnmount: () => { },
|
||||
afterClose: () => { },
|
||||
onClickOutside: () => { },
|
||||
onKeypress: () => { },
|
||||
onKeypressEscape: () => { },
|
||||
});
|
||||
}
|
||||
|
||||
const [UpdateStagiaireEmargement_api, setUpdateStagiaireEmargement_api] = useState();
|
||||
const [UpdateStagiaireEmargement_message, setUpdateStagiaireEmargement_message] = useState();
|
||||
const [UpdateStagiaireEmargement_result, setUpdateStagiaireEmargement_result] = useState();
|
||||
|
@ -14045,7 +14017,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
setselected_session_invoiced_statut(newSelectionModel.row.invoiced_statut);
|
||||
|
||||
console.log(" ### newSelectionModel.row.invoiced_statut = ", newSelectionModel.row.invoiced_statut);
|
||||
//console.log(" ### newSelectionModel.row.invoiced_statut = ", newSelectionModel.row.invoiced_statut);
|
||||
|
||||
setDialog_2_message(String(JSON.parse(rowss[newSelectionModel.row.id]).title));
|
||||
setDialog_2_open(true);
|
||||
|
@ -19895,9 +19867,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}
|
||||
nb_valide_inscription_entreprise={nb_valide_inscription_entreprise}
|
||||
nb_valide_inscription_individuelle={nb_valide_inscription_individuelle}
|
||||
selected_session_invoiced_statut={selected_session_invoiced_statut}
|
||||
|
||||
|
||||
/>
|
||||
|
|
|
@ -20,7 +20,7 @@ import Popup from 'reactjs-popup';
|
|||
import 'reactjs-popup/dist/index.css';
|
||||
import {
|
||||
FcCancel, FcApproval, FcAcceptDatabase,
|
||||
FcPrint,
|
||||
FcPrint, FcExpired
|
||||
} from "react-icons/fc";
|
||||
import DatePicker from "react-datepicker";
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
|
@ -57,6 +57,8 @@ import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
|
|||
import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import Module_Email_Management from "./Module_Email_Management";
|
||||
import FormGroup from '@mui/material/FormGroup';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
|
||||
const DisplayPartnerStagiaires = (props) => {
|
||||
const history = useHistory();
|
||||
|
@ -93,7 +95,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
const [datagrid_columns_size_model2, setdatagrid_columns_size_model2] = useState(80);
|
||||
|
||||
const columns = [
|
||||
{ field: '_id', headerName: '_id', hide: true, editable: false, Width: 0 },
|
||||
{ field: '_id', headerName: '_id', hide: true, editable: false, Width: 0, },
|
||||
{ field: 'session_id', headerName: 'session_id', hide: true, editable: false, Width: 0 },
|
||||
{ field: 'id', headerName: 'id', hide: true, Width: 0 },
|
||||
{ field: 'class_id', headerName: 'class_id', hide: true, Width: 0 },
|
||||
|
@ -106,6 +108,28 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ field: 'ville', headerName: 'ville', hide: true, editable: false, Width: 0 },
|
||||
{ field: 'pays', headerName: 'pays', hide: true, editable: false, Width: 0 },
|
||||
|
||||
{
|
||||
field: 'warning_recyclage_alert', headerName: 'Alert', hide: false, Width: 150,
|
||||
|
||||
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
|
||||
{cellValues.row.warning_recyclage_alert && String(cellValues.row.warning_recyclage_alert) === "1" && <nav>
|
||||
<Tooltip className="tooltip_css" id="my_tooltip_alert_1" />
|
||||
<a data-tooltip-id="my_tooltip_alert_1" data-tooltip-html={"Pensez au recyclage de l'apprenant"}>
|
||||
<FcExpired />
|
||||
</a>
|
||||
</nav>}
|
||||
{cellValues.row.warning_recyclage_alert && String(cellValues.row.warning_recyclage_alert) !== "1" && ""}
|
||||
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
field: 'civilite', headerName: 'Civ.', minWidth: 100, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false,
|
||||
|
||||
|
@ -1942,12 +1966,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
function open_apprenant_dossier() {
|
||||
if (selected_id_status && String(selected_id_status) === "1" && p_detail_apprenant_id && String(p_detail_apprenant_id).trim().length > 3) {
|
||||
|
||||
/*var a = document.createElement("a");
|
||||
a.href = process.env.REACT_APP_FRONT_URL + "Partner/mes_apprenants/" + String(p_detail_apprenant_id) + "/" + String(selected_participant_email);
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
//the tenth parameter of initMouseEvent sets ctrl key
|
||||
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, true, false, false, false, 0, null);
|
||||
a.dispatchEvent(evt);*/
|
||||
|
||||
window.open(
|
||||
process.env.REACT_APP_FRONT_URL + "Partner/mes_apprenants/" + String(p_detail_apprenant_id) + "/" + String(selected_participant_email),
|
||||
|
@ -5337,13 +5355,24 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
async function actionmass_ftion_Traitemet() {
|
||||
|
||||
|
||||
var liste_session = GetSelectedRowsSession();
|
||||
setliste_selected_inscription_id(liste_session);
|
||||
var liste_session = "";
|
||||
var liste_emails = "";
|
||||
|
||||
var liste_emails = GetSelectedRows_Emails();
|
||||
if (display_stagiaire_with_alert && display_stagiaire_with_alert === true){
|
||||
liste_session = GetSelectedRowsSession_filtered_on_alert();
|
||||
liste_emails = GetSelectedRows_Emails_filtered_on_alert();
|
||||
}
|
||||
else{
|
||||
liste_session = GetSelectedRowsSession();
|
||||
liste_emails = GetSelectedRows_Emails();
|
||||
}
|
||||
|
||||
setliste_selected_inscription_id(liste_session);
|
||||
setselectedtraining_emails(liste_session);
|
||||
|
||||
//console.log(" liste_formation = ", liste_formation);
|
||||
console.log(" liste_session = ", liste_session);
|
||||
|
||||
|
||||
//console.log(" actionmass_ftion_val = ", actionmass_ftion_val);
|
||||
|
||||
if (String(actionmass_ftion_val) === String("valide_inscr")) {
|
||||
|
@ -5372,7 +5401,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
Recyclage_Desactivation(liste_session);
|
||||
}
|
||||
else if (String(actionmass_ftion_val) === String("sendemail")) {
|
||||
// console.log(" #### selectedtraining_emails_liste = ", selectedtraining_emails_liste);
|
||||
// console.log(" #### selectedtraining_emails_liste = ", selectedtraining_emails_liste);
|
||||
setDialog_SEND_EMAIL_open(true);
|
||||
}
|
||||
}
|
||||
|
@ -5409,7 +5438,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
const [selectedtraining, setselectedtraining] = useState([])
|
||||
function GetSelectedRowsSession() {
|
||||
///alert(" les lignes slected sont : " + selectionModel + " nb item = " + selectionModel.length);
|
||||
// alert(" les lignes slected sont : " + selectionModel + " nb item = " + selectionModel.length);
|
||||
//const selectedRowsData = selectionModel.map((id) => rowss.find((row) => row.id === id));
|
||||
//console.log(rowss[0]);
|
||||
var tab_tmp = []
|
||||
|
@ -5424,6 +5453,24 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
}
|
||||
|
||||
function GetSelectedRowsSession_filtered_on_alert() {
|
||||
//alert(" les lignes slected sont : " + selectionModel + " nb item = " + selectionModel.length);
|
||||
//const selectedRowsData = selectionModel.map((id) => rowss.find((row) => row.id === id));
|
||||
//console.log(rowss[0]);
|
||||
|
||||
|
||||
var tab_tmp = []
|
||||
for (var i = 0; i < selectionModel.length; i++) {
|
||||
var myid = parseInt(String(selectionModel[i]));
|
||||
var line = JSON.parse(rowss.filter((data) => (JSON.parse(data)).warning_recyclage === "1")[myid]);
|
||||
tab_tmp.push(line._id);
|
||||
//console.log(rowss[myid]['external_code']);
|
||||
}
|
||||
setselectedtraining(tab_tmp);
|
||||
return tab_tmp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [selectedtraining_emails, setselectedtraining_emails] = useState([])
|
||||
const [selectedtraining_emails_liste, setselectedtraining_emails_liste] = useState("")
|
||||
|
@ -5442,6 +5489,23 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
return tab_tmp;
|
||||
}
|
||||
|
||||
|
||||
function GetSelectedRows_Emails_filtered_on_alert() {
|
||||
|
||||
var tab_tmp = []
|
||||
for (var i = 0; i < selectionModel.length; i++) {
|
||||
var myid = parseInt(String(selectionModel[i]));
|
||||
var line = JSON.parse(rowss.filter((data) => (JSON.parse(data)).warning_recyclage === "1")[myid]);
|
||||
tab_tmp.push(line.email);
|
||||
//console.log(rowss[myid]['external_code']);
|
||||
}
|
||||
setselectedtraining_emails(tab_tmp);
|
||||
|
||||
setselectedtraining_emails_liste(tab_tmp.join());
|
||||
return tab_tmp;
|
||||
}
|
||||
|
||||
|
||||
const [Delete_LIST_Stagiaires_api, setDelete_LIST_Stagiaires_api] = useState();
|
||||
const [Delete_LIST_Stagiaires_message, setDelete_LIST_Stagiaires_message] = useState();
|
||||
const [Delete_LIST_Stagiaires_result, setDelete_LIST_Stagiaires_result] = useState();
|
||||
|
@ -6470,6 +6534,12 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setSelectionModel([])
|
||||
}
|
||||
|
||||
const [display_stagiaire_with_alert, setdisplay_stagiaire_with_alert] = useState(false);
|
||||
|
||||
const handleChange_display_stagiaire_with_alert = (event) => {
|
||||
setSelectionModel([]);
|
||||
setdisplay_stagiaire_with_alert(event.target.checked);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
|
@ -6483,7 +6553,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ /********* Dialog redaction email */}
|
||||
<Dialog
|
||||
|
||||
onClose={Dialog_SEND_EMAIL_handleClose}
|
||||
//onClose={Dialog_SEND_EMAIL_handleClose}
|
||||
className="module_email_management"
|
||||
PaperProps={{
|
||||
sx: {
|
||||
|
@ -6492,6 +6562,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
},
|
||||
}}
|
||||
open={Dialog_SEND_EMAIL_open}
|
||||
static
|
||||
onClose={() => null}
|
||||
>
|
||||
|
||||
|
||||
|
@ -6502,7 +6574,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
|
||||
<Module_Email_Management father_close_function={Dialog_SEND_EMAIL_handleClose} email_destinataire={selectedtraining_emails_liste}
|
||||
related_collection={"inscription"} Clean_Selected_Rows_For_Email = {Clean_Selected_Rows_For_Email}/>
|
||||
related_collection={"inscription"} Clean_Selected_Rows_For_Email={Clean_Selected_Rows_For_Email} />
|
||||
|
||||
</DialogContent>
|
||||
|
||||
|
@ -6515,8 +6587,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ /**** Dialog info stagiaire */}
|
||||
<Dialog
|
||||
open={Dialog_stagiaire_open}
|
||||
onClose={Dialog_stagiaire_handleClose}
|
||||
//onClose={Dialog_stagiaire_handleClose}
|
||||
className="displaypartnersession"
|
||||
static
|
||||
onClose={() => null}
|
||||
>
|
||||
|
||||
<DialogTitle>Info Stagiaire</DialogTitle>
|
||||
|
@ -6701,10 +6775,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ /**** Dialog Tuteur */}
|
||||
<Dialog
|
||||
open={Dialog_tuteur_1_open}
|
||||
onClose={Dialog_tuteur_1_handleClose}
|
||||
//onClose={Dialog_tuteur_1_handleClose}
|
||||
|
||||
className="displaypartnersession"
|
||||
|
||||
static
|
||||
onClose={() => null}
|
||||
>
|
||||
|
||||
<DialogTitle>Tuteur {quel_tuteur}</DialogTitle>
|
||||
|
@ -7111,9 +7186,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{ /**** Dialog Convention */}
|
||||
<Dialog
|
||||
open={Dialog_convention_open}
|
||||
onClose={Dialog_convention_handleClose}
|
||||
// onClose={Dialog_convention_handleClose}
|
||||
className="displaypartnersession"
|
||||
>
|
||||
static
|
||||
onClose={() => null}>
|
||||
|
||||
<DialogTitle>MySy Information</DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
|
||||
|
@ -7851,9 +7927,25 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
<div style={{ "textAlign": "left", "float": "left", "width": "100%", "paddingRight": "10px" }} id="participant_menu_tab">
|
||||
|
||||
<div className="session_data">
|
||||
|
||||
<div style={{ textAlign: "right", "width": '100%', 'float': 'left' }}>
|
||||
<nav style={{ width: '50%', float: 'left' }}> </nav>
|
||||
<nav style={{ width: '50%', float: 'left' }}>
|
||||
<FormGroup style={{ float: 'right' }}>
|
||||
<FormControlLabel control={<Checkbox
|
||||
checked={display_stagiaire_with_alert}
|
||||
onChange={handleChange_display_stagiaire_with_alert}
|
||||
inputProps={{ 'aria-label': 'controlled' }}
|
||||
|
||||
/>} label="Alerte" style={{ color: 'red', fontSize: "10px", fontStyle: 'italic' }} />
|
||||
</FormGroup>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
<div style={{ "border": "None", paddingRight: '10px' }}>
|
||||
|
||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||
{(!display_stagiaire_with_alert || display_stagiaire_with_alert !== true) && <div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
|
@ -7972,6 +8064,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
class_recyclage_delai: JSON.parse(item).class_recyclage_delai,
|
||||
class_recyclage_periodicite: JSON.parse(item).class_recyclage_periodicite,
|
||||
nb_jour_avant_recyclage: JSON.parse(item).nb_jour_avant_recyclage,
|
||||
warning_recyclage: JSON.parse(item).warning_recyclage,
|
||||
warning_recyclage_alert: JSON.parse(item).warning_recyclage,
|
||||
}
|
||||
))}
|
||||
|
||||
|
@ -8075,7 +8169,233 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</Box>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{(display_stagiaire_with_alert && display_stagiaire_with_alert === true) && <div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
height: 500,
|
||||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
|
||||
// Gestion des cellule a distance ou presentiel
|
||||
'& .cell--distantiel': {
|
||||
backgroundColor: '#AFE1AF',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
'& .cell--presentiel': {
|
||||
backgroundColor: '#AFE1AF',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
|
||||
// gestion couleur des lignes avec le statut d'inscription
|
||||
'& .line--statut--annule': {
|
||||
backgroundColor: '#D8D8D8',
|
||||
color: 'white',
|
||||
},
|
||||
|
||||
'& .line--statut--inscrit': {
|
||||
backgroundColor: '#CEF6D8',
|
||||
color: 'black',
|
||||
},
|
||||
'& .line--statut--preinscrit': {
|
||||
backgroundColor: '#F7F2E0',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
/*"& .MuiDataGrid-virtualScrollerRenderZone": {
|
||||
"& .MuiDataGrid-row": {
|
||||
"&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
|
||||
}
|
||||
},*/
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#c8cfd5",
|
||||
color: "black",
|
||||
fontSize: 14
|
||||
},
|
||||
|
||||
|
||||
'& .line--statut--pair': {
|
||||
backgroundColor: 'rgba(235, 235, 235, .7)',
|
||||
color: 'black',
|
||||
},
|
||||
'& .line--statut--impair': {
|
||||
backgroundColor: '#FFFFFF',
|
||||
color: 'black',
|
||||
},
|
||||
'& .line--statut--selected': {
|
||||
backgroundColor: '#FBF2EF',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
}}
|
||||
>
|
||||
<DataGrid
|
||||
checkboxSelection
|
||||
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setSelectionModel(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
handleClick_edit_session_From_Line(newSelectionModel);*/
|
||||
if (newSelectionModel.length !== 1) {
|
||||
setaddOneParticipant();
|
||||
setdisplay_detail_stagiaire();
|
||||
setselected_code_session();
|
||||
setsubmenu();
|
||||
}
|
||||
}}
|
||||
selectionModel={selectionModel}
|
||||
|
||||
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
||||
rows={rowss.filter((data) => (JSON.parse(data)).warning_recyclage === "1").map((item, index) => (
|
||||
{
|
||||
id: index,
|
||||
_id: JSON.parse(item)._id,
|
||||
class_id: JSON.parse(item).class_id,
|
||||
class_internal_url: JSON.parse(item).class_internal_url,
|
||||
code_session: JSON.parse(item).code_session,
|
||||
session_id: JSON.parse(item).session_id,
|
||||
email: JSON.parse(item).email,
|
||||
nom: JSON.parse(item).nom,
|
||||
prenom: JSON.parse(item).prenom,
|
||||
employeur: JSON.parse(item).employeur,
|
||||
client_nom: JSON.parse(item).client_rattachement_nom,
|
||||
|
||||
client_facture: JSON.parse(item).facture_client_rattachement_id,
|
||||
|
||||
status: JSON.parse(item).status,
|
||||
title: JSON.parse(item).title,
|
||||
distantiel: JSON.parse(item).distantiel,
|
||||
presentiel: JSON.parse(item).presentiel,
|
||||
domaine: JSON.parse(item).domaine,
|
||||
date_debut: JSON.parse(item).date_du,
|
||||
date_fin: JSON.parse(item).date_au,
|
||||
class_internal_url: JSON.parse(item).class_internal_url,
|
||||
civilite: JSON.parse(item).civilite,
|
||||
|
||||
telephone: JSON.parse(item).telephone,
|
||||
date_naissance: JSON.parse(item).date_naissance,
|
||||
adresse: JSON.parse(item).adresse,
|
||||
civilcode_postalite: JSON.parse(item).code_postal,
|
||||
ville: JSON.parse(item).ville,
|
||||
pays: JSON.parse(item).pays,
|
||||
|
||||
invoiced: JSON.parse(item).invoiced,
|
||||
invoiced_ref: JSON.parse(item).invoiced_ref,
|
||||
invoiced_date: JSON.parse(item).invoiced_date,
|
||||
|
||||
class_recyclage_delai: JSON.parse(item).class_recyclage_delai,
|
||||
class_recyclage_periodicite: JSON.parse(item).class_recyclage_periodicite,
|
||||
nb_jour_avant_recyclage: JSON.parse(item).nb_jour_avant_recyclage,
|
||||
warning_recyclage_alert: JSON.parse(item).warning_recyclage,
|
||||
}
|
||||
))}
|
||||
|
||||
columns={columns}
|
||||
pageSize={10}
|
||||
className="datagridclass"
|
||||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
///setuserimgclassprofil("");
|
||||
|
||||
Get_List_UE_From_Class_Id(newSelectionModel.row.class_id);
|
||||
|
||||
Getall_Class_List_Evalution(newSelectionModel.row.class_id);
|
||||
|
||||
setselected_internal_url(newSelectionModel.row.class_internal_url);
|
||||
setselected_class_id(newSelectionModel.row.class_id);
|
||||
setselected_session_id(newSelectionModel.session_id);
|
||||
|
||||
setinscription_invoiced(newSelectionModel.row.invoiced);
|
||||
|
||||
setselected_row_data_json_age('');
|
||||
setgridline_id(newSelectionModel.row.id);
|
||||
setselected_id_status(newSelectionModel.row.status);
|
||||
|
||||
//getStagiaireImages(newSelectionModel.row.class_internal_url, newSelectionModel.row.session_id, newSelectionModel.row.email);
|
||||
|
||||
var al = JSON.parse(rowss[newSelectionModel.row.id])
|
||||
if (al.date_naissance) {
|
||||
var date_eval = new Date(moment(al.date_naissance, "DD/MM/YYYY"));
|
||||
var diff = Date.now() - date_eval.getTime();
|
||||
var age = new Date(diff);
|
||||
var reel_age = Math.abs(age.getUTCFullYear() - 1970);
|
||||
setselected_row_data_json_age(reel_age)
|
||||
|
||||
}
|
||||
|
||||
Get_Inscrit_List_UE(newSelectionModel.row._id);
|
||||
Get_Inscrit_List_Evaluation_Par_UE(newSelectionModel.row._id);
|
||||
setselected_row_data_json(JSON.parse(rowss[newSelectionModel.row.id]));
|
||||
setDialog_stagiaire_open(true);
|
||||
|
||||
}}
|
||||
|
||||
rowsPerPageOptions={[10]}
|
||||
disableSelectionOnClick
|
||||
components={{
|
||||
Toolbar: GridToolbar,
|
||||
}}
|
||||
//sx={datagridSx}
|
||||
getCellClassName={(params) => {
|
||||
//field === 'distantiel'
|
||||
if (params.field === 'distantiel' && String(params.value) === "1") {
|
||||
return 'cell--distantiel';
|
||||
}
|
||||
if (params.field === "presentiel" && String(params.value) == "1") {
|
||||
return 'cell--presentiel';
|
||||
}
|
||||
|
||||
|
||||
//field === "statut"
|
||||
if (params.field === "status" && String(params.value) == "0") {
|
||||
return 'cell--statut--preinscrit';
|
||||
}
|
||||
|
||||
if (params.field === "status" && String(params.value) == "1") {
|
||||
return 'cell--statut--inscrit';
|
||||
}
|
||||
|
||||
if (params.field === "status" && String(params.value) == "-1") {
|
||||
return 'cell--statut--annule';
|
||||
}
|
||||
|
||||
}}
|
||||
getRowClassName={(params) => {
|
||||
// Pour la gestion de la couleur de zone double cliquée
|
||||
if (String(params.row.id) === String(gridline_id)) {
|
||||
|
||||
return 'line--statut--selected';
|
||||
}
|
||||
if (String(params.row.status) === "-1") {
|
||||
return 'line--statut--annule';
|
||||
}
|
||||
if (String(params.row.status) === "0") {
|
||||
return 'line--statut--preinscrit';
|
||||
}
|
||||
if (String(params.row.status) === "1") {
|
||||
return 'line--statut--inscrit';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
return 'line--statut--pair';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||
return 'line--statut--impair';
|
||||
}
|
||||
|
||||
}}
|
||||
getEstimatedRowHeight={() => 200}
|
||||
getRowHeight={() => "auto"}
|
||||
|
||||
/>
|
||||
</Box>
|
||||
<br />
|
||||
|
||||
</div>}
|
||||
|
||||
<div className="div_row">
|
||||
|
||||
|
|
|
@ -404,7 +404,7 @@ const Module_Email_Management = (props) => {
|
|||
*/
|
||||
|
||||
const tab_destinataire = email_destinataire.split(',');
|
||||
if (tab_destinataire.length > 20) {
|
||||
if (tab_destinataire.length > 30) {
|
||||
alert(" Vous ne pouvez pas envoyer plus de 20 emails (destinataires) à la fois.");
|
||||
return;
|
||||
}
|
||||
|
@ -450,6 +450,10 @@ const Module_Email_Management = (props) => {
|
|||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Email_From_Front/";
|
||||
|
||||
if (props.related_collection === "nointernalcontact")
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Email_From_Front_For_Unknown_Contact/";
|
||||
|
||||
setLoading(true);
|
||||
|
||||
|
||||
|
@ -463,8 +467,12 @@ const Module_Email_Management = (props) => {
|
|||
setSend_Front_Email_api("true");
|
||||
setSend_Front_Email_result(res.data.message);
|
||||
Dialog_1_handleClose_buton();
|
||||
props.father_close_function();
|
||||
props.Clean_Selected_Rows_For_Email();
|
||||
|
||||
if (props.father_close_function)
|
||||
props.father_close_function();
|
||||
|
||||
if (props.Clean_Selected_Rows_For_Email)
|
||||
props.Clean_Selected_Rows_For_Email();
|
||||
|
||||
alert(res.data.message);
|
||||
|
||||
|
@ -584,6 +592,8 @@ const Module_Email_Management = (props) => {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<div className="module_email_management">
|
||||
|
@ -625,12 +635,16 @@ const Module_Email_Management = (props) => {
|
|||
setfield_programme("");
|
||||
set_field_corp_mail("");
|
||||
}
|
||||
Dialog_1_handleClose_buton();
|
||||
setDialog_1_open(false);
|
||||
|
||||
}} className="bton_enreg_dialog">Confirmer</Button>
|
||||
</div>
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_1_handleClose_buton} className="bton_annule_dialog" >Annuler</Button>
|
||||
<Button onClick={(e) => {
|
||||
|
||||
setDialog_1_open(false);
|
||||
|
||||
}} className="bton_annule_dialog" >Annuler</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -690,8 +704,7 @@ const Module_Email_Management = (props) => {
|
|||
fullWidth
|
||||
value={email_destinataire}
|
||||
onChange={(e) => {
|
||||
setemail_destinataire(e.target.value);
|
||||
|
||||
setemail_destinataire(String(e.target.value).replaceAll(";", ","));
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
@ -712,7 +725,7 @@ const Module_Email_Management = (props) => {
|
|||
fullWidth
|
||||
value={email_cc}
|
||||
onChange={(e) => {
|
||||
setemail_cc(e.target.value);
|
||||
setemail_cc(String(e.target.value).replaceAll(";", ","));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -734,7 +747,7 @@ const Module_Email_Management = (props) => {
|
|||
fullWidth
|
||||
value={email_bcc}
|
||||
onChange={(e) => {
|
||||
setemail_bcc(e.target.value);
|
||||
setemail_bcc(String(e.target.value).replaceAll(";", ","));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,6 +114,8 @@ import Groupe_Apprenant from "./Groupe_Apprenant";
|
|||
import Groups2Icon from '@mui/icons-material/Groups2';
|
||||
import { LiaProductHunt } from "react-icons/lia";
|
||||
import Partner_Product_Service from "./Partner_Product_Service";
|
||||
import Module_Email_Management from "./Module_Email_Management";
|
||||
import ForwardToInboxIcon from '@mui/icons-material/ForwardToInbox';
|
||||
|
||||
const Partner = (props) => {
|
||||
const { commingmenu, commingpack } = useParams();
|
||||
|
@ -1444,6 +1446,17 @@ const Partner = (props) => {
|
|||
|
||||
|
||||
const [selected_menu_header, setselected_menu_header] = React.useState("");
|
||||
const [Dialog_SEND_EMAIL_open, setDialog_SEND_EMAIL_open] = React.useState(false);
|
||||
|
||||
|
||||
const Dialog_SEND_EMAIL_handleClose = () => {
|
||||
setDialog_SEND_EMAIL_open(false);
|
||||
}
|
||||
|
||||
const Clean_Selected_Rows_For_Email = () => {
|
||||
//setSelectionModel([])
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
|
||||
|
@ -1483,6 +1496,39 @@ const Partner = (props) => {
|
|||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
{ /********* Dialog redaction email */}
|
||||
<Dialog
|
||||
|
||||
// onClose={Dialog_SEND_EMAIL_handleClose}
|
||||
className="module_email_management"
|
||||
PaperProps={{
|
||||
sx: {
|
||||
width: "100%",
|
||||
maxWidth: "920px!important",
|
||||
},
|
||||
}}
|
||||
open={Dialog_SEND_EMAIL_open}
|
||||
static
|
||||
onClose={() => null}
|
||||
>
|
||||
|
||||
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
|
||||
<Module_Email_Management father_close_function={Dialog_SEND_EMAIL_handleClose} email_destinataire={""}
|
||||
related_collection={"nointernalcontact"} Clean_Selected_Rows_For_Email={""} />
|
||||
|
||||
</DialogContent>
|
||||
|
||||
|
||||
</Dialog>
|
||||
{ /********* Fin Dialog redaction email */}
|
||||
|
||||
|
||||
{left_menu === true && <div className="sub_dib_mobile" >
|
||||
<div className="div_gauche" id="div_gauche">
|
||||
<nav className="not_display_mobile">
|
||||
|
@ -1650,6 +1696,14 @@ const Partner = (props) => {
|
|||
|
||||
</Sidebar>
|
||||
|
||||
<Sidebar className="my_sidebar">
|
||||
<Menu className="my_menu bck_menu_seul" id="my_send_mail" name="my_send_mail" onClick={(e) => {
|
||||
setDialog_SEND_EMAIL_open(true);
|
||||
}} > <ForwardToInboxIcon className="icone_menu" color={"secondary"} /> ENV. MAIL </Menu>
|
||||
|
||||
</Sidebar>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -2373,6 +2427,15 @@ const Partner = (props) => {
|
|||
</a>
|
||||
<hr className="my_hr" />
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_112" />
|
||||
<a data-tooltip-id="tooltip_id_112" data-tooltip-html="ENV. EMAIL">
|
||||
<div className="sousmenu" onClick={(e) => {
|
||||
setDialog_SEND_EMAIL_open(true);
|
||||
}} > <ForwardToInboxIcon className="icone_menu" /> </div>
|
||||
</a>
|
||||
<hr className="my_hr" />
|
||||
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_111" />
|
||||
{String(formation_initiale) === "1" && <a data-tooltip-id="tooltip_id_111" data-tooltip-html="GROUPE APPRENANTS">
|
||||
{String(menu) !== "groupe_apprenant" && <div className="sousmenu" onClick={groupe_apprenant_func} > <Groups2Icon className="icone_menu" /> </div>}
|
||||
|
|
|
@ -4137,8 +4137,10 @@ const Partner_Commande = (props) => {
|
|||
|
||||
<Dialog
|
||||
open={Dialog_Cloture_Devis_open}
|
||||
onClose={Close_Dialog_Cloture_Devis_open}
|
||||
// onClose={Close_Dialog_Cloture_Devis_open}
|
||||
className="partner_commande"
|
||||
static
|
||||
onClose={() => null}
|
||||
>
|
||||
|
||||
<DialogTitle> Cloture devis <font style={{ fontWeight: "700" }}> {String(p_detail_header_ref_interne)} </font> </DialogTitle>
|
||||
|
@ -4232,9 +4234,10 @@ const Partner_Commande = (props) => {
|
|||
{/* Dialog pour gerer la signature digitale */}
|
||||
<Dialog
|
||||
open={Dialog_signature_digitale_open}
|
||||
onClose={Dialog_signature_digitale_handleClose}
|
||||
// onClose={Dialog_signature_digitale_handleClose}
|
||||
className="displaypartnersession"
|
||||
>
|
||||
static
|
||||
onClose={() => null} >
|
||||
|
||||
<DialogTitle>MySy Information</DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
|
||||
|
@ -4346,9 +4349,10 @@ const Partner_Commande = (props) => {
|
|||
{/****** Dialog pour la gestion d'un article (formation) */}
|
||||
<Dialog
|
||||
open={Dialog_Detail_Article_open}
|
||||
onClose={Dialog_1_handleClose}
|
||||
// onClose={Dialog_1_handleClose}
|
||||
className="partner_commande"
|
||||
>
|
||||
static
|
||||
onClose={() => null} >
|
||||
|
||||
<DialogTitle>Edition Détail ligne <font style={{ fontWeight: "700" }}> {String(p_detail_header_type).toLocaleUpperCase()} </font> </DialogTitle>
|
||||
<DialogContent>
|
||||
|
@ -4959,9 +4963,10 @@ const Partner_Commande = (props) => {
|
|||
{/********** Dialog pour une entete de commande/devis */}
|
||||
<Dialog
|
||||
open={Dialog_Detail_Commande_open}
|
||||
onClose={Dialog_Order_handleClose}
|
||||
//onClose={Dialog_Order_handleClose}
|
||||
className="partner_commande"
|
||||
>
|
||||
static
|
||||
onClose={() => null}>
|
||||
|
||||
<DialogTitle>{Dialog_1_message}</DialogTitle>
|
||||
<DialogContent>
|
||||
|
|
|
@ -1910,6 +1910,10 @@ const Partner_Configuration_Technique = (props) => {
|
|||
{ "id": "session_warning", "label": "session_warning", "value": "session_warning" },
|
||||
{ "id": "session_warning_lead_time", "label": "session_warning_lead_time", "value": "session_warning_lead_time" },
|
||||
|
||||
{ "id": "recyclage_warning", "label": "recyclage_warning", "value": "recyclage_warning" },
|
||||
{ "id": "recyclage_warning_lead_time", "label": "recyclage_warning_lead_time", "value": "recyclage_warning_lead_time" },
|
||||
|
||||
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
|
|
|
@ -2131,7 +2131,7 @@
|
|||
|
||||
.ps-menu-button {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
// font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
background-color: #104277 !important;
|
||||
box-sizing: unset !important;
|
||||
|
|
Loading…
Reference in New Issue