30/11/2023 - 21h
parent
d55fc269c6
commit
50d8e75f13
File diff suppressed because it is too large
Load Diff
25
package.json
25
package.json
|
@ -4,8 +4,6 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dr.pogodin/react-global-state": "^0.6.5",
|
"@dr.pogodin/react-global-state": "^0.6.5",
|
||||||
"@emotion/react": "^11.11.1",
|
|
||||||
"@emotion/styled": "^11.11.0",
|
|
||||||
"@fortawesome/fontawesome": "^1.1.8",
|
"@fortawesome/fontawesome": "^1.1.8",
|
||||||
"@fortawesome/fontawesome-free-solid": "^5.0.13",
|
"@fortawesome/fontawesome-free-solid": "^5.0.13",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
||||||
|
@ -14,22 +12,22 @@
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
||||||
"@fortawesome/react-fontawesome": "^0.1.18",
|
"@fortawesome/react-fontawesome": "^0.1.18",
|
||||||
"@fullcalendar/core": "^6.1.9",
|
"@fullcalendar/core": "^6.1.9",
|
||||||
"@fullcalendar/daygrid": "^6.1.8",
|
"@fullcalendar/daygrid": "^6.1.9",
|
||||||
"@fullcalendar/interaction": "^6.1.8",
|
"@fullcalendar/interaction": "^6.1.9",
|
||||||
"@fullcalendar/react": "^6.1.8",
|
"@fullcalendar/react": "^6.1.9",
|
||||||
"@fullcalendar/timegrid": "^6.1.9",
|
"@fullcalendar/timegrid": "^6.1.9",
|
||||||
"@mantine/core": "^4.2.10",
|
"@mantine/core": "^4.2.10",
|
||||||
"@mantine/hooks": "^4.2.10",
|
"@mantine/hooks": "^4.2.10",
|
||||||
"@mantine/rte": "^4.2.10",
|
"@mantine/rte": "^4.2.10",
|
||||||
"@material-ui/core": "^4.12.4",
|
"@material-ui/core": "^4.12.4",
|
||||||
"@material/tooltip": "^14.0.0",
|
|
||||||
"@mui/icons-material": "^5.4.2",
|
"@mui/icons-material": "^5.4.2",
|
||||||
"@mui/lab": "^5.0.0-alpha.137",
|
"@mui/lab": "^5.0.0-alpha.140",
|
||||||
"@mui/material": "^5.14.4",
|
"@mui/material": "^5.14.5",
|
||||||
"@mui/styles": "^5.14.4",
|
"@mui/styles": "^5.14.5",
|
||||||
"@mui/x-data-grid": "^5.17.26",
|
"@mui/x-data-grid": "^5.5.1",
|
||||||
"@mui/x-date-pickers": "^5.0.0",
|
"@mui/x-date-pickers": "^5.0.0",
|
||||||
"@mui/x-date-pickers-pro": "^5.0.0",
|
"@mui/x-date-pickers-pro": "^5.0.0",
|
||||||
|
"@nivo/bar": "^0.84.0",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
"@stripe/react-stripe-js": "^1.12.0",
|
"@stripe/react-stripe-js": "^1.12.0",
|
||||||
"@stripe/stripe-js": "^1.35.0",
|
"@stripe/stripe-js": "^1.35.0",
|
||||||
|
@ -53,17 +51,15 @@
|
||||||
"gatsby-plugin-cookie-gdpr-axeptio": "^1.0.2",
|
"gatsby-plugin-cookie-gdpr-axeptio": "^1.0.2",
|
||||||
"google-map-react": "^2.1.10",
|
"google-map-react": "^2.1.10",
|
||||||
"html-react-parser": "^2.0.0",
|
"html-react-parser": "^2.0.0",
|
||||||
"install": "^0.13.0",
|
|
||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"js-file-download": "^0.4.12",
|
"js-file-download": "^0.4.12",
|
||||||
"js-video-url-parser": "^0.5.1",
|
"js-video-url-parser": "^0.5.1",
|
||||||
"lucide-react": "^0.263.1",
|
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"mui-datatables": "^4.3.0",
|
"mui-datatables": "^4.3.0",
|
||||||
"mui-daterange-picker": "^1.0.5",
|
"mui-daterange-picker": "^1.0.5",
|
||||||
"next": "^12.0.10",
|
"next": "^12.0.10",
|
||||||
"next-link": "^2.0.0",
|
"next-link": "^2.0.0",
|
||||||
"npm": "^9.6.7",
|
"nivo": "^0.31.0",
|
||||||
"popups": "^1.1.3",
|
"popups": "^1.1.3",
|
||||||
"powerbi-client": "^2.19.1",
|
"powerbi-client": "^2.19.1",
|
||||||
"powerbi-client-react": "^1.3.3",
|
"powerbi-client-react": "^1.3.3",
|
||||||
|
@ -86,6 +82,7 @@
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-draft-wysiwyg": "^1.14.7",
|
"react-draft-wysiwyg": "^1.14.7",
|
||||||
"react-dropdown-select": "^4.8.0",
|
"react-dropdown-select": "^4.8.0",
|
||||||
|
"react-dual-range-slider": "^1.0.4",
|
||||||
"react-dual-rangeslider": "^1.2.16",
|
"react-dual-rangeslider": "^1.2.16",
|
||||||
"react-elastic-carousel": "^0.11.5",
|
"react-elastic-carousel": "^0.11.5",
|
||||||
"react-facebook": "^8.1.4",
|
"react-facebook": "^8.1.4",
|
||||||
|
@ -135,7 +132,7 @@
|
||||||
"recharts": "^2.1.14",
|
"recharts": "^2.1.14",
|
||||||
"redux": "^4.1.2",
|
"redux": "^4.1.2",
|
||||||
"router": "^1.3.5",
|
"router": "^1.3.5",
|
||||||
"rsuite": "^5.40.0",
|
"rsuite": "^5.18.0",
|
||||||
"semantic-ui-react": "^2.1.2",
|
"semantic-ui-react": "^2.1.2",
|
||||||
"state-pool": "^0.6.0",
|
"state-pool": "^0.6.0",
|
||||||
"styled-components": "^5.3.5",
|
"styled-components": "^5.3.5",
|
||||||
|
|
|
@ -43,11 +43,12 @@ import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
import daygridPlugin from "@fullcalendar/daygrid";
|
import daygridPlugin from "@fullcalendar/daygrid";
|
||||||
//import interactionPlugin from "@fullcalendar/interaction";
|
//import interactionPlugin from "@fullcalendar/interaction";
|
||||||
//import timeGridPlugin from "@fullcalendar/timegrid";
|
//import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import { v4 as uuid } from "uuid";
|
|
||||||
import allLocales from '@fullcalendar/core/locales-all'
|
import allLocales from '@fullcalendar/core/locales-all'
|
||||||
import { RepeatOnRounded } from "@mui/icons-material";
|
import { RepeatOnRounded } from "@mui/icons-material";
|
||||||
import { alignPropType } from "react-bootstrap/esm/types";
|
import { alignPropType } from "react-bootstrap/esm/types";
|
||||||
|
|
||||||
|
import { tokens } from "./../theme";
|
||||||
|
import { MdOutlineAddchart, MdAssignmentAdd, MdOutlinePlaylistRemove, MdDeleteForever } from "react-icons/md";
|
||||||
|
|
||||||
import FullCalendar, { formatDate } from "@fullcalendar/react";
|
import FullCalendar, { formatDate } from "@fullcalendar/react";
|
||||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||||
|
@ -61,6 +62,11 @@ import {
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import { ResponsiveBar } from "@nivo/bar";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const Dashbord_Session = (props) => {
|
const Dashbord_Session = (props) => {
|
||||||
|
|
||||||
const myconntected_employee_id = props.conntected_employee_id;
|
const myconntected_employee_id = props.conntected_employee_id;
|
||||||
|
@ -70,10 +76,159 @@ const Dashbord_Session = (props) => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const [isLoading, setLoading] = useState();
|
const [isLoading, setLoading] = useState();
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
|
const colors = tokens(theme.palette.mode);
|
||||||
|
|
||||||
|
const [isMySyDashboard, setisMySyDashboard] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
const [Getall_Qry_Session_Data_result_JSON, setGetall_Qry_Session_Data_result_JSON] = useState([]);
|
||||||
|
|
||||||
|
const [Getall_Qry_Session_Data_api, setGetall_Qry_Session_Data_api] = useState();
|
||||||
|
const [Getall_Qry_Session_Data_message, setGetall_Qry_Session_Data_message] = useState();
|
||||||
|
const [Getall_Qry_Session_Data_result, setGetall_Qry_Session_Data_result] = useState();
|
||||||
|
function Getall_Qry_Session_Data(event) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
|
var date_from = "";
|
||||||
|
if (one_SessionstartDate) {
|
||||||
|
date_from = format(one_SessionstartDate, 'dd/MM/yyyy');
|
||||||
|
console.log(" date_from = ", date_from);
|
||||||
|
}
|
||||||
|
|
||||||
|
var date_to = "";
|
||||||
|
if (one_SessionendDate) {
|
||||||
|
date_to = format(one_SessionendDate, 'dd/MM/yyyy');
|
||||||
|
console.log(" date_to = ", date_to);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("session_start_date", date_from);
|
||||||
|
form.append("session_end_date", date_to);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_List_Session_Data/";
|
||||||
|
|
||||||
|
console.log(" ## myurl = ", myurl);
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Getall_Qry_Session_Data res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Getall_Qry_Session_Data res.data.message r_class = " + res.data.message);
|
||||||
|
setGetall_Qry_Session_Data_result_JSON(JSON.parse('[' + res.data.message + ']'));
|
||||||
|
|
||||||
|
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
||||||
|
|
||||||
|
console.log(jsonObj);
|
||||||
|
console.log(Getall_Qry_Session_Data_result_JSON);
|
||||||
|
|
||||||
|
setGetall_Qry_Session_Data_api("true");
|
||||||
|
setGetall_Qry_Session_Data_result(res.data.message);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGetall_Qry_Session_Data_api("false");
|
||||||
|
setGetall_Qry_Session_Data_message(res.data.message);
|
||||||
|
alert(res.data.message)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Getall_Qry_Session_Data = ', error);
|
||||||
|
setGetall_Qry_Session_Data_api("false");
|
||||||
|
alert("Impossible de récuperer les données demandées")
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState();
|
||||||
|
const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState();
|
||||||
|
const [Add_To_User_TBD_result, setAdd_To_User_TBD_result] = useState();
|
||||||
|
function Add_To_User_TBD(event) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
|
||||||
|
|
||||||
|
var tdb_title = "default";
|
||||||
|
var filter_val = "";
|
||||||
|
|
||||||
|
|
||||||
|
if (document.getElementsByName("tdb_title")[0]) {
|
||||||
|
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.getElementsByName("filtre11")[0]) {
|
||||||
|
filter_val = document.getElementsByName("filtre11")[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Si filter_val = "d", alors on va recuperer l'interval de date
|
||||||
|
if( String(filter_val) === "d"){
|
||||||
|
var date_from = format(one_SessionstartDate, 'dd/MM/yyyy');
|
||||||
|
var date_to = format(one_SessionendDate, 'dd/MM/yyyy');
|
||||||
|
|
||||||
|
|
||||||
|
filter_val = "{'session_start_date':'"+String(date_from)+"' , 'session_end_date':'"+String(date_to)+"'}";
|
||||||
|
}else{
|
||||||
|
filter_val = "{'periode':'"+String(filter_val)+"'}"
|
||||||
|
}
|
||||||
|
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
form.append("dashbord_internal_code", dashbord_internal_code);
|
||||||
|
form.append("default_filter", filter_val);
|
||||||
|
form.append("title", tdb_title);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_To_User_Dashbord/";
|
||||||
|
|
||||||
|
console.log(" ## myurl = ", myurl);
|
||||||
|
|
||||||
|
setLoading(true);
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
setLoading(false);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Add_To_User_TBD res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Add_To_User_TBD res.data.message r_class = " + res.data.message);
|
||||||
|
|
||||||
|
setAdd_To_User_TBD_api("true");
|
||||||
|
setAdd_To_User_TBD_result(res.data.message);
|
||||||
|
settdb_title();
|
||||||
|
alert(res.data.message)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setAdd_To_User_TBD_api("false");
|
||||||
|
setAdd_To_User_TBD_message(res.data.message);
|
||||||
|
alert(res.data.message)
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
setLoading(false);
|
||||||
|
console.warn('Not good man :( Add_To_User_TBD = ', error);
|
||||||
|
setAdd_To_User_TBD_api("false");
|
||||||
|
alert("Impossible d'ajouter le tableau de bord");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [one_SessionstartDate, setone_SessionstartDate] = useState();
|
||||||
|
const [one_SessionendDate, setone_SessionendDate] = useState();
|
||||||
|
|
||||||
|
const [dashbord_internal_code, setdashbord_internal_code] = useState("session_01");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
Getall_Qry_Session_Data();
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: 0,
|
top: 0,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
|
@ -81,6 +236,10 @@ const Dashbord_Session = (props) => {
|
||||||
|
|
||||||
}, [myconntected_employee_id])
|
}, [myconntected_employee_id])
|
||||||
|
|
||||||
|
|
||||||
|
const [filter_value, setfilter_value] = useState("m0");
|
||||||
|
const [tdb_title, settdb_title] = useState();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session">
|
<div className="dashbord_session">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -88,6 +247,254 @@ const Dashbord_Session = (props) => {
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
<h3> Tableaux de bord des sessions</h3>
|
<h3> Tableaux de bord des sessions</h3>
|
||||||
|
|
||||||
|
<Box m="20px">
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "textAlign": "right", "float": "left" }}>
|
||||||
|
<nav style={{ "width": "20rem", "float": "left" }}>
|
||||||
|
<Tooltip id="my-tooltip01" style={{ "fontSize": "12px" }} />
|
||||||
|
<a data-tooltip-id="my-tooltip01" data-tooltip-content="Ajouter à ma liste de TBD">
|
||||||
|
<MdOutlineAddchart onClick={(e) => settdb_title("1")} style={{ "cursor": "pointer" }} />
|
||||||
|
|
||||||
|
{tdb_title && String(tdb_title) === "1" && <nav> <TextField
|
||||||
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
required
|
||||||
|
name="tdb_title"
|
||||||
|
id="tdb_title"
|
||||||
|
text
|
||||||
|
label="Titre TDB"
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
|
disabled={false}
|
||||||
|
className="disabled_style"
|
||||||
|
|
||||||
|
|
||||||
|
/>
|
||||||
|
<button onClick={Add_To_User_TBD}> Ajouter </button> <button onClick={(e) => settdb_title("0")}> Fermer </button>
|
||||||
|
</nav>}
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
<nav style={{ "width": "20rem", "float": "left" }}>
|
||||||
|
<Tooltip id="my-tooltip02" style={{ "fontSize": "12px" }} />
|
||||||
|
<a data-tooltip-id="my-tooltip02" data-tooltip-content="Supprimer de ma liste de TBD ==> A ne pas faire ici, mais depuis les TBD du user">
|
||||||
|
<MdDeleteForever style={{ "cursor": "pointer" }} />
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="session_caract">
|
||||||
|
Filtre <br />
|
||||||
|
<TextField
|
||||||
|
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||||
|
required
|
||||||
|
name="filtre11"
|
||||||
|
id="filtre11"
|
||||||
|
select
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
|
disabled={false}
|
||||||
|
className="disabled_style"
|
||||||
|
value={filter_value}
|
||||||
|
onChange={(e) => {
|
||||||
|
setfilter_value(e.target.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>
|
||||||
|
<MenuItem value="m0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Mois en cours </MenuItem>
|
||||||
|
<MenuItem value="t0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Trimestre en cours </MenuItem>
|
||||||
|
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates </MenuItem>
|
||||||
|
</TextField>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{filter_value && String(filter_value) === "d" && <div>
|
||||||
|
<div className="session_caract">
|
||||||
|
Date Debut
|
||||||
|
<DatePicker
|
||||||
|
name="one_sessiondatedebut"
|
||||||
|
id="one_sessiondatedebut"
|
||||||
|
selected={one_SessionstartDate}
|
||||||
|
onChange={(date) => {
|
||||||
|
setone_SessionstartDate(date);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style session_caract_Dialog_DatePicker"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="session_caract">
|
||||||
|
Date Fin
|
||||||
|
<DatePicker
|
||||||
|
name="one_sessiondatefin"
|
||||||
|
id="one_sessiondatefin"
|
||||||
|
selected={one_SessionendDate}
|
||||||
|
onChange={(date) => {
|
||||||
|
setone_SessionendDate(date);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style enable_style"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={Getall_Qry_Session_Data}>Afficher
|
||||||
|
</Button><br />
|
||||||
|
|
||||||
|
|
||||||
|
<Box height="75vh" style={{ "color": "black" }}>
|
||||||
|
|
||||||
|
<ResponsiveBar
|
||||||
|
data={Getall_Qry_Session_Data_result_JSON}
|
||||||
|
|
||||||
|
colors={({ id, data }) => data[`${id}Color`]}
|
||||||
|
keys={["taux_remplissage", "taux_disponibilite",]}
|
||||||
|
indexBy="code_session"
|
||||||
|
margin={{ top: 50, right: 130, bottom: 50, left: 60 }}
|
||||||
|
padding={0.3}
|
||||||
|
valueScale={{ type: 'linear' }}
|
||||||
|
indexScale={{ type: 'band', round: true }}
|
||||||
|
defs={[
|
||||||
|
{
|
||||||
|
id: 'dots',
|
||||||
|
type: 'patternDots',
|
||||||
|
background: 'inherit',
|
||||||
|
color: '#38bcb2',
|
||||||
|
size: 4,
|
||||||
|
padding: 1,
|
||||||
|
stagger: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'lines',
|
||||||
|
type: 'patternLines',
|
||||||
|
background: 'inherit',
|
||||||
|
color: '#eed312',
|
||||||
|
rotation: -45,
|
||||||
|
lineWidth: 6,
|
||||||
|
spacing: 10
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
|
||||||
|
borderColor={{
|
||||||
|
from: 'color',
|
||||||
|
modifiers: [
|
||||||
|
[
|
||||||
|
'darker',
|
||||||
|
1.6
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
axisTop={null}
|
||||||
|
axisRight={null}
|
||||||
|
axisBottom={{
|
||||||
|
tickSize: 5,
|
||||||
|
tickPadding: 5,
|
||||||
|
tickRotation: 0,
|
||||||
|
legend: 'country',
|
||||||
|
legendPosition: 'middle',
|
||||||
|
legendOffset: 32,
|
||||||
|
truncateTickAt: 0
|
||||||
|
}}
|
||||||
|
axisLeft={{
|
||||||
|
tickSize: 5,
|
||||||
|
tickPadding: 5,
|
||||||
|
tickRotation: 0,
|
||||||
|
legend: 'food',
|
||||||
|
legendPosition: 'middle',
|
||||||
|
legendOffset: -40,
|
||||||
|
truncateTickAt: 0
|
||||||
|
}}
|
||||||
|
labelSkipWidth={12}
|
||||||
|
labelSkipHeight={12}
|
||||||
|
labelTextColor={{
|
||||||
|
from: 'color',
|
||||||
|
modifiers: [
|
||||||
|
[
|
||||||
|
'darker',
|
||||||
|
2
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
legends={[
|
||||||
|
{
|
||||||
|
dataFrom: 'keys',
|
||||||
|
anchor: 'bottom-right',
|
||||||
|
direction: 'column',
|
||||||
|
justify: false,
|
||||||
|
translateX: 120,
|
||||||
|
translateY: 0,
|
||||||
|
itemsSpacing: 2,
|
||||||
|
itemWidth: 100,
|
||||||
|
itemHeight: 20,
|
||||||
|
itemDirection: 'left-to-right',
|
||||||
|
itemOpacity: 0.85,
|
||||||
|
symbolSize: 20,
|
||||||
|
effects: [
|
||||||
|
{
|
||||||
|
on: 'hover',
|
||||||
|
style: {
|
||||||
|
itemOpacity: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
|
||||||
|
|
||||||
|
theme={{
|
||||||
|
// added
|
||||||
|
fontSize: 16,
|
||||||
|
axis: {
|
||||||
|
domain: {
|
||||||
|
line: {
|
||||||
|
stroke: colors.grey[100],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
text: {
|
||||||
|
fill: colors.grey[100],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
line: {
|
||||||
|
stroke: colors.grey[100],
|
||||||
|
strokeWidth: 1,
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
fill: colors.grey[100],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legends: {
|
||||||
|
text: {
|
||||||
|
fill: colors.grey[100],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
role="application"
|
||||||
|
ariaLabel="Nivo bar chart demo"
|
||||||
|
barAriaLabel={e => e.id + ": " + e.formattedValue + " in country: " + e.indexValue}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
</Box>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -7681,7 +7681,6 @@ Update du 22/10/2023 - Gestion des champs spécifiques ajoutés par le partenair
|
||||||
|
|
||||||
value={p_detail_sequence_title}
|
value={p_detail_sequence_title}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
||||||
setp_detail_sequence_title(e.target.value);
|
setp_detail_sequence_title(e.target.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import FullCalendar from "@fullcalendar/react";
|
||||||
import daygridPlugin from "@fullcalendar/daygrid";
|
import daygridPlugin from "@fullcalendar/daygrid";
|
||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import { v4 as uuid } from "uuid";
|
|
||||||
import allLocales from '@fullcalendar/core/locales-all'
|
import allLocales from '@fullcalendar/core/locales-all'
|
||||||
import { RepeatOnRounded, RestaurantMenu } from "@mui/icons-material";
|
import { RepeatOnRounded, RestaurantMenu } from "@mui/icons-material";
|
||||||
import { alignPropType } from "react-bootstrap/esm/types";
|
import { alignPropType } from "react-bootstrap/esm/types";
|
||||||
|
|
|
@ -43,7 +43,7 @@ import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||||
import daygridPlugin from "@fullcalendar/daygrid";
|
import daygridPlugin from "@fullcalendar/daygrid";
|
||||||
//import interactionPlugin from "@fullcalendar/interaction";
|
//import interactionPlugin from "@fullcalendar/interaction";
|
||||||
//import timeGridPlugin from "@fullcalendar/timegrid";
|
//import timeGridPlugin from "@fullcalendar/timegrid";
|
||||||
import { v4 as uuid } from "uuid";
|
|
||||||
import allLocales from '@fullcalendar/core/locales-all'
|
import allLocales from '@fullcalendar/core/locales-all'
|
||||||
import { RepeatOnRounded } from "@mui/icons-material";
|
import { RepeatOnRounded } from "@mui/icons-material";
|
||||||
import { alignPropType } from "react-bootstrap/esm/types";
|
import { alignPropType } from "react-bootstrap/esm/types";
|
||||||
|
|
|
@ -312,8 +312,8 @@ const Partner = (props) => {
|
||||||
var list_menu = ['creation', 'infopartner', 'statistique', 'abonnement', 'affichage', 'ordervalide',
|
var list_menu = ['creation', 'infopartner', 'statistique', 'abonnement', 'affichage', 'ordervalide',
|
||||||
'mes_sessions', 'setuplms', 'facture', 'pricing', 'mes_clients', 'mes_devis', 'mes_cmd',
|
'mes_sessions', 'setuplms', 'facture', 'pricing', 'mes_clients', 'mes_devis', 'mes_cmd',
|
||||||
'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique",
|
'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique",
|
||||||
"config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashobrd_formation",
|
"config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashbord_formation",
|
||||||
"dashobrd_session"]
|
"dashbord_session"]
|
||||||
|
|
||||||
|
|
||||||
if (action && list_menu.includes(action)) {
|
if (action && list_menu.includes(action)) {
|
||||||
|
@ -372,7 +372,7 @@ const Partner = (props) => {
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
history.push("/Partner/config_document");
|
history.push("/Partner/config_document");
|
||||||
document.body.style.backgroundColor = "#141b2d";
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
} else {
|
} else {
|
||||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ const Partner = (props) => {
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
history.push("/Partner/config_champ_specific");
|
history.push("/Partner/config_champ_specific");
|
||||||
document.body.style.backgroundColor = "#141b2d";
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
} else {
|
} else {
|
||||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,7 @@ const Partner = (props) => {
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
history.push("/Partner/config_technique");
|
history.push("/Partner/config_technique");
|
||||||
document.body.style.backgroundColor = "#141b2d";
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
} else {
|
} else {
|
||||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
||||||
}
|
}
|
||||||
|
@ -427,7 +427,7 @@ const Partner = (props) => {
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
history.push("/Partner/config_session_steps");
|
history.push("/Partner/config_session_steps");
|
||||||
document.body.style.backgroundColor = "#141b2d";
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
} else {
|
} else {
|
||||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ const Partner = (props) => {
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
history.push("/Partner/config_jours_heures");
|
history.push("/Partner/config_jours_heures");
|
||||||
document.body.style.backgroundColor = "#141b2d";
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
} else {
|
} else {
|
||||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des documents");
|
||||||
}
|
}
|
||||||
|
@ -649,7 +649,7 @@ const Partner = (props) => {
|
||||||
setmenu("dashbord_session");
|
setmenu("dashbord_session");
|
||||||
setapiexcelimportmessage();
|
setapiexcelimportmessage();
|
||||||
setformation_file_name();
|
setformation_file_name();
|
||||||
document.body.style.backgroundColor = "#141b2d";
|
document.body.style.backgroundColor = "#ffffff";
|
||||||
history.push("/Partner/dashbord_session");
|
history.push("/Partner/dashbord_session");
|
||||||
} else {
|
} else {
|
||||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion du matériel pédagogique");
|
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion du matériel pédagogique");
|
||||||
|
|
|
@ -0,0 +1,214 @@
|
||||||
|
import { createContext, useState, useMemo } from "react";
|
||||||
|
import { createTheme } from "@mui/material/styles";
|
||||||
|
|
||||||
|
// color design tokens export
|
||||||
|
export const tokens = (mode) => ({
|
||||||
|
...(mode === "dark"
|
||||||
|
? {
|
||||||
|
grey: {
|
||||||
|
100: "#e0e0e0",
|
||||||
|
200: "#c2c2c2",
|
||||||
|
300: "#a3a3a3",
|
||||||
|
400: "#858585",
|
||||||
|
500: "#666666",
|
||||||
|
600: "#525252",
|
||||||
|
700: "#3d3d3d",
|
||||||
|
800: "#292929",
|
||||||
|
900: "#141414",
|
||||||
|
},
|
||||||
|
primary: {
|
||||||
|
100: "#d0d1d5",
|
||||||
|
200: "#a1a4ab",
|
||||||
|
300: "#727681",
|
||||||
|
400: "#1F2A40",
|
||||||
|
500: "#141b2d",
|
||||||
|
600: "#101624",
|
||||||
|
700: "#0c101b",
|
||||||
|
800: "#080b12",
|
||||||
|
900: "#040509",
|
||||||
|
},
|
||||||
|
greenAccent: {
|
||||||
|
100: "#dbf5ee",
|
||||||
|
200: "#b7ebde",
|
||||||
|
300: "#94e2cd",
|
||||||
|
400: "#70d8bd",
|
||||||
|
500: "#4cceac",
|
||||||
|
600: "#3da58a",
|
||||||
|
700: "#2e7c67",
|
||||||
|
800: "#1e5245",
|
||||||
|
900: "#0f2922",
|
||||||
|
},
|
||||||
|
redAccent: {
|
||||||
|
100: "#f8dcdb",
|
||||||
|
200: "#f1b9b7",
|
||||||
|
300: "#e99592",
|
||||||
|
400: "#e2726e",
|
||||||
|
500: "#db4f4a",
|
||||||
|
600: "#af3f3b",
|
||||||
|
700: "#832f2c",
|
||||||
|
800: "#58201e",
|
||||||
|
900: "#2c100f",
|
||||||
|
},
|
||||||
|
blueAccent: {
|
||||||
|
100: "#e1e2fe",
|
||||||
|
200: "#c3c6fd",
|
||||||
|
300: "#a4a9fc",
|
||||||
|
400: "#868dfb",
|
||||||
|
500: "#6870fa",
|
||||||
|
600: "#535ac8",
|
||||||
|
700: "#3e4396",
|
||||||
|
800: "#2a2d64",
|
||||||
|
900: "#151632",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
grey: {
|
||||||
|
100: "#141414",
|
||||||
|
200: "#292929",
|
||||||
|
300: "#3d3d3d",
|
||||||
|
400: "#525252",
|
||||||
|
500: "#666666",
|
||||||
|
600: "#858585",
|
||||||
|
700: "#a3a3a3",
|
||||||
|
800: "#c2c2c2",
|
||||||
|
900: "#e0e0e0",
|
||||||
|
},
|
||||||
|
primary: {
|
||||||
|
100: "#040509",
|
||||||
|
200: "#080b12",
|
||||||
|
300: "#0c101b",
|
||||||
|
400: "#f2f0f0", // manually changed
|
||||||
|
500: "#141b2d",
|
||||||
|
600: "#1F2A40",
|
||||||
|
700: "#727681",
|
||||||
|
800: "#a1a4ab",
|
||||||
|
900: "#d0d1d5",
|
||||||
|
},
|
||||||
|
greenAccent: {
|
||||||
|
100: "#0f2922",
|
||||||
|
200: "#1e5245",
|
||||||
|
300: "#2e7c67",
|
||||||
|
400: "#3da58a",
|
||||||
|
500: "#4cceac",
|
||||||
|
600: "#70d8bd",
|
||||||
|
700: "#94e2cd",
|
||||||
|
800: "#b7ebde",
|
||||||
|
900: "#dbf5ee",
|
||||||
|
},
|
||||||
|
redAccent: {
|
||||||
|
100: "#2c100f",
|
||||||
|
200: "#58201e",
|
||||||
|
300: "#832f2c",
|
||||||
|
400: "#af3f3b",
|
||||||
|
500: "#db4f4a",
|
||||||
|
600: "#e2726e",
|
||||||
|
700: "#e99592",
|
||||||
|
800: "#f1b9b7",
|
||||||
|
900: "#f8dcdb",
|
||||||
|
},
|
||||||
|
blueAccent: {
|
||||||
|
100: "#151632",
|
||||||
|
200: "#2a2d64",
|
||||||
|
300: "#3e4396",
|
||||||
|
400: "#535ac8",
|
||||||
|
500: "#6870fa",
|
||||||
|
600: "#868dfb",
|
||||||
|
700: "#a4a9fc",
|
||||||
|
800: "#c3c6fd",
|
||||||
|
900: "#e1e2fe",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
// mui theme settings
|
||||||
|
export const themeSettings = (mode) => {
|
||||||
|
const colors = tokens(mode);
|
||||||
|
return {
|
||||||
|
palette: {
|
||||||
|
mode: mode,
|
||||||
|
...(mode === "dark"
|
||||||
|
? {
|
||||||
|
// palette values for dark mode
|
||||||
|
primary: {
|
||||||
|
main: colors.primary[500],
|
||||||
|
},
|
||||||
|
secondary: {
|
||||||
|
main: colors.greenAccent[500],
|
||||||
|
},
|
||||||
|
neutral: {
|
||||||
|
dark: colors.grey[700],
|
||||||
|
main: colors.grey[500],
|
||||||
|
light: colors.grey[100],
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
default: colors.primary[500],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
// palette values for light mode
|
||||||
|
primary: {
|
||||||
|
main: colors.primary[100],
|
||||||
|
},
|
||||||
|
secondary: {
|
||||||
|
main: colors.greenAccent[500],
|
||||||
|
},
|
||||||
|
neutral: {
|
||||||
|
dark: colors.grey[700],
|
||||||
|
main: colors.grey[500],
|
||||||
|
light: colors.grey[100],
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
default: "#fcfcfc",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
typography: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 12,
|
||||||
|
h1: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 40,
|
||||||
|
},
|
||||||
|
h2: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 32,
|
||||||
|
},
|
||||||
|
h3: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 24,
|
||||||
|
},
|
||||||
|
h4: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 20,
|
||||||
|
},
|
||||||
|
h5: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
h6: {
|
||||||
|
fontFamily: ["Source Sans Pro", "sans-serif"].join(","),
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// context for color mode
|
||||||
|
export const ColorModeContext = createContext({
|
||||||
|
toggleColorMode: () => {},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const useMode = () => {
|
||||||
|
const [mode, setMode] = useState("dark");
|
||||||
|
|
||||||
|
const colorMode = useMemo(
|
||||||
|
() => ({
|
||||||
|
toggleColorMode: () =>
|
||||||
|
setMode((prev) => (prev === "light" ? "dark" : "light")),
|
||||||
|
}),
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
|
const theme = useMemo(() => createTheme(themeSettings(mode)), [mode]);
|
||||||
|
return [theme, colorMode];
|
||||||
|
};
|
Loading…
Reference in New Issue