20/12/2023 - 22h30
parent
a98bfdfbf6
commit
ca67e28696
|
@ -0,0 +1,110 @@
|
|||
import React, { useRef, useState, useEffect } from "react";
|
||||
import TextField from '@mui/material/TextField';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
|
||||
import Button from '@mui/material/Button';
|
||||
import axios from "axios";
|
||||
import { getCookie, setCookie } from 'react-use-cookie';
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { 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 Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import { FcSearch } from "react-icons/fc";
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint, FcAlarmClock, FcMultipleSmartphones, FcWorkflow } from "react-icons/fc";
|
||||
import DatePicker from "react-datepicker";
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
import { format } from 'date-fns'
|
||||
import moment from "moment";
|
||||
import InputAdornment from '@mui/material/InputAdornment';
|
||||
import { AiFillCloseCircle, AiOutlineConsoleSql } 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';
|
||||
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 { RestoreFromTrashRounded } from "@mui/icons-material";
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
import { Fab } from "@material-ui/core";
|
||||
import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
|
||||
import { AiTwotoneEdit, AiTwotoneSave } from "react-icons/ai";
|
||||
import { confirmAlert } from 'react-confirm-alert';
|
||||
import ToggleSwitch from "./ToggleSwitch";
|
||||
import Module_Historique_Action from "./Module_Historique_Action";
|
||||
import { HiDocumentCheck } from "react-icons/hi2";
|
||||
import { BsSend } from "react-icons/bs";
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import { FcOpenedFolder } from "react-icons/fc";
|
||||
|
||||
const Apprenant = (props) => {
|
||||
|
||||
const history = useHistory();
|
||||
const [submenu, setsubmenu] = useState("");
|
||||
const [rowss, setRows] = useState([]);
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
const [Dialog_1_message, setDialog_1_message] = React.useState(false);
|
||||
const [Dialog_1_open, setDialog_1_open] = React.useState(false);
|
||||
function Dialog_1_handle_change_participant_session(message) {
|
||||
setDialog_1_message(message);
|
||||
setDialog_1_open(true);
|
||||
}
|
||||
|
||||
const Dialog_1_handleClose = () => {
|
||||
|
||||
};
|
||||
|
||||
const Dialog_1_handleClose_buton = () => {
|
||||
setDialog_1_open(false);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="apprenant">
|
||||
|
||||
{isLoading && <div className="loader-container">
|
||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||
</div>}
|
||||
|
||||
<Dialog
|
||||
open={Dialog_1_open}
|
||||
onClose={Dialog_1_handleClose}
|
||||
|
||||
>
|
||||
|
||||
<DialogTitle>MySy Information</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
{Dialog_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
</DialogContent>
|
||||
|
||||
<DialogActions>
|
||||
<Button onClick={Dialog_1_handleClose_buton}>OK</Button>
|
||||
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
<h3> Vos apprenants </h3>
|
||||
|
||||
|
||||
</div >
|
||||
);
|
||||
}
|
||||
|
||||
export default Apprenant;
|
|
@ -882,7 +882,8 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
GetAllClass_new();
|
||||
|
||||
|
||||
if (String(props.class_internal_url).length > 3 && String(props.class_external_code).length > 3 ) {
|
||||
if (props.class_internal_url && props.class_external_code &&
|
||||
String(props.class_internal_url).length > 3 && String(props.class_external_code).length > 3 ) {
|
||||
|
||||
setLoading(true);
|
||||
setreftrainingtoupdate(props.class_internal_url);
|
||||
|
|
|
@ -36,6 +36,7 @@ import {
|
|||
FcBusinesswoman, FcServices, FcCollect, FcCandleSticks, FcKindle,
|
||||
FcFlowChart, FcReading, FcFinePrint, FcCancel, FcCalendar,
|
||||
} from "react-icons/fc";
|
||||
import { PiStudent } from "react-icons/pi";
|
||||
|
||||
import { BiPurchaseTag } from "react-icons/bi";
|
||||
|
||||
|
@ -57,6 +58,8 @@ import Dashbord_Session from "./Dashbord_Session";
|
|||
import Mon_Tableau_De_Bord from "./Mon_Tableau_De_Bord";
|
||||
import Dashbord_Formation from "./Dashbord_Formation";
|
||||
import Partner_Prix_Achat from "./Partner_Prix_Achat";
|
||||
import Apprenant from "./Apprenant";
|
||||
|
||||
|
||||
import Dialog from '@mui/material/Dialog';
|
||||
import DialogActions from '@mui/material/DialogActions';
|
||||
|
@ -315,7 +318,7 @@ const Partner = (props) => {
|
|||
'mes_sessions', 'setuplms', 'facture', 'pricing', 'mes_clients', 'mes_devis', 'mes_cmd',
|
||||
'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique",
|
||||
"config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashbord_formation",
|
||||
"dashbord_session", "mon_tableau_de_bord", "prix_achat"]
|
||||
"dashbord_session", "mon_tableau_de_bord", "prix_achat", "mes_apprenants"]
|
||||
|
||||
|
||||
if (action && list_menu.includes(action)) {
|
||||
|
@ -622,6 +625,19 @@ const Partner = (props) => {
|
|||
}
|
||||
}
|
||||
|
||||
function mes_apprenants_func(event) {
|
||||
var security_retval = check_user_acces_right("stagiaire", "read");
|
||||
if (security_retval === 1) {
|
||||
setmenu("mes_apprenants");
|
||||
setapiexcelimportmessage();
|
||||
setformation_file_name();
|
||||
history.push("/Partner/mes_apprenants");
|
||||
document.body.style.backgroundColor = "#ffffff";
|
||||
} else {
|
||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des stagiaires");
|
||||
}
|
||||
}
|
||||
|
||||
function DisplayeEmployeList(event) {
|
||||
var security_retval = check_user_acces_right("employe", "read");
|
||||
if (security_retval === 1) {
|
||||
|
@ -1153,6 +1169,11 @@ const Partner = (props) => {
|
|||
{String(menu) === "mes_stagiaires" && <div className="sousmenu_selected" onClick={DiplayStagiaireList} ><FcReading className="icone_menu" /> MES STAGIAIRES</div>}
|
||||
<hr className="my_hr" />
|
||||
|
||||
{String(menu) !== "mes_apprenants" && <div className="sousmenu" onClick={mes_apprenants_func} > <PiStudent className="icone_menu" /> MES APPRENANTS </div>}
|
||||
{String(menu) === "mes_apprenants" && <div className="sousmenu_selected" onClick={mes_apprenants_func} ><PiStudent className="icone_menu" /> MES APPRENANTS</div>}
|
||||
<hr className="my_hr" />
|
||||
|
||||
|
||||
{String(menu) !== "mes_employes" && <div className="sousmenu" onClick={DisplayeEmployeList} > <GiTeacher className="icone_menu" /> MES EMPLOYES </div>}
|
||||
{String(menu) === "mes_employes" && <div className="sousmenu_selected" onClick={DisplayeEmployeList} ><GiTeacher className="icone_menu" /> MES EMPLOYES</div>}
|
||||
<hr className="my_hr" />
|
||||
|
@ -1327,8 +1348,8 @@ const Partner = (props) => {
|
|||
|
||||
{String(menu) === "affichage" &&
|
||||
<div className="div_droite">
|
||||
<PartnerTranings ispending={partnerstatus} currentpack={partnerPackService} conntected_employee_id={conntected_employee_id}
|
||||
class_external_code={orderid} class_internal_url={packs}/>
|
||||
<PartnerTranings ispending={partnerstatus} currentpack={partnerPackService} conntected_employee_id={conntected_employee_id}
|
||||
class_external_code={orderid} class_internal_url={packs} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -1484,9 +1505,9 @@ const Partner = (props) => {
|
|||
|
||||
{String(menu) === "mes_sessions" &&
|
||||
<div className="div_droite">
|
||||
|
||||
|
||||
<DisplayPartnerSession conntected_employee_id={conntected_employee_id} object_key={orderid} class_internal_url={packs}
|
||||
read_access={check_user_acces_right("session", "read")} write_access={check_user_acces_right("session", "write")} />
|
||||
read_access={check_user_acces_right("session", "read")} write_access={check_user_acces_right("session", "write")} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -1540,6 +1561,13 @@ const Partner = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
{String(menu) === "mes_apprenants" && <div className="div_droite">
|
||||
|
||||
<Apprenant conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("stagiaire", "read")} write_access={check_user_acces_right("stagiaire", "write")} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(menu) === "abonnement" && <div className="div_droite">
|
||||
|
||||
<Abonnement currentpack={partnerPackService} conntected_employee_id={conntected_employee_id} read_access={check_user_acces_right("abonnement", "read")} write_access={check_user_acces_right("abonnement", "write")} />
|
||||
|
@ -1553,8 +1581,8 @@ const Partner = (props) => {
|
|||
|
||||
{String(menu) === "mes_clients" && <div className="div_droite">
|
||||
|
||||
<Partner_Client conntected_employee_id={conntected_employee_id} object_key={orderid}
|
||||
read_access={check_user_acces_right("client", "read")} write_access={check_user_acces_right("client", "write")} />
|
||||
<Partner_Client conntected_employee_id={conntected_employee_id} object_key={orderid}
|
||||
read_access={check_user_acces_right("client", "read")} write_access={check_user_acces_right("client", "write")} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -92,4 +92,5 @@
|
|||
@import "./components/dashbord_formation";
|
||||
@import "./components/module_historique_action";
|
||||
@import "./components/partner_prix_achat";
|
||||
@import "./components/apprenant";
|
||||
|
||||
|
|
Loading…
Reference in New Issue