08/10/2023 - 22h40
parent
cc26b92db6
commit
476f21046a
|
@ -261,6 +261,7 @@ const AddClassManual = (props) => {
|
||||||
//document.getElementsByName("mots_cle")[0].value = "";
|
//document.getElementsByName("mots_cle")[0].value = "";
|
||||||
//document.getElementsByName("plus_produit")[0].value = "";
|
//document.getElementsByName("plus_produit")[0].value = "";
|
||||||
document.getElementsByName("url")[0].value = "";
|
document.getElementsByName("url")[0].value = "";
|
||||||
|
document.getElementsByName("lms_class_code")[0].value = "";
|
||||||
document.getElementsByName("class_inscription_url")[0].value = "";
|
document.getElementsByName("class_inscription_url")[0].value = "";
|
||||||
document.getElementsByName("metier")[0].value = "";
|
document.getElementsByName("metier")[0].value = "";
|
||||||
|
|
||||||
|
@ -495,6 +496,11 @@ const AddClassManual = (props) => {
|
||||||
if (mylocaltraining.url)
|
if (mylocaltraining.url)
|
||||||
document.getElementsByName("url")[0].value = mylocaltraining.url;
|
document.getElementsByName("url")[0].value = mylocaltraining.url;
|
||||||
|
|
||||||
|
document.getElementsByName("lms_class_code")[0].value = "";
|
||||||
|
if (mylocaltraining.lms_class_code)
|
||||||
|
document.getElementsByName("lms_class_code")[0].value = mylocaltraining.lms_class_code;
|
||||||
|
|
||||||
|
|
||||||
document.getElementsByName("class_inscription_url")[0].value = "";
|
document.getElementsByName("class_inscription_url")[0].value = "";
|
||||||
if (mylocaltraining.class_inscription_url)
|
if (mylocaltraining.class_inscription_url)
|
||||||
document.getElementsByName("class_inscription_url")[0].value = mylocaltraining.class_inscription_url;
|
document.getElementsByName("class_inscription_url")[0].value = mylocaltraining.class_inscription_url;
|
||||||
|
@ -576,6 +582,7 @@ const AddClassManual = (props) => {
|
||||||
var price = document.getElementsByName("price")[0].value;
|
var price = document.getElementsByName("price")[0].value;
|
||||||
var duree = document.getElementsByName("duree")[0].value;
|
var duree = document.getElementsByName("duree")[0].value;
|
||||||
var url = document.getElementsByName("url")[0].value;
|
var url = document.getElementsByName("url")[0].value;
|
||||||
|
var lms_class_code = document.getElementsByName("lms_class_code")[0].value;
|
||||||
var class_inscription_url = document.getElementsByName("class_inscription_url")[0].value;
|
var class_inscription_url = document.getElementsByName("class_inscription_url")[0].value;
|
||||||
var mymetier = document.getElementsByName("metier")[0].value;
|
var mymetier = document.getElementsByName("metier")[0].value;
|
||||||
var mynote = document.getElementsByName("note")[0].value;
|
var mynote = document.getElementsByName("note")[0].value;
|
||||||
|
@ -708,6 +715,7 @@ const AddClassManual = (props) => {
|
||||||
formData.append('duration', duree);
|
formData.append('duration', duree);
|
||||||
formData.append('duration_unit', mytrainingdurationunit);
|
formData.append('duration_unit', mytrainingdurationunit);
|
||||||
formData.append('url', url);
|
formData.append('url', url);
|
||||||
|
formData.append('lms_class_code', lms_class_code);
|
||||||
formData.append('class_inscription_url', class_inscription_url);
|
formData.append('class_inscription_url', class_inscription_url);
|
||||||
formData.append('mots_cle', mots_cle);
|
formData.append('mots_cle', mots_cle);
|
||||||
formData.append('plus_produit', plus_produit);
|
formData.append('plus_produit', plus_produit);
|
||||||
|
@ -1478,6 +1486,19 @@ const AddClassManual = (props) => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="training_caract">
|
||||||
|
<TextField
|
||||||
|
name="lms_class_code"
|
||||||
|
label="Code LMS"
|
||||||
|
type="text"
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
|
disabled={false}
|
||||||
|
className="disabled_style"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="training_caract">
|
<div className="training_caract">
|
||||||
<TextField
|
<TextField
|
||||||
|
@ -1543,7 +1564,7 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
|
|
||||||
{String(datamodification) !== String("1") && String(editor_tochange) !== String("1") && <div className="parter_div_filtrer_row_droite" >
|
{String(datamodification) !== String("1") && String(editor_tochange) !== String("1") && <div className="parter_div_filtrer_row_droite" >
|
||||||
|
|
||||||
<Popup
|
<Popup
|
||||||
trigger={
|
trigger={
|
||||||
<Button variant="contained" startIcon={<DeleteIcon />} className="bton_suppr2"> SUPPRIMER LA FORMATION </Button>
|
<Button variant="contained" startIcon={<DeleteIcon />} className="bton_suppr2"> SUPPRIMER LA FORMATION </Button>
|
||||||
|
|
|
@ -39,7 +39,9 @@ import DialogContentText from '@mui/material/DialogContentText';
|
||||||
import DialogTitle from '@mui/material/DialogTitle';
|
import DialogTitle from '@mui/material/DialogTitle';
|
||||||
import { RestoreFromTrashRounded } from "@mui/icons-material";
|
import { RestoreFromTrashRounded } from "@mui/icons-material";
|
||||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
|
import { Fab } from "@material-ui/core";
|
||||||
|
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||||
|
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||||
|
|
||||||
const DisplayPartnerSession = (props) => {
|
const DisplayPartnerSession = (props) => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
@ -3381,6 +3383,8 @@ const DisplayPartnerSession = (props) => {
|
||||||
GetAttendee_Data(email, selected_session_id);
|
GetAttendee_Data(email, selected_session_id);
|
||||||
getStagiaireImages(selected_internal_url, selected_session_id, email,);
|
getStagiaireImages(selected_internal_url, selected_session_id, email,);
|
||||||
|
|
||||||
|
Get_List_Of_All_PJ(cellValues.row._id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const [print_detail_insc, setprint_detail_insc] = React.useState();
|
const [print_detail_insc, setprint_detail_insc] = React.useState();
|
||||||
|
@ -4341,6 +4345,354 @@ const DisplayPartnerSession = (props) => {
|
||||||
|
|
||||||
const [isLoading, setLoading] = useState();
|
const [isLoading, setLoading] = useState();
|
||||||
|
|
||||||
|
|
||||||
|
// -- 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('tokenmysypart');
|
||||||
|
|
||||||
|
|
||||||
|
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_Stored_Downloaded_File/" + token + "/" + file_name;
|
||||||
|
|
||||||
|
|
||||||
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
.then((res) => {
|
||||||
|
fileDownload(res.data, nom_fiche_detaillee);
|
||||||
|
setDownload_one_attached_document_api("true");
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setDownload_one_attached_document_api("false");
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
setfile_1_name(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("file_size = ", 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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', fileUploaded);
|
||||||
|
//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;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
setsessions_file_change_1_result(result['message']);
|
||||||
|
setsessions_file_change_1_api("true");
|
||||||
|
//GetCurrentClass_trainingsession();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setsessions_file_change_1_message(result['message']);
|
||||||
|
setsessions_file_change_1_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setsessions_file_change_1_api("false");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
setfile_2_name(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("file_size = ", 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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', fileUploaded);
|
||||||
|
//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;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
setsessions_file_change_2_result(result['message']);
|
||||||
|
setsessions_file_change_2_api("true");
|
||||||
|
//GetCurrentClass_trainingsession();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setsessions_file_change_2_message(result['message']);
|
||||||
|
setsessions_file_change_2_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setsessions_file_change_2_api("false");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
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");
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
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_inscription_id);
|
||||||
|
|
||||||
|
//formData.append("class_internal_url", internal_url);
|
||||||
|
//console.log("token = " + stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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_inscription_id);
|
||||||
|
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")
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setRecord_All_PJ_message(result['message']);
|
||||||
|
setRecord_All_PJ_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(' Record_All_PJ Error:', error);
|
||||||
|
setRecord_All_PJ_api("false");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_2_name && file_2_name.name) {
|
||||||
|
console.log(" ### Traitement de : ", file_2_name.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
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/";
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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_inscription_id);
|
||||||
|
alert(result['message'])
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setDelete_one_attached_document_message(result['message']);
|
||||||
|
setDelete_one_attached_document_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(' Record_All_PJ Error:', error);
|
||||||
|
setDelete_one_attached_document_api("false");
|
||||||
|
alert(" Impossible de supprimer le document")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
formData.append("object_owner_collection", "inscription");
|
||||||
|
formData.append("object_owner_id", local_employee_id);
|
||||||
|
|
||||||
|
|
||||||
|
//formData.append("class_internal_url", internal_url);
|
||||||
|
//console.log("token = " + stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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) => {
|
||||||
|
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
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="displaypartnersession">
|
<div className="displaypartnersession">
|
||||||
|
|
||||||
|
@ -6604,7 +6956,7 @@ const DisplayPartnerSession = (props) => {
|
||||||
{String(Resend_LMS_Credentials_api) === "false" && <div className="div_row okUpdateData" style={{ "textAlign": "center" }}>
|
{String(Resend_LMS_Credentials_api) === "false" && <div className="div_row okUpdateData" style={{ "textAlign": "center" }}>
|
||||||
{Resend_LMS_Credentials_message}</div>}
|
{Resend_LMS_Credentials_message}</div>}
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
@ -7060,12 +7412,155 @@ const DisplayPartnerSession = (props) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
{is_lms_class_code && <div>
|
{is_lms_class_code && <div>
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
<hr className="hr_break" />
|
<hr className="hr_break" />
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
|
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||||
Acces LMS
|
Acces LMS
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -7101,12 +7596,11 @@ const DisplayPartnerSession = (props) => {
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
<div className="session_caract" style={{ "paddingTop": "15px" }}> <br />
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={Resend_LMS_Credentials} style={{ "width": "80%" }}> (R)envoyer les Identifiants
|
||||||
<Button variant="contained" className="bton_enreg" onClick={Resend_LMS_Credentials}> (R)envoyer les Identifiants
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
@ -7137,11 +7631,11 @@ const DisplayPartnerSession = (props) => {
|
||||||
|
|
||||||
{String(participant_data_edit_mode) !== "1" && <div className="div_row" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
{String(participant_data_edit_mode) !== "1" && <div className="div_row" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||||
|
|
||||||
<Button variant="contained" className="bton_edit" onClick={EnableAttendeeDetailFields}>Editer
|
<Button variant="contained" className="bton_edit" onClick={EnableAttendeeDetailFields}>Editer
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -7153,7 +7647,7 @@ const DisplayPartnerSession = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
|
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||||
Evaluation
|
Evaluation
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -7255,7 +7749,7 @@ const DisplayPartnerSession = (props) => {
|
||||||
<hr className="hr_break" />
|
<hr className="hr_break" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
|
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||||
Attestation
|
Attestation
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -7333,7 +7827,7 @@ const DisplayPartnerSession = (props) => {
|
||||||
|
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||||
|
|
||||||
<Button variant="contained" className="bton_edit" onClick={DownloadAttendeeAttestation} style={{"textAlign":"center"}}>Imprimer l'attestation de formation
|
<Button variant="contained" className="bton_edit" onClick={DownloadAttendeeAttestation} style={{ "textAlign": "center" }}>Imprimer l'attestation de formation
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,9 @@ import DialogContentText from '@mui/material/DialogContentText';
|
||||||
import DialogTitle from '@mui/material/DialogTitle';
|
import DialogTitle from '@mui/material/DialogTitle';
|
||||||
import { TransitionProps } from '@mui/material/transitions';
|
import { TransitionProps } from '@mui/material/transitions';
|
||||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
|
import { Fab } from "@material-ui/core";
|
||||||
|
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||||
|
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||||
|
|
||||||
const DisplayPartnerStagiaires = (props) => {
|
const DisplayPartnerStagiaires = (props) => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
@ -470,6 +472,8 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
// Recuperation des informations de la session
|
// Recuperation des informations de la session
|
||||||
GetCurrentSession(session_id, internal_url);
|
GetCurrentSession(session_id, internal_url);
|
||||||
|
|
||||||
|
Get_List_Of_All_PJ(line._id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2077,16 +2081,16 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
Getall_TrainingParticipant();
|
Getall_TrainingParticipant();
|
||||||
clear_one_Attende_Fields();
|
clear_one_Attende_Fields();
|
||||||
alert(" Le participant a été correctement ajouté");
|
alert(" Le participant a été correctement ajouté");
|
||||||
|
|
||||||
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
|
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
|
||||||
if ( document.getElementById('myRef_head')) {
|
if (document.getElementById('myRef_head')) {
|
||||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
var divh = document.getElementById('myRef_head').offsetTop;
|
var divh = document.getElementById('myRef_head').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (String(res.data.status) === String("Err_Connexion")) {
|
} else if (String(res.data.status) === String("Err_Connexion")) {
|
||||||
alert('Erreur: ' + res.data.message);
|
alert('Erreur: ' + res.data.message);
|
||||||
|
@ -2178,14 +2182,14 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
|
|
||||||
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
|
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
|
||||||
if ( document.getElementById('myRef_head')) {
|
if (document.getElementById('myRef_head')) {
|
||||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
var divh = document.getElementById('myRef_head').offsetTop;
|
var divh = document.getElementById('myRef_head').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2467,9 +2471,9 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
if (String(res.data.status) === "true") {
|
if (String(res.data.status) === "true") {
|
||||||
console.log(" In GetCurrentSession res.data.status = " + res.data.status);
|
//console.log(" In GetCurrentSession res.data.status = " + res.data.status);
|
||||||
console.log(" In GetCurrentSession res.data.message r_class = " + res.data.message);
|
//console.log(" In GetCurrentSession res.data.message r_class = " + res.data.message);
|
||||||
console.log(" In GetCurrentSession res.data.message len = " + String(res.data.message).length);
|
//console.log(" In GetCurrentSession res.data.message len = " + String(res.data.message).length);
|
||||||
|
|
||||||
setGetCurrentSession_api("true");
|
setGetCurrentSession_api("true");
|
||||||
if (String(res.data.message).length > 0) {
|
if (String(res.data.message).length > 0) {
|
||||||
|
@ -2760,6 +2764,354 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
const [isLoading, setLoading] = useState();
|
const [isLoading, setLoading] = useState();
|
||||||
|
|
||||||
|
|
||||||
|
// -- 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('tokenmysypart');
|
||||||
|
|
||||||
|
|
||||||
|
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_Stored_Downloaded_File/" + token + "/" + file_name;
|
||||||
|
|
||||||
|
|
||||||
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
.then((res) => {
|
||||||
|
fileDownload(res.data, nom_fiche_detaillee);
|
||||||
|
setDownload_one_attached_document_api("true");
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setDownload_one_attached_document_api("false");
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
setfile_1_name(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("file_size = ", 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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', fileUploaded);
|
||||||
|
//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;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
setsessions_file_change_1_result(result['message']);
|
||||||
|
setsessions_file_change_1_api("true");
|
||||||
|
//GetCurrentClass_trainingsession();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setsessions_file_change_1_message(result['message']);
|
||||||
|
setsessions_file_change_1_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setsessions_file_change_1_api("false");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
setfile_2_name(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("file_size = ", 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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', fileUploaded);
|
||||||
|
//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;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
setsessions_file_change_2_result(result['message']);
|
||||||
|
setsessions_file_change_2_api("true");
|
||||||
|
//GetCurrentClass_trainingsession();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setsessions_file_change_2_message(result['message']);
|
||||||
|
setsessions_file_change_2_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setsessions_file_change_2_api("false");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
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");
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
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("class_internal_url", internal_url);
|
||||||
|
//console.log("token = " + stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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();
|
||||||
|
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setRecord_All_PJ_message(result['message']);
|
||||||
|
setRecord_All_PJ_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(' Record_All_PJ Error:', error);
|
||||||
|
setRecord_All_PJ_api("false");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_2_name && file_2_name.name) {
|
||||||
|
console.log(" ### Traitement de : ", file_2_name.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
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/";
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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'])
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setDelete_one_attached_document_message(result['message']);
|
||||||
|
setDelete_one_attached_document_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(' Record_All_PJ Error:', error);
|
||||||
|
setDelete_one_attached_document_api("false");
|
||||||
|
alert(" Impossible de supprimer le document")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
formData.append("object_owner_collection", "inscription");
|
||||||
|
formData.append("object_owner_id", local_employee_id);
|
||||||
|
|
||||||
|
|
||||||
|
//formData.append("class_internal_url", internal_url);
|
||||||
|
//console.log("token = " + stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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) => {
|
||||||
|
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
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="displaypartnerstagiaire">
|
<div className="displaypartnerstagiaire">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -4114,11 +4466,155 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
{is_lms_class_code && <div>
|
{is_lms_class_code && <div>
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
<hr className="hr_break" />
|
<hr className="hr_break" />
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
|
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||||
Acces LMS
|
Acces LMS
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -4155,12 +4651,11 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
<div className="session_caract" style={{ "paddingTop": "15px" }}> <br />
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={Resend_LMS_Credentials} style={{ "width": "80%" }}> (R)envoyer les Identifiants
|
||||||
<Button variant="contained" className="bton_fermer" onClick={Resend_LMS_Credentials}> (R)envoyer les Identifiants
|
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
@ -4201,7 +4696,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
|
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||||
Evaluation
|
Evaluation
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -4302,7 +4797,7 @@ const DisplayPartnerStagiaires = (props) => {
|
||||||
<hr className="hr_break" />
|
<hr className="hr_break" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}>
|
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||||
Attestation
|
Attestation
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,6 +43,9 @@ import { ElectricScooterRounded } from "@mui/icons-material";
|
||||||
import { Container, Row, Col } from 'react-grid-system';
|
import { Container, Row, Col } from 'react-grid-system';
|
||||||
import Visibility from '@mui/icons-material/Visibility';
|
import Visibility from '@mui/icons-material/Visibility';
|
||||||
import VisibilityOff from '@mui/icons-material/VisibilityOff';
|
import VisibilityOff from '@mui/icons-material/VisibilityOff';
|
||||||
|
import { Fab } from "@material-ui/core";
|
||||||
|
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||||
|
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||||
|
|
||||||
|
|
||||||
const Employes = (props) => {
|
const Employes = (props) => {
|
||||||
|
@ -583,17 +586,19 @@ const Employes = (props) => {
|
||||||
Display_Detail_Employe(employe_id);
|
Display_Detail_Employe(employe_id);
|
||||||
|
|
||||||
|
|
||||||
if ( document.getElementById('myRef')) {
|
if (document.getElementById('myRef')) {
|
||||||
var divh = document.getElementById('myRef').offsetTop;
|
var divh = document.getElementById('myRef').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Getall_Employee_Affectation(employe_id);
|
Getall_Employee_Affectation(employe_id);
|
||||||
Getall_Employee_Acces_Right(employe_id);
|
Getall_Employee_Acces_Right(employe_id);
|
||||||
|
|
||||||
|
Get_List_Of_All_PJ(employe_id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -617,15 +622,15 @@ const Employes = (props) => {
|
||||||
//console.log("### line = ", line);
|
//console.log("### line = ", line);
|
||||||
var affectation_id = line._id;
|
var affectation_id = line._id;
|
||||||
set_selected_affectation_id(affectation_id);
|
set_selected_affectation_id(affectation_id);
|
||||||
|
|
||||||
if ( document.getElementById('myRef_affectation')) {
|
if (document.getElementById('myRef_affectation')) {
|
||||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
var divh = document.getElementById('myRef_affectation').offsetTop;
|
var divh = document.getElementById('myRef_affectation').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Get_Given_Employee_Affectation(affectation_id);
|
Get_Given_Employee_Affectation(affectation_id);
|
||||||
|
|
||||||
|
@ -1528,14 +1533,14 @@ const Employes = (props) => {
|
||||||
Get_Employee_Data(selected_id);
|
Get_Employee_Data(selected_id);
|
||||||
alert(" La mise à jour été correctement faite.");
|
alert(" La mise à jour été correctement faite.");
|
||||||
|
|
||||||
|
|
||||||
if ( document.getElementById('myRef_head')) {
|
if (document.getElementById('myRef_head')) {
|
||||||
var divh = document.getElementById('myRef_head').offsetTop;
|
var divh = document.getElementById('myRef_head').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2077,13 +2082,13 @@ const Employes = (props) => {
|
||||||
setemployee_data_edit_mode("");
|
setemployee_data_edit_mode("");
|
||||||
|
|
||||||
alert(res.data.message);
|
alert(res.data.message);
|
||||||
if ( document.getElementById('myRef_head')) {
|
if (document.getElementById('myRef_head')) {
|
||||||
var divh = document.getElementById('myRef_head').offsetTop;
|
var divh = document.getElementById('myRef_head').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2515,14 +2520,14 @@ const Employes = (props) => {
|
||||||
|
|
||||||
alert(" La mise à jour été correctement faite.");
|
alert(" La mise à jour été correctement faite.");
|
||||||
|
|
||||||
if ( document.getElementById('myRef_affectation')) {
|
if (document.getElementById('myRef_affectation')) {
|
||||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
var divh = document.getElementById('myRef_affectation').offsetTop;
|
var divh = document.getElementById('myRef_affectation').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2557,14 +2562,14 @@ const Employes = (props) => {
|
||||||
|
|
||||||
if (document.getElementById('myRef_new_affectation')) {
|
if (document.getElementById('myRef_new_affectation')) {
|
||||||
//myRef_new_affectation.current.scrollIntoView({ behavior: "smooth" });
|
//myRef_new_affectation.current.scrollIntoView({ behavior: "smooth" });
|
||||||
if ( document.getElementById('myRef_new_affectation')) {
|
if (document.getElementById('myRef_new_affectation')) {
|
||||||
//myRef.current.scrollIntoView({ behavior: "smooth" });
|
//myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
var divh = document.getElementById('myRef_new_affectation').offsetTop;
|
var divh = document.getElementById('myRef_new_affectation').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_affectation_fields();
|
clean_affectation_fields();
|
||||||
|
@ -2643,14 +2648,14 @@ const Employes = (props) => {
|
||||||
setSelectionModel_affectations([]);
|
setSelectionModel_affectations([]);
|
||||||
alert(" L'affectation a été ajoutée.");
|
alert(" L'affectation a été ajoutée.");
|
||||||
|
|
||||||
if ( document.getElementById('myRef_affectation')) {
|
if (document.getElementById('myRef_affectation')) {
|
||||||
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
// myRef.current.scrollIntoView({ behavior: "smooth" });
|
||||||
var divh = document.getElementById('myRef_affectation').offsetTop;
|
var divh = document.getElementById('myRef_affectation').offsetTop;
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: divh,
|
top: divh,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -3007,6 +3012,353 @@ const Employes = (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('tokenmysypart');
|
||||||
|
|
||||||
|
|
||||||
|
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_Stored_Downloaded_File/" + token + "/" + file_name;
|
||||||
|
|
||||||
|
|
||||||
|
axios.get(url, { responseType: 'blob', },)
|
||||||
|
.then((res) => {
|
||||||
|
fileDownload(res.data, nom_fiche_detaillee);
|
||||||
|
setDownload_one_attached_document_api("true");
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setDownload_one_attached_document_api("false");
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
setfile_1_name(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("file_size = ", 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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', fileUploaded);
|
||||||
|
//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;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
setsessions_file_change_1_result(result['message']);
|
||||||
|
setsessions_file_change_1_api("true");
|
||||||
|
//GetCurrentClass_trainingsession();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setsessions_file_change_1_message(result['message']);
|
||||||
|
setsessions_file_change_1_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setsessions_file_change_1_api("false");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
setfile_2_name(event.target.files[0]);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("file_size = ", 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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('File', fileUploaded);
|
||||||
|
//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;
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Add_Update_SessionFormation_mass/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//console.log(" ## result['status'] = ", result['status'])
|
||||||
|
if (String(result['status']) === String("true")) {
|
||||||
|
//console.log('Success:', result['message']);
|
||||||
|
setsessions_file_change_2_result(result['message']);
|
||||||
|
setsessions_file_change_2_api("true");
|
||||||
|
//GetCurrentClass_trainingsession();
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setsessions_file_change_2_message(result['message']);
|
||||||
|
setsessions_file_change_2_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
setsessions_file_change_2_api("false");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
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");
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
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", "ressource_humaine");
|
||||||
|
formData.append("object_owner_id", selected_id);
|
||||||
|
|
||||||
|
//formData.append("class_internal_url", internal_url);
|
||||||
|
//console.log("token = " + stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Store_User_Downloaded_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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();
|
||||||
|
alert(" La pièce jointe " + file_1_name.name + " a été bien enregistrée")
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setRecord_All_PJ_message(result['message']);
|
||||||
|
setRecord_All_PJ_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(' Record_All_PJ Error:', error);
|
||||||
|
setRecord_All_PJ_api("false");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_2_name && file_2_name.name) {
|
||||||
|
console.log(" ### Traitement de : ", file_2_name.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
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/";
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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'])
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setDelete_one_attached_document_message(result['message']);
|
||||||
|
setDelete_one_attached_document_api("false");
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(' Record_All_PJ Error:', error);
|
||||||
|
setDelete_one_attached_document_api("false");
|
||||||
|
alert(" Impossible de supprimer le document")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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('tokenmysypart');
|
||||||
|
|
||||||
|
formData.append("token", stored_cookie);
|
||||||
|
formData.append("object_owner_collection", "ressource_humaine");
|
||||||
|
formData.append("object_owner_id", local_employee_id);
|
||||||
|
|
||||||
|
|
||||||
|
//formData.append("class_internal_url", internal_url);
|
||||||
|
//console.log("token = " + stored_cookie);
|
||||||
|
|
||||||
|
|
||||||
|
fetch(
|
||||||
|
process.env.REACT_APP_API_URL + "myclass/api/Get_List_object_owner_collection_Stored_Files/",
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
body: formData,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((result) => {
|
||||||
|
|
||||||
|
//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) => {
|
||||||
|
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
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="employes">
|
<div className="employes">
|
||||||
<Dialog
|
<Dialog
|
||||||
|
@ -3127,7 +3479,7 @@ const Employes = (props) => {
|
||||||
margin="dense"
|
margin="dense"
|
||||||
id="new_pwd"
|
id="new_pwd"
|
||||||
name="new_pwd"
|
name="new_pwd"
|
||||||
type = "password"
|
type="password"
|
||||||
//label="Prix Unitaire"
|
//label="Prix Unitaire"
|
||||||
|
|
||||||
fullWidth
|
fullWidth
|
||||||
|
@ -3139,9 +3491,9 @@ const Employes = (props) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<nav className="show_pwd_div" onClick={handleClickShowPassword}>
|
<nav className="show_pwd_div" onClick={handleClickShowPassword}>
|
||||||
{currentpawdvisible ? <Visibility /> : <VisibilityOff />}
|
{currentpawdvisible ? <Visibility /> : <VisibilityOff />}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="session_caract_Dialog" > Confirmer Mot de passe
|
<div className="session_caract_Dialog" > Confirmer Mot de passe
|
||||||
|
@ -3150,7 +3502,7 @@ const Employes = (props) => {
|
||||||
margin="dense"
|
margin="dense"
|
||||||
id="conf_new_login"
|
id="conf_new_login"
|
||||||
name="conf_new_login"
|
name="conf_new_login"
|
||||||
type = "password"
|
type="password"
|
||||||
//label="Prix Unitaire"
|
//label="Prix Unitaire"
|
||||||
|
|
||||||
fullWidth
|
fullWidth
|
||||||
|
@ -3162,10 +3514,10 @@ const Employes = (props) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Button onClick={Generate_Pwd} className="bton_enreg_dialog" style={{"width":"100%", "margin":"0px", "background":"orange"}}>Generer un mot de passe</Button>
|
<Button onClick={Generate_Pwd} className="bton_enreg_dialog" style={{ "width": "100%", "margin": "0px", "background": "orange" }}>Generer un mot de passe</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
@ -4203,6 +4555,7 @@ const Employes = (props) => {
|
||||||
</TextField>
|
</TextField>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
<div className="div_row">
|
<div className="div_row">
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
|
@ -4239,7 +4592,145 @@ const Employes = (props) => {
|
||||||
</Button>
|
</Button>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
<div className="div_row">
|
||||||
|
<div className="div_row" style={{ "padding": "5px" }}>
|
||||||
|
|
||||||
|
Liste des pièces jointes <br />
|
||||||
|
|
||||||
|
<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 className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -608,6 +608,12 @@
|
||||||
margin-top: 10rem;
|
margin-top: 10rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 100%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
||||||
|
@ -1163,6 +1169,12 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 50%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
||||||
|
@ -1619,6 +1631,13 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 30%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1200px) {
|
@media only screen and (min-width: 1200px) {
|
||||||
|
@ -2169,6 +2188,12 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 30%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// end media
|
// end media
|
||||||
|
|
|
@ -613,6 +613,12 @@
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
padding-top: 0.5rem !important;
|
padding-top: 0.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 100%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
||||||
|
@ -1190,6 +1196,12 @@
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
padding-top: 0.5rem !important;
|
padding-top: 0.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 50%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1658,6 +1670,12 @@
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 30%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1200px) {
|
@media only screen and (min-width: 1200px) {
|
||||||
|
@ -2198,6 +2216,12 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 30%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// end media
|
// end media
|
||||||
|
|
|
@ -583,6 +583,13 @@
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
padding-top: 0.5rem !important;
|
padding-top: 0.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 100%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
@media only screen and (min-width: 601px) and (max-width: 991px) {
|
||||||
|
@ -1160,7 +1167,13 @@
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
padding-top: 0.5rem !important;
|
padding-top: 0.5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 50%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
||||||
|
@ -1628,6 +1641,13 @@
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 30%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1200px) {
|
@media only screen and (min-width: 1200px) {
|
||||||
|
@ -2166,6 +2186,12 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.div_row_list_pj{
|
||||||
|
width: 30%;
|
||||||
|
border-left: 3mm ridge rgba(211, 220, 50, .6);
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// end media
|
// end media
|
||||||
|
|
Loading…
Reference in New Issue