19/09/2023 - 19h30
parent
eb0893c8bd
commit
c283ba0115
|
@ -1554,7 +1554,7 @@ function Abonnement(props) {
|
|||
{String(testval) === String("false") && <div className="koUpdateData"> Impossible de modifier les informations </div>}
|
||||
|
||||
|
||||
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }}>
|
||||
<Box alignItems="left" sx={{ '& > :not(style)': { m: 1 }, width: '100%', }}>
|
||||
|
||||
<TextField
|
||||
required
|
||||
|
|
|
@ -63,11 +63,11 @@ const Config_Documents = (props) => {
|
|||
const columns = [
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: 'nom', headerName: 'nom', width: 150, hideable: false, },
|
||||
{ field: 'ref_interne', headerName: 'ref_interne', width: 150, hideable: false, },
|
||||
{ field: 'nom', headerName: 'nom', hideable: false, flex:1},
|
||||
{ field: 'ref_interne', headerName: 'ref_interne', hideable: false, flex:1},
|
||||
{ field: 'type_doc', headerName: 'type_doc', width: 150, hideable: false, },
|
||||
{ field: 'cible', headerName: 'cible', width: 150, hide: false, editable: true },
|
||||
{ field: 'sujet', headerName: 'sujet', width: 150, hide: false, editable: true },
|
||||
{ field: 'cible', headerName: 'cible', width: 150, hide: false, editable: false },
|
||||
{ field: 'sujet', headerName: 'sujet', hide: false, editable: false, flex:1 },
|
||||
|
||||
|
||||
/*{
|
||||
|
|
|
@ -26,6 +26,7 @@ import Box from '@mui/material/Box';
|
|||
import 'react-tooltip/dist/react-tooltip.css'
|
||||
import { Tooltip } from 'react-tooltip'
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||
import { CiTrash } from "react-icons/ci";
|
||||
|
||||
const DistplayPartnerTraningsPage = (props) => {
|
||||
|
||||
|
@ -229,6 +230,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
const columns = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'lms_class_code', headerName: 'lms_class_code', hide: true },
|
||||
{ field: 'zone_diffusion', headerName: 'zone_diffusion', hide: true },
|
||||
{ field: 'internal_url', headerName: 'internal_url', hide: true },
|
||||
|
@ -372,6 +374,68 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "delete", headerName: 'Supprimer',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
||||
<Popup
|
||||
trigger={<Button
|
||||
|
||||
onClick={(event) => {
|
||||
// handleClick_delete(event, cellValues);
|
||||
}}
|
||||
>
|
||||
<CiTrash />
|
||||
|
||||
</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, la formation sera <i><font color="red"> définitivement supprimée</font></i>. <br />
|
||||
Avant, assurez-vous de n'avoir aucune session rattachée à la formation.
|
||||
|
||||
</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
handleClick_delete(event, cellValues);
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
||||
</div>
|
||||
<div style={{ "width": "45%", "float": "right" }}>
|
||||
<button
|
||||
className="gest_bton_popup"
|
||||
onClick={() => {
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}
|
||||
>
|
||||
Annuler
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Popup>
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
|
||||
|
@ -629,7 +693,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
}
|
||||
}
|
||||
|
||||
function Delete_class(tab_class) {
|
||||
function Disable_class(tab_class) {
|
||||
|
||||
var url = process.env.REACT_APP_API_URL + "myclass/api/disable_class/";
|
||||
|
||||
|
@ -693,7 +757,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
}
|
||||
|
||||
else if (String(actionenmasse) === String("supprimer")) {
|
||||
Delete_class(liste_formation);
|
||||
Disable_class(liste_formation);
|
||||
GetAllClass_WOfilter();
|
||||
}
|
||||
|
||||
|
@ -721,6 +785,61 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function handleClick_delete(event, cellValues) {
|
||||
|
||||
var local_class_id = cellValues.row._id;
|
||||
|
||||
Delete_Class(local_class_id);
|
||||
}
|
||||
|
||||
|
||||
const [Delete_Class_api, setDelete_Class_api] = useState();
|
||||
const [Delete_Class_message, setDelete_Class_message] = useState();
|
||||
const [Delete_Class_result, setDelete_Class_result] = useState();
|
||||
function Delete_Class(local_class_id) {
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("class_id", local_class_id);
|
||||
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/delete_Class/";
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
//console.log(" In Delete_Class res.data.status = " + res.data.status);
|
||||
//console.log(" In Delete_Class res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
setDelete_Class_api("true");
|
||||
setDelete_Class_result(res.data.message);
|
||||
|
||||
GetAllClass_new();
|
||||
alert(res.data.message)
|
||||
}
|
||||
else {
|
||||
setDelete_Class_api("false");
|
||||
setDelete_Class_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
|
||||
console.log('Delete_Class : Not good man :( Delete_Class = ' + error);
|
||||
setDelete_Class_api("false");
|
||||
alert(" Impossible de supprimer la formation");
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
||||
|
||||
|
@ -838,7 +957,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
const value = event.target.value;
|
||||
|
||||
|
||||
if (String(value) === "publier" || String(value) === "depublier" || String(value) === "supprmier") {
|
||||
if (String(value) === "publier" || String(value) === "depublier" || String(value) === "desactiver") {
|
||||
setactionmass_ftion_val(value);
|
||||
}
|
||||
else {
|
||||
|
@ -866,8 +985,8 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
var liste_formation = GetSelectedRowsTraining();
|
||||
|
||||
console.log(" liste_formation = ", liste_formation);
|
||||
console.log(" actionmass_ftion_val = ", actionmass_ftion_val);
|
||||
//console.log(" liste_formation = ", liste_formation);
|
||||
//console.log(" actionmass_ftion_val = ", actionmass_ftion_val);
|
||||
|
||||
if (String(actionmass_ftion_val) === String("depublier")) {
|
||||
|
||||
|
@ -882,8 +1001,8 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
window.location.reload();
|
||||
}
|
||||
|
||||
else if (String(actionmass_ftion_val) === String("supprimer")) {
|
||||
Delete_class(liste_formation);
|
||||
else if (String(actionmass_ftion_val) === String("desactiver")) {
|
||||
Disable_class(liste_formation);
|
||||
GetAllClass_WOfilter();
|
||||
window.location.reload();
|
||||
}
|
||||
|
@ -1201,6 +1320,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
{
|
||||
id: index,
|
||||
_id: JSON.parse(item)._id,
|
||||
internal_url: JSON.parse(item).internal_url,
|
||||
zone_diffusion: JSON.parse(item).zone_diffusion_str,
|
||||
external_code: JSON.parse(item).external_code,
|
||||
|
@ -1276,7 +1396,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
<MenuItem value="" style={{ "paddingLeft": "5px", "textAlign": "left" }}>Action </MenuItem>
|
||||
<MenuItem value="publier" style={{ "paddingLeft": "5px", "textAlign": "left" }}>Publier </MenuItem>
|
||||
<MenuItem value="depublier" style={{ "paddingLeft": "5px", "textAlign": "left" }}>Dépublier </MenuItem>
|
||||
<MenuItem value="supprmier" style={{ "paddingLeft": "5px", "textAlign": "left" }}>Supprimer </MenuItem>
|
||||
<MenuItem value="desactiver" style={{ "paddingLeft": "5px", "textAlign": "left" }}>Désactiver </MenuItem>
|
||||
|
||||
</TextField>
|
||||
|
||||
|
|
|
@ -4182,7 +4182,7 @@ function GestionAdministrative(props) {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("class_internal_url", internal_url);
|
||||
form.append("session_id", code_session);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("nom", one_nom_part);
|
||||
form.append("prenom", one_prenom_part);
|
||||
form.append("email", one_email_part);
|
||||
|
|
|
@ -2408,10 +2408,11 @@ const Materiels = (props) => {
|
|||
|
||||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
||||
|
||||
<Button variant="outlined" onClick={submenu_import_materiel} className="detail_class_submenu bton_import_excel"
|
||||
{/* <Button variant="outlined" onClick={submenu_import_materiel} className="detail_class_submenu bton_import_excel"
|
||||
id='menu_import_participant' name='menu_import_participant'>Importer du materiel Excel
|
||||
<img src={excel_icone} alt="ajout csv" className="icon_excel" />
|
||||
</Button>
|
||||
*/}
|
||||
|
||||
|
||||
<Button variant="outlined" onClick={submenu_add_one_materiel}
|
||||
|
|
|
@ -17,7 +17,7 @@ import logowhite from "../mysy_img/MYSY-LOGO-WHITE.png";
|
|||
|
||||
import downarrow from "../mysy_img/downarrow.png";
|
||||
import uparrow from "../mysy_img/uparrow.png";
|
||||
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
import { GiTeacher } from "react-icons/gi";
|
||||
import Footer from "./Fotter";
|
||||
import { confirmAlert } from 'react-confirm-alert'; // Import
|
||||
|
@ -148,7 +148,7 @@ const Partner = (props) => {
|
|||
formData.append("token", stored_cookie);
|
||||
|
||||
//console.log("token = " + stored_cookie); theme_name
|
||||
|
||||
setLoading(true);
|
||||
fetch(
|
||||
process.env.REACT_APP_API_URL + "myclass/api/add_class_mass/",
|
||||
{
|
||||
|
@ -162,7 +162,9 @@ const Partner = (props) => {
|
|||
setexcelimportmessage(result['message']);
|
||||
setmyApiResponse("true");
|
||||
setapiexcelimportmessage(result['status']);
|
||||
setLoading(false);
|
||||
if (String(result['status']) === String("true")) {
|
||||
|
||||
sethandleSubmission_api("true");
|
||||
var local_message = result['message'] + " Vous allez être redirigé vers la liste des formations"
|
||||
alert(local_message);
|
||||
|
@ -183,6 +185,7 @@ const Partner = (props) => {
|
|||
//alert("result['status'] " + result['status']);
|
||||
})
|
||||
.catch((error) => {
|
||||
setLoading(false);
|
||||
console.error('Error:', result);
|
||||
setmyApiResponse("false");
|
||||
setapiexcelimportmessage("-1");
|
||||
|
@ -629,6 +632,9 @@ const Partner = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
||||
|
||||
const [GetPartnerLMSData_api, setGetPartnerLMSData_api] = useState();
|
||||
const [GetPartnerLMSData_result, setGetPartnerLMSData_result] = useState();
|
||||
const [GetPartnerLMSData_message, setGetPartnerLMSData_message] = useState();
|
||||
|
@ -700,6 +706,8 @@ const Partner = (props) => {
|
|||
return (
|
||||
|
||||
<div className="partner">
|
||||
|
||||
|
||||
<Helmet>
|
||||
<title>Partenaires editeurs formations</title>
|
||||
<meta name="description" content="backoffice partenaire editeurs formation" />
|
||||
|
@ -710,6 +718,9 @@ const Partner = (props) => {
|
|||
|
||||
|
||||
<div className="div_mobile">
|
||||
{isLoading && <div className="loader-container">
|
||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||
</div>}
|
||||
<div className="sub_dib_mobile">
|
||||
<div className="div_gauche">
|
||||
<img class="img-responsive img_user" src={userimgprofil} />
|
||||
|
|
|
@ -53,6 +53,8 @@ import Typography from '@mui/material/Typography';
|
|||
const PartnerClientActivite = (props) => {
|
||||
|
||||
const history = useHistory();
|
||||
var date_today_90j = new Date();
|
||||
date_today_90j.setDate(date_today_90j.getDate() +90);
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
@ -335,30 +337,42 @@ const PartnerClientActivite = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
form.append("description", one_activite_description);
|
||||
form.append("detail", one_activite_detail);
|
||||
form.append("deadline", format(one_activite_deadline, 'dd/MM/yyyy'));
|
||||
form.append("type", one_activite_type);
|
||||
form.append("status", one_activite_status);
|
||||
|
||||
|
||||
// Controle d'integrité des infos
|
||||
if (one_activite_description.length == 0) {
|
||||
if (one_activite_description && one_activite_description.length == 0) {
|
||||
alert(" Le champ 'Description' est vide ");
|
||||
return;
|
||||
}
|
||||
|
||||
if (one_activite_description.length > 255) {
|
||||
if (one_activite_description && one_activite_description.length > 255) {
|
||||
alert(" Le champ 'Description' comporte plus de 255 caractères ");
|
||||
return;
|
||||
}
|
||||
|
||||
if (one_activite_detail.length > 255) {
|
||||
if (one_activite_detail && one_activite_detail.length > 255) {
|
||||
alert(" Le champ 'Détail' comporte plus de 255 caractères ");
|
||||
return;
|
||||
}
|
||||
|
||||
if (one_activite_description)
|
||||
form.append("description", one_activite_description);
|
||||
else
|
||||
form.append("description", "");
|
||||
|
||||
if (one_activite_detail)
|
||||
form.append("detail", one_activite_detail);
|
||||
else
|
||||
form.append("detail", "");
|
||||
|
||||
if (one_activite_deadline)
|
||||
form.append("deadline", one_activite_deadline);
|
||||
|
||||
if (one_activite_type)
|
||||
form.append("type", one_activite_type);
|
||||
|
||||
if (one_activite_status)
|
||||
form.append("status", one_activite_status);
|
||||
|
||||
|
||||
var myurl = "";
|
||||
|
@ -620,16 +634,19 @@ const PartnerClientActivite = (props) => {
|
|||
|
||||
|
||||
const [one_activite_description, setone_activite_description] = useState();
|
||||
const [one_activite_deadline, setone_activite_deadline] = useState();
|
||||
const [one_activite_type, setone_activite_type] = useState();
|
||||
const [one_activite_status, setone_activite_status] = useState();
|
||||
const [one_activite_deadline, setone_activite_deadline] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||
const [one_activite_type, setone_activite_type] = useState("call");
|
||||
const [one_activite_status, setone_activite_status] = useState("0");
|
||||
const [one_activite_detail, setone_activite_detail] = useState();
|
||||
|
||||
function Close_add_one_activite() {
|
||||
setone_activite_description();
|
||||
setone_activite_deadline();
|
||||
setone_activite_type();
|
||||
setone_activite_status();
|
||||
|
||||
setone_activite_deadline(new Date().toLocaleDateString('fr-FR'));
|
||||
|
||||
|
||||
setone_activite_type("call");
|
||||
setone_activite_status("0");
|
||||
setone_activite_detail();
|
||||
|
||||
setshowactivite_detail();
|
||||
|
@ -910,9 +927,10 @@ const PartnerClientActivite = (props) => {
|
|||
<DatePicker
|
||||
name="activite_deadline"
|
||||
id="activite_deadline"
|
||||
selected={one_activite_deadline}
|
||||
selected={new Date(moment(one_activite_deadline, "DD/MM/YYYY HH:mm:ss"))}
|
||||
|
||||
onChange={(date) => {
|
||||
setone_activite_deadline(date);
|
||||
setone_activite_deadline(format(date, 'dd/MM/yyyy'));
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.834);
|
||||
background: white;
|
||||
background-color: transparent;
|
||||
z-index: 1;
|
||||
top: 0px;
|
||||
opacity: 80%;
|
||||
|
@ -23,6 +24,11 @@
|
|||
background-color: red;
|
||||
color: black;
|
||||
}
|
||||
.mysy_spinner{
|
||||
border-radius: 5px;
|
||||
border: 1px solid black;
|
||||
opacity: 100%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue