23/11/25 - 21h30
parent
89258f2e4a
commit
8f2763d939
|
|
@ -22,7 +22,7 @@ import { useLocation } from "react-router-dom";
|
|||
import { FaHandPointRight } from "react-icons/fa";
|
||||
import Intranet_Factures_Client from "./Intranet_Factures_Client";
|
||||
import Intranet_Tous_Documents from "./Intranet_Tous_Documents";
|
||||
import Modules_Mes_Documents from "./Modules_Mes_Documents_old";
|
||||
import Modules_Mes_Documents from "./Modules_Mes_Documents";
|
||||
import Intranet_Mes_Stagiaires from "./Intranet_Mes_Stagiaires";
|
||||
|
||||
function Account() {
|
||||
|
|
@ -109,7 +109,7 @@ function Account() {
|
|||
//console.log(" getImage: res.data.message.img = " + res.data.message);
|
||||
if (res.data.message.img.length > 0) {
|
||||
setisimage("True");
|
||||
}
|
||||
}
|
||||
else {
|
||||
setisimage("False");
|
||||
}
|
||||
|
|
@ -442,7 +442,7 @@ function Account() {
|
|||
</div>}
|
||||
|
||||
{/** Menu pour un utilisateur NON type 'user' exemple un apprenant */}
|
||||
{connected_user_data && connected_user_data.type &&
|
||||
{/*connected_user_data && connected_user_data.type &&
|
||||
String(connected_user_data.type) !== "student" &&
|
||||
<div>
|
||||
<div className="sousmenu" onClick={displayPersoInfo}> INFORMATIONS PERSONNELLES</div>
|
||||
|
|
@ -455,9 +455,8 @@ function Account() {
|
|||
<hr className="my_hr" />
|
||||
<div className="sousmenu" onClick={displayProfil_Facture}> MES FACTURES</div>
|
||||
<hr className="my_hr" />
|
||||
{/* <div className="sousmenu" onClick={deletemyaccount}> SUPPRIMER MON COMPTE</div>
|
||||
<hr className="my_hr" />*/}
|
||||
</div>}
|
||||
|
||||
</div>*/}
|
||||
|
||||
</div>
|
||||
<div className="div_droite" style={{ border: 'none' }}>
|
||||
|
|
@ -494,11 +493,6 @@ function Account() {
|
|||
filter_all_document={"0"}
|
||||
/>}
|
||||
|
||||
{/*String(menu) === String("tout_documents") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
connected_user_data.partner_client_id &&
|
||||
<Intranet_Tous_Documents partner_client_id={connected_user_data.partner_client_id}
|
||||
partner_owner_recid={connected_user_data.partner_owner_recid}
|
||||
/>*/}
|
||||
|
||||
|
||||
{String(menu) === String("modules_mes_documents") && connected_user_data && connected_user_data.partner_owner_recid &&
|
||||
|
|
|
|||
|
|
@ -10579,7 +10579,7 @@ const AddClassManual = (props) => {
|
|||
</nav>}
|
||||
|
||||
{String(selected_statistic_question_type) === "Moyenne" &&
|
||||
<nav>
|
||||
<nav style={{marginBottom:"1rem"}}>
|
||||
Somme totale d'enquêtes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_somme_question_response']} <br />
|
||||
Moyenne Globale sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_moyenne_question_response']} <br />
|
||||
</nav>}
|
||||
|
|
|
|||
|
|
@ -5402,7 +5402,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
|
||||
<div className="div_row">
|
||||
<div className="div_row" style={{ "padding": "5px" }}>
|
||||
<div className="div_row" style={{ "padding": "5px", textAlign: 'center', marginTop: '1rem' }}>
|
||||
|
||||
{String(props.check_user_acces_right("client", "write")) === "1" && <div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload-photo">
|
||||
|
|
@ -5473,7 +5473,7 @@ const AddParnerClient = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
{/*Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
<div className="div_row">
|
||||
<b> Liste des pièces jointes </b> <br />
|
||||
<div className="div_row">
|
||||
|
|
@ -5538,12 +5538,8 @@ const AddParnerClient = (props) => {
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
</div>*/}
|
||||
</div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<Modules_Mes_Documents
|
||||
|
|
@ -5552,7 +5548,8 @@ const AddParnerClient = (props) => {
|
|||
type_user_connected={"partner_account"}
|
||||
my_title={"Gestion Documentaire"}
|
||||
object_owner_collection={"partner_client"}
|
||||
object_owner_id={props.client_id}
|
||||
object_owner_id={props.client_id}
|
||||
authorize_deletion={"1"}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import 'react-tooltip/dist/react-tooltip.css'
|
|||
import { Tooltip } from 'react-tooltip'
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import excel_icone from "../mysy_img/excel_icone.png";
|
||||
|
||||
import Modules_Mes_Documents from "./Modules_Mes_Documents";
|
||||
import fileDownload from 'js-file-download'
|
||||
import { FcInfo } from "react-icons/fc";
|
||||
import Popup from 'reactjs-popup';
|
||||
|
|
@ -105,7 +105,7 @@ const useStyles = makeStyles((theme) => ({
|
|||
}));
|
||||
|
||||
const Apprenant = (props) => {
|
||||
registerLocale('fr', fr);
|
||||
registerLocale('fr', fr);
|
||||
const classes = useStyles();
|
||||
|
||||
const history = useHistory();
|
||||
|
|
@ -3095,7 +3095,7 @@ registerLocale('fr', fr);
|
|||
setalert_message("Vous devez préciser le sujet du suivi ");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
|
@ -5861,7 +5861,7 @@ registerLocale('fr', fr);
|
|||
// Hide the export menu after the export
|
||||
hideMenu?.();
|
||||
}}
|
||||
>
|
||||
>
|
||||
Export Excel
|
||||
</MenuItem>
|
||||
);
|
||||
|
|
@ -9826,7 +9826,6 @@ registerLocale('fr', fr);
|
|||
trigger={
|
||||
<nav style={{ "color": "red", "cursor": "pointer" }} > Supprimer</nav>
|
||||
|
||||
|
||||
}
|
||||
modal
|
||||
nested
|
||||
|
|
@ -9879,6 +9878,14 @@ registerLocale('fr', fr);
|
|||
</div>}
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,24 @@
|
|||
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 TextareaAutosize from '@mui/material/TextareaAutosize';
|
||||
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 { FcViewDetails, FcDisapprove } from "react-icons/fc";
|
||||
|
||||
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 Autocomplete from '@mui/material/Autocomplete';
|
||||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||
|
||||
import fr from 'date-fns/locale/fr';
|
||||
import { registerLocale } from 'react-datepicker';
|
||||
import DatePicker from "react-datepicker";
|
||||
|
|
@ -32,8 +28,7 @@ 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 } 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';
|
||||
|
|
@ -41,11 +36,9 @@ 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 { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
|
||||
import FileCopyIcon from '@mui/icons-material/FileCopy';
|
||||
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
|
||||
|
|
@ -101,7 +94,7 @@ const useStyles = makeStyles((theme) => ({
|
|||
}));
|
||||
|
||||
const CRM_Opportunite = (props) => {
|
||||
registerLocale('fr', fr);
|
||||
registerLocale('fr', fr);
|
||||
const classes_dialog = useStyles();
|
||||
|
||||
const history = useHistory();
|
||||
|
|
@ -1667,7 +1660,7 @@ registerLocale('fr', fr);
|
|||
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily:'DM Sans'}} id="draggable-dialog-title"> MySy Information</DialogTitle>
|
||||
<DialogTitle style={{ cursor: 'move', background: '#fff', fontFamily: 'DM Sans' }} id="draggable-dialog-title"> MySy Information</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
|
|
@ -1711,7 +1704,7 @@ registerLocale('fr', fr);
|
|||
aria-labelledby="draggable-dialog-title"
|
||||
>
|
||||
|
||||
<DialogTitle style={{ cursor: 'move', fontFamily:"DM Sans"}} id="draggable-dialog-title" >MySy Information</DialogTitle>
|
||||
<DialogTitle style={{ cursor: 'move', fontFamily: "DM Sans" }} id="draggable-dialog-title" >MySy Information</DialogTitle>
|
||||
<DialogContent className="DialogContent_width" style={{ "minHeight": "30rem" }}>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
|
|
@ -1732,7 +1725,7 @@ registerLocale('fr', fr);
|
|||
}}><AddCircleIcon style={{ fontSize: "15px", }} /> Devis </Button>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Titre<br />
|
||||
<div className="session_caract_Dialog" style={{ marginBottom:'5px'}}> Titre<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
|
|
@ -1750,14 +1743,18 @@ registerLocale('fr', fr);
|
|||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Description<br />
|
||||
<TextField
|
||||
<div className="session_caract_Dialog" style={{ marginBottom:'5px'}}> Description<br />
|
||||
<TextareaAutosize
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_desc"
|
||||
id="dialog_opport_desc"
|
||||
className="disabled_style"
|
||||
id="dialog_opport_desc"
|
||||
|
||||
style={{
|
||||
border: "1px solid gainsboro", width: '99%', padding: '2px',
|
||||
maxHeight: '7rem', height: '7rem', minHeight: '7rem', marginBottom: '3rem'
|
||||
}}
|
||||
value={p_detail_description}
|
||||
onChange={(e) => {
|
||||
setp_detail_description(e.target.value);
|
||||
|
|
@ -1767,7 +1764,7 @@ registerLocale('fr', fr);
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Client
|
||||
<div className="session_caract_Dialog" style={{ marginBottom:'5px'}}> Client
|
||||
{New_Get_List_Partner_Clients_result && New_Get_List_Partner_Clients_result.length > 0 &&
|
||||
|
||||
<Autocomplete
|
||||
|
|
@ -1807,129 +1804,159 @@ registerLocale('fr', fr);
|
|||
|
||||
|
||||
{String(p_detail_partner_client_id).length < 2 &&
|
||||
<div className="session_caract_Dialog" > Civilité
|
||||
<div className="session_caract_Dialog" style={{ width: "95%", marginBottom:'5px'}}>
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
className="disabled_style"
|
||||
options={New_Option_Civilite}
|
||||
value={New_Option_Civilite.filter((data) => (data).value === String(p_detail_contact_civilite))[0].label}
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "left", textAlign: "left" , marginBottom:'5px'}}> Civilité
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_detail_contact_civilite(value.value);
|
||||
setopport_changed("1");
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
className="disabled_style"
|
||||
options={New_Option_Civilite}
|
||||
value={New_Option_Civilite.filter((data) => (data).value === String(p_detail_contact_civilite))[0].label}
|
||||
|
||||
} else {
|
||||
setp_detail_contact_civilite("");
|
||||
setopport_changed("1");
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_detail_contact_civilite(value.value);
|
||||
setopport_changed("1");
|
||||
|
||||
} else {
|
||||
setp_detail_contact_civilite("");
|
||||
setopport_changed("1");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "right", marginBottom:'5px'}}> Nom Contact
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
{String(p_detail_partner_client_id).length < 2 &&
|
||||
<div className="session_caract_Dialog" > Nom Contact
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
className="disabled_style"
|
||||
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_contact_nom}
|
||||
onChange={(e) => {
|
||||
setp_detail_contact_nom(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(p_detail_partner_client_id).length < 2 &&
|
||||
<div className="session_caract_Dialog" > Email Contact
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_contact_email}
|
||||
onChange={(e) => {
|
||||
setp_detail_contact_email(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
{String(p_detail_partner_client_id).length < 2 &&
|
||||
<div className="session_caract_Dialog" > Téléphone Contact
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_contact_telephone}
|
||||
onChange={(e) => {
|
||||
setp_detail_contact_telephone(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Statut<br />
|
||||
{New_Option_Status && New_Option_Status.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_status"
|
||||
id="dialog_opport_status"
|
||||
className="disabled_style"
|
||||
value={New_Option_Status.filter((data) => (data)._id === String(p_detail_statut_id))[0].label}
|
||||
options={New_Option_Status}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_detail_statut(value.value);
|
||||
setp_detail_statut_id(value._id);
|
||||
setopport_changed("1");
|
||||
} else {
|
||||
setp_detail_statut("");
|
||||
setp_detail_statut_id("")
|
||||
value={p_detail_contact_nom}
|
||||
onChange={(e) => {
|
||||
setp_detail_contact_nom(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
{String(p_detail_partner_client_id).length < 2 &&
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "95%", marginBottom:'5px'}}>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "left", textAlign: "left", marginBottom:'5px' }}> Email Contact
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_contact_email}
|
||||
onChange={(e) => {
|
||||
setp_detail_contact_email(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "right", marginBottom:'5px'}}> Téléphone Contact
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_nom_contact"
|
||||
id="dialog_opport_nom_contact"
|
||||
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_contact_telephone}
|
||||
onChange={(e) => {
|
||||
setp_detail_contact_telephone(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "95%", marginBottom:'5px'}}>
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "left", textAlign: "left", marginBottom:'5px' }}> Statut<br />
|
||||
{New_Option_Status && New_Option_Status.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_status"
|
||||
id="dialog_opport_status"
|
||||
className="disabled_style"
|
||||
value={New_Option_Status.filter((data) => (data)._id === String(p_detail_statut_id))[0].label}
|
||||
options={New_Option_Status}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_detail_statut(value.value);
|
||||
setp_detail_statut_id(value._id);
|
||||
setopport_changed("1");
|
||||
} else {
|
||||
setp_detail_statut("");
|
||||
setp_detail_statut_id("")
|
||||
setopport_changed("1");
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "right", marginBottom:'5px' }}> Probabilité de Gain<br />
|
||||
|
||||
{New_Option_Proba_Gain && <Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_proba_gain"
|
||||
id="dialog_opport_proba_gain"
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
|
||||
className="disabled_style"
|
||||
options={New_Option_Proba_Gain}
|
||||
value={New_Option_Proba_Gain.filter((data) => (data).value === String(p_detail_probabilite_gain))[0].label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_detail_probabilite_gain(value.value);
|
||||
} else {
|
||||
setp_detail_probabilite_gain("");
|
||||
}
|
||||
setopport_changed("1");
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
|
|
@ -1938,159 +1965,105 @@ registerLocale('fr', fr);
|
|||
/>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "95%", marginBottom:'5px'}}>
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "left", textAlign: "left", marginBottom:'5px' }}> Montant Gain (estimé)
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
<div className="session_caract_Dialog" > Probabilité de Gain<br />
|
||||
name="dialog_opport_montant"
|
||||
id="dialog_opport_montant"
|
||||
type="number"
|
||||
step="any"
|
||||
className="disabled_style"
|
||||
|
||||
{New_Option_Proba_Gain && <Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_proba_gain"
|
||||
id="dialog_opport_proba_gain"
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 } }}
|
||||
className="disabled_style"
|
||||
options={New_Option_Proba_Gain}
|
||||
value={New_Option_Proba_Gain.filter((data) => (data).value === String(p_detail_probabilite_gain))[0].label}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setp_detail_probabilite_gain(value.value);
|
||||
} else {
|
||||
setp_detail_probabilite_gain("");
|
||||
value={p_detail_revenu_cible}
|
||||
onChange={(e) => {
|
||||
setp_detail_revenu_cible(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
setopport_changed("1");
|
||||
}}
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "right", marginBottom:'5px'}}> Priorité <br />
|
||||
<nav style={{ paddingTop: '1rem' }}>
|
||||
<Rating
|
||||
name="dialog_opport_prio"
|
||||
id="dialog_opport_prio"
|
||||
|
||||
|
||||
precision={0.5}
|
||||
value={parseInt(String(p_detail_priorite))}
|
||||
onChange={(event, newValue) => {
|
||||
setp_detail_priorite(newValue);
|
||||
}} />
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="session_caract_Dialog" style={{ width: "95%", marginBottom:'5px'}}>
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "left", textAlign: "left", marginBottom:'5px' }}> Date Fermeture <br />
|
||||
<DatePicker
|
||||
name="dialog_opport_date_fermeture"
|
||||
id="dialog_opport_date_fermeture"
|
||||
|
||||
selected={new Date(moment(p_detail_date_fermeture, "DD/MM/YYYY"))}
|
||||
onChange={(date) => {
|
||||
setp_detail_date_fermeture(format(date, 'd/MM/yyyy'));
|
||||
setopport_changed("1");
|
||||
|
||||
}
|
||||
}
|
||||
showTimeSelect={false}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style"
|
||||
|
||||
locale={'fr'}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" style={{ width: "45%", float: "right", marginBottom:'5px'}}> Vendeur <br />
|
||||
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_vendeur"
|
||||
id="dialog_opport_vendeur"
|
||||
className="disabled_style"
|
||||
options={New_Getall_Training_Employee_No_Filter_result}
|
||||
value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === p_detail_vendeur_id)[0].label || ""}
|
||||
|
||||
|
||||
</div>
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_detail_vendeur_id(value._id);
|
||||
setopport_changed("1");
|
||||
} else {
|
||||
setp_detail_vendeur_id("");
|
||||
setopport_changed("1");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
<div className="session_caract_Dialog" > Montant Gain (estimé)
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_montant"
|
||||
id="dialog_opport_montant"
|
||||
type="number"
|
||||
step="any"
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_revenu_cible}
|
||||
onChange={(e) => {
|
||||
setp_detail_revenu_cible(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Priorité <br />
|
||||
<nav style={{ "float": "right", "width": "80%", "marginRight": "10%", "textAlign": "right" }}>
|
||||
<Rating
|
||||
name="dialog_opport_prio"
|
||||
id="dialog_opport_prio"
|
||||
|
||||
|
||||
precision={0.5}
|
||||
value={parseInt(String(p_detail_priorite))}
|
||||
onChange={(event, newValue) => {
|
||||
setp_detail_priorite(newValue);
|
||||
}} />
|
||||
</nav>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Date Fermeture <br />
|
||||
<DatePicker
|
||||
name="dialog_opport_date_fermeture"
|
||||
id="dialog_opport_date_fermeture"
|
||||
|
||||
selected={new Date(moment(p_detail_date_fermeture, "DD/MM/YYYY"))}
|
||||
onChange={(date) => {
|
||||
setp_detail_date_fermeture(format(date, 'd/MM/yyyy'));
|
||||
setopport_changed("1");
|
||||
|
||||
}
|
||||
}
|
||||
showTimeSelect={false}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style"
|
||||
|
||||
locale={'fr'}
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Commentaire
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="dialog_opport_comment"
|
||||
id="dialog_opport_comment"
|
||||
multiline
|
||||
rows={2}
|
||||
className="disabled_style"
|
||||
|
||||
value={p_detail_commentaire}
|
||||
onChange={(e) => {
|
||||
setp_detail_commentaire(e.target.value);
|
||||
setopport_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Vendeur <br />
|
||||
|
||||
|
||||
{New_Getall_Training_Employee_No_Filter_result && New_Getall_Training_Employee_No_Filter_result.length > 0 &&
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="dialog_opport_vendeur"
|
||||
id="dialog_opport_vendeur"
|
||||
className="disabled_style"
|
||||
options={New_Getall_Training_Employee_No_Filter_result}
|
||||
value={New_Getall_Training_Employee_No_Filter_result.filter((data) => (data)._id === p_detail_vendeur_id)[0].label || ""}
|
||||
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setp_detail_vendeur_id(value._id);
|
||||
setopport_changed("1");
|
||||
} else {
|
||||
setp_detail_vendeur_id("");
|
||||
setopport_changed("1");
|
||||
/>
|
||||
}
|
||||
}}
|
||||
/>}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
|
|
@ -2151,7 +2124,7 @@ registerLocale('fr', fr);
|
|||
{/* FIN Dialog pour gerer une OPPORTUNITE */}
|
||||
|
||||
|
||||
<h3 style={{ fontFamily:'DM Sans' }}> Mes Opportunités </h3>
|
||||
<h3 style={{ fontFamily: 'DM Sans' }}> Mes Opportunités </h3>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
|
|
|
|||
|
|
@ -808,8 +808,10 @@ const DisplayPartnerSession = (props) => {
|
|||
field: 'comment_or_memo', headerName: 'Memo & Comment.', Width: 50, hide: false, editable: false,
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", cursor: "pointer",
|
||||
textAlign:'center',width:'100%' }} onClick={(event) => {
|
||||
<div style={{
|
||||
paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", cursor: "pointer",
|
||||
textAlign: 'center', width: '100%'
|
||||
}} onClick={(event) => {
|
||||
|
||||
setp_detail_inscription_comment(cellValues.row.comment);
|
||||
setp_detail_inscription_memo(cellValues.row.memo);
|
||||
|
|
@ -1377,9 +1379,10 @@ const DisplayPartnerSession = (props) => {
|
|||
field: 'comment_or_memo', headerName: 'Memo & Comment.', Width: 50, hide: false, editable: false,
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", cursor: "pointer", textAlign:'center',
|
||||
width:'100%'
|
||||
}} onClick={(event) => {
|
||||
<div style={{
|
||||
paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", cursor: "pointer", textAlign: 'center',
|
||||
width: '100%'
|
||||
}} onClick={(event) => {
|
||||
|
||||
setp_detail_inscription_comment(cellValues.row.comment);
|
||||
setp_detail_inscription_memo(cellValues.row.memo);
|
||||
|
|
@ -2289,7 +2292,7 @@ const DisplayPartnerSession = (props) => {
|
|||
var timeline_grp = [];
|
||||
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
|
|
@ -12607,7 +12610,7 @@ const DisplayPartnerSession = (props) => {
|
|||
setLoading(false);
|
||||
console.warn('Not good man :( Get_Class_Default_Document_id = ', error);
|
||||
setGet_Class_Default_Document_id_api("false");
|
||||
// alert("Impossible de récupérer le document par défaut");
|
||||
// alert("Impossible de récupérer le document par défaut");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
|
@ -12773,10 +12776,21 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
if (String(selected_convention_id).trim() === "") {
|
||||
alert(" Vous devez choisir un document");
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir un document.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
var tab_my_inscription_ids = []
|
||||
for (var i = 0; i < selectionModel_insc.length; i++) {
|
||||
|
||||
var local_id = parseInt(selectionModel_insc[i]);
|
||||
var myid = JSON.parse(String(rowss_insc[local_id]));
|
||||
tab_my_inscription_ids.push(myid['_id']);
|
||||
}
|
||||
|
||||
form.append("class_internal_url", selected_internal_url);
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
|
@ -12784,6 +12798,7 @@ const DisplayPartnerSession = (props) => {
|
|||
form.append("courrier_template_id", selected_convention_id);
|
||||
form.append("email_test", selected_convention_email_test);
|
||||
form.append("email_production", "");
|
||||
form.append("tab_ids", tab_my_inscription_ids);
|
||||
|
||||
// pièce jointe
|
||||
form.append("file_business_object", "");
|
||||
|
|
@ -12795,14 +12810,17 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
//form.append("File", list_files);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Convention_From_Session_By_Email/";
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Test_Prepare_and_Send_Convention_From_Session_By_Email/";
|
||||
|
||||
if (String(selected_convention_id) === "default_mail") {
|
||||
// Il s'agit d'envoyer les convention par defaut de type mail
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convention_From_Session_By_Email/";
|
||||
}
|
||||
|
||||
|
||||
const response = window.confirm(" Email de test : Cette convention sera envoyée uniquement à " + String(selected_convention_email_test) + " . Continuer ?");
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
fetch(
|
||||
myurl,
|
||||
|
|
@ -12847,6 +12865,109 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
|
||||
const [Send_Stagiaire_Convocation_By_Email_Test_api, setSend_Stagiaire_Convocation_By_Email_Test_api] = useState();
|
||||
const [Send_Stagiaire_Convocation_By_Email_Test_message, setSend_Stagiaire_Convocation_By_Email_Test_message] = useState();
|
||||
const [Send_Stagiaire_Convocation_By_Email_Test_result, setSend_Stagiaire_Convocation_By_Email_Test_result] = useState();
|
||||
function Send_Stagiaire_Convocation_By_Email_Test(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
if (String(selected_convocation_id).trim() === "") {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("Vous devez choisir un document.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
|
||||
var tab_my_inscription_ids = []
|
||||
for (var i = 0; i < selectionModel_insc.length; i++) {
|
||||
|
||||
var local_id = parseInt(selectionModel_insc[i]);
|
||||
var myid = JSON.parse(String(rowss_insc[local_id]));
|
||||
tab_my_inscription_ids.push(myid['_id']);
|
||||
}
|
||||
|
||||
|
||||
form.append("class_internal_url", selected_internal_url);
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("courrier_template_id", selected_convocation_id);
|
||||
form.append("email_test", selected_convention_email_test);
|
||||
form.append("email_production", "");
|
||||
form.append("tab_ids", tab_my_inscription_ids);
|
||||
|
||||
|
||||
// pièce jointe
|
||||
form.append("file_business_object", "");
|
||||
var list_files = new FormData();
|
||||
|
||||
for (let i = 0; i < tab_convention_pieces_jointes_result.length; i++) {
|
||||
form.append('File', tab_convention_pieces_jointes_result[i]);
|
||||
|
||||
}
|
||||
//form.append("File", list_files);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Test_Prepare_and_Send_Convocation_From_Session_By_Email/";
|
||||
|
||||
if (String(selected_convention_id) === "default_mail") {
|
||||
// Il s'agit d'envoyer les convention par defaut de type mail
|
||||
myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Default_Convocation_From_Session_By_Email/";
|
||||
}
|
||||
|
||||
|
||||
|
||||
const response = window.confirm(" Email de test : Cette convocation sera envoyée uniquement à " + String(selected_convention_email_test) + " . Continuer ?");
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
setLoading(true);
|
||||
fetch(
|
||||
myurl,
|
||||
{
|
||||
method: 'POST',
|
||||
body: form,
|
||||
}
|
||||
)
|
||||
.then((response) => response.json())
|
||||
.then((result) => {
|
||||
|
||||
// console.log(" In Send_Stagiaire_Convocation_By_Email_Test res.data.status = " + result['status']);
|
||||
//console.log(" In Send_Stagiaire_Convocation_By_Email_Test res.data.message r_class = " + result['message']);
|
||||
if (String(result['status']) === String("true")) {
|
||||
setLoading(false);
|
||||
setSend_Stagiaire_Convocation_By_Email_Test_api("true");
|
||||
setSend_Stagiaire_Convocation_By_Email_Test_result(result['message']);
|
||||
|
||||
// alert(result['message']);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("success");
|
||||
Dialog_convention_handleClose_buton()
|
||||
|
||||
}
|
||||
else {
|
||||
setLoading(false);
|
||||
setSend_Stagiaire_Convocation_By_Email_Test_api("false");
|
||||
setSend_Stagiaire_Convocation_By_Email_Test_message(result['message']);
|
||||
// alert(result['message']);
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Send_Stagiaire_Convocation_By_Email_Test = ', error);
|
||||
setSend_Stagiaire_Convocation_By_Email_Test_api("false");
|
||||
alert("Impossible d'envoyer l'email de test ");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [Get_Stagiaire_List_Email_Com_api, setGet_Stagiaire_List_Email_Com_api] = useState();
|
||||
|
|
@ -14839,7 +14960,6 @@ const DisplayPartnerSession = (props) => {
|
|||
form.append("tab_ids", tab_my_inscription_ids);
|
||||
|
||||
|
||||
console.log(" ### form = ", form);
|
||||
|
||||
// pièce jointe
|
||||
form.append("file_business_object", "");
|
||||
|
|
@ -17220,36 +17340,55 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{String(selected_convention_type) === "email" && <div className="session_caract_Dialog" > Type Document<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, width: '75%' }}
|
||||
{String(selected_convention_type) === "email" &&
|
||||
<div className="session_caract_Dialog" >
|
||||
|
||||
name="event_dialog_type_convention"
|
||||
id="event_dialog_type_convention"
|
||||
<Tooltip className="tooltip_css" id="test01" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="test01" data-tooltip-html="Pour recevoir une email de test avant de l'envoyer">
|
||||
<nav style={{ width: '100%', 'float': 'left' }}> Adresse email de test <FcInfo /> </nav>
|
||||
|
||||
value="email"
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, width: '75%' }}
|
||||
|
||||
/>
|
||||
name="event_dialog_email_test_convention"
|
||||
id="event_dialog_email_test_convention"
|
||||
|
||||
fullWidth
|
||||
|
||||
value={selected_convention_email_test}
|
||||
onChange={(e) => {
|
||||
setselected_convention_email_test(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
</a>
|
||||
|
||||
|
||||
{String(selected_convention_type) === "email" && <label className="bton_image_class" style={{ "width": "20%", "float": "right", "height": "3.5rem", "paddingTop": "15px" }} onClick={(e) => {
|
||||
{String(selected_convention_type) === "email" && <label className="bton_image_class" style={{ "width": "20%", "float": "right", "height": "3rem", "paddingTop": "15px" }} onClick={(e) => {
|
||||
|
||||
if (selected_convention_email_test) {
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!selected_convention_email_test.match(validRegex)) {
|
||||
alert("L'adresse email de test est invalide.");
|
||||
return;
|
||||
if (selected_convention_email_test) {
|
||||
var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
|
||||
if (!selected_convention_email_test.match(validRegex)) {
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("L'adresse email de test est invalide.");
|
||||
setalert_type("error");
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
Send_Stagiaire_Convocation_By_Email_Test();
|
||||
|
||||
} else {
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message("L'adresse email de test est invalide.");
|
||||
setalert_type("error");
|
||||
}
|
||||
Send_Stagiaire_Conventions_By_Email_Test();
|
||||
} else {
|
||||
alert("L'adresse email de test est invalide.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}} > <FcSearch /> Test</label>}
|
||||
}} > <FcSearch /> Test</label>}
|
||||
|
||||
</div>}
|
||||
</div>}
|
||||
|
||||
{String(selected_convention_type) === "pdf" && <div className="session_caract_Dialog" > Type Document<br />
|
||||
<TextField
|
||||
|
|
@ -17267,7 +17406,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
{String(selected_convention_type) === "email" && <div className="session_caract_Dialog" >
|
||||
{/*String(selected_convention_type) === "email" && <div className="session_caract_Dialog" >
|
||||
<Tooltip className="tooltip_css" id="test01" style={{ "fontSize": "12px" }} />
|
||||
<a data-tooltip-id="test01" data-tooltip-html="Pour recevoir une email de test avant de l'envoyer">
|
||||
Adresse email de test <FcInfo /> <TextField
|
||||
|
|
@ -17287,7 +17426,7 @@ const DisplayPartnerSession = (props) => {
|
|||
</a>
|
||||
|
||||
</div>
|
||||
}
|
||||
*/}
|
||||
|
||||
|
||||
|
||||
|
|
@ -20435,7 +20574,7 @@ const DisplayPartnerSession = (props) => {
|
|||
{/** Affichage Timeline */}
|
||||
|
||||
{/*** Fin affichage timeline */}
|
||||
|
||||
|
||||
|
||||
{(!display_session_with_alert || display_session_with_alert !== true) && <div className="div_row" style={{ "border": "None" }}>
|
||||
<div className='block_groupe_class'>
|
||||
|
|
@ -28187,7 +28326,7 @@ const DisplayPartnerSession = (props) => {
|
|||
{String(submenu) === String("attestation") && <div style={{ "border": "None" }}>
|
||||
|
||||
<Module_Attestation_Formation conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
|
||||
related_collection_recid={selected_session_id} class_id={session_selected_class_id}/>
|
||||
related_collection_recid={selected_session_id} class_id={session_selected_class_id} />
|
||||
|
||||
</div>}
|
||||
|
||||
|
|
|
|||
|
|
@ -6909,7 +6909,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
const New_Option_Filter = [
|
||||
{ "id": "email", "label": "Email ", "value": "email" },
|
||||
{ "id": "nom", "label": "Nom ", "value": "nom" },
|
||||
{ "id": "code_session", "label": "Code Promo", "value": "code_session" },
|
||||
{ "id": "code_session", "label": "Code Session/Promo", "value": "code_session" },
|
||||
{ "id": "class_title", "label": "Titre Formation", "value": "class_title" },
|
||||
{ "id": "client_nom", "label": "Lié au Client (nom client) ", "value": "client_nom" },
|
||||
{ "id": "archive", "label": "Archive", "value": "archive" },
|
||||
|
|
@ -7641,8 +7641,6 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
|
@ -12141,12 +12139,8 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
<hr className="hr_break" />
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None", "fontSize": "22px", "fontWeight": "600", "padding": "5px" }}>
|
||||
Pièces jointes
|
||||
|
||||
</div>
|
||||
|
||||
{String(props.check_user_acces_right("stagiaire", "write")) === "1" && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
{String(props.check_user_acces_right("stagiaire", "write")) === "1" && <div className="div_row" style={{ "padding": "5px", textAlign: 'center', marginTop: '1rem' }}>
|
||||
|
||||
<div style={{ "fontSize": "12px" }}>
|
||||
<label htmlFor="upload-photo">
|
||||
|
|
@ -12215,7 +12209,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
{/*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">
|
||||
|
|
@ -12276,9 +12270,9 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
</div>*/}
|
||||
|
||||
|
||||
------------------
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<Modules_Mes_Documents
|
||||
partner_client_id={selected_id}
|
||||
|
|
@ -12287,6 +12281,7 @@ const DisplayPartnerStagiaires = (props) => {
|
|||
my_title={"Gestion Documentaire"}
|
||||
object_owner_collection={"inscription"}
|
||||
object_owner_id={selected_id}
|
||||
authorize_deletion={"1"}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2970,7 +2970,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
|
||||
<hr />
|
||||
<div onClick={closeTrainingForm} className="parter_div_filtrer_center">
|
||||
<div onClick={closeTrainingForm} className="parter_div_filtrer_center" style={{marginBottom:'3rem'}}>
|
||||
<AiFillCloseCircle alt="Fermer detail formation" />FERMER
|
||||
</div>
|
||||
|
||||
|
|
@ -2989,7 +2989,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
<hr />
|
||||
|
||||
<div onClick={Closecreatetraining} className="parter_div_filtrer_center">
|
||||
<div onClick={Closecreatetraining} className="parter_div_filtrer_center" style={{marginBottom:'3rem'}}>
|
||||
<AiFillCloseCircle alt="Fermer detail formation" />FERMER
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useRef, useState, useMemo, useEffect } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import axios from "axios";
|
||||
import axios from "axios";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { getCookie, } from 'react-use-cookie';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
|
|
|||
|
|
@ -831,6 +831,20 @@ const Module_Editique = (props) => {
|
|||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node2 = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"ref_interne": "",
|
||||
"nom": "",
|
||||
"sujet": "",
|
||||
"type_doc": "",
|
||||
"cible": "",
|
||||
"joint_pdf": "",
|
||||
|
||||
};
|
||||
new_data2.push(node2);
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Get_List_Stagiaire_Convocations_result(new_data2);
|
||||
|
||||
|
|
@ -2422,7 +2436,7 @@ const Module_Editique = (props) => {
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{(String(selected_convention_type) === "email" || String(selected_convention_type) === "pdf") &&
|
||||
New_Get_List_Stagiaire_Convocations_result.length > 0 &&
|
||||
<div className="session_caract_Dialog" ><b>Choisir une convocation </b>
|
||||
|
|
@ -2437,7 +2451,7 @@ const Module_Editique = (props) => {
|
|||
|
||||
onChange={(event, value) => {
|
||||
if (value && value._id) {
|
||||
setselected_convocation_id(value._id);
|
||||
setselected_convocation_id(value._id);
|
||||
|
||||
if (String(value._id) === "default_mail") {
|
||||
setselected_convention_type("email");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
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";
|
||||
|
|
@ -8,70 +8,35 @@ import { getCookie, setCookie } from 'react-use-cookie';
|
|||
import { useHistory } from "react-router-dom";
|
||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
import { Editor } from '@tinymce/tinymce-react';
|
||||
import { FcViewDetails, FcDisapprove } from "react-icons/fc";
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import excel_icone from "../mysy_img/excel_icone.png";
|
||||
|
||||
import fileDownload from 'js-file-download'
|
||||
import { FcInfo } from "react-icons/fc";
|
||||
import Popup from 'reactjs-popup';
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
|
||||
import { FcAcceptDatabase, } from "react-icons/fc";
|
||||
import { format } from 'date-fns'
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import { AiFillCloseCircle, AiOutlineConsoleSql } from "react-icons/ai";
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
|
||||
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 img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||
import { AiTwotoneSave } from "react-icons/ai";
|
||||
import { FcEditImage } from "react-icons/fc";
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
|
||||
import { FcSpeaker } from "react-icons/fc";
|
||||
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import { FcOpenedFolder } from "react-icons/fc";
|
||||
import Module_Absence from "./Module_Absence";
|
||||
import { RiMoreFill } from "react-icons/ri";
|
||||
|
||||
import fr from 'date-fns/locale/fr';
|
||||
import { registerLocale } from 'react-datepicker';
|
||||
import DatePicker from "react-datepicker";
|
||||
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import moment from "moment";
|
||||
import 'moment/locale/fr';
|
||||
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
|
||||
import { gridClasses } from '@mui/x-data-grid';
|
||||
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
import {
|
||||
GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
|
||||
GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext,
|
||||
gridFilteredSortedRowIdsSelector,
|
||||
gridVisibleColumnFieldsSelector,
|
||||
GridValueGetterParams,
|
||||
GridPreferencePanelsValue,
|
||||
|
||||
} from '@mui/x-data-grid';
|
||||
import * as XLSX from 'xlsx';
|
||||
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
|
||||
|
||||
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 (
|
||||
|
|
|
|||
|
|
@ -0,0 +1,423 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import TextField from '@mui/material/TextField';
|
||||
import fileDownload from 'js-file-download';
|
||||
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 { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
|
||||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import 'moment/locale/fr';
|
||||
import Box from '@mui/material/Box';
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import { FcOpenedFolder } from "react-icons/fc";
|
||||
import { gridClasses } from '@mui/x-data-grid';
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
import Draggable from 'react-draggable';
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import { AiFillCloseCircle } from "react-icons/ai";
|
||||
import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
|
||||
import Module_Alert_Confirmation from "./Module_Alert_Confirmation";
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
import DialogContent from '@mui/material/DialogContent';
|
||||
import DialogTitle from '@mui/material/DialogTitle';
|
||||
import DialogContentText from '@mui/material/DialogContentText';
|
||||
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
|
||||
import { IconButton } from '@material-ui/core';
|
||||
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
||||
import Menu from '@mui/material/Menu';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import {
|
||||
GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
|
||||
GridToolbarFilterButton, GridToolbarDensitySelector, GridToolbarExportContainer, useGridApiContext,
|
||||
gridFilteredSortedRowIdsSelector,
|
||||
gridVisibleColumnFieldsSelector,
|
||||
GridValueGetterParams,
|
||||
GridPreferencePanelsValue,
|
||||
|
||||
} from '@mui/x-data-grid';
|
||||
import * as XLSX from 'xlsx';
|
||||
import { FcInfo } from "react-icons/fc";
|
||||
|
||||
|
||||
import { FcAcceptDatabase, FcPlanner } from "react-icons/fc";
|
||||
|
||||
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 Module_Ent_Message_Public = (props) => {
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
||||
function ExpandableCell_50({ value }) {
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
|
||||
return (
|
||||
<nav>
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
|
||||
|
||||
{expanded ? value : String(value).slice(0, 50)}
|
||||
{value.length > 50 && (
|
||||
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
||||
<Link
|
||||
type="button"
|
||||
component="button"
|
||||
sx={{ fontSize: 'inherit' }}
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
>
|
||||
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
|
||||
</Link>
|
||||
)}
|
||||
</div>}
|
||||
|
||||
{!value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
|
||||
|
||||
</div>
|
||||
}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
function ExpandableCell_50_bg_hiligt({ value }) {
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
|
||||
return (
|
||||
<nav>
|
||||
{value && <div style={{
|
||||
paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", color: '#0000FF',
|
||||
"textAlign": "center"
|
||||
}}>
|
||||
|
||||
{expanded ? value : value.slice(0, 50)}
|
||||
{value.length > 50 && (
|
||||
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
||||
<Link
|
||||
type="button"
|
||||
component="button"
|
||||
sx={{ fontSize: 'inherit' }}
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
>
|
||||
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
|
||||
</Link>
|
||||
)}
|
||||
</div>}
|
||||
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", color: '#0000FF' }}>
|
||||
|
||||
</div>
|
||||
}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
function ExpandableCell_50_bg_hiligt_red_color({ value }) {
|
||||
const [expanded, setExpanded] = React.useState(false);
|
||||
|
||||
return (
|
||||
<nav>
|
||||
{value && <div style={{
|
||||
paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", color: 'red',
|
||||
"textAlign": "center"
|
||||
}}>
|
||||
|
||||
{expanded ? value : value.slice(0, 50)}
|
||||
{value.length > 50 && (
|
||||
// eslint-disable-next-line jsx-a11y/anchor-is-valid
|
||||
<Link
|
||||
type="button"
|
||||
component="button"
|
||||
sx={{ fontSize: 'inherit' }}
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
>
|
||||
{expanded ? <nav> <PiDotsThree />Réduire</nav> : <nav> <PiDotsThree />Voir</nav>}
|
||||
</Link>
|
||||
)}
|
||||
</div>}
|
||||
|
||||
{value && <div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all", color: 'red' }}>
|
||||
|
||||
</div>
|
||||
}
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function Display_Colunm_text({ value }) {
|
||||
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
|
||||
{value}
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const columns_ent_message = [
|
||||
{ field: '_id', headerName: '_id', hide: true, editable: false, Width: 0 },
|
||||
{ field: 'id', headerName: 'id', hide: true, Width: 0 },
|
||||
|
||||
{ field: 'code', headerName: 'code', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'priorite', headerName: 'priorite', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'message', headerName: 'message', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'date_debut', headerName: 'date_debut', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'date_fin', headerName: 'date_fin', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
]
|
||||
|
||||
const [Get_All_Ent_Message_Public_api, setGet_All_Ent_Message_Public_api] = useState();
|
||||
const [Get_All_Ent_Message_Public_message, setGet_All_Ent_Message_Public_message] = useState();
|
||||
const [Get_All_Ent_Message_Public_result, setGet_All_Ent_Message_Public_result] = useState([]);
|
||||
function Get_All_Ent_Message_Public() {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysych');
|
||||
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ent_Alert_Message/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
// console.log(" In Get_All_Ent_Message_Public res.data.status = " + res.data.status);
|
||||
//console.log(" In Get_All_Ent_Message_Public res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setGet_All_Ent_Message_Public_api("true");
|
||||
setGet_All_Ent_Message_Public_result(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGet_All_Ent_Message_Public_api("false");
|
||||
setGet_All_Ent_Message_Public_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Get_All_Ent_Message_Public = ', error);
|
||||
setGet_All_Ent_Message_Public_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [selectionModel_ent_lessage, setselectionModel_ent_lessage] = React.useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
Get_All_Ent_Message_Public();
|
||||
|
||||
}, [])
|
||||
|
||||
|
||||
|
||||
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_ent_message_public">
|
||||
|
||||
{isLoading && <div className="loader-container">
|
||||
<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*/}
|
||||
|
||||
|
||||
<div className="session_data">
|
||||
<div style={{ "border": "None", paddingRight: '10px' }}>
|
||||
|
||||
{Get_All_Notes_Of_Evaluations_result && Get_All_Notes_Of_Evaluations_result.length > 0 && <div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
height: 500,
|
||||
width: '100%',
|
||||
paddingRight: '1px',
|
||||
|
||||
|
||||
|
||||
"& .MuiDataGrid-columnHeaders": {
|
||||
backgroundColor: "#c8cfd5",
|
||||
color: "black",
|
||||
fontSize: 14
|
||||
},
|
||||
|
||||
|
||||
'& .line--statut--pair': {
|
||||
backgroundColor: 'rgba(235, 235, 235, .7)',
|
||||
color: 'black',
|
||||
},
|
||||
'& .line--statut--impair': {
|
||||
backgroundColor: '#FFFFFF',
|
||||
color: 'black',
|
||||
},
|
||||
'& .line--statut--selected': {
|
||||
backgroundColor: '#FBF2EF',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
}}
|
||||
>
|
||||
<DataGrid
|
||||
checkboxSelection
|
||||
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
setselectionModel_ent_lessage(newSelectionModel);
|
||||
/*if (newSelectionModel.length === 1)
|
||||
handleClick_edit_session_From_Line(newSelectionModel);*/
|
||||
if (newSelectionModel.length !== 1) {
|
||||
|
||||
}
|
||||
}}
|
||||
selectionModel={selectionModel_ent_lessage}
|
||||
|
||||
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
||||
rows={Get_All_Ent_Message_Public_result.map((item, index) => (
|
||||
{
|
||||
id: index,
|
||||
_id: JSON.parse(item)._id,
|
||||
code: JSON.parse(item).code,
|
||||
priorite: JSON.parse(item).priorite,
|
||||
message: JSON.parse(item).message,
|
||||
date_debut: JSON.parse(item).date_debut,
|
||||
date_fin: JSON.parse(item).date_fin,
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
columns={columns_ent_message}
|
||||
pageSize={10}
|
||||
className="datagridclass"
|
||||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
|
||||
}}
|
||||
|
||||
rowsPerPageOptions={[10]}
|
||||
disableSelectionOnClick
|
||||
components={{
|
||||
Toolbar: GridToolbar,
|
||||
}}
|
||||
//sx={datagridSx}
|
||||
getCellClassName={(params) => {
|
||||
//field === 'distantiel'
|
||||
if (params.field === 'distantiel' && String(params.value) === "1") {
|
||||
return 'cell--distantiel';
|
||||
}
|
||||
if (params.field === "presentiel" && String(params.value) == "1") {
|
||||
return 'cell--presentiel';
|
||||
}
|
||||
|
||||
|
||||
//field === "statut"
|
||||
if (params.field === "status" && String(params.value) == "0") {
|
||||
return 'cell--statut--preinscrit';
|
||||
}
|
||||
|
||||
if (params.field === "status" && String(params.value) == "1") {
|
||||
return 'cell--statut--inscrit';
|
||||
}
|
||||
|
||||
if (params.field === "status" && String(params.value) == "-1") {
|
||||
return 'cell--statut--annule';
|
||||
}
|
||||
|
||||
}}
|
||||
getRowClassName={(params) => {
|
||||
// Pour la gestion de la couleur de zone double cliquée
|
||||
if (String(params.row.id) === String(gridline_id)) {
|
||||
|
||||
return 'line--statut--selected';
|
||||
}
|
||||
|
||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||
return 'line--statut--pair';
|
||||
}
|
||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||
return 'line--statut--impair';
|
||||
}
|
||||
|
||||
}}
|
||||
getEstimatedRowHeight={() => 200}
|
||||
getRowHeight={() => "auto"}
|
||||
|
||||
/>
|
||||
</Box>
|
||||
<br />
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div >
|
||||
);
|
||||
}
|
||||
|
||||
export default Module_Ent_Message_Public;
|
||||
|
|
@ -13,6 +13,9 @@ import {
|
|||
DataGrid, frFR, GridToolbar,
|
||||
|
||||
} from '@mui/x-data-grid';
|
||||
import { FcCancel } from "react-icons/fc";
|
||||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import { useCookies } from "react-cookie";
|
||||
import { DataGridPro } from '@mui/x-data-grid-pro';
|
||||
import * as XLSX from 'xlsx';
|
||||
|
|
@ -54,7 +57,7 @@ import AttachFileIcon from '@mui/icons-material/AttachFile';
|
|||
import { IconButton } from '@material-ui/core';
|
||||
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
||||
import Menu from '@mui/material/Menu';
|
||||
|
||||
import { CiTrash } from "react-icons/ci";
|
||||
import Document_Affichage_Grid from "./Document_Affichage_Grid";
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
|
|
@ -97,7 +100,7 @@ const useStyles = makeStyles((theme) => ({
|
|||
backgroundColor: 'lightgray',
|
||||
color: 'gray',
|
||||
},
|
||||
}));
|
||||
}));
|
||||
|
||||
|
||||
const Modules_Mes_Documents = (props) => {
|
||||
|
|
@ -248,92 +251,163 @@ const Modules_Mes_Documents = (props) => {
|
|||
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center",
|
||||
renderCell: (cellValues,) => {
|
||||
field: 'Supprimer', headerName: 'Supprimer', minWidth: 50, flex: 1, maxWidth: 100, hide: false, editable: false,
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
<>
|
||||
{props && props.authorize_deletion && props.authorize_deletion === "1" &&
|
||||
<Popup
|
||||
trigger={<Button
|
||||
|
||||
<nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
|
||||
|
||||
<IconButton
|
||||
aria-label="more"
|
||||
id="long-button"
|
||||
aria-controls={open ? 'long-menu' : undefined}
|
||||
aria-expanded={open ? 'true' : undefined}
|
||||
aria-haspopup="true"
|
||||
|
||||
onClick={(e) => {
|
||||
handleClick_option_button_vertical(e);
|
||||
|
||||
setprint_doc_id(cellValues.row._id);
|
||||
setprint_file_extention(cellValues.row.file_extention);
|
||||
setprint_file_business_object(cellValues.row.file_business_object);
|
||||
|
||||
}}
|
||||
>
|
||||
<MoreVertIcon />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="long-menu"
|
||||
MenuListProps={{
|
||||
'aria-labelledby': 'long-button',
|
||||
}}
|
||||
anchorEl={anchorEl}
|
||||
open={open}
|
||||
|
||||
onClose={handleClose_option_button_vertical}
|
||||
onClick={(e) => {
|
||||
|
||||
}}
|
||||
|
||||
slotProps={{
|
||||
paper: {
|
||||
style: {
|
||||
maxHeight: ITEM_HEIGHT * 4.5,
|
||||
width: '20ch',
|
||||
boxShadow: "-3px 4px 0px -30px #000000",
|
||||
borderRadius: '0px !important',
|
||||
lineHeight: '3rem'
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
{options_menu_vertical.map((option) => (
|
||||
<MenuItem key={option}
|
||||
|
||||
onClick={(e) => {
|
||||
|
||||
if (option && String(option) === "Télécharger") {
|
||||
setselected_id(cellValues.row._id);
|
||||
print_document_pdf(print_doc_id, print_file_extention, print_file_business_object);
|
||||
}
|
||||
|
||||
if (option && String(option) === "Visualiser") {
|
||||
setselected_id(cellValues.row._id);
|
||||
|
||||
|
||||
preview_document_pdf(print_doc_id, print_file_extention, print_file_business_object);
|
||||
setselected_doc_name(print_file_business_object);
|
||||
setDialog_Preview_Doc_open(true);
|
||||
|
||||
}
|
||||
|
||||
setAnchorEl(null);
|
||||
|
||||
onClick={(event) => {
|
||||
// handleClick_delete(event, cellValues);
|
||||
}}
|
||||
>
|
||||
{option}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</nav>
|
||||
<CiTrash style={{ color: 'red', fontSize: '16px' }} />
|
||||
|
||||
</Button>}
|
||||
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, le document sera <i><font color="red"> définitivement supprimé</font></i>. <br />
|
||||
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
Delete_List_document(cellValues.row._id);
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup_annuler"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>}
|
||||
|
||||
{props.authorize_deletion !== "1" && <nav style={{ width: '100%', textAlign: 'center' }}>
|
||||
<Tooltip className="tooltip_css" id="my_tooltip_no_delete" />
|
||||
<a data-tooltip-id="my_tooltip_no_delete" data-tooltip-html={"Suppression non autorisée."}>
|
||||
<FcCancel style={{ color: 'red', fontSize: '18px' }} />
|
||||
</a>
|
||||
</nav>}
|
||||
|
||||
</>
|
||||
|
||||
);
|
||||
},
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
/*
|
||||
{
|
||||
field: 'bton_vertif', headerName: 'Gestion', minWidth: 50, flex: 1, maxWidth: 100, hideable: true, hide: false, editable: false, align: "center",
|
||||
renderCell: (cellValues,) => {
|
||||
return (
|
||||
|
||||
<nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
|
||||
|
||||
<IconButton
|
||||
aria-label="more"
|
||||
id="long-button"
|
||||
aria-controls={open ? 'long-menu' : undefined}
|
||||
aria-expanded={open ? 'true' : undefined}
|
||||
aria-haspopup="true"
|
||||
|
||||
onClick={(e) => {
|
||||
handleClick_option_button_vertical(e);
|
||||
|
||||
setprint_doc_id(cellValues.row._id);
|
||||
setprint_file_extention(cellValues.row.file_extention);
|
||||
setprint_file_business_object(cellValues.row.file_business_object);
|
||||
|
||||
}}
|
||||
>
|
||||
<MoreVertIcon />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="long-menu"
|
||||
MenuListProps={{
|
||||
'aria-labelledby': 'long-button',
|
||||
}}
|
||||
anchorEl={anchorEl}
|
||||
open={open}
|
||||
|
||||
onClose={handleClose_option_button_vertical}
|
||||
onClick={(e) => {
|
||||
|
||||
}}
|
||||
|
||||
slotProps={{
|
||||
paper: {
|
||||
style: {
|
||||
maxHeight: ITEM_HEIGHT * 4.5,
|
||||
width: '20ch',
|
||||
boxShadow: "-3px 4px 0px -30px #000000",
|
||||
borderRadius: '0px !important',
|
||||
lineHeight: '3rem'
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
{options_menu_vertical.map((option) => (
|
||||
<MenuItem key={option}
|
||||
|
||||
onClick={(e) => {
|
||||
|
||||
if (option && String(option) === "Télécharger") {
|
||||
setselected_id(cellValues.row._id);
|
||||
print_document_pdf(print_doc_id, print_file_extention, print_file_business_object);
|
||||
}
|
||||
|
||||
if (option && String(option) === "Visualiser") {
|
||||
setselected_id(cellValues.row._id);
|
||||
|
||||
|
||||
preview_document_pdf(print_doc_id, print_file_extention, print_file_business_object);
|
||||
setselected_doc_name(print_file_business_object);
|
||||
setDialog_Preview_Doc_open(true);
|
||||
|
||||
}
|
||||
|
||||
setAnchorEl(null);
|
||||
|
||||
}}
|
||||
>
|
||||
{option}
|
||||
</MenuItem>
|
||||
))}
|
||||
</Menu>
|
||||
</nav>
|
||||
|
||||
);
|
||||
},
|
||||
},*/
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -419,6 +493,7 @@ const Modules_Mes_Documents = (props) => {
|
|||
|
||||
if (props.partner_client_id && props.type_document && autorized_type_document.includes(String(props.type_document)) &&
|
||||
props.partner_owner_recid === "") {
|
||||
|
||||
setmyprops_type_document(props.type_document);
|
||||
setp_filtre1("filter_type_document");
|
||||
setp_filtre1_value(props.type_document);
|
||||
|
|
@ -438,8 +513,6 @@ const Modules_Mes_Documents = (props) => {
|
|||
Get_List_Of_All_PJ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}, [])
|
||||
|
||||
const [display_detail_invoice, setdisplay_detail_invoice] = React.useState();
|
||||
|
|
@ -593,7 +666,7 @@ const Modules_Mes_Documents = (props) => {
|
|||
|
||||
|
||||
|
||||
const New_Option_Filter = [
|
||||
var New_Option_Filter = [
|
||||
{ "id": "filter_file_business_object", "label": "Nom Document", "value": "filter_file_business_object" },
|
||||
{ "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" },
|
||||
{ "id": "filter_nom_client", "label": "Nom Client", "value": "filter_nom_client" },
|
||||
|
|
@ -605,6 +678,31 @@ const Modules_Mes_Documents = (props) => {
|
|||
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
|
||||
]
|
||||
|
||||
if (props && props.object_owner_collection && props.object_owner_collection === "inscription") {
|
||||
New_Option_Filter = [
|
||||
{ "id": "filter_file_business_object", "label": "Nom Document", "value": "filter_file_business_object" },
|
||||
{ "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" },
|
||||
{ "id": "filter_nom_client", "label": "Nom Client", "value": "filter_nom_client" },
|
||||
{ "id": "date_creation", "label": "Date Création (jj/mm/aaaa) ", "value": "date_creation" },
|
||||
{ "id": "filter_formation_external_code", "label": "Lié a la Formation (code externe)", "value": "filter_formation_external_code" },
|
||||
{ "id": "filter_session_code", "label": "Lié a la session (code session)", "value": "filter_session_code" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
|
||||
]
|
||||
}
|
||||
else if (props && props.object_owner_collection && props.object_owner_collection === "partner_client") {
|
||||
New_Option_Filter = [
|
||||
{ "id": "filter_file_business_object", "label": "Nom Document", "value": "filter_file_business_object" },
|
||||
{ "id": "filter_type_document", "label": "Type Document", "value": "filter_type_document" },
|
||||
{ "id": "filter_nom_prenom_mail_inscrit", "label": "Nom/Prénom/Email inscrit", "value": "filter_nom_prenom_mail_inscrit" },
|
||||
{ "id": "date_creation", "label": "Date Création (jj/mm/aaaa) ", "value": "date_creation" },
|
||||
{ "id": "filter_formation_external_code", "label": "Lié a la Formation (code externe)", "value": "filter_formation_external_code" },
|
||||
{ "id": "filter_session_code", "label": "Lié a la session (code session)", "value": "filter_session_code" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
{ "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres.
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1086,6 +1184,83 @@ const Modules_Mes_Documents = (props) => {
|
|||
const [document_display_view, setdocument_display_view] = useState("list");
|
||||
const [cookie_document_display_view, setcookie_document_display_view, removecookie_document_display_view] = useCookies(['mysy_document_display_view,']);
|
||||
|
||||
const [Delete_List_document_api, setDelete_List_document_api] = useState();
|
||||
const [Delete_List_document_result, setDelete_List_document_result] = useState();
|
||||
const [Delete_List_document_message, setDelete_List_document_message] = useState();
|
||||
const Delete_List_document = (local_tab_ids) => {
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
||||
var formData = new FormData();
|
||||
|
||||
|
||||
formData.append("token", stored_cookie);
|
||||
formData.append("tab_ids", local_tab_ids);
|
||||
|
||||
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/Delete_Stored_Downloaded_File_from_Ids/",
|
||||
{
|
||||
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_List_document_result(result['message']);
|
||||
setDelete_List_document_api("true");
|
||||
if (props.partner_client_id && props.type_document && autorized_type_document.includes(String(props.type_document)) &&
|
||||
props.partner_owner_recid === "") {
|
||||
setmyprops_type_document(props.type_document);
|
||||
setp_filtre1("filter_type_document");
|
||||
setp_filtre1_value(props.type_document);
|
||||
Get_All_Documents_With_Filter();
|
||||
|
||||
|
||||
} else if (props.partner_client_id && props.type_document && String(props.type_document) === "all" &&
|
||||
props.partner_owner_recid === "") {
|
||||
|
||||
Get_All_Documents_With_Filter();
|
||||
}
|
||||
|
||||
else if (props.partner_owner_recid && props.partner_client_id === "") {
|
||||
|
||||
Get_All_Documents_With_Filter();
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
Get_List_Of_All_PJ();
|
||||
}
|
||||
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("success");
|
||||
|
||||
}
|
||||
else {
|
||||
setDelete_List_document_message(result['message']);
|
||||
setDelete_List_document_api("false");
|
||||
setdisplay_alert_mysy("1");
|
||||
setalert_message(result['message']);
|
||||
setalert_type("error");
|
||||
}
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(' Record_All_PJ Error:', error);
|
||||
setDelete_List_document_api("false");
|
||||
alert(" Impossible de supprimer le document")
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<div className="modules_mes_documents">
|
||||
|
|
@ -1171,7 +1346,7 @@ const Modules_Mes_Documents = (props) => {
|
|||
|
||||
{props.all_ged && props.my_title && <h3 style={{ fontFamily: 'DM Sans' }}> {props.my_title} </h3>}
|
||||
{props.all_ged && !props.my_title && <h3 style={{ fontFamily: 'DM Sans' }}> Tous vos documents </h3>}
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
<div className="div_row" style={{ "marginBottom": "5px" }}>
|
||||
|
|
@ -1936,75 +2111,7 @@ const Modules_Mes_Documents = (props) => {
|
|||
|
||||
<div className="div_row" > </div>
|
||||
|
||||
{/* <div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
|
||||
|
||||
{Get_List_Of_All_PJ_result && <div className="div_row" style={{ "padding": "5px" }}>
|
||||
<div className="div_row">
|
||||
<b> Liste des pièces jointes </b> <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 name={(JSON.parse(val).file_name)}
|
||||
id={(JSON.parse(val).file_name)}> <i> <AttachFileIcon />{(JSON.parse(val).file_business_object)} </i> <br /><font style={{ "color": "green", "cursor": "pointer" }}
|
||||
name={(JSON.parse(val).file_name)}
|
||||
id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger </font></nav>
|
||||
|
||||
<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_annuler"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
</div>*/}
|
||||
|
||||
<div className="div_row" ref={myRef} id="myRef" > </div>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,721 +0,0 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { FacebookShareButton, LinkedinShareButton, TwitterShareButton } from "react-share";
|
||||
import { SocialIcon } from 'react-social-icons';
|
||||
import { Button, } from "reactstrap";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { Helmet } from "react-helmet";
|
||||
import { useCookies } from "react-cookie";
|
||||
import { confirmAlert } from 'react-confirm-alert';
|
||||
|
||||
import coeurimg from "../mysy_img/coeur.png";
|
||||
import img_met_program from "../mysy_img/met_programmation.jpg";
|
||||
|
||||
import img_met_graphisme from "../mysy_img/metier_graphisme.jpg";
|
||||
|
||||
import img_met_autre from "../mysy_img/met_autre.jpg";
|
||||
import img_met_digital from "../mysy_img/met_digital.jpg";
|
||||
import img_met_management from "../mysy_img/met_management.jpg";
|
||||
|
||||
import img_met_dev_perso from "../mysy_img/metier_dev_perso.jpg";
|
||||
import img_met_rh from "../mysy_img/met_rh.jpg";
|
||||
|
||||
import img_met_bureautic from "../mysy_img/met_burautic.jpg";
|
||||
import img_met_vente from "../mysy_img/met_vente.jpg";
|
||||
import axios from "axios";
|
||||
//import { Rating } from 'react-simple-star-rating'
|
||||
import Rating from '@mui/material/Rating';
|
||||
import parse from 'html-react-parser'
|
||||
import { CiLocationOn } from "react-icons/ci";
|
||||
|
||||
const Formation_Partner_Catalog = (props) => {
|
||||
const [userconnected, setuserconnected] = useState("0");
|
||||
const [partnerconnected, setpartnerconnected] = useState("0");
|
||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
||||
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']);
|
||||
const history = useHistory();
|
||||
const [myfilter, setmyfilter] = useState(props.formation.price);
|
||||
|
||||
const [profileimg, setprofileimg] = useState(props.formation.price);
|
||||
|
||||
|
||||
// Gestion des Cookies
|
||||
const stored_partner = cookie_part.tokenmysypart;
|
||||
const stored_user = cookie.tokenmysych;
|
||||
|
||||
function test(val) {
|
||||
|
||||
if (userconnected === "0" && partnerconnected === "0") {
|
||||
confirmAlert({
|
||||
title: 'Activer votre session ?',
|
||||
message: 'Merci de vous connecter pour acceder au detail de cette formation',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Oui',
|
||||
onClick: () => { history.push("/mysy-training-login/training/" + props.formation.internal_url) }
|
||||
},
|
||||
{
|
||||
label: 'Non',
|
||||
onClick: () => { return }
|
||||
|
||||
}
|
||||
],
|
||||
closeOnEscape: false,
|
||||
closeOnClickOutside: false,
|
||||
keyCodeForClose: [8, 32],
|
||||
willUnmount: () => { },
|
||||
afterClose: () => { },
|
||||
onClickOutside: () => { },
|
||||
onKeypress: () => { },
|
||||
onKeypressEscape: () => { },
|
||||
});
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [myclassimage, setmyclassimage] = useState();
|
||||
const [isclassimage, setisclassimage] = useState("False");
|
||||
const [userimgclassprofil, setuserimgclassprofil] = useState("");
|
||||
|
||||
const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState("");
|
||||
|
||||
function getClassImage_no_token() {
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/";
|
||||
|
||||
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("type", "partner");
|
||||
form.append("related_collection", "myclass");
|
||||
form.append("related_collection_recid", props.formation._id);
|
||||
form.append("class_external_code", props.formation.external_code);
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "False") {
|
||||
|
||||
//console.log(" getClassImage : In test res.data.status = " + res.data.status);
|
||||
//console.log(" getClassImage: res.data.message.img = " + res.data.message);
|
||||
|
||||
if (res.data.message.img.length > 0) {
|
||||
setisclassimage("True");
|
||||
}
|
||||
else {
|
||||
setisclassimage("False");
|
||||
}
|
||||
setisclassimage(res.data.message.img);
|
||||
var ch_img = "data:image/png;base64," + res.data.message.img;
|
||||
setclass_img_stored_in_bdd(ch_img);
|
||||
}
|
||||
else {
|
||||
//console.log(" In Erreur res.data.status = " + res.data.status);
|
||||
//console.log(" In Erreur res.data.message = " + res.data.message);
|
||||
setisclassimage("False");
|
||||
setuserimgclassprofil();
|
||||
setclass_img_stored_in_bdd();
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
||||
console.warn('getClassImage ee: Not good man :( getClassImage = ');
|
||||
setisclassimage("False");
|
||||
setuserimgclassprofil("");
|
||||
setclass_img_stored_in_bdd("");
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Cette variable accompagne la gestion des images par defaut.
|
||||
idée : si la valeur de "DetailTraining.metier" != "management, digital, office, rh, vente, dev_perso"
|
||||
alors l'utilisateur à créer une formation avec un metier qui n'est pas geré, donc on met une image par defaut
|
||||
*/
|
||||
const [ismetiermanaged, setismetiermanaged] = useState();
|
||||
const liste_metier = ["management", "digital", "office", "rh", "vente", "dev_perso"];
|
||||
|
||||
useEffect(() => {
|
||||
setmyfilter(props.myfil);
|
||||
|
||||
if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
|
||||
setuserconnected("0");
|
||||
} else {
|
||||
setuserconnected("1");
|
||||
}
|
||||
|
||||
if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') {
|
||||
setpartnerconnected("0");
|
||||
} else {
|
||||
setpartnerconnected("1");
|
||||
}
|
||||
|
||||
getClassImage_no_token();
|
||||
GetCurrentClass_trainingsession();
|
||||
|
||||
GetCurrentClass_trainingsession_cities();
|
||||
|
||||
// Verifier si le metier est geré
|
||||
if (props.formation.metier) {
|
||||
if (!liste_metier.includes(props.formation.metier)) {
|
||||
setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré
|
||||
}
|
||||
}
|
||||
else {
|
||||
setismetiermanaged("0");
|
||||
}
|
||||
|
||||
if (props.formation.img_url && String(props.formation.img_url).length > 0) {
|
||||
setismetiermanaged("1");
|
||||
}
|
||||
|
||||
}, []);
|
||||
|
||||
|
||||
const [GetCurrentClass_api, setGetCurrentClass_api] = useState();
|
||||
const [GetCurrentClass_message, setGetCurrentClass_message] = useState();
|
||||
const [GetCurrentClass_result, setGetCurrentClass_result] = useState();
|
||||
function GetCurrentClass_trainingsession(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("class_internal_url", props.formation.internal_url);
|
||||
|
||||
form.append("token", stored_partner);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "false") {
|
||||
//console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status);
|
||||
//console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message);
|
||||
setGetCurrentClass_api("true");
|
||||
setGetCurrentClass_result(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGetCurrentClass_api("false");
|
||||
setGetCurrentClass_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( GetCurrentClass_trainingsession = ', error);
|
||||
setGetCurrentClass_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState();
|
||||
const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState();
|
||||
const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]);
|
||||
function GetCurrentClass_trainingsession_cities(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("class_internal_url", props.formation.internal_url);
|
||||
|
||||
form.append("token", stored_partner);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "false") {
|
||||
//console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status);
|
||||
//console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message);
|
||||
setGetCurrentClass_trainingsession_cities_api("true");
|
||||
setGetCurrentClass_trainingsession_cities_result(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGetCurrentClass_trainingsession_cities_api("false");
|
||||
setGetCurrentClass_trainingsession_cities_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error);
|
||||
setGetCurrentClass_trainingsession_cities_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<div className="formation_partner_catalog">
|
||||
|
||||
<div style={{ "width": "100%" }}>
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 && <div className="forma_img_gauche">
|
||||
<img src={class_img_stored_in_bdd} alt="informatique" className="training_img" />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{ (!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" && <div className="forma_img_gauche">
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_management} alt="management" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" className="training_img" />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" className="training_img" />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_dev_perso} alt="developpement personnel" className="training_img" />}
|
||||
|
||||
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" className="training_img" />}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 && <div className="forma_img_gauche">
|
||||
<img src={userimgclassprofil} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 && <div className="forma_img_gauche">
|
||||
<img src={img_met_autre} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50 ) && String(ismetiermanaged) === "1" && <div className="forma_img_gauche">
|
||||
<img src={props.formation.img_url} alt="autre" className="training_img" />
|
||||
{props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br /> {String(props.formation.institut_formation)} </div>}
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="forma_rightbox"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
}}>
|
||||
<div className="p_forma">
|
||||
<div className="div_row">
|
||||
|
||||
<div className="div_row_gauche" style={{ "marginTop": "5px" }}>
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly />
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_cpf">
|
||||
<div className="block_cpf">
|
||||
<div className="block_cpf_txt">
|
||||
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) === String("1") &&
|
||||
<div>
|
||||
OUI Éligible au CPF
|
||||
</div>}
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) !== String("1") &&
|
||||
<div>
|
||||
NON Éligible au CPF
|
||||
</div>}
|
||||
|
||||
{!props.formation.cpf &&
|
||||
<div>
|
||||
NON Éligible au CPF
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_title">
|
||||
<p className="p_class training_title">
|
||||
<b>
|
||||
{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 100)}
|
||||
</b>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div className="div_row">
|
||||
|
||||
{String(props.formation.price).length == 9 &&
|
||||
<div className="training_price" > <i>Prix : Non communiqué</i>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) === String("0") &&
|
||||
<div className="training_price">Gratuit
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") && (!props.formation.business_prices ||
|
||||
Object.keys(props.formation.business_prices).length <= 0) &&
|
||||
<div className="training_price">{props.formation.price} € HT
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{String(props.formation.price).length != 9 && String(props.formation.price) !== String("0") &&
|
||||
props.formation.business_prices && Object.keys(props.formation.business_prices).length > 0 &&
|
||||
<div className="training_price">
|
||||
<nav className="discounted_price">{String(props.formation.business_prices[0].discounted_price)} € HT</nav>
|
||||
<nav className="training_price_barre">
|
||||
{props.formation.price} € HT
|
||||
</nav>
|
||||
|
||||
<nav className="discount_block"> (- {String(props.formation.business_prices[0].discount)} % )
|
||||
</nav>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row row_formation_desc">
|
||||
{parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))}
|
||||
|
||||
</div>
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.length > 0 &&
|
||||
<nav style={{ "width": "100%", "float": "left", "textAlign": "left", "color": "#619E31" }}>
|
||||
<nav style={{ "width": "auto", "float": "left" }}> <CiLocationOn className="icone_location" /> </nav>
|
||||
|
||||
{GetCurrentClass_trainingsession_cities_result && GetCurrentClass_trainingsession_cities_result.sort().slice(0, 5).map((formation_ville) => (
|
||||
<nav style={{ "width": "auto", "float": "left" }}>
|
||||
|
||||
|
||||
|
||||
{formation_ville &&
|
||||
|
||||
<b> {formation_ville.replaceAll('"', '').substring(0, 20).toLocaleLowerCase().charAt(0).toUpperCase() +
|
||||
formation_ville.replaceAll('"', '').substring(0, 20).toLocaleLowerCase().slice(1)} </b>
|
||||
|
||||
}
|
||||
|
||||
</nav>
|
||||
))}
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
}
|
||||
{!GetCurrentClass_result || GetCurrentClass_result.length <= 0 &&
|
||||
<nav style={{ "width": "100%", "float": "left", "textAlign": "left", "fontWeight": "700" }}><CiLocationOn className="icone_location" /> A venir </nav>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row row_formation_crit">
|
||||
|
||||
<hr style={{ "width": "90%", "marginLeft": "auto", "marginRight": "auto", "marginBottom": "2px", "marginTop": "2px" }} />
|
||||
|
||||
<div className="div_row_gauche div_row_gauche_critere" >
|
||||
<div className="div_row_critere" style={{ "marginTop": "0.5rem", "marginBottom": "0.3rem" }}>
|
||||
{!props.formation.extented_search &&
|
||||
<div className="div_row_gauche">
|
||||
|
||||
|
||||
{props.formation.duration_unit &&
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">Durée
|
||||
</div>
|
||||
|
||||
{String(props.formation.duration_unit) === "heure" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} hr(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "heures" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} hr(s)
|
||||
</div>}
|
||||
|
||||
|
||||
{String(props.formation.duration_unit) === "jour" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} jr(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "mois" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} mois(s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "semaine" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} Sem (s)
|
||||
</div>}
|
||||
|
||||
{String(props.formation.duration_unit) === "user_rythme" &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
A votre rythme
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{!props.formation.duration_unit &&
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">Durée
|
||||
</div>
|
||||
|
||||
{props.formation.duration && <div className="criteres ftion_tab_droite">
|
||||
{props.formation.duration} jr(s)
|
||||
</div>}
|
||||
|
||||
{!props.formation.duration && <div className="criteres ftion_tab_droite">
|
||||
<i> En traitement </i>
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
<div style={{ "width": "100%" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Certification
|
||||
</div>
|
||||
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.certif && String(props.formation.certif) === String("1") &&
|
||||
<div>
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.certif && String(props.formation.certif) !== String("1") &&
|
||||
<div>
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.certif &&
|
||||
<div>
|
||||
NC
|
||||
</div>}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="media_sociaux" style={{ 'float': "left", marginTop: "0.2rem", }}>
|
||||
<FacebookShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
|
||||
quote={props.formation.title + " -- " + props.formation.description}
|
||||
hashtag={"ySyTraining"}
|
||||
>
|
||||
<SocialIcon network="facebook" style={{ height: 20, width: 20 }} />
|
||||
</FacebookShareButton>
|
||||
|
||||
|
||||
<TwitterShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
hashtag={"#MySy-Formation"}
|
||||
>
|
||||
<SocialIcon network="twitter" style={{ height: 20, width: 20 }} />
|
||||
</TwitterShareButton>
|
||||
|
||||
|
||||
<LinkedinShareButton
|
||||
url={"https://www.mysy-training.com/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url}
|
||||
title={" Une nouvelle formation : " + props.formation.title}
|
||||
summary={props.formation.title + " -- " + props.formation.description}
|
||||
|
||||
source={"https://www.mysy-training.com/"}
|
||||
|
||||
>
|
||||
<SocialIcon network="linkedin" style={{ height: 20, width: 20 }} />
|
||||
</LinkedinShareButton>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="div_row_droite" style={{ textAlign: "center" }}>
|
||||
{String(props.formation.coeur) === String("1") && <div>
|
||||
<img class="imgcoeur" src={coeurimg} alt="coup de coeur" />
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Sur site
|
||||
</div>
|
||||
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||
String(props.formation.presentiel.presentiel) === String("1") && <div className="criteres ftion_tab_droite">
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.presentiel && props.formation.presentiel.presentiel &&
|
||||
String(props.formation.presentiel.presentiel) !== String("1") && <div className="criteres ftion_tab_droite">
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.presentiel || !props.formation.presentiel.presentiel &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
A distance
|
||||
</div>
|
||||
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||
String(props.formation.presentiel.distantiel) === String("1") && <div className="criteres ftion_tab_droite">
|
||||
Oui
|
||||
</div>}
|
||||
|
||||
{props.formation.presentiel && props.formation.presentiel.distantiel &&
|
||||
String(props.formation.presentiel.distantiel) !== String("1") && <div className="criteres ftion_tab_droite">
|
||||
Non
|
||||
</div>}
|
||||
|
||||
{!props.formation.presentiel || !props.formation.presentiel.distantiel &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
<div style={{ "width": "100%", "float": "right" }}>
|
||||
<div className="criteres ftion_tab_gauche">
|
||||
Support
|
||||
</div>
|
||||
{props.formation.support &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
{props.formation.support}
|
||||
</div>}
|
||||
|
||||
{!props.formation.support &&
|
||||
<div className="criteres ftion_tab_droite">
|
||||
NC
|
||||
</div>}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row_droite div_row_droite_critere" >
|
||||
{!props.formation.extented_search && props.formation.coeur != "1" &&
|
||||
<div style={{ 'float': "right", "width": "100%", textAlign: "right", marginTop: "0rem", }}>
|
||||
|
||||
<Button className="bton_se_renseinger"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Information",
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
>Se renseigner </Button>
|
||||
|
||||
|
||||
<Button className="bton_voir_detail"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
//test(props.formation.external_code);
|
||||
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
}}
|
||||
>Voir details</Button>
|
||||
|
||||
{GetCurrentClass_result && GetCurrentClass_result.length > 0 &&
|
||||
<Button variant="contained" className="bton_sinscrire"
|
||||
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
window.open(
|
||||
"/Display-Partner-Catalog-Detail-formation/" + props.formation.internal_url + "/Inscription",
|
||||
'_blank'
|
||||
);
|
||||
|
||||
}}
|
||||
|
||||
>S'incrire</Button>
|
||||
}
|
||||
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default Formation_Partner_Catalog;
|
||||
|
|
@ -1,483 +0,0 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
import { useCookies } from "react-cookie";
|
||||
import { confirmAlert } from 'react-confirm-alert';
|
||||
|
||||
import img_met_program from "../mysy_img/met_programmation.jpg";
|
||||
|
||||
import img_met_graphisme from "../mysy_img/metier_graphisme.jpg";
|
||||
|
||||
import img_met_autre from "../mysy_img/met_autre.jpg";
|
||||
import img_met_digital from "../mysy_img/met_digital.jpg";
|
||||
import img_met_management from "../mysy_img/met_management.jpg";
|
||||
|
||||
import img_met_dev_perso from "../mysy_img/metier_dev_perso.jpg";
|
||||
import img_met_rh from "../mysy_img/met_rh.jpg";
|
||||
|
||||
import img_met_bureautic from "../mysy_img/met_burautic.jpg";
|
||||
import img_met_vente from "../mysy_img/met_vente.jpg";
|
||||
import axios from "axios";
|
||||
//import { Rating } from 'react-simple-star-rating'
|
||||
import Rating from '@mui/material/Rating';
|
||||
import parse from 'html-react-parser'
|
||||
import { CiLocationOn } from "react-icons/ci";
|
||||
|
||||
const New_C_Formation_2025 = (props) => {
|
||||
const [userconnected, setuserconnected] = useState("0");
|
||||
const [partnerconnected, setpartnerconnected] = useState("0");
|
||||
const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']);
|
||||
const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']);
|
||||
const history = useHistory();
|
||||
const [myfilter, setmyfilter] = useState(props.formation.price);
|
||||
|
||||
const [profileimg, setprofileimg] = useState(props.formation.price);
|
||||
|
||||
|
||||
// Gestion des Cookies
|
||||
const stored_partner = cookie_part.tokenmysypart;
|
||||
const stored_user = cookie.tokenmysych;
|
||||
|
||||
function test(val) {
|
||||
|
||||
if (userconnected === "0" && partnerconnected === "0") {
|
||||
confirmAlert({
|
||||
title: 'Activer votre session ?',
|
||||
message: 'Merci de vous connecter pour acceder au detail de cette formation',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Oui',
|
||||
onClick: () => { history.push("/mysy-training-login/training/" + props.formation.internal_url) }
|
||||
},
|
||||
{
|
||||
label: 'Non',
|
||||
onClick: () => { return }
|
||||
|
||||
}
|
||||
],
|
||||
closeOnEscape: false,
|
||||
closeOnClickOutside: false,
|
||||
keyCodeForClose: [8, 32],
|
||||
willUnmount: () => { },
|
||||
afterClose: () => { },
|
||||
onClickOutside: () => { },
|
||||
onKeypress: () => { },
|
||||
onKeypressEscape: () => { },
|
||||
});
|
||||
} else {
|
||||
window.open(
|
||||
"/Display-Detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [myclassimage, setmyclassimage] = useState();
|
||||
const [isclassimage, setisclassimage] = useState("False");
|
||||
const [userimgclassprofil, setuserimgclassprofil] = useState("");
|
||||
|
||||
const [class_img_stored_in_bdd, setclass_img_stored_in_bdd] = useState("");
|
||||
|
||||
function getClassImage_no_token() {
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage_no_token/";
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("type", "partner");
|
||||
form.append("related_collection", "myclass");
|
||||
form.append("related_collection_recid", props.formation._id);
|
||||
form.append("class_external_code", props.formation.external_code);
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
// console.log(" getClassImage_no_token : In test res.data.status = ", res.data.status);
|
||||
if (String(res.data.status) === "true") {
|
||||
|
||||
|
||||
//console.log(" getClassImage_no_token: res.data.message.img = ", res.data.message);
|
||||
|
||||
if (res.data.message.img.length > 0) {
|
||||
setisclassimage("True");
|
||||
}
|
||||
else {
|
||||
setisclassimage("False");
|
||||
}
|
||||
setisclassimage(res.data.message.img);
|
||||
var ch_img = "data:image/png;base64," + res.data.message.img;
|
||||
setclass_img_stored_in_bdd(ch_img);
|
||||
// console.log(" getClassImage_no_token: setclass_img_stored_in_bdd = ", setclass_img_stored_in_bdd);
|
||||
|
||||
}
|
||||
else {
|
||||
// console.log(" In Erreur res.data.status = " + res.data.status);
|
||||
//console.log(" In Erreur res.data.message = " + res.data.message);
|
||||
setisclassimage("False");
|
||||
setuserimgclassprofil();
|
||||
setclass_img_stored_in_bdd();
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
||||
console.warn('getClassImage ee: Not good man :( getClassImage = ');
|
||||
setisclassimage("False");
|
||||
setuserimgclassprofil("");
|
||||
setclass_img_stored_in_bdd("");
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Cette variable accompagne la gestion des images par defaut.
|
||||
idée : si la valeur de "DetailTraining.metier" != "management, digital, office, rh, vente, dev_perso"
|
||||
alors l'utilisateur à créer une formation avec un metier qui n'est pas geré, donc on met une image par defaut
|
||||
*/
|
||||
const [ismetiermanaged, setismetiermanaged] = useState();
|
||||
const liste_metier = ["management", "digital", "office", "rh", "vente", "dev_perso"];
|
||||
|
||||
useEffect(() => {
|
||||
setmyfilter(props.myfil);
|
||||
|
||||
// console.log(" #### useEffect props.formation = ", props.formation);
|
||||
|
||||
|
||||
if (typeof (stored_user) === "undefined" || String(stored_user) === '') {
|
||||
setuserconnected("0");
|
||||
} else {
|
||||
setuserconnected("1");
|
||||
}
|
||||
|
||||
if (typeof (stored_partner) === "undefined" || String(stored_partner) === '') {
|
||||
setpartnerconnected("0");
|
||||
} else {
|
||||
setpartnerconnected("1");
|
||||
}
|
||||
|
||||
getClassImage_no_token();
|
||||
GetCurrentClass_trainingsession();
|
||||
|
||||
GetCurrentClass_trainingsession_cities();
|
||||
|
||||
// Verifier si le metier est geré
|
||||
if (props.formation.metier) {
|
||||
if (!liste_metier.includes(props.formation.metier)) {
|
||||
setismetiermanaged("0"); // j'ai une valeur dans metier, mais qui n'est pas geré
|
||||
}
|
||||
}
|
||||
else {
|
||||
setismetiermanaged("0");
|
||||
}
|
||||
|
||||
if (props.formation.img_url && String(props.formation.img_url).length > 0) {
|
||||
setismetiermanaged("1");
|
||||
}
|
||||
|
||||
}, []);
|
||||
|
||||
|
||||
const [GetCurrentClass_api, setGetCurrentClass_api] = useState();
|
||||
const [GetCurrentClass_message, setGetCurrentClass_message] = useState();
|
||||
const [GetCurrentClass_result, setGetCurrentClass_result] = useState();
|
||||
function GetCurrentClass_trainingsession(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("class_internal_url", props.formation.internal_url);
|
||||
|
||||
form.append("token", stored_partner);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSessionFormation_List/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "false") {
|
||||
//console.log(" In GetCurrentClass_trainingsession res.data.status = " + res.data.status);
|
||||
//console.log(" In GetCurrentClass_trainingsession res.data.message r_class = " + res.data.message);
|
||||
setGetCurrentClass_api("true");
|
||||
setGetCurrentClass_result(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGetCurrentClass_api("false");
|
||||
setGetCurrentClass_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( GetCurrentClass_trainingsession = ', error);
|
||||
setGetCurrentClass_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [GetCurrentClass_trainingsession_cities_api, setGetCurrentClass_trainingsession_cities_api] = useState();
|
||||
const [GetCurrentClass_trainingsession_cities_message, setGetCurrentClass_trainingsession_cities_message] = useState();
|
||||
const [GetCurrentClass_trainingsession_cities_result, setGetCurrentClass_trainingsession_cities_result] = useState([]);
|
||||
function GetCurrentClass_trainingsession_cities(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append("class_internal_url", props.formation.internal_url);
|
||||
|
||||
form.append("token", stored_partner);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/GetActiveSession_Cities_And_Distance_Formation_List/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (res.data.status != "false") {
|
||||
//console.log(" In GetCurrentClass_trainingsession_cities res.data.status = " + res.data.status);
|
||||
//console.log(" In GetCurrentClass_trainingsession_cities res.data.message r_class = " + res.data.message);
|
||||
setGetCurrentClass_trainingsession_cities_api("true");
|
||||
setGetCurrentClass_trainingsession_cities_result(res.data.message);
|
||||
}
|
||||
else {
|
||||
setGetCurrentClass_trainingsession_cities_api("false");
|
||||
setGetCurrentClass_trainingsession_cities_message(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( GetCurrentClass_trainingsession_cities = ', error);
|
||||
setGetCurrentClass_trainingsession_cities_api("false");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
const styles = {
|
||||
list: {
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: '32px',
|
||||
width: '100%',
|
||||
},
|
||||
row: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
gap: '24px',
|
||||
width: '100%',
|
||||
},
|
||||
card: {
|
||||
flexGrow: 1,
|
||||
backgroundColor: '#fff',
|
||||
borderRadius: '8px',
|
||||
overflow: 'hidden',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
},
|
||||
|
||||
image: {
|
||||
maxWidth: '100%',
|
||||
height: '200px',
|
||||
overflow: 'hidden',
|
||||
margin: "auto",
|
||||
|
||||
},
|
||||
content: {
|
||||
padding: '16px',
|
||||
},
|
||||
header: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
},
|
||||
eligibility: {
|
||||
backgroundColor: '#e2e9fb',
|
||||
padding: '4px 8px',
|
||||
borderRadius: '4px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
title: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
margin: '8px 0',
|
||||
},
|
||||
price: {
|
||||
fontSize: '14px',
|
||||
fontWeight: 'bold',
|
||||
color: '#000',
|
||||
},
|
||||
description: {
|
||||
fontSize: '12px',
|
||||
color: '#666',
|
||||
margin: '8px 0',
|
||||
height: "40px",
|
||||
overflow: "hidden",
|
||||
},
|
||||
details: {
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '16px',
|
||||
},
|
||||
button: {
|
||||
backgroundColor: '#007bff',
|
||||
color: '#fff',
|
||||
padding: '8px 16px',
|
||||
border: 'none',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
buttonOutline: {
|
||||
backgroundColor: '#fff',
|
||||
color: '#007bff',
|
||||
padding: '8px 16px',
|
||||
border: '1px solid #007bff',
|
||||
borderRadius: '4px',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
<div className="new_formation_2025">
|
||||
|
||||
|
||||
<div style={styles.card}>
|
||||
<div style={{ width: '100%', textAlign: 'right', zIndex: '9999' }}>
|
||||
|
||||
<div style={{ width: '50%', float: 'left' }}> </div>
|
||||
|
||||
{props.formation.cpf && String(props.formation.cpf) === String("1") && <div className="case_cpf" >
|
||||
<span className="tag_cpf_txt_ok_cpf" >{"OUI CPF"}</span>
|
||||
</div>
|
||||
}
|
||||
{props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
|
||||
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
|
||||
</div>
|
||||
}
|
||||
{!props.formation.cpf && String(props.formation.cpf) !== String("1") && <div className="case_cpf">
|
||||
<span className="tag_cpf_txt_no_ok_cpf">{"NON CPF"}</span>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{class_img_stored_in_bdd && String(class_img_stored_in_bdd).length > 50 &&
|
||||
<img src={class_img_stored_in_bdd} alt="Formation" style={styles.image} />
|
||||
}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) &&
|
||||
(!props.formation.img_url || String(props.formation.img_url).length <= 10) &&
|
||||
String(ismetiermanaged) !== "0" && String(ismetiermanaged) !== "1" &&
|
||||
|
||||
<div >
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("it") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_program} alt="informatique" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("graphisme") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_graphisme} alt="graphisme" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("management") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_management} alt="management" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("digital") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_digital} alt="digital" style={styles.image} />}
|
||||
|
||||
{(!props.formation.img_url || String(props.formation.img_url).length <= 0) &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("office") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_bureautic} alt="office" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("rh") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_rh} alt="ressources humaines" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("vente") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_vente} alt="vente" style={styles.image} />}
|
||||
|
||||
{!props.formation.img_url || String(props.formation.img_url).length <= 0 &&
|
||||
props.formation.metier && String(props.formation.metier).toLocaleLowerCase() === String("dev_perso") &&
|
||||
String(isclassimage) === "False" && <img src={img_met_dev_perso} alt="developpement personnel" style={styles.image} />}
|
||||
|
||||
{String(isclassimage) === "True" && <img src={userimgclassprofil} alt="developpement personnel" style={styles.image} />}
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length > 100 &&
|
||||
<div>
|
||||
<img src={userimgclassprofil} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "0" && String(userimgclassprofil).length <= 100 &&
|
||||
<div>
|
||||
<img src={img_met_autre} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par :<br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
{(!class_img_stored_in_bdd || String(class_img_stored_in_bdd).length < 50) && String(ismetiermanaged) === "1" &&
|
||||
<div>
|
||||
<img src={props.formation.img_url} alt="autre" style={styles.image} />
|
||||
{/*props.formation.institut_formation && <div style={{ width: '100%', "textAlign": "center" }}> Dispensé par : <br />
|
||||
{String(props.formation.institut_formation)} </div>*/}
|
||||
</div>}
|
||||
|
||||
|
||||
<div className="block_main_contente">
|
||||
<div className="block_top_content">
|
||||
<div className="div_row_gauche" >
|
||||
{props.formation.note && String(props.formation.note).length === 1 &&
|
||||
parseInt(String(props.formation.note)) <= 5 &&
|
||||
<Rating name="half-rating-read" defaultValue={props.formation.note} precision={0.5} readOnly style={{ fontSize: '15px' }} />
|
||||
}
|
||||
</div>
|
||||
|
||||
<h3 className="formation_titre">{String(parse(String(props.formation.title).replace(/(<([^>]+)>)/ig, ''))).substring(0, 50)}</h3>
|
||||
{props.formation.discounted_price && props.formation.business_prices && <p className="formation_prix">{props.formation.discounted_price} € HT </p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length <= 0
|
||||
&& <p className="formation_prix">{props.formation.price} € HT </p>}
|
||||
|
||||
{props.formation.business_prices && props.formation.business_prices.length > 0 &&
|
||||
<p style={{ width: '100%', float: 'left' }}>
|
||||
|
||||
<p className="formation_prix" style={{ width: '100%', float: 'left' }}>{props.formation.business_prices[0].discounted_price}€ HT
|
||||
<font className='training_price_barre' style={{ fontSize: '14px' }}> {props.formation.price} € HT </font>
|
||||
<font className='discount_block' style={{ fontSize: '14px' }}> ({props.formation.business_prices[0].discount} %) </font></p>
|
||||
</p>}
|
||||
|
||||
<p className="formation_description"> {String(parse(String(props.formation.description).replace(/(<([^>]+)>)/ig, ''))).substring(0, 80)}...</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="block_cats">
|
||||
<button className="block_cats_bton_detail">
|
||||
<nav className="block_cats_bton_detail_text"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
if (props.formation.url && props.formation.url.length > 5) {
|
||||
|
||||
window.open(
|
||||
props.formation.url,
|
||||
'_blank'
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
"/detail-formation/" + props.formation.internal_url,
|
||||
'_blank'
|
||||
);
|
||||
}
|
||||
}}> Voir les détails </nav></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
export default New_C_Formation_2025;
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2680,7 +2680,7 @@ function UpdateParnterInfo(props) {
|
|||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
setLoading(false);
|
||||
console.log(" In Add_Update_Catalog_Pub_Banniere res.data.status = " + res.data.status);
|
||||
console.log(" In Add_Update_Catalog_Pub_Banniere res.data.status = " + res.data.status);
|
||||
console.log(" In Add_Update_Catalog_Pub_Banniere res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
|
@ -3616,6 +3616,21 @@ function UpdateParnterInfo(props) {
|
|||
>
|
||||
<OpenInNewIcon />
|
||||
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
|
||||
onClick={(event) => {
|
||||
window.open(
|
||||
String(partner_ent_student_url),
|
||||
'_blank'
|
||||
);
|
||||
}}
|
||||
|
||||
style={{ marginTop: '10px' }}
|
||||
>
|
||||
Messages ENT
|
||||
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -950,6 +950,8 @@
|
|||
float: right;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-family: 'DM Sans';
|
||||
font-size: '12px';
|
||||
}
|
||||
|
||||
.nav_descrip_champs {
|
||||
|
|
@ -1457,8 +1459,9 @@
|
|||
width: 12%;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
|
||||
text-align: center;
|
||||
font-family: 'DM Sans';
|
||||
font-size: '14px';
|
||||
}
|
||||
|
||||
.nav_descrip_champs {
|
||||
|
|
@ -1953,6 +1956,8 @@
|
|||
float: right;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
font-family: 'DM Sans';
|
||||
font-size: '14px';
|
||||
}
|
||||
|
||||
.nav_descrip_champs {
|
||||
|
|
|
|||
Loading…
Reference in New Issue