27/04/2024 - 22h
parent
60494e4bcb
commit
84e5f96cdc
|
@ -2429,7 +2429,8 @@ const CRM_Opportunite = (props) => {
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
getEstimatedRowHeight={() => 200}
|
||||||
|
getRowHeight={() => "auto"}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -303,6 +303,24 @@ const Dashbord_Factures = (props) => {
|
||||||
margin: 100,
|
margin: 100,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const chartSetting_nb = {
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
label: " Nomnbre de ",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
width: 1000,
|
||||||
|
height: 400,
|
||||||
|
sx: {
|
||||||
|
[`.${axisClasses.left} .${axisClasses.label}`]: {
|
||||||
|
transform: 'translate(-20px, 0)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
margin: 100,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const valueFormatter_CA = (value) => `${value}€`;
|
const valueFormatter_CA = (value) => `${value}€`;
|
||||||
|
|
||||||
const valueFormatter_count = (value) => `${value} Fact`;
|
const valueFormatter_count = (value) => `${value} Fact`;
|
||||||
|
@ -472,10 +490,13 @@ const Dashbord_Factures = (props) => {
|
||||||
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (document.getElementsByName("filtre11")[0]) {
|
/* if (document.getElementsByName("filtre11")[0]) {
|
||||||
filter_val = document.getElementsByName("filtre11")[0].value;
|
filter_val = document.getElementsByName("filtre11")[0].value;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
if (filter_value) {
|
||||||
|
filter_val = filter_value
|
||||||
|
}
|
||||||
// Si filter_val = "d", alors on va recuperer l'interval de date
|
// Si filter_val = "d", alors on va recuperer l'interval de date
|
||||||
if (String(filter_val) === "d") {
|
if (String(filter_val) === "d") {
|
||||||
var date_from = p_filter_date_from;
|
var date_from = p_filter_date_from;
|
||||||
|
@ -528,6 +549,12 @@ const Dashbord_Factures = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session">
|
<div className="dashbord_session">
|
||||||
|
@ -560,71 +587,76 @@ const Dashbord_Factures = (props) => {
|
||||||
<div className="div_row">
|
<div className="div_row">
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "30%" }}>
|
||||||
Filtre <br />
|
Filtre <br />
|
||||||
<TextField
|
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
<Autocomplete
|
||||||
required
|
disablePortal
|
||||||
name="filtre11"
|
name="filtre11"
|
||||||
id="filtre11"
|
id="filtre11"
|
||||||
select
|
|
||||||
InputLabelProps={{
|
|
||||||
shrink: true,
|
|
||||||
}}
|
|
||||||
disabled={false}
|
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={filter_value}
|
options={New_option_periode}
|
||||||
onChange={(e) => {
|
onChange={(event, value) => {
|
||||||
setfilter_value(e.target.value);
|
if (value && value.value) {
|
||||||
}
|
setfilter_value(value.value);
|
||||||
}
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
>
|
|
||||||
<MenuItem value="m0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Mois en cours </MenuItem>
|
|
||||||
<MenuItem value="m1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Mois précédant </MenuItem>
|
|
||||||
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates </MenuItem>
|
|
||||||
</TextField>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{filter_value && String(filter_value) === "d" && <div>
|
{filter_value && String(filter_value) === "d" &&
|
||||||
<div className="session_caract">
|
|
||||||
Date Debut
|
|
||||||
<DatePicker
|
|
||||||
name="one_sessiondatedebut"
|
|
||||||
id="one_sessiondatedebut"
|
|
||||||
|
|
||||||
selected={new Date(moment(p_filter_date_from, "DD/MM/YYYY"))}
|
<div>
|
||||||
onChange={(date) => {
|
<div className="session_caract">
|
||||||
setp_filter_date_from(format(date, 'dd/MM/yyyy'));
|
Date Debut
|
||||||
|
<DatePicker
|
||||||
|
name="one_sessiondatedebut"
|
||||||
|
id="one_sessiondatedebut"
|
||||||
|
|
||||||
}
|
selected={new Date(moment(p_filter_date_from, "DD/MM/YYYY"))}
|
||||||
}
|
onChange={(date) => {
|
||||||
showTimeSelect={false}
|
setp_filter_date_from(format(date, 'dd/MM/yyyy'));
|
||||||
dateFormat="dd/MM/yyyy"
|
|
||||||
className="disabled_style session_caract_Dialog_DatePicker"
|
|
||||||
locale='fr-FR'
|
|
||||||
|
|
||||||
/>
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style session_caract_Dialog_DatePicker"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
</div>
|
/>
|
||||||
|
|
||||||
<div className="session_caract">
|
</div>
|
||||||
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'));
|
|
||||||
|
|
||||||
}
|
<div className="session_caract">
|
||||||
}
|
Date Fin
|
||||||
showTimeSelect={false}
|
<DatePicker
|
||||||
dateFormat="dd/MM/yyyy"
|
name="one_sessiondatefin"
|
||||||
className="disabled_style enable_style"
|
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'));
|
||||||
|
|
||||||
</div>
|
}
|
||||||
|
}
|
||||||
|
showTimeSelect={false}
|
||||||
|
dateFormat="dd/MM/yyyy"
|
||||||
|
className="disabled_style enable_style"
|
||||||
|
/>
|
||||||
|
|
||||||
<br />
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
</div>}
|
||||||
|
<div>
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "30%" }}>
|
||||||
Client <br />
|
Client <br />
|
||||||
|
|
||||||
|
@ -644,18 +676,13 @@ const Dashbord_Factures = (props) => {
|
||||||
if (value && value._id) {
|
if (value && value._id) {
|
||||||
|
|
||||||
setp_detail_partner_client_id(value._id);
|
setp_detail_partner_client_id(value._id);
|
||||||
|
|
||||||
setp_detail_partner_client_nom(value.label);
|
setp_detail_partner_client_nom(value.label);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setp_detail_partner_client_id("");
|
setp_detail_partner_client_id("");
|
||||||
setp_detail_partner_client_nom("");
|
setp_detail_partner_client_nom("");
|
||||||
}
|
}
|
||||||
|
|
||||||
Getall_Qry_Invoice_Data();
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
@ -666,7 +693,7 @@ const Dashbord_Factures = (props) => {
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>}
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
|
@ -731,8 +758,7 @@ const Dashbord_Factures = (props) => {
|
||||||
Getall_Qry_Invoice_Data_result_JSON[0].data &&
|
Getall_Qry_Invoice_Data_result_JSON[0].data &&
|
||||||
<BarChart
|
<BarChart
|
||||||
|
|
||||||
|
dataset={Getall_Qry_Invoice_Data_result_JSON[0].data}
|
||||||
dataset={Getall_Qry_Invoice_Data_result_JSON[0].data }
|
|
||||||
xAxis={[{ scaleType: 'band', dataKey: 'month_year', tickPlacement: 'middle' }]}
|
xAxis={[{ scaleType: 'band', dataKey: 'month_year', tickPlacement: 'middle' }]}
|
||||||
series={[
|
series={[
|
||||||
{ dataKey: 'TotalAmount', label: 'CA', valueFormatter_CA },
|
{ dataKey: 'TotalAmount', label: 'CA', valueFormatter_CA },
|
||||||
|
@ -884,7 +910,7 @@ const Dashbord_Factures = (props) => {
|
||||||
|
|
||||||
|
|
||||||
<div className="session_data" style={{ paddingLeft: "2rem" }}>
|
<div className="session_data" style={{ paddingLeft: "2rem" }}>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{p_detail_partner_client_nom && String(p_detail_partner_client_nom) !== "" && " Client : " + { p_detail_partner_client_nom }}
|
{p_detail_partner_client_nom && String(p_detail_partner_client_nom) !== "" && " Client : " + { p_detail_partner_client_nom }}
|
||||||
|
@ -898,12 +924,12 @@ const Dashbord_Factures = (props) => {
|
||||||
xAxis={[{ scaleType: 'band', dataKey: 'month_year', tickPlacement: 'middle' }]}
|
xAxis={[{ scaleType: 'band', dataKey: 'month_year', tickPlacement: 'middle' }]}
|
||||||
series={[
|
series={[
|
||||||
{ dataKey: 'nb_devis_gagne', label: 'Gagné', color: '#41B06E' },
|
{ dataKey: 'nb_devis_gagne', label: 'Gagné', color: '#41B06E' },
|
||||||
{ dataKey: 'nb_devis_perdu', label: 'Perdu', color: '#FA7070'},
|
{ dataKey: 'nb_devis_perdu', label: 'Perdu', color: '#FA7070' },
|
||||||
|
|
||||||
]}
|
]}
|
||||||
{...chartSetting}
|
{...chartSetting_nb}
|
||||||
margin={{ right: 15, left: 100 }}
|
margin={{ right: 15, left: 100 }}
|
||||||
|
|
||||||
|
|
||||||
/>}
|
/>}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,11 +22,14 @@ import { MdOutlineAddchart, } from "react-icons/md";
|
||||||
import {
|
import {
|
||||||
useTheme,
|
useTheme,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
import { ResponsivePie } from '@nivo/pie'
|
import { ResponsivePie } from '@nivo/pie'
|
||||||
import { ResponsiveBar } from "@nivo/bar";
|
import { ResponsiveBar } from "@nivo/bar";
|
||||||
|
|
||||||
import { TbColumns2, TbColumns1 } from "react-icons/tb";
|
import { TbColumns2, TbColumns1 } from "react-icons/tb";
|
||||||
|
import { BarChart } from '@mui/x-charts';
|
||||||
|
import { axisClasses } from '@mui/x-charts';
|
||||||
|
import { pieArcLabelClasses } from '@mui/x-charts/PieChart';
|
||||||
|
|
||||||
const Dashbord_Inscriptions = (props) => {
|
const Dashbord_Inscriptions = (props) => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
@ -84,6 +87,8 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
const [filter_type_tache, setfilter_type_tache] = useState("");
|
const [filter_type_tache, setfilter_type_tache] = useState("");
|
||||||
|
|
||||||
|
const [filter_group_by, setfilter_group_by] = useState("");
|
||||||
|
|
||||||
const [tdb_title, settdb_title] = useState();
|
const [tdb_title, settdb_title] = useState();
|
||||||
|
|
||||||
const [display_nb_column, setdisplay_nb_column] = useState("1");
|
const [display_nb_column, setdisplay_nb_column] = useState("1");
|
||||||
|
@ -93,6 +98,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
const [gridline_id, setgridline_id] = useState("");
|
const [gridline_id, setgridline_id] = useState("");
|
||||||
|
|
||||||
const [Getall_Qry_Inscription_Data_result_JSON, setGetall_Qry_Inscription_Data_result_JSON] = useState([]);
|
const [Getall_Qry_Inscription_Data_result_JSON, setGetall_Qry_Inscription_Data_result_JSON] = useState([]);
|
||||||
|
|
||||||
const [Getall_Qry_Inscription_Data_api, setGetall_Qry_Inscription_Data_api] = useState();
|
const [Getall_Qry_Inscription_Data_api, setGetall_Qry_Inscription_Data_api] = useState();
|
||||||
const [Getall_Qry_Inscription_Data_message, setGetall_Qry_Inscription_Data_message] = useState();
|
const [Getall_Qry_Inscription_Data_message, setGetall_Qry_Inscription_Data_message] = useState();
|
||||||
const [Getall_Qry_Inscription_Data_result, setGetall_Qry_Inscription_Data_result] = useState([]);
|
const [Getall_Qry_Inscription_Data_result, setGetall_Qry_Inscription_Data_result] = useState([]);
|
||||||
|
@ -105,7 +111,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
if (p_filter_date_from) {
|
if (p_filter_date_from) {
|
||||||
date_from = p_filter_date_from;
|
date_from = p_filter_date_from;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var date_to = "";
|
var date_to = "";
|
||||||
if (p_filter_date_to) {
|
if (p_filter_date_to) {
|
||||||
|
@ -121,8 +127,13 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = "";
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_By_Session_By_Periode/";
|
if (String(filter_group_by) === "class")
|
||||||
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_Group_By_Class/";
|
||||||
|
else if (String(filter_group_by) === "session")
|
||||||
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_Group_By_Session/";
|
||||||
|
else
|
||||||
|
myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_By_Session_By_Periode/";
|
||||||
|
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
axios.post(myurl, form).then(res => {
|
axios.post(myurl, form).then(res => {
|
||||||
|
@ -135,6 +146,8 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
||||||
|
|
||||||
|
//console.log(" ### jsonObj = ", jsonObj)
|
||||||
|
|
||||||
setGetall_Qry_Inscription_Data_api("true");
|
setGetall_Qry_Inscription_Data_api("true");
|
||||||
setGetall_Qry_Inscription_Data_result(res.data.message);
|
setGetall_Qry_Inscription_Data_result(res.data.message);
|
||||||
|
|
||||||
|
@ -175,8 +188,12 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (document.getElementsByName("filtre11")[0]) {
|
if (document.getElementsByName("filtre11")[0]) {
|
||||||
filter_val = document.getElementsByName("filtre11")[0].value;
|
filter_val = document.getElementsByName("filtre11")[0].value;
|
||||||
|
}*/
|
||||||
|
if (filter_value) {
|
||||||
|
filter_val = filter_value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementsByName("filtre12")[0]) {
|
if (document.getElementsByName("filtre12")[0]) {
|
||||||
|
@ -246,6 +263,41 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
const New_option_group_by = [
|
||||||
|
{ "id": "mois", "label": "Mois", "value": "mois" },
|
||||||
|
{ "id": "class", "label": "Formation", "value": "class" },
|
||||||
|
{ "id": "session", "label": "Session", "value": "session" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
const valueFormatter_count = (value) => `${value} Insc`;
|
||||||
|
|
||||||
|
const chartSetting = {
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
label: " Nombre d'inscription ",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
width: 1000,
|
||||||
|
height: 400,
|
||||||
|
sx: {
|
||||||
|
[`.${axisClasses.left} .${axisClasses.label}`]: {
|
||||||
|
transform: 'translate(-20px, 0)',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
margin: 100,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session">
|
<div className="dashbord_session">
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
|
@ -276,28 +328,32 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
<div className="div_row">
|
<div className="div_row">
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "30%" }}>
|
||||||
Filtre <br />
|
Filtre <br />
|
||||||
<TextField
|
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
<Autocomplete
|
||||||
required
|
disablePortal
|
||||||
name="filtre11"
|
name="filtre11"
|
||||||
id="filtre11"
|
id="filtre11"
|
||||||
select
|
|
||||||
InputLabelProps={{
|
|
||||||
shrink: true,
|
|
||||||
}}
|
|
||||||
disabled={false}
|
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={filter_value}
|
options={New_option_periode}
|
||||||
onChange={(e) => {
|
onChange={(event, value) => {
|
||||||
setfilter_value(e.target.value);
|
if (value && value.value) {
|
||||||
}
|
setfilter_value(value.value);
|
||||||
}
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
>
|
|
||||||
<MenuItem value="m0" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Mois en cours </MenuItem>
|
|
||||||
<MenuItem value="m1" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Mois précédant </MenuItem>
|
|
||||||
<MenuItem value="d" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Choisir des dates </MenuItem>
|
|
||||||
</TextField>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{filter_value && String(filter_value) === "d" && <div>
|
{filter_value && String(filter_value) === "d" && <div>
|
||||||
|
@ -343,30 +399,32 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
</div>}
|
</div>}
|
||||||
<br />
|
<br />
|
||||||
<div className="" style={{ "width": "30%" }}>
|
<div className="" style={{ "width": "30%" }}>
|
||||||
Type Tache <br />
|
Grouper par <br />
|
||||||
<TextField
|
<Autocomplete
|
||||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
disablePortal
|
||||||
required
|
|
||||||
name="filtre12"
|
name="filtre12"
|
||||||
id="filtre12"
|
id="filtre12"
|
||||||
select
|
|
||||||
InputLabelProps={{
|
|
||||||
shrink: true,
|
|
||||||
}}
|
|
||||||
disabled={false}
|
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={filter_type_tache}
|
options={New_option_group_by}
|
||||||
onChange={(e) => {
|
onChange={(event, value) => {
|
||||||
setfilter_type_tache(e.target.value);
|
if (value && value.value) {
|
||||||
}
|
setfilter_group_by(value.value);
|
||||||
}
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_group_by("");
|
||||||
|
}
|
||||||
|
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Grouper par"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
>
|
|
||||||
<MenuItem value="absence" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>Absence </MenuItem>
|
|
||||||
<MenuItem value="planning" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Planning </MenuItem>
|
|
||||||
<MenuItem value="autre" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Autre </MenuItem>
|
|
||||||
<MenuItem value="" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} > </MenuItem>
|
|
||||||
</TextField>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
|
@ -416,10 +474,35 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</nav>}
|
</nav>}
|
||||||
|
|
||||||
<Box style={{ "color": "black", "height": "30rem" }}>
|
<Box style={{ "color": "black", "height": "30rem" }}>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="session_data" style={{ paddingLeft: "2rem" }}>
|
||||||
|
|
||||||
|
|
||||||
|
{Getall_Qry_Inscription_Data_result_JSON && Getall_Qry_Inscription_Data_result_JSON.length > 0 &&
|
||||||
|
Getall_Qry_Inscription_Data_result_JSON[0].data &&
|
||||||
|
<BarChart
|
||||||
|
|
||||||
|
dataset={Getall_Qry_Inscription_Data_result_JSON[0].data}
|
||||||
|
xAxis={[{ scaleType: 'band', dataKey: 'label', tickPlacement: 'middle' }]}
|
||||||
|
series={[
|
||||||
|
|
||||||
|
{ dataKey: 'count', label: 'Count', valueFormatter_count },
|
||||||
|
|
||||||
|
]}
|
||||||
|
{...chartSetting}
|
||||||
|
margin={{ right: 15, left: 100 }}
|
||||||
|
|
||||||
|
/>}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</Box>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
{/* <Box style={{ "color": "black", "height": "30rem" }}>
|
||||||
|
|
||||||
|
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
@ -478,14 +561,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
onSelectionModelChange={(newSelectionModel) => {
|
onSelectionModelChange={(newSelectionModel) => {
|
||||||
setSelectionModel(newSelectionModel);
|
setSelectionModel(newSelectionModel);
|
||||||
/*if (newSelectionModel.length === 1)
|
|
||||||
handleClick_edit_session_From_Line(newSelectionModel);*/
|
|
||||||
if (newSelectionModel.length !== 1) {
|
|
||||||
/* setaddOneParticipant();
|
|
||||||
setdisplay_detail_insc();
|
|
||||||
setselected_code_session();
|
|
||||||
setsubmenu();*/
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
selectionModel={selectionModel}
|
selectionModel={selectionModel}
|
||||||
|
|
||||||
|
@ -575,7 +651,7 @@ const Dashbord_Inscriptions = (props) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Box>
|
</Box>*/}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,9 +20,18 @@ import {
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
|
||||||
import { ResponsiveBar } from "@nivo/bar";
|
import { ResponsiveBar } from "@nivo/bar";
|
||||||
|
import Link from '@mui/material/Link';
|
||||||
|
import { PiDotsThree } from "react-icons/pi";
|
||||||
import { RiFileExcel2Line } from "react-icons/ri";
|
import { RiFileExcel2Line } from "react-icons/ri";
|
||||||
|
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import { format } from 'date-fns'
|
||||||
|
import moment from "moment";
|
||||||
|
import DatePicker from "react-datepicker";
|
||||||
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
|
import Button from '@mui/material/Button';
|
||||||
|
|
||||||
const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
||||||
const [gridline_id, setgridline_id] = useState("");
|
const [gridline_id, setgridline_id] = useState("");
|
||||||
const [isLoading, setLoading] = useState();
|
const [isLoading, setLoading] = useState();
|
||||||
|
@ -33,47 +42,82 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
||||||
date_today_90j.setDate(date_today_90j.getDate() - 90);
|
date_today_90j.setDate(date_today_90j.getDate() - 90);
|
||||||
|
|
||||||
const [selectionModel_task_cost, setSelectionModel_task_cost] = React.useState([]);
|
const [selectionModel_task_cost, setSelectionModel_task_cost] = React.useState([]);
|
||||||
|
const [filter_type_tache, setfilter_type_tache] = 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 : 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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const columns_task_cost = [
|
const columns_task_cost = [
|
||||||
{ field: 'id', headerName: 'id', hide: true },
|
{ field: 'id', headerName: 'id', hide: true },
|
||||||
{ field: '_id', headerName: '_id', hide: true },
|
{ field: '_id', headerName: '_id', hide: true },
|
||||||
|
|
||||||
{ field: 'rh_civilite', headerName: 'Civ.', hide: false, minWidth: 50, flex: 1, maxWidth: 60 },
|
{ field: 'rh_civilite', headerName: 'Civ.', hide: true, minWidth: 100, flex: 1, maxWidth: 60, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
{ field: 'rh_nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
{ field: 'rh_prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_email', headerName: 'Email', hide: true, flex: 1, minWidth: 200 },
|
{ field: 'rh_email', headerName: 'Email', hide: true, flex: 1, minWidth: 250, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_ismanager', headerName: 'Manager', hide: true, minWidth: 50, flex: 1, maxWidth: 100 },
|
{ field: 'rh_ismanager', headerName: 'Manager', hide: true, minWidth: 50, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_fonction', headerName: 'Fonction', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_fonction', headerName: 'Fonction', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_telephone_mobile', headerName: 'Mobile', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_telephone_mobile', headerName: 'Mobile', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_adr_adresse', headerName: 'Adesse', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_adr_adresse', headerName: 'Adesse', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_adr_code_postal', headerName: 'CP', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_adr_code_postal', headerName: 'CP', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_adr_ville', headerName: 'Ville', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_adr_ville', headerName: 'Ville', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_adr_pays', headerName: 'Pays', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_adr_pays', headerName: 'Pays', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
|
|
||||||
|
|
||||||
{ field: 'rh_contrat_date_debut', headerName: 'Ctrat Du', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_date_debut', headerName: 'Ctrat Du', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_date_fin', headerName: 'Ctrat Au', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_date_fin', headerName: 'Ctrat Au', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_type_contrat', headerName: 'Ctrat Type', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_type_contrat', headerName: 'Ctrat Type', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_type_employe', headerName: 'Ctrat Empl.', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_type_employe', headerName: 'Ctrat Empl.', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_cout', headerName: 'Ctrat Cout', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_cout', headerName: 'Ctrat Cout', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_periodicite', headerName: 'Ctrat Périodicité', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_periodicite', headerName: 'Ctrat Périodicité', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_quantite', headerName: 'Ctrat Qte', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_quantite', headerName: 'Ctrat Qte', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_groupe_prix_achat_id', headerName: 'Grp Prix ID', hide: true, Width: 0, },
|
|
||||||
{ field: 'rh_contrat_groupe_prix_achat_code', headerName: 'Grp Prix Code', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_groupe_prix_achat_id', headerName: 'Grp Prix ID', hide: true, Width: 0, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_groupe_prix_achat_cout', headerName: 'Grp Prix Cout', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_contrat_groupe_prix_achat_code', headerName: 'Grp Prix Code', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_contrat_groupe_prix_achat_periodicite', headerName: 'Grp Prix Périodicité', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
|
||||||
|
{ field: 'rh_contrat_groupe_prix_achat_cout', headerName: 'Grp Prix Cout', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
|
{ field: 'rh_contrat_groupe_prix_achat_periodicite', headerName: 'Grp Prix Périodicité', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
|
|
||||||
|
|
||||||
{ field: 'rh_event_planning_event_title', headerName: 'Planning Titre', hide: false, minWidth: 200, flex: 1, },
|
{ field: 'rh_event_planning_event_title', headerName: 'Planning Titre', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_even_comment', headerName: 'Planning Comment', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_event_planning_even_comment', headerName: 'Planning Comment', hide: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_event_type', headerName: 'Planning Type', hide: false, minWidth: 100, flex: 1, maxWidth: 100 },
|
{ field: 'rh_event_planning_event_type', headerName: 'Planning Type', hide: false, minWidth: 150, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_event_duration_hour', headerName: 'Planning Durée (h)', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
{ field: 'rh_event_planning_event_duration_hour', headerName: 'Planning Durée (h)', hide: false, minWidth: 100, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_agenda_date_jour', headerName: 'Planning Date', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'rh_event_planning_agenda_date_jour', headerName: 'Planning Date', hide: true, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_event_start', headerName: 'Planning Début', hide: false, minWidth: 150, flex: 1, maxWidth: 200 },
|
{ field: 'rh_event_planning_event_start', headerName: 'Planning Début', hide: false, minWidth: 150, flex: 1, maxWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_event_end', headerName: 'Planning Fin', hide: false, minWidth: 150, flex: 1, maxWidth: 200 },
|
{ field: 'rh_event_planning_event_end', headerName: 'Planning Fin', hide: false, minWidth: 150, flex: 1, maxWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'rh_event_planning_event_cost', headerName: 'Planning Cout Total (HT)', hide: false, minWidth: 150, flex: 1, maxWidth: 150 },
|
{ field: 'rh_event_planning_event_cost', headerName: 'Planning Cout Total (HT)', hide: false, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR'));
|
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 [p_filter_date_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||||
|
|
||||||
|
@ -109,7 +153,10 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
||||||
form.append("session_start_date", date_from);
|
form.append("session_start_date", date_from);
|
||||||
form.append("session_end_date", date_to);
|
form.append("session_end_date", date_to);
|
||||||
form.append("filter_value", filter_value);
|
form.append("filter_value", filter_value);
|
||||||
form.append("tab_rh_id", "all");
|
if (selected_employee_id && String(setselected_employee_id).length > 5)
|
||||||
|
form.append("tab_rh_id", selected_employee_id);
|
||||||
|
else
|
||||||
|
form.append("tab_rh_id", "all");
|
||||||
|
|
||||||
form.append("event_type", event_type_filter);
|
form.append("event_type", event_type_filter);
|
||||||
|
|
||||||
|
@ -197,6 +244,78 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [New_Getall_Training_Employee_No_Filter_result, setNew_Getall_Training_Employee_No_Filter_result] = useState([]);
|
||||||
|
|
||||||
|
const [Getall_Training_Employee_No_Filter_api, setGetall_Training_Employee_No_Filter_api] = useState();
|
||||||
|
const [Getall_Training_Employee_No_Filter_message, setGetall_Training_Employee_No_Filter_message] = useState();
|
||||||
|
const [Getall_Training_Employee_No_Filter_result, setGetall_Training_Employee_No_Filter_result] = useState();
|
||||||
|
function Getall_Training_Employee_No_Filter(event) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_no_filter/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message);
|
||||||
|
setGetall_Training_Employee_No_Filter_api("true");
|
||||||
|
setGetall_Training_Employee_No_Filter_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = res.data.message.map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
var local_prenom = JSON.parse(x).prenom;
|
||||||
|
var local_ismanager = JSON.parse(x).ismanager;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": local_id,
|
||||||
|
"id": localid,
|
||||||
|
"label": local_nom + " " + local_prenom,
|
||||||
|
"nom": local_nom,
|
||||||
|
"prenom": local_prenom,
|
||||||
|
"ismanager": local_ismanager
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (new_data2.length > 0)
|
||||||
|
setNew_Getall_Training_Employee_No_Filter_result(new_data2);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGetall_Training_Employee_No_Filter_api("false");
|
||||||
|
setGetall_Training_Employee_No_Filter_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
console.warn('Not good man :( Getall_Training_Employee_No_Filter = ', error);
|
||||||
|
setGetall_Training_Employee_No_Filter_api("false");
|
||||||
|
alert(" Impossible de recuperer la liste des employés");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const [selected_employee_id, setselected_employee_id] = useState("");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
setp_filter_date_from(props.user_dashbord_filter_start);
|
setp_filter_date_from(props.user_dashbord_filter_start);
|
||||||
|
@ -246,12 +365,177 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const New_option_type_planing = [
|
||||||
|
{ "id": "absence", "label": "Absence", "value": "absence" },
|
||||||
|
{ "id": "planning", "label": "Planning", "value": "planning" },
|
||||||
|
{ "id": "autre", "label": "Autre", "value": "autre" },
|
||||||
|
{ "id": "", "label": "", "value": "" },
|
||||||
|
]
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session" style={{ "marginLeft": "1px", "marginRight": "2px" }}>
|
<div className="dashbord_session" style={{ "marginLeft": "1px", "marginRight": "2px" }}>
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Filtre <br />
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="filtre11"
|
||||||
|
id="filtre11"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_option_periode}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setfilter_value(value.value);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{filter_value && String(filter_value) === "d" &&
|
||||||
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
|
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 enable_style"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
|
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>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Type Tache <br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="filtre12"
|
||||||
|
id="filtre12"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_option_type_planing}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setfilter_type_tache(value.value);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_type_tache("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Employé <br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="employee_id"
|
||||||
|
id="employee_id"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_Getall_Training_Employee_No_Filter_result}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value._id) {
|
||||||
|
setselected_employee_id(value._id);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setselected_employee_id("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
<br />
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
|
|
||||||
|
Getall_Qry_RH_Task_Cost_Data();
|
||||||
|
|
||||||
|
}}> Afficher
|
||||||
|
</Button><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{ "height": "40rem" }}>
|
<div style={{ "height": "40rem" }}>
|
||||||
|
|
||||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||||
|
@ -323,150 +607,171 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
||||||
|
|
||||||
|
|
||||||
<div className="session_data">
|
<div className="session_data">
|
||||||
<div style={{ "border": "None" }}>
|
<div style={{ "border": "None" }}>
|
||||||
|
|
||||||
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
|
||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
height: 500,
|
height: 500,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
paddingRight: '1px',
|
paddingRight: '1px',
|
||||||
|
|
||||||
"& .MuiDataGrid-columnHeaders": {
|
"& .MuiDataGrid-columnHeaders": {
|
||||||
backgroundColor: "#c8cfd5",
|
backgroundColor: "#c8cfd5",
|
||||||
color: "black",
|
color: "black",
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
|
|
||||||
'& .line--statut--selected': {
|
'& .line--statut--selected': {
|
||||||
backgroundColor: '#FBF2EF',
|
backgroundColor: '#FBF2EF',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
},
|
},
|
||||||
'& .line--statut--pair': {
|
'& .line--statut--pair': {
|
||||||
backgroundColor: 'rgba(235, 235, 235, .7)',
|
backgroundColor: 'rgba(235, 235, 235, .7)',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
},
|
},
|
||||||
'& .line--statut--impair': {
|
'& .line--statut--impair': {
|
||||||
backgroundColor: '#FFFFFF',
|
backgroundColor: '#FFFFFF',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
},
|
},
|
||||||
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DataGrid
|
<DataGrid
|
||||||
checkboxSelection
|
checkboxSelection
|
||||||
|
|
||||||
onSelectionModelChange={(newSelectionModel) => {
|
onSelectionModelChange={(newSelectionModel) => {
|
||||||
setSelectionModel_task_cost(newSelectionModel);
|
setSelectionModel_task_cost(newSelectionModel);
|
||||||
/*if (newSelectionModel.length === 1)
|
/*if (newSelectionModel.length === 1)
|
||||||
handleClick_edit_session_From_Line(newSelectionModel);*/
|
handleClick_edit_session_From_Line(newSelectionModel);*/
|
||||||
if (newSelectionModel.length !== 1) {
|
if (newSelectionModel.length !== 1) {
|
||||||
/* setaddOneParticipant();
|
/* setaddOneParticipant();
|
||||||
setdisplay_detail_insc();
|
setdisplay_detail_insc();
|
||||||
setselected_code_session();
|
setselected_code_session();
|
||||||
setsubmenu();*/
|
setsubmenu();*/
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
selectionModel={selectionModel_task_cost}
|
selectionModel={selectionModel_task_cost}
|
||||||
|
|
||||||
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
||||||
rows={Getall_Qry_RH_Task_Cost_Data_result.map((item, index) => (
|
rows={Getall_Qry_RH_Task_Cost_Data_result.map((item, index) => (
|
||||||
{
|
{
|
||||||
id: index,
|
id: index,
|
||||||
_id: JSON.parse(item)._id,
|
_id: JSON.parse(item)._id,
|
||||||
rh_civilite: JSON.parse(item).rh_civilite,
|
rh_civilite: JSON.parse(item).rh_civilite,
|
||||||
rh_nom: JSON.parse(item).rh_nom,
|
rh_nom: JSON.parse(item).rh_nom,
|
||||||
rh_prenom: JSON.parse(item).rh_prenom,
|
rh_prenom: JSON.parse(item).rh_prenom,
|
||||||
rh_email: JSON.parse(item).rh_email,
|
rh_email: JSON.parse(item).rh_email,
|
||||||
rh_ismanager: JSON.parse(item).rh_ismanager,
|
rh_ismanager: JSON.parse(item).rh_ismanager,
|
||||||
rh_fonction: JSON.parse(item).rh_fonction,
|
rh_fonction: JSON.parse(item).rh_fonction,
|
||||||
rh_telephone_mobile: JSON.parse(item).rh_telephone_mobile,
|
rh_telephone_mobile: JSON.parse(item).rh_telephone_mobile,
|
||||||
rh_adr_adresse: JSON.parse(item).rh_adr_adresse,
|
rh_adr_adresse: JSON.parse(item).rh_adr_adresse,
|
||||||
rh_adr_code_postal: JSON.parse(item).rh_adr_code_postal,
|
rh_adr_code_postal: JSON.parse(item).rh_adr_code_postal,
|
||||||
rh_adr_ville: JSON.parse(item).rh_adr_ville,
|
rh_adr_ville: JSON.parse(item).rh_adr_ville,
|
||||||
rh_adr_pays: JSON.parse(item).rh_adr_pays,
|
rh_adr_pays: JSON.parse(item).rh_adr_pays,
|
||||||
rh_contrat_date_debut: JSON.parse(item).rh_contrat_date_debut,
|
rh_contrat_date_debut: JSON.parse(item).rh_contrat_date_debut,
|
||||||
rh_contrat_date_fin: JSON.parse(item).rh_contrat_date_fin,
|
rh_contrat_date_fin: JSON.parse(item).rh_contrat_date_fin,
|
||||||
rh_contrat_type_contrat: JSON.parse(item).rh_contrat_type_contrat,
|
rh_contrat_type_contrat: JSON.parse(item).rh_contrat_type_contrat,
|
||||||
rh_contrat_type_employe: JSON.parse(item).rh_contrat_type_employe,
|
rh_contrat_type_employe: JSON.parse(item).rh_contrat_type_employe,
|
||||||
rh_contrat_cout: JSON.parse(item).rh_contrat_cout,
|
rh_contrat_cout: JSON.parse(item).rh_contrat_cout,
|
||||||
rh_contrat_periodicite: JSON.parse(item).rh_contrat_periodicite,
|
rh_contrat_periodicite: JSON.parse(item).rh_contrat_periodicite,
|
||||||
rh_contrat_quantite: JSON.parse(item).rh_contrat_quantite,
|
rh_contrat_quantite: JSON.parse(item).rh_contrat_quantite,
|
||||||
rh_contrat_groupe_prix_achat_id: JSON.parse(item).rh_contrat_groupe_prix_achat_id,
|
rh_contrat_groupe_prix_achat_id: JSON.parse(item).rh_contrat_groupe_prix_achat_id,
|
||||||
|
|
||||||
rh_contrat_groupe_prix_achat_code: JSON.parse(item).rh_contrat_groupe_prix_achat_code,
|
rh_contrat_groupe_prix_achat_code: JSON.parse(item).rh_contrat_groupe_prix_achat_code,
|
||||||
rh_contrat_groupe_prix_achat_cout: JSON.parse(item).rh_contrat_groupe_prix_achat_cout,
|
rh_contrat_groupe_prix_achat_cout: JSON.parse(item).rh_contrat_groupe_prix_achat_cout,
|
||||||
rh_contrat_groupe_prix_achat_periodicite: JSON.parse(item).rh_contrat_groupe_prix_achat_periodicite,
|
rh_contrat_groupe_prix_achat_periodicite: JSON.parse(item).rh_contrat_groupe_prix_achat_periodicite,
|
||||||
rh_event_planning_event_title: JSON.parse(item).rh_event_planning_event_title,
|
rh_event_planning_event_title: JSON.parse(item).rh_event_planning_event_title,
|
||||||
rh_event_planning_even_comment: JSON.parse(item).rh_event_planning_even_comment,
|
rh_event_planning_even_comment: JSON.parse(item).rh_event_planning_even_comment,
|
||||||
rh_event_planning_event_type: JSON.parse(item).rh_event_planning_event_type,
|
rh_event_planning_event_type: JSON.parse(item).rh_event_planning_event_type,
|
||||||
rh_event_planning_event_duration_hour: JSON.parse(item).rh_event_planning_event_duration_hour,
|
rh_event_planning_event_duration_hour: JSON.parse(item).rh_event_planning_event_duration_hour,
|
||||||
rh_event_planning_agenda_date_jour: JSON.parse(item).rh_event_planning_agenda_date_jour,
|
rh_event_planning_agenda_date_jour: JSON.parse(item).rh_event_planning_agenda_date_jour,
|
||||||
rh_event_planning_event_start: JSON.parse(item).rh_event_planning_event_start,
|
rh_event_planning_event_start: JSON.parse(item).rh_event_planning_event_start,
|
||||||
rh_event_planning_event_end: JSON.parse(item).rh_event_planning_event_end,
|
rh_event_planning_event_end: JSON.parse(item).rh_event_planning_event_end,
|
||||||
rh_event_planning_event_cost: JSON.parse(item).rh_event_planning_event_cost,
|
rh_event_planning_event_cost: JSON.parse(item).rh_event_planning_event_cost,
|
||||||
|
|
||||||
}
|
}
|
||||||
))}
|
))}
|
||||||
|
|
||||||
columns={columns_task_cost}
|
columns={columns_task_cost}
|
||||||
pageSize={10}
|
pageSize={10}
|
||||||
className="datagridclass"
|
className="datagridclass"
|
||||||
|
|
||||||
onRowDoubleClick={(newSelectionModel) => {
|
onRowDoubleClick={(newSelectionModel) => {
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rowsPerPageOptions={[10]}
|
rowsPerPageOptions={[10]}
|
||||||
disableSelectionOnClick
|
disableSelectionOnClick
|
||||||
components={{
|
components={{
|
||||||
Toolbar: GridToolbar,
|
Toolbar: GridToolbar,
|
||||||
}}
|
}}
|
||||||
//sx={datagridSx}
|
//sx={datagridSx}
|
||||||
getCellClassName={(params) => {
|
getCellClassName={(params) => {
|
||||||
|
|
||||||
// Pour la gestion de la couleur de zone double cliquée
|
// Pour la gestion de la couleur de zone double cliquée
|
||||||
if (String(params.row.id) === String(gridline_id)) {
|
if (String(params.row.id) === String(gridline_id)) {
|
||||||
return 'line--statut--selected';
|
return 'line--statut--selected';
|
||||||
}
|
}
|
||||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||||
return 'line--statut--pair';
|
return 'line--statut--pair';
|
||||||
}
|
}
|
||||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||||
return 'line--statut--impair';
|
return 'line--statut--impair';
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
getRowClassName={(params) => {
|
getRowClassName={(params) => {
|
||||||
|
|
||||||
// Pour la gestion de la couleur de zone double cliquée
|
// Pour la gestion de la couleur de zone double cliquée
|
||||||
if (String(params.row.id) === String(gridline_id)) {
|
if (String(params.row.id) === String(gridline_id)) {
|
||||||
|
|
||||||
return 'line--statut--selected';
|
return 'line--statut--selected';
|
||||||
}
|
}
|
||||||
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
else if (parseInt(String(params.row.id)) % 2 === 0) {
|
||||||
return 'line--statut--pair';
|
return 'line--statut--pair';
|
||||||
}
|
}
|
||||||
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
else if (parseInt(String(params.row.id)) % 2 !== 0) {
|
||||||
return 'line--statut--impair';
|
return 'line--statut--impair';
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
getEstimatedRowHeight={() => 200}
|
||||||
|
getRowHeight={() => "auto"}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{Getall_Qry_RH_Task_Cost_Data_result &&
|
||||||
|
Getall_Qry_RH_Task_Cost_Data_result.map((my_data) => (
|
||||||
|
<div >
|
||||||
|
|
||||||
</div>
|
{JSON.parse(my_data).total_duration &&
|
||||||
|
<nav style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "700", "fontSize": "2rem", height:"5rem",
|
||||||
|
"color":'#6495ED' }}>
|
||||||
|
Durée totale : {JSON.parse(my_data).total_duration}
|
||||||
|
<div className="div_row"> </div>
|
||||||
|
</nav>}
|
||||||
|
|
||||||
</div>
|
{JSON.parse(my_data).total_cost &&
|
||||||
|
<nav style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "700", "fontSize": "2rem", height:"5rem",
|
||||||
|
"color":'#FF7F50' }}>
|
||||||
|
Coût total : {JSON.parse(my_data).total_cost}
|
||||||
|
<div className="div_row"> </div>
|
||||||
|
</nav>}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
|
|
|
@ -20,9 +20,18 @@ import {
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
|
|
||||||
import { ResponsiveBar } from "@nivo/bar";
|
import { ResponsiveBar } from "@nivo/bar";
|
||||||
|
import Link from '@mui/material/Link';
|
||||||
|
import { PiDotsThree } from "react-icons/pi";
|
||||||
import { RiFileExcel2Line } from "react-icons/ri";
|
import { RiFileExcel2Line } from "react-icons/ri";
|
||||||
|
|
||||||
|
import Autocomplete from '@mui/material/Autocomplete';
|
||||||
|
import TextField from '@mui/material/TextField';
|
||||||
|
import { format } from 'date-fns'
|
||||||
|
import moment from "moment";
|
||||||
|
import DatePicker from "react-datepicker";
|
||||||
|
import "react-datepicker/dist/react-datepicker.css";
|
||||||
|
import Button from '@mui/material/Button';
|
||||||
|
|
||||||
const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
const [gridline_id, setgridline_id] = useState("");
|
const [gridline_id, setgridline_id] = useState("");
|
||||||
const [isLoading, setLoading] = useState();
|
const [isLoading, setLoading] = useState();
|
||||||
|
@ -32,27 +41,57 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
var date_today_90j = new Date();
|
var date_today_90j = new Date();
|
||||||
date_today_90j.setDate(date_today_90j.getDate() - 90);
|
date_today_90j.setDate(date_today_90j.getDate() - 90);
|
||||||
|
|
||||||
|
const [filter_type_tache, setfilter_type_tache] = 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 : 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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ field: 'id', headerName: 'id', hide: true },
|
{ field: 'id', headerName: 'id', hide: true },
|
||||||
{ field: '_id', headerName: '_id', hide: true },
|
{ field: '_id', headerName: '_id', hide: true },
|
||||||
|
|
||||||
{ field: 'civilite', headerName: 'Civ.', hide: false, minWidth: 50, flex: 1, maxWidth: 60 },
|
{ field: 'civilite', headerName: 'Civ.', hide: true, minWidth: 100, flex: 1, maxWidth: 60, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
{ field: 'nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
{ field: 'email', headerName: 'Email', hide: false, flex: 1, minWidth: 200 },
|
{ field: 'email', headerName: 'Email', hide: true, flex: 1, minWidth: 250, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
{ field: 'ismanager', headerName: 'Manager', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
{ field: 'ismanager', headerName: 'Manager', hide: true, minWidth: 100, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
{ field: 'fonction', headerName: 'Fonction', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
{ field: 'fonction', headerName: 'Fonction', hide: true, minWidth: 200, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
|
||||||
{ field: 'agenda_event_title', headerName: 'Titre Event', hide: false, minWidth: 200, flex: 1, },
|
|
||||||
{ field: 'agenda_event_code_session', headerName: 'Code session', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
|
||||||
{ field: 'agenda_event_type', headerName: 'Type Event', hide: false, minWidth: 100, flex: 1, maxWidth: 100 },
|
|
||||||
{ field: 'event_duration_hour', headerName: 'Durée (h)', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
|
||||||
{ field: 'agenda_date_jour', headerName: 'Date', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
|
||||||
{ field: 'agenda_event_start', headerName: 'Début', hide: false, minWidth: 150, flex: 1, maxWidth: 200 },
|
|
||||||
{ field: 'agenda_event_end', headerName: 'Fin', hide: false, minWidth: 150, flex: 1, maxWidth: 200 },
|
|
||||||
{ field: 'agenda_event_sequence_session_id', headerName: 'agenda_id', hide: true, maxWidth: 1 },
|
|
||||||
|
|
||||||
|
|
||||||
|
{ field: 'agenda_event_title', headerName: 'Titre Event', hide: false, minWidth: 250, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'agenda_event_code_session', headerName: 'Code session', hide: false, minWidth: 250, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'agenda_event_type', headerName: 'Type Event', hide: false, minWidth: 150, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'event_duration_hour', headerName: 'Durée (h)', hide: false, minWidth: 100, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'agenda_date_jour', headerName: 'Date', hide: false, minWidth: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'agenda_event_start', headerName: 'Début', hide: false, minWidth: 150, flex: 1, maxWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'agenda_event_end', headerName: 'Fin', hide: false, minWidth: 150, flex: 1, maxWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
|
{ field: 'agenda_event_sequence_session_id', headerName: 'agenda_id', hide: true, maxWidth: 1, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||||
]
|
]
|
||||||
|
|
||||||
const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR'));
|
const [p_filter_date_from, setp_filter_date_from] = useState(date_today_90j.toLocaleDateString('fr-FR'));
|
||||||
|
@ -60,7 +99,7 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
|
|
||||||
const [event_type_filter, setevent_type_filter] = useState(props.user_dashbord_filter_type_envent);
|
const [event_type_filter, setevent_type_filter] = useState(props.user_dashbord_filter_type_envent);
|
||||||
|
|
||||||
|
|
||||||
const [filter_value, setfilter_value] = useState("");
|
const [filter_value, setfilter_value] = useState("");
|
||||||
|
|
||||||
const [Getall_Qry_RH_Data_result_JSON, setGetall_Qry_RH_Data_result_JSON] = useState([]);
|
const [Getall_Qry_RH_Data_result_JSON, setGetall_Qry_RH_Data_result_JSON] = useState([]);
|
||||||
|
@ -95,7 +134,10 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
form.append("session_start_date", date_from);
|
form.append("session_start_date", date_from);
|
||||||
form.append("session_end_date", date_to);
|
form.append("session_end_date", date_to);
|
||||||
form.append("filter_value", filter_value);
|
form.append("filter_value", filter_value);
|
||||||
form.append("tab_rh_id", "all");
|
if (selected_employee_id && String(setselected_employee_id).length > 5)
|
||||||
|
form.append("tab_rh_id", selected_employee_id);
|
||||||
|
else
|
||||||
|
form.append("tab_rh_id", "all");
|
||||||
|
|
||||||
form.append("event_type", event_type);
|
form.append("event_type", event_type);
|
||||||
|
|
||||||
|
@ -183,9 +225,81 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const [New_Getall_Training_Employee_No_Filter_result, setNew_Getall_Training_Employee_No_Filter_result] = useState([]);
|
||||||
|
|
||||||
|
const [Getall_Training_Employee_No_Filter_api, setGetall_Training_Employee_No_Filter_api] = useState();
|
||||||
|
const [Getall_Training_Employee_No_Filter_message, setGetall_Training_Employee_No_Filter_message] = useState();
|
||||||
|
const [Getall_Training_Employee_No_Filter_result, setGetall_Training_Employee_No_Filter_result] = useState();
|
||||||
|
function Getall_Training_Employee_No_Filter(event) {
|
||||||
|
|
||||||
|
var form = new FormData();
|
||||||
|
|
||||||
|
|
||||||
|
const stored_cookie = getCookie('tokenmysypart');
|
||||||
|
form.append("token", stored_cookie);
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Ressource_Humaine_no_filter/";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
axios.post(myurl, form).then(res => {
|
||||||
|
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
//console.log(" In Getall_Training_Employee_No_Filter res.data.status = " + res.data.status);
|
||||||
|
//console.log(" In Getall_Training_Employee_No_Filter res.data.message r_class = " + res.data.message);
|
||||||
|
setGetall_Training_Employee_No_Filter_api("true");
|
||||||
|
setGetall_Training_Employee_No_Filter_result(res.data.message);
|
||||||
|
|
||||||
|
var new_data2 = [];
|
||||||
|
const new_data = res.data.message.map((x) => {
|
||||||
|
|
||||||
|
//---
|
||||||
|
var localid = JSON.parse(x).id;
|
||||||
|
var local_id = JSON.parse(x)._id;
|
||||||
|
var local_nom = JSON.parse(x).nom;
|
||||||
|
var local_prenom = JSON.parse(x).prenom;
|
||||||
|
var local_ismanager = JSON.parse(x).ismanager;
|
||||||
|
|
||||||
|
|
||||||
|
//---
|
||||||
|
var node = {
|
||||||
|
"_id": local_id,
|
||||||
|
"id": localid,
|
||||||
|
"label": local_nom + " " + local_prenom,
|
||||||
|
"nom": local_nom,
|
||||||
|
"prenom": local_prenom,
|
||||||
|
"ismanager": local_ismanager
|
||||||
|
};
|
||||||
|
new_data2.push(node);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (new_data2.length > 0)
|
||||||
|
setNew_Getall_Training_Employee_No_Filter_result(new_data2);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setGetall_Training_Employee_No_Filter_api("false");
|
||||||
|
setGetall_Training_Employee_No_Filter_message(res.data.message);
|
||||||
|
alert(res.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
console.warn('Not good man :( Getall_Training_Employee_No_Filter = ', error);
|
||||||
|
setGetall_Training_Employee_No_Filter_api("false");
|
||||||
|
alert(" Impossible de recuperer la liste des employés");
|
||||||
|
//setmyApimyApiMessage("")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const [selected_employee_id, setselected_employee_id] = useState("");
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
setp_filter_date_from(props.user_dashbord_filter_start);
|
setp_filter_date_from(props.user_dashbord_filter_start);
|
||||||
|
|
||||||
|
|
||||||
setp_filter_date_to(props.user_dashbord_filter_end);
|
setp_filter_date_to(props.user_dashbord_filter_end);
|
||||||
setevent_type_filter(props.user_dashbord_filter_type_envent);
|
setevent_type_filter(props.user_dashbord_filter_type_envent);
|
||||||
|
|
||||||
|
@ -231,12 +345,176 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const New_option_type_planing = [
|
||||||
|
{ "id": "absence", "label": "Absence", "value": "absence" },
|
||||||
|
{ "id": "planning", "label": "Planning", "value": "planning" },
|
||||||
|
{ "id": "autre", "label": "Autre", "value": "autre" },
|
||||||
|
{ "id": "", "label": "", "value": "" },
|
||||||
|
]
|
||||||
|
|
||||||
|
const New_option_periode = [
|
||||||
|
{ "id": "m0", "label": "Mois en cours", "value": "m0" },
|
||||||
|
{ "id": "m1", "label": "Mois précédant ", "value": "m1" },
|
||||||
|
{ "id": "d", "label": "Choisir des dates", "value": "d" },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dashbord_session" style={{ "marginLeft": "1px", "marginRight": "2px" }}>
|
<div className="dashbord_session" style={{ "marginLeft": "1px", "marginRight": "2px" }}>
|
||||||
{isLoading && <div className="loader-container">
|
{isLoading && <div className="loader-container">
|
||||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
<div className="mysy_spinner"> <img src={img_loading_spin} /> </div>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Filtre <br />
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="filtre11"
|
||||||
|
id="filtre11"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_option_periode}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setfilter_value(value.value);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_value("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{filter_value && String(filter_value) === "d" &&
|
||||||
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
|
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 enable_style"
|
||||||
|
locale='fr-FR'
|
||||||
|
|
||||||
|
/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||||
|
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>
|
||||||
|
|
||||||
|
</div>}
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div style={{ "width": "100%", "float": "left" }}>
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Type Tache <br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="filtre12"
|
||||||
|
id="filtre12"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_option_type_planing}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setfilter_type_tache(value.value);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setfilter_type_tache("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||||
|
Employé <br />
|
||||||
|
|
||||||
|
<Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="employee_id"
|
||||||
|
id="employee_id"
|
||||||
|
className="disabled_style"
|
||||||
|
options={New_Getall_Training_Employee_No_Filter_result}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value._id) {
|
||||||
|
setselected_employee_id(value._id);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setselected_employee_id("");
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row">
|
||||||
|
<br />
|
||||||
|
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||||
|
|
||||||
|
Getall_Qry_RH_Data();
|
||||||
|
|
||||||
|
}}> Afficher
|
||||||
|
</Button><br />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style={{ "height": "40rem" }}>
|
<div style={{ "height": "40rem" }}>
|
||||||
|
|
||||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||||
|
@ -435,6 +713,8 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
getEstimatedRowHeight={() => 200}
|
||||||
|
getRowHeight={() => "auto"}
|
||||||
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
@ -442,6 +722,21 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
{Getall_Qry_RH_Data_result &&
|
||||||
|
Getall_Qry_RH_Data_result.map((my_data) => (
|
||||||
|
<div >
|
||||||
|
|
||||||
|
{JSON.parse(my_data).total_duration &&
|
||||||
|
<nav style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "700", "fontSize": "2rem", height:"5rem",
|
||||||
|
"color":'#6495ED' }}>
|
||||||
|
Durée totale : {JSON.parse(my_data).total_duration}
|
||||||
|
<div className="div_row"> </div>
|
||||||
|
</nav>}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -170,11 +170,51 @@ const Mon_Tableau_De_Bord = (props) => {
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
{/* Gestion des TBD des ressources humaines */}
|
|
||||||
|
{/* Gestion des TBD des factures */}
|
||||||
{display_nb_column && <div>
|
{display_nb_column && <div>
|
||||||
{Get_Connected_User_Dashbord_result &&
|
{Get_Connected_User_Dashbord_result &&
|
||||||
Get_Connected_User_Dashbord_result.map((step) => (
|
Get_Connected_User_Dashbord_result.map((step) => (
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
||||||
|
|
||||||
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_01" &&
|
||||||
|
|
||||||
|
<Dashbord_Factures_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
}
|
||||||
|
|
||||||
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_02" &&
|
||||||
|
|
||||||
|
<Dashbord_Factures_Par_Client user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
}
|
||||||
|
|
||||||
|
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_03" &&
|
||||||
|
|
||||||
|
<Dashbord_Factures_Devis_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
||||||
|
user_dashbord_title={String(JSON.parse(step).title)}
|
||||||
|
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
||||||
|
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
))}
|
||||||
|
</div>}
|
||||||
|
|
||||||
|
{/* Gestion des TBD des ressources humaines */}
|
||||||
|
{display_nb_column && <div>
|
||||||
|
{Get_Connected_User_Dashbord_result &&
|
||||||
|
Get_Connected_User_Dashbord_result.map((step) => (
|
||||||
|
|
||||||
<div className="div_row" style={{ "width": "95%", "float": "left", "paddingRight": "2px" }}>
|
<div className="div_row" style={{ "width": "95%", "float": "left", "paddingRight": "2px" }}>
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,45 +258,6 @@ const Mon_Tableau_De_Bord = (props) => {
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|
||||||
{/* Gestion des TBD des factures */}
|
|
||||||
{display_nb_column && <div>
|
|
||||||
{Get_Connected_User_Dashbord_result &&
|
|
||||||
Get_Connected_User_Dashbord_result.map((step) => (
|
|
||||||
|
|
||||||
<div className="div_row" style={{ "width": String(display_column_size), "float": "left", "paddingRight": "2px" }}>
|
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_01" &&
|
|
||||||
|
|
||||||
<Dashbord_Factures_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
|
||||||
}
|
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_02" &&
|
|
||||||
|
|
||||||
<Dashbord_Factures_Par_Client user_dashbord_id={String(JSON.parse(step)._id)}
|
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
|
||||||
}
|
|
||||||
|
|
||||||
{String(JSON.parse(step).dashbord_internal_code) === "tbd_facture_03" &&
|
|
||||||
|
|
||||||
<Dashbord_Factures_Devis_Par_Periode user_dashbord_id={String(JSON.parse(step)._id)}
|
|
||||||
user_dashbord_title={String(JSON.parse(step).title)}
|
|
||||||
user_dashbord_filter_start={String(JSON.parse(step).start_date)}
|
|
||||||
user_dashbord_filter_end={String(JSON.parse(step).end_date)} />
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
))}
|
|
||||||
</div>}
|
|
||||||
|
|
||||||
{String(Get_Connected_User_Dashbord_api) === "true" && (!Get_Connected_User_Dashbord_result || Get_Connected_User_Dashbord_result.length <= 0) && <div>
|
{String(Get_Connected_User_Dashbord_api) === "true" && (!Get_Connected_User_Dashbord_result || Get_Connected_User_Dashbord_result.length <= 0) && <div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -102,10 +102,10 @@ const Partner_Commande = (props) => {
|
||||||
const columns = [
|
const columns = [
|
||||||
{ field: '_id', headerName: '_id', hide: true },
|
{ field: '_id', headerName: '_id', hide: true },
|
||||||
{ field: 'id', headerName: 'id', hide: true },
|
{ field: 'id', headerName: 'id', hide: true },
|
||||||
{ field: 'order_header_ref_interne', headerName: 'Reference', maxWidth: 200, minWidth : 180, flex:1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
{ field: 'order_header_ref_interne', headerName: 'Reference', maxWidth: 200, minWidth: 180, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'order_header_type', headerName: 'Type', width: 100, hide: false, editable: false },
|
{ field: 'order_header_type', headerName: 'Type', width: 100, hide: false, editable: false },
|
||||||
{
|
{
|
||||||
field: 'order_header_status', headerName: 'Statut', maxWidth : 150, flex :1, hide: false, editable: false,
|
field: 'order_header_status', headerName: 'Statut', maxWidth: 150, flex: 1, hide: false, editable: false,
|
||||||
valueFormatter: (params) => {
|
valueFormatter: (params) => {
|
||||||
if (String(params.value) === "-1")
|
if (String(params.value) === "-1")
|
||||||
return "Annulé";
|
return "Annulé";
|
||||||
|
@ -122,11 +122,11 @@ const Partner_Commande = (props) => {
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ field: 'order_header_client_id', headerName: 'Client_Id', width: 0, hide: true, editable: false },
|
{ field: 'order_header_client_id', headerName: 'Client_Id', width: 0, hide: true, editable: false },
|
||||||
{ field: 'order_header_client_nom', headerName: 'Nom Client', minWidth: 200, flex: 1 , renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
{ field: 'order_header_client_nom', headerName: 'Nom Client', minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'order_header_vendeur_id', headerName: 'Vendeur Id', width: 0, hide: true, editable: false },
|
{ field: 'order_header_vendeur_id', headerName: 'Vendeur Id', width: 0, hide: true, editable: false },
|
||||||
{ field: 'order_header_vendeur_nom_prenom', headerName: 'Vendeur', width: 150, flex: 1, editable: false, flex:1 },
|
{ field: 'order_header_vendeur_nom_prenom', headerName: 'Vendeur', width: 150, flex: 1, editable: false, flex: 1 },
|
||||||
{ field: 'order_header_date_cmd', headerName: 'Date', minWidth: 150, hide: false, editable: false, flex: 1 , renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
{ field: 'order_header_date_cmd', headerName: 'Date', minWidth: 150, hide: false, editable: false, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||||
{ field: 'order_header_date_expiration', headerName: 'Date Expiration', minWidth: 150, hide: false, editable: false },
|
{ field: 'order_header_date_expiration', headerName: 'Date Expiration', minWidth: 150, hide: false, editable: false },
|
||||||
|
|
||||||
|
|
||||||
|
@ -4170,6 +4170,9 @@ const Partner_Commande = (props) => {
|
||||||
setp_add_cmd_header_vendeur_id_label(value.label);
|
setp_add_cmd_header_vendeur_id_label(value.label);
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
setp_add_cmd_header_vendeur_id("");
|
||||||
|
setp_add_cmd_header_vendeur_id_label("");
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -5838,14 +5841,14 @@ const Partner_Commande = (props) => {
|
||||||
|
|
||||||
{String(p_detail_header_statut_label).toLowerCase() !== "brouillon" && <Button variant="outlined" onClick={print_order_pdf} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>Imprimer pdf</Button>}
|
{String(p_detail_header_statut_label).toLowerCase() !== "brouillon" && <Button variant="outlined" onClick={print_order_pdf} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>Imprimer pdf</Button>}
|
||||||
{String(p_detail_header_statut_label).toLowerCase() !== "brouillon" && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>envoyer par mail</Button>}
|
{String(p_detail_header_statut_label).toLowerCase() !== "brouillon" && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>envoyer par mail</Button>}
|
||||||
|
|
||||||
<br /> <br />
|
<br /> <br />
|
||||||
|
|
||||||
{String(p_detail_header_devis_date_validation).length > 5 && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche_info" id='order_header_main' name='order_header_main'>Validé le {String(p_detail_header_devis_date_validation).substring(0, 10)}</Button>}
|
{String(p_detail_header_devis_date_validation).length > 5 && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche_info" id='order_header_main' name='order_header_main'>Validé le {String(p_detail_header_devis_date_validation).substring(0, 10)}</Button>}
|
||||||
{String(p_detail_header_devis_date_envoi).length > 5 && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche_info" id='order_header_main' name='order_header_main'>Envoyé le {String(p_detail_header_devis_date_envoi).substring(0, 10)}</Button>}
|
{String(p_detail_header_devis_date_envoi).length > 5 && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche_info" id='order_header_main' name='order_header_main'>Envoyé le {String(p_detail_header_devis_date_envoi).substring(0, 10)}</Button>}
|
||||||
|
|
||||||
|
|
||||||
{(!p_detail_header_devis_date_validation || String(p_detail_header_devis_date_validation).length < 5) && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>Non Validé </Button>}
|
{(!p_detail_header_devis_date_validation || String(p_detail_header_devis_date_validation).length < 5) && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>Non Validé </Button>}
|
||||||
{(!p_detail_header_devis_date_envoi || String(p_detail_header_devis_date_envoi).length < 5) && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>Non Envoyé </Button>}
|
{(!p_detail_header_devis_date_envoi || String(p_detail_header_devis_date_envoi).length < 5) && <Button variant="outlined" onClick={Check_Electronic_Sign_Before_Sending_Email} className="detail_class_submenu bton_add_sous_menu_cmd_gauche" id='order_header_main' name='order_header_main'>Non Envoyé </Button>}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2047,7 +2047,7 @@
|
||||||
.bton_put_to_invoice {
|
.bton_put_to_invoice {
|
||||||
background: #d5f38f;
|
background: #d5f38f;
|
||||||
color: black;
|
color: black;
|
||||||
width: 25% !important;
|
width: 100% !important;
|
||||||
height: 3rem !important;
|
height: 3rem !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue