01/12/2023 - 17h

recette2
cherif 2023-12-01 17:09:23 +01:00
parent 50d8e75f13
commit d935e7b48b
5 changed files with 792 additions and 148 deletions

115
package-lock.json generated
View File

@ -33,6 +33,7 @@
"@mui/x-date-pickers": "^5.0.0",
"@mui/x-date-pickers-pro": "^5.0.0",
"@nivo/bar": "^0.84.0",
"@nivo/pie": "^0.84.0",
"@react-icons/all-files": "^4.1.0",
"@stripe/react-stripe-js": "^1.12.0",
"@stripe/stripe-js": "^1.35.0",
@ -5157,6 +5158,34 @@
"react": ">= 16.14.0 < 19.0.0"
}
},
"node_modules/@nivo/arcs": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/arcs/-/arcs-0.84.0.tgz",
"integrity": "sha512-6i6CQmqdk7KZnaYmg8l0jqElQM19LJ/29WlxwVtDW43iQD0AqDzXb/eIwzZSZwf8sfGP8e8vvapkESlfkmzuPw==",
"dependencies": {
"@nivo/colors": "0.84.0",
"@nivo/core": "0.84.0",
"@react-spring/web": "9.4.5 || ^9.7.2",
"@types/d3-shape": "^2.0.0",
"d3-shape": "^1.3.5"
},
"peerDependencies": {
"react": ">= 16.14.0 < 19.0.0"
}
},
"node_modules/@nivo/arcs/node_modules/d3-path": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
"integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="
},
"node_modules/@nivo/arcs/node_modules/d3-shape": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
"integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
"dependencies": {
"d3-path": "1"
}
},
"node_modules/@nivo/axes": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/axes/-/axes-0.84.0.tgz",
@ -5351,6 +5380,36 @@
"react": ">= 16.14.0 < 19.0.0"
}
},
"node_modules/@nivo/pie": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/pie/-/pie-0.84.0.tgz",
"integrity": "sha512-yM8oe162YlOKFZkpVhSF+9J/F3rhyUc+gS9M3M+HyVqzXM3xOKjZiqd5tckgFbvTixDK6FLsSBHzH2SRij/hDQ==",
"dependencies": {
"@nivo/arcs": "0.84.0",
"@nivo/colors": "0.84.0",
"@nivo/core": "0.84.0",
"@nivo/legends": "0.84.0",
"@nivo/tooltip": "0.84.0",
"@types/d3-shape": "^2.0.0",
"d3-shape": "^1.3.5"
},
"peerDependencies": {
"react": ">= 16.14.0 < 19.0.0"
}
},
"node_modules/@nivo/pie/node_modules/d3-path": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
"integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="
},
"node_modules/@nivo/pie/node_modules/d3-shape": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
"integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
"dependencies": {
"d3-path": "1"
}
},
"node_modules/@nivo/recompose": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/recompose/-/recompose-0.84.0.tgz",
@ -36188,6 +36247,33 @@
"prop-types": "^15.7.2"
}
},
"@nivo/arcs": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/arcs/-/arcs-0.84.0.tgz",
"integrity": "sha512-6i6CQmqdk7KZnaYmg8l0jqElQM19LJ/29WlxwVtDW43iQD0AqDzXb/eIwzZSZwf8sfGP8e8vvapkESlfkmzuPw==",
"requires": {
"@nivo/colors": "0.84.0",
"@nivo/core": "0.84.0",
"@react-spring/web": "9.4.5 || ^9.7.2",
"@types/d3-shape": "^2.0.0",
"d3-shape": "^1.3.5"
},
"dependencies": {
"d3-path": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
"integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="
},
"d3-shape": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
"integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
"requires": {
"d3-path": "1"
}
}
}
},
"@nivo/axes": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/axes/-/axes-0.84.0.tgz",
@ -36360,6 +36446,35 @@
"prop-types": "^15.7.2"
}
},
"@nivo/pie": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/pie/-/pie-0.84.0.tgz",
"integrity": "sha512-yM8oe162YlOKFZkpVhSF+9J/F3rhyUc+gS9M3M+HyVqzXM3xOKjZiqd5tckgFbvTixDK6FLsSBHzH2SRij/hDQ==",
"requires": {
"@nivo/arcs": "0.84.0",
"@nivo/colors": "0.84.0",
"@nivo/core": "0.84.0",
"@nivo/legends": "0.84.0",
"@nivo/tooltip": "0.84.0",
"@types/d3-shape": "^2.0.0",
"d3-shape": "^1.3.5"
},
"dependencies": {
"d3-path": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
"integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg=="
},
"d3-shape": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
"integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
"requires": {
"d3-path": "1"
}
}
}
},
"@nivo/recompose": {
"version": "0.84.0",
"resolved": "https://registry.npmjs.org/@nivo/recompose/-/recompose-0.84.0.tgz",

View File

@ -28,6 +28,7 @@
"@mui/x-date-pickers": "^5.0.0",
"@mui/x-date-pickers-pro": "^5.0.0",
"@nivo/bar": "^0.84.0",
"@nivo/pie": "^0.84.0",
"@react-icons/all-files": "^4.1.0",
"@stripe/react-stripe-js": "^1.12.0",
"@stripe/stripe-js": "^1.35.0",

View File

@ -55,14 +55,14 @@ import dayGridPlugin from "@fullcalendar/daygrid";
import timeGridPlugin from "@fullcalendar/timegrid";
import interactionPlugin from "@fullcalendar/interaction";
import {
ListItem,
ListItemText,
useTheme,
} from "@mui/material";
import { ResponsivePie } from '@nivo/pie'
import { ResponsiveBar } from "@nivo/bar";
@ -81,72 +81,12 @@ const Dashbord_Session = (props) => {
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);
}
var date_today_90j = new Date();
date_today_90j.setDate(date_today_90j.getDate() - 90);
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 [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR'));
const [p_filter_date_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR'));
const [Add_To_User_TBD_api, setAdd_To_User_TBD_api] = useState();
const [Add_To_User_TBD_message, setAdd_To_User_TBD_message] = useState();
@ -170,14 +110,14 @@ const Dashbord_Session = (props) => {
}
// 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');
if (String(filter_val) === "d") {
var date_from = format(p_filter_date_from, 'dd/MM/yyyy');
var date_to = format(p_filter_date_to, 'dd/MM/yyyy');
filter_val = "{'session_start_date':'"+String(date_from)+"' , 'session_end_date':'"+String(date_to)+"'}";
}else{
filter_val = "{'periode':'"+String(filter_val)+"'}"
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);
@ -189,7 +129,7 @@ const Dashbord_Session = (props) => {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_To_User_Dashbord/";
console.log(" ## myurl = ", myurl);
//console.log(" ## myurl = ", myurl);
setLoading(true);
axios.post(myurl, form).then(res => {
@ -221,14 +161,197 @@ const Dashbord_Session = (props) => {
}
const [one_SessionstartDate, setone_SessionstartDate] = useState();
const [one_SessionendDate, setone_SessionendDate] = useState();
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 (p_filter_date_from) {
date_from = p_filter_date_from;
}
var date_to = "";
if (p_filter_date_to) {
date_to = p_filter_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/";
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 + ']');
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 [Getall_Qry_Session_Data_By_Trainer_result_JSON, setGetall_Qry_Session_Data_By_Trainer_result_JSON] = useState([]);
const [Getall_Qry_Session_Data_By_Trainer_api, setGetall_Qry_Session_Data_By_Trainer_api] = useState();
const [Getall_Qry_Session_Data_By_Trainer_message, setGetall_Qry_Session_Data_By_Trainer_message] = useState();
const [Getall_Qry_Session_Data_By_Trainer_result, setGetall_Qry_Session_Data_By_Trainer_result] = useState([]);
function Getall_Qry_Session_Data_By_Trainer(event) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
var date_from = "";
if (p_filter_date_from) {
date_from = p_filter_date_from;
}
var date_to = "";
if (p_filter_date_to) {
date_to = p_filter_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_Session_By_Trainer_By_Periode/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Qry_Session_Data_By_Trainer res.data.status = " + res.data.status);
//console.log(" In Getall_Qry_Session_Data_By_Trainer res.data.message r_class = " + res.data.message);
setGetall_Qry_Session_Data_By_Trainer_result_JSON(JSON.parse('[' + res.data.message + ']'));
console.log(Getall_Qry_Session_Data_By_Trainer_result_JSON);
setGetall_Qry_Session_Data_By_Trainer_api("true");
setGetall_Qry_Session_Data_By_Trainer_result(res.data.message);
}
else {
setGetall_Qry_Session_Data_By_Trainer_api("false");
setGetall_Qry_Session_Data_By_Trainer_message(res.data.message);
alert(res.data.message)
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Getall_Qry_Session_Data_By_Trainer = ', error);
setGetall_Qry_Session_Data_By_Trainer_api("false");
alert("Impossible de récuperer les données demandées")
//setmyApimyApiMessage("")
})
}
const [Getall_Qry_Session_Data_Pourcent_Trainer_result_JSON, setGetall_Qry_Session_Data_Pourcent_Trainer_result_JSON] = useState([]);
const [Getall_Qry_Session_Data_Pourcent_Trainer_api, setGetall_Qry_Session_Data_Pourcent_Trainer_api] = useState();
const [Getall_Qry_Session_Data_Pourcent_Trainer_message, setGetall_Qry_Session_Data_Pourcent_Trainer_message] = useState();
const [Getall_Qry_Session_Data_Pourcent_Trainer_result, setGetall_Qry_Session_Data_Pourcent_Trainer_result] = useState([]);
function Getall_Qry_Session_Data_Pourcent_Trainer(event) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
var date_from = "";
if (p_filter_date_from) {
date_from = p_filter_date_from;
}
var date_to = "";
if (p_filter_date_to) {
date_to = p_filter_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_Session_Repartition_Session_By_Trainer_By_Periode/";
setLoading(true);
axios.post(myurl, form).then(res => {
setLoading(false);
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Qry_Session_Data_Pourcent_Trainer res.data.status = " + res.data.status);
//console.log(" In Getall_Qry_Session_Data_Pourcent_Trainer res.data.message r_class = " + res.data.message);
setGetall_Qry_Session_Data_Pourcent_Trainer_result_JSON(JSON.parse('[' + res.data.message + ']'));
setGetall_Qry_Session_Data_Pourcent_Trainer_api("true");
setGetall_Qry_Session_Data_Pourcent_Trainer_result(res.data.message);
console.log("### setGetall_Qry_Session_Data_Pourcent_Trainer_result_JSON = ", Getall_Qry_Session_Data_Pourcent_Trainer_result_JSON);
}
else {
setGetall_Qry_Session_Data_Pourcent_Trainer_api("false");
setGetall_Qry_Session_Data_Pourcent_Trainer_message(res.data.message);
alert(res.data.message)
}
}).catch((error) => {
setLoading(false);
console.warn('Not good man :( Getall_Qry_Session_Data_Pourcent_Trainer = ', error);
setGetall_Qry_Session_Data_Pourcent_Trainer_api("false");
alert("Impossible de récuperer les données demandées")
//setmyApimyApiMessage("")
})
}
const [dashbord_internal_code, setdashbord_internal_code] = useState("session_01");
useEffect(() => {
Getall_Qry_Session_Data();
Getall_Qry_Session_Data_By_Trainer();
Getall_Qry_Session_Data_Pourcent_Trainer();
window.scrollTo({
top: 0,
behavior: "smooth",
@ -241,15 +364,90 @@ const Dashbord_Session = (props) => {
const [tdb_title, settdb_title] = useState();
return (
<div className="dashbord_session">
<div className="">
{isLoading && <div className="loader-container">
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
</div>}
<h3> Tableaux de bord des sessions</h3>
<div className="div_row">
<div className="" style={{ "width": "30%" }}>
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 &nbsp;&nbsp;</MenuItem>
<MenuItem value="t0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Trimestre en cours &nbsp;</MenuItem>
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates &nbsp;</MenuItem>
</TextField>
</div>
{filter_value && String(filter_value) === "d" && <div>
<div className="session_caract">
Date Debut
<DatePicker
name="one_sessiondatedebut"
id="one_sessiondatedebut"
selected={new Date(moment(p_filter_date_from, "dd/MM/yyyy"))}
onChange={(date) => {
setp_filter_date_from(format(date, 'dd/MM/yyyy'));
}
}
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={new Date(moment(p_filter_date_to, "dd/MM/yyyy"))}
onChange={(date) => {
setp_filter_date_to(format(date, 'dd/MM/yyyy'));
}
}
showTimeSelect={false}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
/>
</div>
</div>}
<Button variant="contained" className="bton_enreg" onClick={(e) => {
Getall_Qry_Session_Data();
Getall_Qry_Session_Data_By_Trainer();
}}> Afficher
</Button><br />
</div>
<Box m="20px">
<div className="titre1"> TBD Session : Taux de remplissage </div>
<div className="div_row" style={{ "textAlign": "right", "float": "left" }}>
<nav style={{ "width": "20rem", "float": "left" }}>
<Tooltip id="my-tooltip01" style={{ "fontSize": "12px" }} />
@ -284,74 +482,6 @@ const Dashbord_Session = (props) => {
</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 &nbsp;&nbsp;</MenuItem>
<MenuItem value="t0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Trimestre en cours &nbsp;</MenuItem>
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates &nbsp;</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" }}>
@ -495,6 +625,372 @@ const Dashbord_Session = (props) => {
</Box>
<br />
<br />
<br />
<br />
<Box m="20px">
<div className="titre1"> TBD Session : Nb Session par formateur </div>
<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" }} /> &nbsp;
{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> &nbsp; <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>
<br /> <br /> <br />
<Box height="75vh" style={{ "color": "black" }}>
<ResponsiveBar
data={Getall_Qry_Session_Data_By_Trainer_result_JSON}
//colors={({ id, data }) => data[`${id}Color`]}
colors={{ scheme: 'nivo' }}
keys={["nb",]}
indexBy="Formateur_nom_prenom_mois_annee"
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: 'Formateur',
legendPosition: 'middle',
legendOffset: 32,
truncateTickAt: 0
}}
axisLeft={{
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: 'Nb Ftion',
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 />
<br />
<br />
<Box m="20px">
<div className="titre1"> TBD Session : Repartition par Formateur </div>
<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" }} /> &nbsp;
{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> &nbsp; <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>
<br /> <br /> <br />
<Box height="75vh" style={{ "color": "black" }}>
<ResponsivePie
data={Getall_Qry_Session_Data_Pourcent_Trainer_result_JSON}
margin={{ top: 40, right: 80, bottom: 80, left: 80 }}
innerRadius={0.5}
padAngle={0.7}
cornerRadius={3}
activeOuterRadiusOffset={8}
borderWidth={1}
borderColor={{
from: 'color',
modifiers: [
[
'darker',
0.2
]
]
}}
arcLinkLabelsSkipAngle={10}
arcLinkLabelsTextColor="#333333"
arcLinkLabelsThickness={2}
arcLinkLabelsColor={{ from: 'color' }}
arcLabelsSkipAngle={10}
arcLabelsTextColor={{
from: 'color',
modifiers: [
[
'darker',
2
]
]
}}
defs={[
{
id: 'dots',
type: 'patternDots',
background: 'inherit',
color: 'rgba(255, 255, 255, 0.3)',
size: 4,
padding: 1,
stagger: true
},
{
id: 'lines',
type: 'patternLines',
background: 'inherit',
color: 'rgba(255, 255, 255, 0.3)',
rotation: -45,
lineWidth: 6,
spacing: 10
}
]}
fill={[
{
match: {
id: 'ruby'
},
id: 'dots'
},
{
match: {
id: 'c'
},
id: 'dots'
},
{
match: {
id: 'go'
},
id: 'dots'
},
{
match: {
id: 'python'
},
id: 'dots'
},
{
match: {
id: 'scala'
},
id: 'lines'
},
{
match: {
id: 'lisp'
},
id: 'lines'
},
{
match: {
id: 'elixir'
},
id: 'lines'
},
{
match: {
id: 'javascript'
},
id: 'lines'
},
{
match: {
id: 'balde_em'
},
id: 'lines'
}
]}
legends={[
{
anchor: 'bottom',
direction: 'row',
justify: false,
translateX: 0,
translateY: 56,
itemsSpacing: 0,
itemWidth: 100,
itemHeight: 18,
itemTextColor: '#999',
itemDirection: 'left-to-right',
itemOpacity: 1,
symbolSize: 18,
symbolShape: 'circle',
effects: [
{
on: 'hover',
style: {
itemTextColor: '#000'
}
}
]
}
]}
/>
</Box>
</Box>
</div>
)
}

View File

@ -681,6 +681,20 @@
width: 200px !important;
}
.titre1 {
font-family: "Quicksand", "Signika", sans-serif;
font-size: medium;
text-align: center;
margin-bottom: 0.8rem;
color: white;
cursor: pointer;
font-style: italic;
background-color: gray;
font-weight: normal;
float: left;
width: 100%;
}
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
@ -1298,6 +1312,20 @@
width: 500px !important;
}
.titre1 {
font-family: "Quicksand", "Signika", sans-serif;
font-size: medium;
text-align: center;
margin-bottom: 0.8rem;
color: white;
cursor: pointer;
font-style: italic;
background-color: gray;
font-weight: normal;
float: left;
width: 100%;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
@ -1757,6 +1785,8 @@
font-style: italic;
background-color: gray;
font-weight: normal;
float: left;
width: 100%;
}
.block_detail_inscrit {
@ -2375,6 +2405,8 @@
font-style: italic;
background-color: gray;
font-weight: normal;
float: left;
width: 100%;
}
.file_ariane {