ezrez
parent
4083518ab3
commit
aa84b9e357
|
@ -3012,7 +3012,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const [New_Getall_Class_List_Evalution_result, setNew_Getall_Class_List_Evalution_result] = useState([]);
|
||||
|
@ -5159,8 +5159,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
console.log("file_size 2 = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5171,9 +5173,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
//formData.append("token", stored_cookie);
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
return;
|
||||
|
||||
|
@ -5194,15 +5193,24 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
|
||||
if (file_type !== "application/pdf") {
|
||||
alert("Le fichier n'est pas de type PDF");
|
||||
// alert("Le fichier n'est pas de type PDF");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier n'est pas de type PDF");
|
||||
setalert_type("error");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5224,8 +5232,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
settab_convention_pieces_jointes_result(new_tmp);
|
||||
|
||||
console.log(" tab_convention_pieces_jointes_result = ", tab_convention_pieces_jointes_result)
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
@ -5246,8 +5252,13 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
console.log("file_size 1 = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
|
||||
return;
|
||||
}
|
||||
setfile_2_name(event.target.files[0]);
|
||||
|
@ -5273,7 +5284,11 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
function Record_All_PJ() {
|
||||
|
||||
if (!p_detail_one_file_to_download_type_name) {
|
||||
alert(" Vous devez donner un nom à la pièce jointe");
|
||||
// alert(" Vous devez donner un nom à la pièce jointe");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Vous devez donner un nom à la pièce jointe");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -5318,13 +5333,20 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setfile_1_name();
|
||||
setp_detail_one_file_to_download_type_name();
|
||||
//GetCurrentClass_trainingsession();
|
||||
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
|
||||
var text = " La pièce jointe " + file_1_name.name + " a été bien enregistrée";
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(text);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setRecord_All_PJ_message(result['message']);
|
||||
setRecord_All_PJ_api("false");
|
||||
alert(result['message']);
|
||||
// alert(result['message']);
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -5375,13 +5397,19 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setDelete_one_attached_document_result(result['message']);
|
||||
setDelete_one_attached_document_api("true");
|
||||
Get_List_Of_All_PJ(selected_id);
|
||||
alert(result['message'])
|
||||
// alert(result['message'])
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setDelete_one_attached_document_message(result['message']);
|
||||
setDelete_one_attached_document_api("false");
|
||||
alert(result['message'])
|
||||
// alert(result['message'])
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -5389,7 +5417,10 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
setLoading(false);
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setDelete_one_attached_document_api("false");
|
||||
alert(" Impossible de supprimer le document")
|
||||
// alert(" Impossible de supprimer le document")
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de supprimer le document");
|
||||
setalert_type("error");
|
||||
|
||||
});
|
||||
|
||||
|
@ -7999,25 +8030,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
}
|
||||
/>}
|
||||
|
||||
{/*<TextField
|
||||
name="filtre1"
|
||||
label="Choisir un champ"
|
||||
select
|
||||
sx={{ m: 1, width: '100%' }}
|
||||
value={p_filtre1}
|
||||
onChange={(e) => {
|
||||
setp_filtre1(e.target.value);
|
||||
|
||||
}}
|
||||
>
|
||||
<MenuItem value="email" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Email </MenuItem>
|
||||
<MenuItem value="nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Nom </MenuItem>
|
||||
<MenuItem value="code_session" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Code Session </MenuItem>
|
||||
<MenuItem value="class_title" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Titre Formation </MenuItem>
|
||||
<MenuItem value="client_nom" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Lié au Client (nom client) </MenuItem>
|
||||
|
||||
|
||||
</TextField>*/}
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -8905,7 +8918,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
/>
|
||||
|
||||
|
||||
{actionmass_ftion_val && <nav className='block_en_mass_bton_action'>
|
||||
{actionmass_ftion_val && String(actionmass_ftion_val) !== "sendemail" && <nav className='block_en_mass_bton_action'>
|
||||
<Popup
|
||||
trigger={<Button className="bton_enreg" style={{ "width": "90%" }}>
|
||||
|
||||
|
@ -8915,7 +8928,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
modal
|
||||
nested
|
||||
position="center center"
|
||||
|
||||
>
|
||||
|
||||
{close => (
|
||||
|
@ -8980,6 +8992,18 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</nav>
|
||||
}
|
||||
|
||||
{actionmass_ftion_val && String(actionmass_ftion_val) === "sendemail" && <nav className='block_en_mass_bton_action'>
|
||||
<Button className="bton_enreg" style={{ "width": "90%" }}
|
||||
|
||||
onClick={(event) => {
|
||||
actionmass_ftion_Traitemet();
|
||||
}}
|
||||
>
|
||||
<FcAcceptDatabase /> Traiter
|
||||
</Button>
|
||||
</nav>}
|
||||
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
@ -9033,8 +9057,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
{((selected_id && String(selected_id).length > 2) || (String(addOneParticipant) === "1")) && <div className="div_row">
|
||||
<Button variant="outlined" ref={myRef} onClick={submenu_detail_stagaire} className="detail_class_submenu" id='detail_session' name='detail_session'>Détail Participant</Button>
|
||||
|
||||
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
|
||||
|
||||
|
||||
{/* <Button variant="outlined" onClick={submenu_sessions} className="detail_class_submenu" id='preinscrit' name='preinscrit'>Détail Session </Button>
|
||||
<Button variant="outlined" onClick={submenu_absence} className="detail_class_submenu" id='absence' name='absence'>Absence </Button> */}
|
||||
|
@ -9043,6 +9065,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
{String(props.formation_initiale) === "1" && String(addOneParticipant) !== "1" && <Button variant="outlined" onClick={submenu_notes} className="detail_class_submenu" id='notes' name='ue'>Notes </Button>}
|
||||
|
||||
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_class_submenu" id='piece_jointe' name='piece_jointe'>Pièces Jointes </Button>
|
||||
|
||||
{String(addOneParticipant) !== "1" && String(history_securite_read) === "1" && <Button variant="outlined" onClick={submenu_historique} className="detail_class_submenu" id='historique' name='historique'>Historique </Button>}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import Visibility from '@mui/icons-material/Visibility';
|
|||
import VisibilityOff from '@mui/icons-material/VisibilityOff';
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
|
||||
import ent_studend_img from "../mysy_img/ent_studend_img.jpg";
|
||||
|
||||
function Module_Connexion_Ent_Student() {
|
||||
const [isconnected, setisconnected] = useState("");
|
||||
|
@ -375,135 +375,151 @@ function Module_Connexion_Ent_Student() {
|
|||
<div className="block_centrer">
|
||||
|
||||
<div className="display_screen_600_901">
|
||||
<div className="div_centre_master">
|
||||
<div className="div_centre_002">
|
||||
<Button variant="outlined" onClick={menu_user_account} className="signin_menu"
|
||||
id="user_account" name="user_account"
|
||||
style={{ "float": "left", "textAlign": "center", "height": "3rem" }}> Espace numérique de travail - ENT</Button>
|
||||
|
||||
<div style={{ width: '100%', }}>
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Bienvenue sur Espace Numérique de Travail </h3>
|
||||
</div>
|
||||
|
||||
<div style={{ width: '100%', }}>
|
||||
|
||||
<div style={{ width: '50%', float: 'left' }}>
|
||||
<img src={ent_studend_img} style={{width:'100%'}}/>
|
||||
</div>
|
||||
|
||||
<div className="div_centre">
|
||||
<div style={{ width: '50%', float: 'left', paddingTop:'2rem' }}>
|
||||
<div className="div_centre_master">
|
||||
<div className="div_centre_002">
|
||||
<Button variant="outlined" onClick={menu_user_account} className="signin_menu"
|
||||
id="user_account" name="user_account"
|
||||
style={{ "float": "left", "textAlign": "center", "height": "3rem" }}> Espace numérique de travail - ENT</Button>
|
||||
</div>
|
||||
|
||||
<div className="div_row_bis" >
|
||||
<div className="div_centre">
|
||||
|
||||
<FormGroup>
|
||||
<Label style={{ fontSize: "14px" }}>Votre adresse email</Label>
|
||||
<Input type="email" placeholder="Email" name="email" />
|
||||
</FormGroup>
|
||||
<div className="div_row_bis" >
|
||||
|
||||
<div style={{ height: '10px' }}> </div>
|
||||
<FormGroup>
|
||||
<Label style={{ fontSize: "14px" }}>Votre adresse email</Label>
|
||||
<Input type="email" placeholder="Email" name="email" />
|
||||
</FormGroup>
|
||||
|
||||
<div style={{ height: '10px' }}> </div>
|
||||
|
||||
|
||||
<FormGroup>
|
||||
<div className="label_pwd_div">
|
||||
<div className="label_div" >
|
||||
<Label style={{ fontSize: "14px" }}>Votre mot de passe </Label>
|
||||
</div>
|
||||
<div className="show_pwd_div" onClick={handleClickShowPassword}>
|
||||
{currentpawdvisible ? <Visibility style={{ fontSize: '15px' }} /> : <VisibilityOff style={{ fontSize: '15px' }} />}
|
||||
</div>
|
||||
<FormGroup>
|
||||
<div className="label_pwd_div">
|
||||
<div className="label_div" >
|
||||
<Label style={{ fontSize: "14px" }}>Votre mot de passe </Label>
|
||||
</div>
|
||||
<div className="show_pwd_div" onClick={handleClickShowPassword}>
|
||||
{currentpawdvisible ? <Visibility style={{ fontSize: '15px' }} /> : <VisibilityOff style={{ fontSize: '15px' }} />}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<Input type="password" placeholder="Password" name="pwd" />
|
||||
</FormGroup>
|
||||
</div>
|
||||
<Input type="password" placeholder="Password" name="pwd" />
|
||||
</FormGroup>
|
||||
|
||||
|
||||
{String(initpasswd) === String("true") && closepopup === 1 && <div className="okUpdateData">
|
||||
La demande reinitialisation a bien ete prise en compte.
|
||||
Verifiez votre boite email.
|
||||
</div>}
|
||||
<div className="forgot_pass" >
|
||||
{String(initpasswd) !== String("true") && String(closepopup) !== String("1")
|
||||
&& <Popup trigger={<button className="avisformation"> Mot de passe oublié</button>}
|
||||
position="center" className="signin popup-reset-pwd">
|
||||
<div className="signin-content popup-reset-pwd-content">
|
||||
<div className="div_row" style={{
|
||||
"textAlign": "center", "background": "orangered",
|
||||
"height": "2rem", "paddingTop": "5px", "fontSize": "14px", "fontWeight": "bold"
|
||||
}}
|
||||
> Modifier le mot de passe</div>
|
||||
<br />
|
||||
{String(initpasswd) === String("true") && closepopup === 1 && <div className="okUpdateData">
|
||||
La demande reinitialisation a bien ete prise en compte.
|
||||
Verifiez votre boite email.
|
||||
</div>}
|
||||
<div className="forgot_pass" >
|
||||
{String(initpasswd) !== String("true") && String(closepopup) !== String("1")
|
||||
&& <Popup trigger={<button className="avisformation"> Mot de passe oublié</button>}
|
||||
position="center" className="signin popup-reset-pwd">
|
||||
<div className="signin-content popup-reset-pwd-content">
|
||||
<div className="div_row" style={{
|
||||
"textAlign": "center", "background": "orangered",
|
||||
"height": "2rem", "paddingTop": "5px", "fontSize": "14px", "fontWeight": "bold"
|
||||
}}
|
||||
> Modifier le mot de passe</div>
|
||||
<br />
|
||||
|
||||
<label for="exampleFormControlTextarea1">Saisir votre email</label>
|
||||
<br />
|
||||
<label for="exampleFormControlTextarea1">Saisir votre email</label>
|
||||
<br />
|
||||
|
||||
<input type="text" id="resetemailvalue" name="resetemailvalue" rows="1" cols="20"
|
||||
className="zone_mail" />
|
||||
<br />
|
||||
|
||||
|
||||
<div>
|
||||
<br />
|
||||
<Tooltip className="tooltip_css" id="is_user_or_pro-tooltip" />
|
||||
<a data-tooltip-id="is_user_or_pro-tooltip" data-tooltip-html="Compte partenaire : création et gestion de formation <br/>
|
||||
compte utilisateur : non autorisé à la création et gestion de formation">
|
||||
<label for="is_user_or_pro">Compte partenaire ou utilisateur * ?</label>
|
||||
<input type="text" id="resetemailvalue" name="resetemailvalue" rows="1" cols="20"
|
||||
className="zone_mail" />
|
||||
<br />
|
||||
|
||||
|
||||
<select id="is_user_or_pro" name="is_user_or_pro" style={{
|
||||
"width": '100%', "height": "2.5rem",
|
||||
'marginTop': '5px'
|
||||
}}
|
||||
onChange={(event) => settypecompte(event.target.value)}>
|
||||
<option selected value="">Choisir </option>
|
||||
|
||||
<option value="partner">Partenaire </option>
|
||||
<option value="user">Utilisateur </option>
|
||||
</select>
|
||||
</a>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<Tooltip className="tooltip_css" id="is_user_or_pro-tooltip" />
|
||||
<a data-tooltip-id="is_user_or_pro-tooltip" data-tooltip-html="Compte partenaire : création et gestion de formation <br/>
|
||||
compte utilisateur : non autorisé à la création et gestion de formation">
|
||||
<label for="is_user_or_pro">Compte partenaire ou utilisateur * ?</label>
|
||||
<br />
|
||||
|
||||
|
||||
<select id="is_user_or_pro" name="is_user_or_pro" style={{
|
||||
"width": '100%', "height": "2.5rem",
|
||||
'marginTop': '5px'
|
||||
}}
|
||||
onChange={(event) => settypecompte(event.target.value)}>
|
||||
<option selected value="">Choisir </option>
|
||||
|
||||
<div className="text_pwd_crit" style={{ "textAlign": "center" }}>
|
||||
Je ne suis pas un robot <br />
|
||||
<div >
|
||||
<option value="partner">Partenaire </option>
|
||||
<option value="user">Utilisateur </option>
|
||||
</select>
|
||||
</a>
|
||||
<br />
|
||||
|
||||
|
||||
<div name="pasrobot" > {random1} + {random2} = <input
|
||||
type='text'
|
||||
name='sommerandom'
|
||||
id='sommerandom'
|
||||
|
||||
{...register('sommerandom', {
|
||||
required: { value: true, message: 'sommes de valeurs' },
|
||||
maxLength: {
|
||||
value: 30,
|
||||
}
|
||||
})}
|
||||
|
||||
className="pasrobot_css"
|
||||
placeholder='Le total est ?'
|
||||
/>
|
||||
|
||||
{errors.sommerandom && (
|
||||
<span className='koUpdateData'>la sommes est incorrect</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div className="text_pwd_crit" style={{ "textAlign": "center" }}>
|
||||
Je ne suis pas un robot <br />
|
||||
<div >
|
||||
|
||||
|
||||
<div name="pasrobot" > {random1} + {random2} = <input
|
||||
type='text'
|
||||
name='sommerandom'
|
||||
id='sommerandom'
|
||||
|
||||
{...register('sommerandom', {
|
||||
required: { value: true, message: 'sommes de valeurs' },
|
||||
maxLength: {
|
||||
value: 30,
|
||||
}
|
||||
})}
|
||||
|
||||
className="pasrobot_css"
|
||||
placeholder='Le total est ?'
|
||||
/>
|
||||
|
||||
{errors.sommerandom && (
|
||||
<span className='koUpdateData'>la sommes est incorrect</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-secondary btn-sm" onClick={resetpasswd_ok}>Envoyer</button>
|
||||
<button type="submit" class="btn btn-secondary btn-sm" onClick={closepopupinitpwd}> Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-secondary btn-sm" onClick={resetpasswd_ok}>Envoyer</button>
|
||||
<button type="submit" class="btn btn-secondary btn-sm" onClick={closepopupinitpwd}> Annuler</button>
|
||||
</div>
|
||||
</Popup>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<FormGroup>
|
||||
|
||||
</FormGroup>
|
||||
|
||||
<div className="div_row22">
|
||||
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</Popup>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<FormGroup>
|
||||
|
||||
</FormGroup>
|
||||
|
||||
<div className="div_row22">
|
||||
<Button variant="contained" color="success" className="div_row22 btn_login button" onClick={onSubmit}>Connectez-Vous</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{isconnected === "false" && <div className="erreurconnexion">
|
||||
<br />
|
||||
|
|
|
@ -1,83 +1,32 @@
|
|||
|
||||
import React, { useRef, useState, useEffect } from "react";
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
import { getCookie, setCookie } from 'react-use-cookie';
|
||||
import { useHistory } from "react-router-dom";
|
||||
import CheckOut from "./CheckOut";
|
||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import parse from 'html-react-parser';
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import add_plus from "../mysy_img/plus.png";
|
||||
import excel_icone from "../mysy_img/excel_icone.png";
|
||||
import participants from "../mysy_img/participants.png";
|
||||
import fileDownload from 'js-file-download'
|
||||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||
import DatePicker from "react-datepicker";
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import { format } from 'date-fns'
|
||||
import moment from "moment";
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import { AiFillCloseCircle } from "react-icons/ai";
|
||||
import Box from '@mui/material/Box';
|
||||
import { Typography, LinearProgress, sliderClasses } from '@mui/material';
|
||||
import styled from 'styled-components';
|
||||
import { CiTrash } from "react-icons/ci";
|
||||
import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogContentText from '@mui/material/DialogContentText';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import { TransitionProps } from '@mui/material/transitions';
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
//import FullCalendar from "@fullcalendar/react";
|
||||
import daygridPlugin from "@fullcalendar/daygrid";
|
||||
//import interactionPlugin from "@fullcalendar/interaction";
|
||||
//import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import allLocales from '@fullcalendar/core/locales-all'
|
||||
import { RepeatOnRounded, ResetTvRounded, RestaurantMenu } from "@mui/icons-material";
|
||||
import { alignPropType } from "react-bootstrap/esm/types";
|
||||
|
||||
import AttachFileIcon from '@mui/icons-material/AttachFile';
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
|
||||
import ToggleSwitch_v3_mysy from "./ToggleSwitch_v3_mysy";
|
||||
|
||||
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import FullCalendar, { formatDate } from "@fullcalendar/react";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import { FcSearch } from "react-icons/fc";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import {
|
||||
ListItem,
|
||||
ListItemText,
|
||||
useTheme,
|
||||
} from "@mui/material";
|
||||
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
||||
import { TreeView } from '@mui/x-tree-view/TreeView';
|
||||
import { TreeItem } from '@mui/x-tree-view/TreeItem';
|
||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||
import { FcViewDetails, FcDisapprove, FcInfo } from "react-icons/fc";
|
||||
import { convertNwSeToNeSw } from "google-map-react";
|
||||
|
||||
import { IoMdAddCircle } from "react-icons/io";
|
||||
import FormGroup from '@mui/material/FormGroup';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
|
||||
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
|
||||
const Module_Email_Management = (props) => {
|
||||
|
||||
const myconntected_employee_id = props.conntected_employee_id;
|
||||
|
@ -248,7 +197,10 @@ const Module_Email_Management = (props) => {
|
|||
else {
|
||||
setGet_Partner_List_SendEmail_Document_api("false");
|
||||
setGet_Partner_List_SendEmail_Document_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
@ -384,7 +336,11 @@ const Module_Email_Management = (props) => {
|
|||
else {
|
||||
setGet_Given_Partner_Document_Data_By_id_api("false");
|
||||
setGet_Given_Partner_Document_Data_By_id_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
@ -401,8 +357,6 @@ const Module_Email_Management = (props) => {
|
|||
const [Send_Front_Email_message, setSend_Front_Email_message] = useState();
|
||||
const [Send_Front_Email_result, setSend_Front_Email_result] = useState();
|
||||
function Send_Front_Email() {
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/!\ : Pour eviter les spams, ce module ne doit pas envoyer plus de 20 email à la fois
|
||||
|
@ -410,31 +364,46 @@ const Module_Email_Management = (props) => {
|
|||
|
||||
const tab_destinataire = email_destinataire.split(',');
|
||||
if (tab_destinataire.length > 30) {
|
||||
alert(" Vous ne pouvez pas envoyer plus de 20 emails (destinataires) à la fois.");
|
||||
// alert(" Vous ne pouvez pas envoyer plus de 20 emails (destinataires) à la fois.");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Vous ne pouvez pas envoyer plus de 20 emails (destinataires) à la fois.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
const tab_email_cc = email_cc.split(',');
|
||||
if (tab_email_cc.length > 10) {
|
||||
alert(" Vous ne pouvez mettre plus de 10 adresses en copie.");
|
||||
// alert(" Vous ne pouvez mettre plus de 10 adresses en copie.");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Vous ne pouvez mettre plus de 10 adresses en copie.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const tab_email_bcc = email_bcc.split(',');
|
||||
if (tab_email_bcc.length > 10) {
|
||||
alert(" Vous ne pouvez mettre plus de 10 adresses en copie-cachée.");
|
||||
// alert(" Vous ne pouvez mettre plus de 10 adresses en copie-cachée.");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Vous ne pouvez mettre plus de 10 adresses en copie-cachée.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (tab_email_pieces_jointes_result.length > 10) {
|
||||
alert("Vous ne pouvez pas envoyer plus de 5 pièces jointes à la fois.");
|
||||
// alert("Vous ne pouvez pas envoyer plus de 5 pièces jointes à la fois.");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous ne pouvez pas envoyer plus de 5 pièces jointes à la fois.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
@ -445,7 +414,7 @@ const Module_Email_Management = (props) => {
|
|||
form.append("email_corps", field_programme);
|
||||
form.append("related_collection", props.related_collection);
|
||||
form.append("email_sujet", email_sujet);
|
||||
|
||||
|
||||
// pièce jointe
|
||||
|
||||
|
||||
|
@ -454,7 +423,7 @@ const Module_Email_Management = (props) => {
|
|||
}
|
||||
|
||||
|
||||
var myurl = "";
|
||||
var myurl = "";
|
||||
|
||||
if (props.related_collection === "nointernalcontact") {
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Email_From_Front_For_Unknown_Contact/";
|
||||
|
@ -475,8 +444,19 @@ const Module_Email_Management = (props) => {
|
|||
} else {
|
||||
form.append("include_tuteur", "0");
|
||||
}
|
||||
|
||||
|
||||
if (store_file_in_ent === true) {
|
||||
form.append("store_file_in_ent", "1");
|
||||
} else {
|
||||
form.append("store_file_in_ent", "0");
|
||||
}
|
||||
}
|
||||
|
||||
console.log(" ### form = ",form)
|
||||
|
||||
// return;
|
||||
|
||||
setLoading(true);
|
||||
|
||||
|
||||
|
@ -497,13 +477,20 @@ const Module_Email_Management = (props) => {
|
|||
if (props.Clean_Selected_Rows_For_Email)
|
||||
props.Clean_Selected_Rows_For_Email();
|
||||
|
||||
alert(res.data.message);
|
||||
//alert(res.data.message);
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setSend_Front_Email_api("false");
|
||||
setSend_Front_Email_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
// alert(res.data.message);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(res.data.message);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
@ -558,15 +545,23 @@ const Module_Email_Management = (props) => {
|
|||
|
||||
|
||||
if (file_type !== "application/pdf") {
|
||||
alert("Le fichier n'est pas de type PDF");
|
||||
// alert("Le fichier n'est pas de type PDF");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier n'est pas de type PDF");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (file_size > 10000000) {
|
||||
alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -618,6 +613,19 @@ const Module_Email_Management = (props) => {
|
|||
const [include_client, setinclude_client] = useState(false);
|
||||
const [include_tuteur, setinclude_tuteur] = useState(false);
|
||||
|
||||
const [store_file_in_ent, setstore_file_in_ent] = useState(false);
|
||||
|
||||
const handleChange_file_to_ent = (event) => {
|
||||
if (event.currentTarget.checked) {
|
||||
setstore_file_in_ent(true);
|
||||
}
|
||||
else {
|
||||
setstore_file_in_ent(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const handleChange_include_tuteur = (event) => {
|
||||
if (event.currentTarget.checked) {
|
||||
setinclude_tuteur(true);
|
||||
|
@ -639,6 +647,22 @@ const Module_Email_Management = (props) => {
|
|||
|
||||
|
||||
|
||||
const [display_alert_mysy, setdisplay_alert_mysy] = useState("");
|
||||
const [alert_message, setalert_message] = useState("");
|
||||
const [alert_type, setalert_type] = useState("");
|
||||
|
||||
function clear_alert_message() {
|
||||
setalert_message("");
|
||||
}
|
||||
function clear_alert_type() {
|
||||
setalert_type("");
|
||||
}
|
||||
|
||||
function clear_display_alert_mysy() {
|
||||
setdisplay_alert_mysy("");
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<div className="module_email_management">
|
||||
|
@ -646,6 +670,16 @@ const Module_Email_Management = (props) => {
|
|||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||
</div>}
|
||||
|
||||
{/*** Affichage des messages d'alerte*/}
|
||||
{display_alert_mysy && String(display_alert_mysy) === "1" &&
|
||||
<Module_Alert_Confirmation alert_message={alert_message}
|
||||
alert_type={alert_type}
|
||||
clear_alert_message={clear_alert_message}
|
||||
clear_alert_type={clear_alert_type}
|
||||
clear_display_alert_mysy={clear_display_alert_mysy}
|
||||
/>
|
||||
}
|
||||
{/*** FIN Affichage des messages d'alerte*/}
|
||||
|
||||
<Dialog
|
||||
|
||||
|
@ -660,7 +694,7 @@ const Module_Email_Management = (props) => {
|
|||
open={Dialog_1_open}
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> </DialogTitle>
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> </DialogTitle>
|
||||
<DialogContent style={{ "width": "400px" }}>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
|
@ -995,6 +1029,25 @@ const Module_Email_Management = (props) => {
|
|||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{tab_email_pieces_jointes_result && tab_email_pieces_jointes_result.length > 0 &&
|
||||
<div style={{ position: 'flex', flexDirection: 'row', justifyContent: 'right', alignItems: 'right' }}>
|
||||
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
size="small"
|
||||
checked={store_file_in_ent}
|
||||
onChange={handleChange_file_to_ent}
|
||||
name="send_file_to_ent"
|
||||
/>
|
||||
}
|
||||
label="Partage ENT"
|
||||
/>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
@ -1006,8 +1059,6 @@ const Module_Email_Management = (props) => {
|
|||
<Popup
|
||||
trigger={
|
||||
<Button onClick={(e) => {
|
||||
|
||||
|
||||
}} className="bton_enreg_dialog">Envoyer</Button>
|
||||
|
||||
|
||||
|
|
|
@ -268,13 +268,15 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
useEffect(() => {
|
||||
|
||||
Get_List_Ent_Formation();
|
||||
if (props.apprenant_id)
|
||||
Get_List_Ent_Formation();
|
||||
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
});
|
||||
|
||||
}, [])
|
||||
}, [props.apprenant_id])
|
||||
|
||||
|
||||
const [New_Get_List_Ent_Formation_result, setNew_Get_List_Ent_Formation_result] = useState([]);
|
||||
|
@ -415,7 +417,6 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
var local_type = JSON.parse(x).type;
|
||||
|
||||
console.log(" ## local_type = ", local_type)
|
||||
//---
|
||||
var node = {
|
||||
"_id": localid,
|
||||
|
@ -435,9 +436,7 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
if (new_data2.length > 0) {
|
||||
setGetall_Sequence_Of_Session_result_planning_view(new_data2);
|
||||
|
||||
console.log(" ### new_data2 = ", new_data2);
|
||||
|
||||
//console.log(" ### new_data2 = ", new_data2);
|
||||
}
|
||||
|
||||
|
||||
|
@ -482,7 +481,7 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
// console.log(" In Get_Given_Class_Data res.data.status = " + res.data.status);
|
||||
console.log(" In Get_Given_Class_Data res.data.message r_class = " + res.data.message);
|
||||
// console.log(" In Get_Given_Class_Data res.data.message r_class = " + res.data.message);
|
||||
|
||||
setLoading(false);
|
||||
|
||||
|
@ -573,9 +572,8 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
// Recuperer le planning liée à cette formation
|
||||
Getall_Sequence_Of_Session(selected_row_id.associated_session_id);
|
||||
|
||||
Get_Inscrit_Notes_Of_Evaluations(selected_row_id.associated_inscription_id, selected_row_id.associated_session_id);
|
||||
|
||||
Get_List_Of_All_PJ(selected_row_id.associated_inscription_id);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1168,6 +1166,399 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
// -- Gestion pièces jointes
|
||||
|
||||
const [Download_one_attached_document_api, setDownload_one_attached_document_api] = useState();
|
||||
const [Download_one_attached_document_result, setDownload_one_attached_document_result] = useState();
|
||||
const [Download_one_attached_document_message, setDownload_one_attached_document_message] = useState();
|
||||
|
||||
const Download_one_attached_document = (event) => {
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
|
||||
var nom_fiche_detaillee = "Fiche_Detaillee.pdf";
|
||||
var token = stored_cookie;
|
||||
var file_name = event.target.id;
|
||||
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Get_Ent_Student_Stored_Downloaded_File/" + token + "/" + file_name+"/"+props.apprenant_id;
|
||||
|
||||
setLoading(true);
|
||||
axios.get(url, { responseType: 'blob', },)
|
||||
.then((res) => {
|
||||
setLoading(false);
|
||||
fileDownload(res.data, nom_fiche_detaillee);
|
||||
setDownload_one_attached_document_api("true");
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', error);
|
||||
setDownload_one_attached_document_api("false");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const [tab_convention_pieces_jointes_result, settab_convention_pieces_jointes_result] = useState([]);
|
||||
|
||||
const [file_1_name, setfile_1_name] = useState();
|
||||
|
||||
const [sessions_file_change_1_api, setsessions_file_change_1_api] = useState();
|
||||
const [sessions_file_change_1_result, setsessions_file_change_1_result] = useState();
|
||||
const [sessions_file_change_1_message, setsessions_file_change_1_message] = useState();
|
||||
const sessions_file_change_1 = event => {
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
|
||||
|
||||
console.log("file_size 2 = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
setfile_1_name(event.target.files[0]);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('File', fileUploaded);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
const [sessions_file_change_1_convention_api, setsessions_file_change_1_convention_api] = useState();
|
||||
const [sessions_file_change_1_convention_result, setsessions_file_change_1_convention_result] = useState();
|
||||
const [sessions_file_change_1_convention_message, setsessions_file_change_1_convention_message] = useState();
|
||||
const sessions_file_change_1_convention = event => {
|
||||
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
if (file_type !== "application/pdf") {
|
||||
// alert("Le fichier n'est pas de type PDF");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier n'est pas de type PDF");
|
||||
setalert_type("error");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (file_size > 10000000) {
|
||||
// alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
//var new_node = {'name':event.target.files[0].name, 'type':event.target.files[0].type}
|
||||
|
||||
|
||||
var new_tmp = [];
|
||||
|
||||
if (tab_convention_pieces_jointes_result && tab_convention_pieces_jointes_result.length > 0) {
|
||||
|
||||
tab_convention_pieces_jointes_result.map((x) => {
|
||||
new_tmp.push(x);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
new_tmp.push(event.target.files[0])
|
||||
|
||||
settab_convention_pieces_jointes_result(new_tmp);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
||||
};
|
||||
|
||||
const [file_2_name, setfile_2_name] = useState();
|
||||
|
||||
const [sessions_file_change_2_api, setsessions_file_change_2_api] = useState();
|
||||
const [sessions_file_change_2_result, setsessions_file_change_2_result] = useState();
|
||||
const [sessions_file_change_2_message, setsessions_file_change_2_message] = useState();
|
||||
const sessions_file_change_2 = event => {
|
||||
|
||||
const fileUploaded = event.target.files[0];
|
||||
let file_size = event.target.files[0].size;
|
||||
let file_type = event.target.files[0].type;
|
||||
|
||||
|
||||
console.log("file_size 1 = ", file_size, " file_type = ", file_type);
|
||||
if (file_size > 10000000) {
|
||||
// alert("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
// console.log("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Le fichier ne doit pas depasser un 1 Méga octets");
|
||||
setalert_type("error");
|
||||
|
||||
return;
|
||||
}
|
||||
setfile_2_name(event.target.files[0]);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('File', fileUploaded);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
|
||||
|
||||
return;
|
||||
|
||||
|
||||
};
|
||||
|
||||
const [Record_All_PJ_api, setRecord_All_PJ_api] = useState();
|
||||
const [Record_All_PJ_result, setRecord_All_PJ_result] = useState();
|
||||
const [Record_All_PJ_message, setRecord_All_PJ_message] = useState();
|
||||
|
||||
function Record_All_PJ() {
|
||||
|
||||
if (!p_detail_one_file_to_download_type_name) {
|
||||
// alert(" Vous devez donner un nom à la pièce jointe");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Vous devez donner un nom à la pièce jointe");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
if (file_1_name && file_1_name.name) {
|
||||
//console.log(" ### Traitement de : ", file_1_name.name);
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('File', file_1_name);
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_business_object", p_detail_one_file_to_download_type_name);
|
||||
formData.append("file_name", file_1_name.name);
|
||||
formData.append("status", "0");
|
||||
formData.append("object_owner_collection", "inscription");
|
||||
formData.append("object_owner_id", selected_id);
|
||||
formData.append("type_document", "");
|
||||
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
|
||||
setLoading(true);
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
setLoading(false);
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setRecord_All_PJ_result(result['message']);
|
||||
setRecord_All_PJ_api("true");
|
||||
|
||||
Get_List_Of_All_PJ(selected_id);
|
||||
setfile_1_name();
|
||||
setp_detail_one_file_to_download_type_name();
|
||||
//GetCurrentClass_trainingsession();
|
||||
var text = " La pièce jointe " + file_1_name.name + " a été bien enregistrée";
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(text);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setRecord_All_PJ_message(result['message']);
|
||||
setRecord_All_PJ_api("false");
|
||||
// alert(result['message']);
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setRecord_All_PJ_api("false");
|
||||
alert(" Impossible d'ajouter la pièce jointe")
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [Delete_one_attached_document_api, setDelete_one_attached_document_api] = useState();
|
||||
const [Delete_one_attached_document_result, setDelete_one_attached_document_result] = useState();
|
||||
const [Delete_one_attached_document_message, setDelete_one_attached_document_message] = useState();
|
||||
|
||||
const Delete_one_attached_document = (event) => {
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
var formData = new FormData();
|
||||
var nom_fiche_detaillee = "Fiche_Detaillee.pdf";
|
||||
var file_name = event.target.id;
|
||||
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("file_name", file_name);
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/";
|
||||
|
||||
setLoading(true);
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
setLoading(false);
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Success:', result['message']);
|
||||
setDelete_one_attached_document_result(result['message']);
|
||||
setDelete_one_attached_document_api("true");
|
||||
Get_List_Of_All_PJ(selected_id);
|
||||
// alert(result['message'])
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setDelete_one_attached_document_message(result['message']);
|
||||
setDelete_one_attached_document_api("false");
|
||||
// alert(result['message'])
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setDelete_one_attached_document_api("false");
|
||||
// alert(" Impossible de supprimer le document")
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(" Impossible de supprimer le document");
|
||||
setalert_type("error");
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
const Delete_one_attached_document_convention = (event) => {
|
||||
var file_name = event.target.id;
|
||||
|
||||
}
|
||||
|
||||
const [Get_List_Of_All_PJ_api, setGet_List_Of_All_PJ_api] = useState();
|
||||
const [Get_List_Of_All_PJ_result, setGet_List_Of_All_PJ_result] = useState();
|
||||
const [Get_List_Of_All_PJ_message, setGet_List_Of_All_PJ_message] = useState();
|
||||
|
||||
function Get_List_Of_All_PJ(local_employee_id) {
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
//formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA');
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("object_owner_collection", "inscription");
|
||||
formData.append("object_owner_id", local_employee_id);
|
||||
formData.append("apprenant_id", props.apprenant_id);
|
||||
|
||||
|
||||
//formData.append("class_internal_url", internal_url);
|
||||
//console.log("token = " + stored_cookie);
|
||||
setLoading(true);
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Get_Ent_Student_List_object_owner_collection_Stored_Files/",
|
||||
{
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
setLoading(false);
|
||||
|
||||
//console.log(" ## result['status'] = ", result['status'])
|
||||
if (String(result['status']) === String("true")) {
|
||||
//console.log('Message :', result['message']);
|
||||
setGet_List_Of_All_PJ_result(result['message']);
|
||||
setGet_List_Of_All_PJ_api("true");
|
||||
|
||||
}
|
||||
else {
|
||||
setGet_List_Of_All_PJ_message(result['message']);
|
||||
setGet_List_Of_All_PJ_api("false");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error(' Get_List_Of_All_PJ Error:', error);
|
||||
setGet_List_Of_All_PJ_api("false");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Delete_file_1_name() {
|
||||
setfile_1_name();
|
||||
}
|
||||
|
||||
function Delete_file_2_name() {
|
||||
setfile_2_name();
|
||||
}
|
||||
|
||||
const [p_detail_one_file_to_download_type_name, setp_detail_one_file_to_download_type_name] = useState();
|
||||
|
||||
// -- end gestion pièces jointes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const [affichage_class, setaffichage_class] = useState("grid");
|
||||
return (
|
||||
<div className="module_ent_mes_formations" >
|
||||
|
@ -1387,7 +1778,7 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Formations </h3>
|
||||
<div>
|
||||
{/*<div>
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
<div className="div_row_gauche texte_area_filter" >
|
||||
|
@ -1547,7 +1938,7 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
</div>}
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<br />*/}
|
||||
|
||||
<div className="div_row">
|
||||
<nav style={{ width: '80%', float: 'right', textAlign: "right", marginTop: "10px" }}>
|
||||
|
@ -1571,7 +1962,7 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
{
|
||||
affichage_class && String(affichage_class) === "list" && <div className="div_row" style={{ paddingRight: '10px' }}>
|
||||
<div className="div_row"> Affichage LIST </div>
|
||||
|
||||
<div className="session_data">
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
|
@ -1767,7 +2158,6 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
|
||||
{
|
||||
affichage_class && String(affichage_class) === "grid" && <div className="div_row" style={{ paddingRight: '10px' }}>
|
||||
<div className="div_row"> Affichage GRID </div>
|
||||
|
||||
<div style={{ width: '100%', float: 'left', }}>
|
||||
<div className="block_display_flex_formation">
|
||||
|
@ -2056,13 +2446,153 @@ const Module_Ent_Mes_Formations = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
String(submenu) === "piece_jointe" && Get_Given_Class_Data_result && Get_Given_Class_Data_result.length > 0 && <div className="div_row" >
|
||||
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Pièces Jointes </nav>
|
||||
<div className="div_row" style={{ "border": "None" }}></div>
|
||||
|
||||
{String(submenu) === "piece_jointe" && Get_Given_Class_Data_result && Get_Given_Class_Data_result.length > 0 && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
|
||||
|
||||
<div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||
Pièces jointes
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "padding": "5px" }}>
|
||||
|
||||
<div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload-photo">
|
||||
<input
|
||||
style={{ display: "none" }}
|
||||
id="upload-photo"
|
||||
name="upload-photo"
|
||||
type="file"
|
||||
onChange={sessions_file_change_1}
|
||||
/>
|
||||
|
||||
<Fab
|
||||
color="secondary"
|
||||
size="small"
|
||||
component="span"
|
||||
aria-label="add"
|
||||
variant="extended"
|
||||
>
|
||||
<IoMdAddCircle /> <nav style={{ "fontSize": "12px" }}> Ajouter un fichier </nav>
|
||||
</Fab>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
{file_1_name && file_1_name.name &&
|
||||
<nav style={{ "fontSize": "12px" }}>
|
||||
<div className="session_caract">Nom du fichier <br />
|
||||
<TextField
|
||||
name="file_to_download_type_name"
|
||||
id="file_to_download_type_name"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
|
||||
disabled={false}
|
||||
className="disabled_style enable_style"
|
||||
value={p_detail_one_file_to_download_type_name}
|
||||
onChange={(e) => {
|
||||
setp_detail_one_file_to_download_type_name(e.target.value);
|
||||
|
||||
}}
|
||||
/>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
Fichier : {file_1_name.name} <br /> <font style={{ "cursor": "pointer" }}
|
||||
onClick={Delete_file_1_name}> Supprimer <IoIosRemoveCircleOutline /> </font>
|
||||
</nav>}
|
||||
|
||||
{Record_All_PJ_api && String(Record_All_PJ_api) === "true" && <div className="okUpdateData"> Pièce jointe enregistrée </div>}
|
||||
|
||||
{Record_All_PJ_api && String(Record_All_PJ_api) === "false" && <div className="koUpdateData"> {Record_All_PJ_message} </div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{file_1_name && file_1_name.name && <div className="div_row">
|
||||
|
||||
<div className="div_row_gauche">
|
||||
<Button variant="contained" onClick={Record_All_PJ}
|
||||
startIcon={<AiTwotoneSave />} className="bton_enreg">ENREGISTRER LA PIECE</Button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
<div className="div_row">
|
||||
Liste des pièces jointes <br />
|
||||
<div className="div_row">
|
||||
{Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (
|
||||
<div className="div_row_list_pj" >
|
||||
<nav style={{ "color": "green", "cursor": "pointer" }} onClick={Download_one_attached_document} name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}> Télécharger <i> {(JSON.parse(val).file_business_object)}</i> </nav> <br />
|
||||
<Popup
|
||||
trigger={
|
||||
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
|
||||
|
||||
|
||||
}
|
||||
modal
|
||||
nested
|
||||
position="center center"
|
||||
>
|
||||
{close => (
|
||||
<div>
|
||||
<button className="gest_close" onClick={close}>
|
||||
×
|
||||
</button>
|
||||
<div className="gest_header"> MySy Information </div>
|
||||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
En confirmant cette opération, la pièce jointe sera <i><font color="red"> définitivement supprimée</font></i>. <br />
|
||||
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
|
||||
Delete_one_attached_document(event);
|
||||
close();
|
||||
}}
|
||||
name={(JSON.parse(val).file_name)} id={(JSON.parse(val).file_name)}
|
||||
> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>}
|
||||
|
||||
|
||||
</div >
|
||||
|
|
|
@ -0,0 +1,428 @@
|
|||
.partner_header_automatic_files {
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
|
||||
position: fixed;
|
||||
/* margin-top: 22px;*/
|
||||
width: 100%;
|
||||
opacity: 1;
|
||||
background: #FFF;
|
||||
|
||||
.header_new_2025 {
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
width: 100%;
|
||||
padding-left: 50px;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 40px;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 96px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cta-login {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.hide_on_mobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 10px 15px;
|
||||
border-radius: 200px;
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 126%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #3e6ee3;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: transparent;
|
||||
color: #4b5162;
|
||||
border: 1px solid #c7c9ce;
|
||||
}
|
||||
|
||||
.separator {
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
background-color: rgba(23, 23, 23, 0.1);
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.login-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.user-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.login-link span {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #171717;
|
||||
line-height: 122%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
||||
.header_new_2025 {
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
padding: 14px 48px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
max-width: 60%;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 96px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #4b5162;
|
||||
text-decoration: none;
|
||||
line-height: 122%;
|
||||
}
|
||||
|
||||
.cta-login {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
display: flex;
|
||||
gap: 1px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 5px 8px;
|
||||
border-radius: 200px;
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
line-height: 126%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #3e6ee3;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: transparent;
|
||||
color: #4b5162;
|
||||
border: 1px solid #c7c9ce;
|
||||
}
|
||||
|
||||
.separator {
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
background-color: rgba(23, 23, 23, 0.1);
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.login-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.user-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.login-link span {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #171717;
|
||||
line-height: 122%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
||||
.header_new_2025 {
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
padding: 14px 48px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 70%;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 96px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #4b5162;
|
||||
text-decoration: none;
|
||||
line-height: 122%;
|
||||
}
|
||||
|
||||
.cta-login {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 3px 10px;
|
||||
border-radius: 200px;
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 126%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #3e6ee3;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: transparent;
|
||||
color: #4b5162;
|
||||
border: 1px solid #c7c9ce;
|
||||
}
|
||||
|
||||
.separator {
|
||||
width: 1px;
|
||||
height: 5px;
|
||||
background-color: rgba(23, 23, 23, 0.1);
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.login-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.user-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.login-link span {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #171717;
|
||||
line-height: 122%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width: 1200px) {
|
||||
.header_new_2025 {
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
padding: 14px 48px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 96px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #4b5162;
|
||||
text-decoration: none;
|
||||
line-height: 122%;
|
||||
}
|
||||
|
||||
.cta-login {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.cta-buttons {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 12px 24px;
|
||||
border-radius: 200px;
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 126%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #3e6ee3;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: transparent;
|
||||
color: #4b5162;
|
||||
border: 1px solid #c7c9ce;
|
||||
}
|
||||
|
||||
.separator {
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
background-color: rgba(23, 23, 23, 0.1);
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.login-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.user-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.login-link span {
|
||||
font-family: 'DM Sans', sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #171717;
|
||||
line-height: 122%;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,322 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import './Partner_Header.css';
|
||||
import moment from "moment";
|
||||
import { getCookie } from 'react-use-cookie';
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
import Header_MySy_Logo from '../../img_new_design_2025/header_mysy_logo.png';
|
||||
import Header_User from '../../img_new_design_2025/header_user.png';
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogContentText from '@mui/material/DialogContentText';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import Button from '@mui/material/Button';
|
||||
import { useCookies } from "react-cookie";
|
||||
|
||||
|
||||
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
import Draggable from 'react-draggable';
|
||||
import { IconButton } from '@material-ui/core';
|
||||
|
||||
|
||||
function PaperComponent(props) {
|
||||
return (
|
||||
<Draggable
|
||||
handle="#draggable-dialog-title"
|
||||
cancel={'[class*="MuiDialogContent-root"]'}
|
||||
>
|
||||
<Paper {...props} />
|
||||
</Draggable>
|
||||
);
|
||||
}
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
|
||||
dialog: {
|
||||
position: 'absolute',
|
||||
// left: 10,
|
||||
top: 400
|
||||
},
|
||||
|
||||
paper: {
|
||||
overflowY: 'unset',
|
||||
},
|
||||
customizedButton: {
|
||||
position: 'absolute',
|
||||
left: '98%',
|
||||
top: '-3%',
|
||||
backgroundColor: 'lightgray',
|
||||
color: 'gray',
|
||||
},
|
||||
}));
|
||||
|
||||
const Partner_Header = () => {
|
||||
const history = useHistory();
|
||||
const classes = useStyles();
|
||||
const [userconnected, setuserconnected] = useState("0");
|
||||
const [someoneconnected, setsomeoneconnected] = useState("0");
|
||||
const [partnerconnected, setpartnerconnected] = useState("0");
|
||||
const stored_user = getCookie('tokenmysych');
|
||||
const stored_part = getCookie('tokenmysypart');
|
||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych'], { path: '/' });
|
||||
const [partcookie, setpartCookie, removepartCookie] = useCookies(['tokenmysypart'], { path: '/' });
|
||||
const [PartnerMenu, setPartnerMenu] = React.useState(null);
|
||||
const [AccountMenu, setAccountMenu] = React.useState(null);
|
||||
const [ProduitMenu, setproduitMenu] = React.useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
var local_user_connect = 0;
|
||||
var local_part_connect = 0;
|
||||
|
||||
if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
|
||||
setuserconnected("0");
|
||||
local_user_connect = 0;
|
||||
} else {
|
||||
setuserconnected("1");
|
||||
setsomeoneconnected("1");
|
||||
local_user_connect = 1;
|
||||
//alert(" user connected OK");
|
||||
}
|
||||
|
||||
if (typeof (stored_part) === "undefined" || String(stored_part) === '') {
|
||||
setpartnerconnected("0");
|
||||
local_part_connect = 0;
|
||||
} else {
|
||||
setpartnerconnected("1");
|
||||
setsomeoneconnected("1");
|
||||
local_part_connect = 1;
|
||||
//alert(" partner connected OK");
|
||||
}
|
||||
|
||||
}, []);
|
||||
|
||||
const handleAccountCreation = () => {
|
||||
setAccountMenu(null);
|
||||
history.push("/signup/")
|
||||
};
|
||||
|
||||
|
||||
const handleMyAccount = () => {
|
||||
setAccountMenu(null);
|
||||
history.push("/mysy-user-account")
|
||||
};
|
||||
|
||||
const handleAccountConnexion = () => {
|
||||
setAccountMenu(null);
|
||||
history.push("/signin/")
|
||||
};
|
||||
|
||||
|
||||
const handleMyPartnerAccount = () => {
|
||||
setAccountMenu(null);
|
||||
history.push("/Partner")
|
||||
};
|
||||
|
||||
|
||||
function handleAccountConnexion_v2() {
|
||||
|
||||
if (String(userconnected) === String("1")) {
|
||||
handleMyAccount();
|
||||
}
|
||||
else if (String(partnerconnected) === String("1")) {
|
||||
handleMyPartnerAccount();
|
||||
}
|
||||
}
|
||||
|
||||
const [Dialog_1_open, setDialog_1_open] = React.useState(false);
|
||||
const Dialog_1_handleClose = () => {
|
||||
};
|
||||
|
||||
const Dialog_1_handleClose_buton = () => {
|
||||
setDialog_1_open(false);
|
||||
};
|
||||
|
||||
function part_logout_confirmation() {
|
||||
/* si c'est une connexion partner qui est active */
|
||||
|
||||
if (typeof (stored_part) != "undefined") {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
var acces_right_token_name = stored_cookie + "_uar";
|
||||
|
||||
setpartCookie("tokenmysypart", "", { path: '/' });
|
||||
setpartCookie(acces_right_token_name, "", { path: '/' });
|
||||
removeCookie(acces_right_token_name, { path: '/' });
|
||||
|
||||
|
||||
setpartCookie("mysy_session_display_view", "", { path: '/' });
|
||||
setpartCookie("mysy_menu_gauche_reduit", "", { path: '/' });
|
||||
setpartCookie("mysy_catalog_data_row_grouped_by", "", { path: '/' });
|
||||
|
||||
removeCookie("tokenmysypart", { path: '/' });
|
||||
removeCookie("mysy_session_display_view", { path: '/' });
|
||||
removeCookie("mysy_menu_gauche_reduit", { path: '/' });
|
||||
removeCookie("mysy_catalog_data_row_grouped_by", { path: '/' });
|
||||
|
||||
|
||||
}
|
||||
setsomeoneconnected("0");
|
||||
setDialog_1_open(false);
|
||||
history.push("/recherche-formation");
|
||||
}
|
||||
|
||||
function user_logout_confirmation() {
|
||||
/* si c'est une connexion partner qui est active */
|
||||
if (typeof (stored_user) != "undefined") {
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
var acces_right_token_name = stored_cookie + "_uar";
|
||||
|
||||
setpartCookie("tokenmysych", "", { path: '/' });
|
||||
setpartCookie(acces_right_token_name, "", { path: '/' });
|
||||
removeCookie(acces_right_token_name, { path: '/' });
|
||||
|
||||
removeCookie("tokenmysych", { path: '/' });
|
||||
|
||||
|
||||
}
|
||||
history.push("/intranet");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='partner_header_automatic_files'>
|
||||
|
||||
{/*** GESTION Deconnexion */}
|
||||
<Dialog
|
||||
open={Dialog_1_open}
|
||||
// onClose={Dialog_1_handleClose}
|
||||
className="displaypartnersession"
|
||||
static
|
||||
onClose={() => null}
|
||||
|
||||
PaperProps={{
|
||||
|
||||
|
||||
className: classes.paper, // Apply the paper style
|
||||
style: {
|
||||
overflowY: 'unset',
|
||||
position: 'absolute',
|
||||
top: '7rem',
|
||||
margin: "2px",
|
||||
},
|
||||
}}
|
||||
hideBackdrop={true}
|
||||
disableScrollLock
|
||||
classes={{
|
||||
paper: classes.dialog
|
||||
}}
|
||||
|
||||
PaperComponent={PaperComponent}
|
||||
aria-labelledby="draggable-dialog-title"
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" >MySy Information</DialogTitle>
|
||||
<DialogContent className="DialogContent_width">
|
||||
<DialogContentText>
|
||||
Confirmez la deconnexion <br />
|
||||
|
||||
|
||||
</DialogContentText>
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
||||
<IconButton
|
||||
//autoFocus
|
||||
onClick={Dialog_1_handleClose_buton}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
<Button
|
||||
|
||||
onClick={(e) => {
|
||||
if (partnerconnected && String(partnerconnected) === '1')
|
||||
part_logout_confirmation();
|
||||
|
||||
if (userconnected && String(userconnected) === '1')
|
||||
user_logout_confirmation();
|
||||
|
||||
}}
|
||||
|
||||
className="bton_enreg_dialog">Deconnexion</Button>
|
||||
</div>
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_1_handleClose_buton} className="bton_annule_dialog" >Annuler</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
{/*** Fin GESTION Deconnexion */}
|
||||
|
||||
<header className="header_new_2025">
|
||||
<div className="header-content">
|
||||
<div className="logo-menu">
|
||||
<img src={Header_MySy_Logo} alt="Logo MySy" className="logo" style={{ cursor: 'pointer' }} onClick={(e) => {
|
||||
// e.preventDefault();
|
||||
history.push("/");
|
||||
}} />
|
||||
|
||||
<nav className="menu-list">
|
||||
<a href="/apropos" className="menu-link">À propos</a>
|
||||
<a href="/fonctionnalites" className="menu-link">Fonctionnalités</a>
|
||||
<a href="#" className="menu-link">
|
||||
<nav onClick={(e) => {
|
||||
history.push("/tarif/#debut");
|
||||
// window.open("/tarif/#debut", "_self");
|
||||
}}>Tarifs </nav>
|
||||
</a>
|
||||
<a href="/Recherche-Article-formation" className="menu-link">Blog</a>
|
||||
<div className="separator"></div>
|
||||
<a href="/marketplace" className="menu-link">Marketplace</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div className="cta-login">
|
||||
<div className="cta-buttons">
|
||||
<button className="btn btn-primary" onClick={(e) => {
|
||||
e.preventDefault();
|
||||
var date2 = new Date();
|
||||
const format2 = "YYYY-MM";
|
||||
var dateTime2 = moment(date2).format(format2);
|
||||
window.open(
|
||||
"https://calendly.com/mysytraining/demo-mysy-training-solution?month=" + String(dateTime2),
|
||||
'_blank'
|
||||
);
|
||||
}}>Réserver une démo</button>
|
||||
|
||||
</div>
|
||||
<div className="cta-buttons hide_on_mobile">
|
||||
{String(someoneconnected) !== String("1") && <button className="btn btn-secondary" onClick={handleAccountCreation}>Créer un compte</button>}
|
||||
|
||||
{String(someoneconnected) === String("1") && <button className="btn btn-secondary" onClick={handleAccountConnexion_v2}>Mon compte</button>}
|
||||
|
||||
</div>
|
||||
<div className="separator hide_on_mobile"></div>
|
||||
{String(someoneconnected) !== String("1") && <div className="login-link hide_on_mobile" onClick={handleAccountConnexion}>
|
||||
<img src={Header_User} alt="User icon" className="user-icon hide_on_mobile" />
|
||||
<span className='hide_on_mobile'>Connexion</span>
|
||||
</div>}
|
||||
|
||||
{String(someoneconnected) === String("1") && <div className="login-link hide_on_mobile" onClick={(e) => setDialog_1_open(true)}>
|
||||
<img src={Header_User} alt="User icon" className="user-icon hide_on_mobile" />
|
||||
<span className='hide_on_mobile'>Deconnexion</span>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div >
|
||||
</header >
|
||||
</div >
|
||||
);
|
||||
};
|
||||
|
||||
export default Partner_Header;
|
||||
|
|
@ -27,7 +27,7 @@ import Module_Ent_Mes_Formations from "./Module_Ent_Mes_Formations";
|
|||
import Module_Ent_Mes_Notes from "./Module_Ent_Mes_Notes";
|
||||
|
||||
function Student_Account() {
|
||||
const [menu, setmenu] = useState("mes_stagiaires");
|
||||
const [menu, setmenu] = useState("mes_formations");
|
||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
||||
const [result, setResult] = useState("");
|
||||
const [myApiResponse, setmyApiResponse] = useState("");
|
||||
|
@ -192,8 +192,8 @@ function Student_Account() {
|
|||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_user_account/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
// console.log(" In GetUserNameFromToken res.data.status = " + res.data.status);
|
||||
// console.log(" In GetUserNameFromToken res.data.message = " + res.data.message);
|
||||
// console.log(" In GetUserNameFromToken res.data.status = " + res.data.status);
|
||||
// console.log(" In GetUserNameFromToken res.data.message = " + res.data.message);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setusername(JSON.parse(res.data.message).email);
|
||||
|
@ -341,7 +341,7 @@ function Student_Account() {
|
|||
return (
|
||||
<div className="account" style={{ background: '#f4f4fb' }}>
|
||||
|
||||
|
||||
|
||||
<Helmet>
|
||||
<title>Création compte MySy Trainig Technology</title>
|
||||
<meta name="description" content="Éditeur Français de logiciels pour organisme de formation. Avec solutions de E-Learning, gestion administrative et gestion relation client nous accompagnons les organismes de formation à réaliser l’audit QUALIOPI en toute sérénité. Nous sommes les moins cher du marché. Nous vous accompagnons automatiser vos process : inscription, évaluation, émargement (qr-code), Check-list QUALIOPI, Personnalisation et édition documents, Gestion formateurs, Catalogue formations personnalisé" />
|
||||
|
@ -444,75 +444,6 @@ function Student_Account() {
|
|||
<Module_Ent_Mes_Formations apprenant_id={apprenant_id}
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
|
||||
{String(menu) === String("modules_mes_documents") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Modules_Mes_Documents
|
||||
partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={""}
|
||||
my_title={"Gestion Documentaire"}
|
||||
type_user_connected={"user_account"}
|
||||
type_document={"all"}
|
||||
/>}
|
||||
|
||||
{String(menu) === String("mes_devis") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Modules_Mes_Documents
|
||||
partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={""}
|
||||
my_title={"MES DEVIS"}
|
||||
type_document={"devis"}
|
||||
type_user_connected={"user_account"}
|
||||
filter_all_document={"0"}
|
||||
/>}
|
||||
|
||||
{String(menu) === String("mes_conventions") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Modules_Mes_Documents partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={""}
|
||||
my_title={"MES CONVENTIONS"}
|
||||
type_document={"convention"}
|
||||
type_user_connected={"user_account"}
|
||||
filter_all_document={"0"}
|
||||
/>}
|
||||
|
||||
|
||||
{String(menu) === String("mes_convocations") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Modules_Mes_Documents partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={""}
|
||||
my_title={"MES CONVOCATIONS"}
|
||||
type_document={"convocation"}
|
||||
type_user_connected={"user_account"}
|
||||
filter_all_document={"0"}
|
||||
/>}
|
||||
|
||||
{String(menu) === String("mes_attestations") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Modules_Mes_Documents partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={""}
|
||||
my_title={"MES ATTESTATIONS"}
|
||||
type_document={"attestation"}
|
||||
type_user_connected={"user_account"}
|
||||
filter_all_document={"0"}
|
||||
/>}
|
||||
|
||||
|
||||
{String(menu) === String("mes_stagiaires") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Intranet_Mes_Stagiaires partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={connected_user_data.partner_owner_recid}
|
||||
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
|
||||
{String(menu) === String("mes_documents") && <Profil_Objectif />}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
|
@ -1,6 +1,6 @@
|
|||
import Navigation from "../components/Navigation";
|
||||
import Ent_Intranet from "./../components/Ent_Intranet";
|
||||
import New_C_Header_2025_V2 from "../components/header_automatic_files/Header";
|
||||
import Partner_New_C_Header_2025_V2 from "../components/Partner_header_automatic_files/Partner_Header";
|
||||
import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony";
|
||||
import New_Navigation_2025 from "../components/New_Navigation_2025";
|
||||
import Student_Account from "./../components/Student_Account";
|
||||
|
@ -9,7 +9,7 @@ const student_account = () => {
|
|||
return (
|
||||
<div>
|
||||
<New_Navigation_2025 />
|
||||
<New_C_Header_2025_V2 />
|
||||
<Partner_New_C_Header_2025_V2 />
|
||||
<Student_Account />
|
||||
<New_C_Footer_Without_Testimony_2025_V2 />
|
||||
</div>
|
||||
|
|
|
@ -2105,7 +2105,7 @@
|
|||
}
|
||||
|
||||
.div_centre_master {
|
||||
width: 40%;
|
||||
width: 80%;
|
||||
background-color: white;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
@ -2261,7 +2261,7 @@
|
|||
|
||||
.display_screen_600_901 {
|
||||
width: 95%;
|
||||
margin-left: 5%;
|
||||
// margin-left: 5%;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
min-height: 50vh;
|
||||
|
|
|
@ -1829,7 +1829,7 @@
|
|||
text-align: center;
|
||||
margin-bottom: 0.8rem;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
cursor: normal;
|
||||
font-style: italic;
|
||||
background-color: gray;
|
||||
font-weight: normal;
|
||||
|
@ -2477,7 +2477,7 @@
|
|||
text-align: center;
|
||||
margin-bottom: 0.8rem;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
cursor: normal;
|
||||
font-style: italic;
|
||||
background-color: gray;
|
||||
font-weight: normal;
|
||||
|
|
Loading…
Reference in New Issue