27/04/2024 - 22h
parent
60494e4bcb
commit
84e5f96cdc
|
@ -2429,7 +2429,8 @@ const CRM_Opportunite = (props) => {
|
|||
|
||||
}}
|
||||
|
||||
|
||||
getEstimatedRowHeight={() => 200}
|
||||
getRowHeight={() => "auto"}
|
||||
/>
|
||||
</Box>
|
||||
<br />
|
||||
|
|
|
@ -303,6 +303,24 @@ const Dashbord_Factures = (props) => {
|
|||
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_count = (value) => `${value} Fact`;
|
||||
|
@ -472,10 +490,13 @@ const Dashbord_Factures = (props) => {
|
|||
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;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (filter_value) {
|
||||
filter_val = filter_value
|
||||
}
|
||||
// Si filter_val = "d", alors on va recuperer l'interval de date
|
||||
if (String(filter_val) === "d") {
|
||||
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 (
|
||||
<div className="dashbord_session">
|
||||
|
@ -560,31 +587,34 @@ const Dashbord_Factures = (props) => {
|
|||
<div className="div_row">
|
||||
<div className="" style={{ "width": "30%" }}>
|
||||
Filtre <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre11"
|
||||
id="filtre11"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={filter_value}
|
||||
onChange={(e) => {
|
||||
setfilter_value(e.target.value);
|
||||
}
|
||||
}
|
||||
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" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
>
|
||||
<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>
|
||||
|
||||
{filter_value && String(filter_value) === "d" && <div>
|
||||
{filter_value && String(filter_value) === "d" &&
|
||||
|
||||
<div>
|
||||
<div className="session_caract">
|
||||
Date Debut
|
||||
<DatePicker
|
||||
|
@ -625,6 +655,8 @@ const Dashbord_Factures = (props) => {
|
|||
</div>
|
||||
|
||||
<br />
|
||||
</div>}
|
||||
<div>
|
||||
<div className="" style={{ "width": "30%" }}>
|
||||
Client <br />
|
||||
|
||||
|
@ -644,18 +676,13 @@ const Dashbord_Factures = (props) => {
|
|||
if (value && value._id) {
|
||||
|
||||
setp_detail_partner_client_id(value._id);
|
||||
|
||||
setp_detail_partner_client_nom(value.label);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
setp_detail_partner_client_id("");
|
||||
setp_detail_partner_client_nom("");
|
||||
}
|
||||
|
||||
Getall_Qry_Invoice_Data();
|
||||
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
|
@ -666,7 +693,7 @@ const Dashbord_Factures = (props) => {
|
|||
/>}
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||
|
@ -731,7 +758,6 @@ const Dashbord_Factures = (props) => {
|
|||
Getall_Qry_Invoice_Data_result_JSON[0].data &&
|
||||
<BarChart
|
||||
|
||||
|
||||
dataset={Getall_Qry_Invoice_Data_result_JSON[0].data}
|
||||
xAxis={[{ scaleType: 'band', dataKey: 'month_year', tickPlacement: 'middle' }]}
|
||||
series={[
|
||||
|
@ -901,7 +927,7 @@ const Dashbord_Factures = (props) => {
|
|||
{ dataKey: 'nb_devis_perdu', label: 'Perdu', color: '#FA7070' },
|
||||
|
||||
]}
|
||||
{...chartSetting}
|
||||
{...chartSetting_nb}
|
||||
margin={{ right: 15, left: 100 }}
|
||||
|
||||
|
||||
|
|
|
@ -22,11 +22,14 @@ import { MdOutlineAddchart, } from "react-icons/md";
|
|||
import {
|
||||
useTheme,
|
||||
} from "@mui/material";
|
||||
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import { ResponsivePie } from '@nivo/pie'
|
||||
import { ResponsiveBar } from "@nivo/bar";
|
||||
|
||||
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 history = useHistory();
|
||||
|
@ -84,6 +87,8 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
const [filter_type_tache, setfilter_type_tache] = useState("");
|
||||
|
||||
const [filter_group_by, setfilter_group_by] = useState("");
|
||||
|
||||
const [tdb_title, settdb_title] = useState();
|
||||
|
||||
const [display_nb_column, setdisplay_nb_column] = useState("1");
|
||||
|
@ -93,6 +98,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
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_api, setGetall_Qry_Inscription_Data_api] = 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([]);
|
||||
|
@ -121,8 +127,13 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Qery_Inscription_By_Session_By_Periode/";
|
||||
var myurl = "";
|
||||
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);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
@ -135,6 +146,8 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
||||
|
||||
//console.log(" ### jsonObj = ", jsonObj)
|
||||
|
||||
setGetall_Qry_Inscription_Data_api("true");
|
||||
setGetall_Qry_Inscription_Data_result(res.data.message);
|
||||
|
||||
|
@ -175,8 +188,12 @@ const Dashbord_Inscriptions = (props) => {
|
|||
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
||||
}
|
||||
|
||||
/*
|
||||
if (document.getElementsByName("filtre11")[0]) {
|
||||
filter_val = document.getElementsByName("filtre11")[0].value;
|
||||
}*/
|
||||
if (filter_value) {
|
||||
filter_val = filter_value
|
||||
}
|
||||
|
||||
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 (
|
||||
<div className="dashbord_session">
|
||||
{isLoading && <div className="loader-container">
|
||||
|
@ -276,28 +328,32 @@ const Dashbord_Inscriptions = (props) => {
|
|||
<div className="div_row">
|
||||
<div className="" style={{ "width": "30%" }}>
|
||||
Filtre <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre11"
|
||||
id="filtre11"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={filter_value}
|
||||
onChange={(e) => {
|
||||
setfilter_value(e.target.value);
|
||||
}
|
||||
options={New_option_periode}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setfilter_value(value.value);
|
||||
|
||||
} else {
|
||||
setfilter_value("");
|
||||
}
|
||||
|
||||
>
|
||||
<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>
|
||||
|
||||
}}
|
||||
|
||||
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>
|
||||
|
@ -343,30 +399,32 @@ const Dashbord_Inscriptions = (props) => {
|
|||
</div>}
|
||||
<br />
|
||||
<div className="" style={{ "width": "30%" }}>
|
||||
Type Tache <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
Grouper par <br />
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre12"
|
||||
id="filtre12"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={filter_type_tache}
|
||||
onChange={(e) => {
|
||||
setfilter_type_tache(e.target.value);
|
||||
}
|
||||
options={New_option_group_by}
|
||||
onChange={(event, value) => {
|
||||
if (value && value.value) {
|
||||
setfilter_group_by(value.value);
|
||||
|
||||
|
||||
} else {
|
||||
setfilter_group_by("");
|
||||
}
|
||||
|
||||
>
|
||||
<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>
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Grouper par"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<Button variant="contained" className="bton_enreg" onClick={(e) => {
|
||||
|
@ -416,10 +474,35 @@ const Dashbord_Inscriptions = (props) => {
|
|||
</nav>
|
||||
|
||||
</nav>}
|
||||
|
||||
<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 style={{ "border": "None" }}>
|
||||
|
||||
|
@ -478,14 +561,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
onSelectionModelChange={(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}
|
||||
|
||||
|
@ -575,7 +651,7 @@ const Dashbord_Inscriptions = (props) => {
|
|||
|
||||
|
||||
|
||||
</Box>
|
||||
</Box>*/}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,11 +22,14 @@ import { MdOutlineAddchart, } from "react-icons/md";
|
|||
import {
|
||||
useTheme,
|
||||
} from "@mui/material";
|
||||
|
||||
import Autocomplete from '@mui/material/Autocomplete';
|
||||
import { ResponsivePie } from '@nivo/pie'
|
||||
import { ResponsiveBar } from "@nivo/bar";
|
||||
|
||||
import { TbColumns2, TbColumns1 } from "react-icons/tb";
|
||||
import { Stroller } from "@mui/icons-material";
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
|
||||
const Dashbord_Ressources_Humaines = (props) => {
|
||||
|
||||
|
@ -43,25 +46,55 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
const [selectionModel, setSelectionModel] = React.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 = [
|
||||
{ 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: 'nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
||||
{ field: 'email', headerName: 'Email', hide: false, flex: 1, minWidth: 200 },
|
||||
{ field: 'ismanager', headerName: 'Manager', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
||||
{ field: 'fonction', headerName: 'Fonction', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ 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: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ field: 'email', headerName: 'Email', hide: true, flex: 1, minWidth: 250, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ field: 'ismanager', headerName: 'Manager', hide: true, minWidth: 100, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ 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} /> },
|
||||
]
|
||||
|
||||
|
||||
|
@ -70,42 +103,42 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
{ 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_nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
||||
{ field: 'rh_prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
||||
{ field: 'rh_email', headerName: 'Email', hide: true, flex: 1, minWidth: 200 },
|
||||
{ field: 'rh_ismanager', headerName: 'Manager', hide: true, minWidth: 50, flex: 1, maxWidth: 100 },
|
||||
{ field: 'rh_fonction', headerName: 'Fonction', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_telephone_mobile', headerName: 'Mobile', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_adresse', headerName: 'Adesse', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_code_postal', headerName: 'CP', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_ville', headerName: 'Ville', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_pays', headerName: 'Pays', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ 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: 200 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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: 250 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ field: 'rh_ismanager', headerName: 'Manager', hide: true, minWidth: 50, flex: 1, maxWidth: 100 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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 , 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_fin', headerName: 'Ctrat Au', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_type_contrat', headerName: 'Ctrat Type', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_type_employe', headerName: 'Ctrat Empl.', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_cout', headerName: 'Ctrat Cout', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_periodicite', headerName: 'Ctrat Périodicité', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_quantite', headerName: 'Ctrat Qte', 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: 150, flex: 1, maxWidth: 150 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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: 150, flex: 1, maxWidth: 150 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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: 150, flex: 1, maxWidth: 150 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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_code', headerName: 'Grp Prix Code', hide: true, minWidth: 100, flex: 1, maxWidth: 150 , 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_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_even_comment', headerName: 'Planning Comment', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_event_planning_event_type', headerName: 'Planning Type', hide: false, minWidth: 100, flex: 1, maxWidth: 100 },
|
||||
{ field: 'rh_event_planning_event_duration_hour', headerName: 'Planning Durée (h)', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
||||
{ field: 'rh_event_planning_agenda_date_jour', headerName: 'Planning Date', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_event_planning_event_start', headerName: 'Planning Début', 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 },
|
||||
{ field: 'rh_event_planning_event_cost', headerName: 'Planning Cout Total (HT)', hide: false, minWidth: 150, flex: 1, maxWidth: 150 },
|
||||
{ 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: true, minWidth: 100, flex: 1, maxWidth: 150 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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: 100, flex: 1, maxWidth: 100 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
{ 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 , renderCell: (params) => <ExpandableCell_50 {...params} />,},
|
||||
|
||||
]
|
||||
|
||||
|
@ -125,6 +158,8 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
const [Getall_Qry_RH_Data_result_JSON, setGetall_Qry_RH_Data_result_JSON] = useState([]);
|
||||
const [Getall_Qry_RH_Data_api, setGetall_Qry_RH_Data_api] = useState();
|
||||
const [Getall_Qry_RH_Data_message, setGetall_Qry_RH_Data_message] = useState();
|
||||
|
@ -151,6 +186,9 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
form.append("session_start_date", date_from);
|
||||
form.append("session_end_date", date_to);
|
||||
form.append("filter_value", filter_value);
|
||||
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", filter_type_tache);
|
||||
|
@ -173,6 +211,14 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
setGetall_Qry_RH_Data_api("true");
|
||||
setGetall_Qry_RH_Data_result(res.data.message);
|
||||
|
||||
var local_total_duration = "0";
|
||||
const new_data = res.data.message.map((x) => {
|
||||
if (JSON.parse(x).total_duration) {
|
||||
console.log(" DUREATION TOTAL = ", JSON.parse(x).total_duration)
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
|
@ -216,6 +262,9 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
form.append("session_start_date", date_from);
|
||||
form.append("session_end_date", date_to);
|
||||
form.append("filter_value", filter_value);
|
||||
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", filter_type_tache);
|
||||
|
@ -234,6 +283,7 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
setGetall_Qry_RH_Task_Cost_Data_result_JSON(JSON.parse('[' + res.data.message + ']'));
|
||||
|
||||
var jsonObj = JSON.parse('[' + res.data.message + ']');
|
||||
//console.log(" ### Getall_Qry_RH_Task_Cost_Data -jsonObj = ", jsonObj)
|
||||
|
||||
setGetall_Qry_RH_Task_Cost_Data_api("true");
|
||||
setGetall_Qry_RH_Task_Cost_Data_result(res.data.message);
|
||||
|
@ -277,12 +327,12 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
tdb_title = document.getElementsByName("tdb_title")[0].value;
|
||||
}
|
||||
|
||||
if (document.getElementsByName("filtre11")[0]) {
|
||||
filter_val = document.getElementsByName("filtre11")[0].value;
|
||||
if (filter_value) {
|
||||
filter_val = filter_value
|
||||
}
|
||||
|
||||
if (document.getElementsByName("filtre12")[0]) {
|
||||
filter_type_event = document.getElementsByName("filtre12")[0].value;
|
||||
if (filter_type_tache) {
|
||||
filter_type_event = filter_type_tache
|
||||
}
|
||||
|
||||
// Si filter_val = "d", alors on va recuperer l'interval de date
|
||||
|
@ -338,10 +388,79 @@ const Dashbord_Ressources_Humaines = (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(() => {
|
||||
Getall_Qry_RH_Data();
|
||||
Getall_Qry_RH_Task_Cost_Data();
|
||||
Getall_Training_Employee_No_Filter();
|
||||
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
|
@ -351,6 +470,22 @@ const Dashbord_Ressources_Humaines = (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 (
|
||||
<div className="dashbord_session">
|
||||
{isLoading && <div className="loader-container">
|
||||
|
@ -377,35 +512,39 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
}} />
|
||||
</a> </div>
|
||||
|
||||
<div className="div_row">
|
||||
<div className="" style={{ "width": "30%" }}>
|
||||
<div style={{ "width": "100%", "float": "left" }}>
|
||||
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||
Filtre <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre11"
|
||||
id="filtre11"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={filter_value}
|
||||
onChange={(e) => {
|
||||
setfilter_value(e.target.value);
|
||||
}
|
||||
}
|
||||
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" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
>
|
||||
<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>
|
||||
|
||||
{filter_value && String(filter_value) === "d" && <div>
|
||||
<div className="session_caract">
|
||||
{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"
|
||||
|
@ -419,14 +558,15 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
}
|
||||
showTimeSelect={false}
|
||||
dateFormat="dd/MM/yyyy"
|
||||
className="disabled_style session_caract_Dialog_DatePicker"
|
||||
className="disabled_style enable_style"
|
||||
locale='fr-FR'
|
||||
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract">
|
||||
</div>
|
||||
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||
<div className="session_caract" style={{ "padding": '0px', 'width': '100%' }}>
|
||||
Date Fin
|
||||
<DatePicker
|
||||
name="one_sessiondatefin"
|
||||
|
@ -443,43 +583,80 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
<br />
|
||||
<div className="" style={{ "width": "30%" }}>
|
||||
|
||||
<div style={{ "width": "100%", "float": "left" }}>
|
||||
<div className="" style={{ "width": "50%", "float": "left" }}>
|
||||
Type Tache <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre12"
|
||||
id="filtre12"
|
||||
select
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={filter_type_tache}
|
||||
onChange={(e) => {
|
||||
setfilter_type_tache(e.target.value);
|
||||
}
|
||||
}
|
||||
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" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
>
|
||||
<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 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();
|
||||
Getall_Qry_RH_Task_Cost_Data();
|
||||
|
||||
}}> Afficher
|
||||
</Button><br />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -487,7 +664,7 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
||||
|
||||
|
||||
<div style={{ "float": "left", "width": String(display_column_size), "height": "42rem", "float": "left", "paddingRight": "5px" }} >
|
||||
<div style={{ "float": "left", "width": String(display_column_size),"float": "left", "paddingRight": "5px" }} >
|
||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||
<nav style={{ "width": "90%", "float": "left", "textAlign": "center" }}> TBD Employés - Détail Tâche </nav>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
|
||||
|
@ -643,13 +820,30 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
|
||||
}}
|
||||
|
||||
getEstimatedRowHeight={() => 200}
|
||||
getRowHeight={() => "auto"}
|
||||
|
||||
|
||||
/>
|
||||
</Box>
|
||||
<br />
|
||||
|
||||
</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>
|
||||
|
@ -666,7 +860,7 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
<div style={{ "float": "left", "width": "100%", "paddingRight": "5px" }}>
|
||||
|
||||
|
||||
<div style={{ "float": "left", "width": String(display_column_size), "height": "42rem", "float": "left", "paddingRight": "5px" }} >
|
||||
<div style={{ "float": "left", "width": String(display_column_size), "float": "left", "paddingRight": "5px" }} >
|
||||
<div className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||
<nav style={{ "width": "90%", "float": "left", "textAlign": "center" }}> TBD Employés Détail Taches et Coût</nav>
|
||||
<Tooltip className="tooltip_css" id="my-tooltip01" style={{ "fontSize": "12px" }} />
|
||||
|
@ -790,9 +984,6 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
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,
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
|
@ -842,13 +1033,35 @@ const Dashbord_Ressources_Humaines = (props) => {
|
|||
}
|
||||
|
||||
}}
|
||||
|
||||
getEstimatedRowHeight={() => 200}
|
||||
getRowHeight={() => "auto"}
|
||||
|
||||
/>
|
||||
</Box>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
{Getall_Qry_RH_Task_Cost_Data_result &&
|
||||
Getall_Qry_RH_Task_Cost_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>}
|
||||
|
||||
{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>
|
||||
|
||||
|
|
|
@ -20,9 +20,18 @@ import {
|
|||
} from "@mui/material";
|
||||
|
||||
import { ResponsiveBar } from "@nivo/bar";
|
||||
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
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 [gridline_id, setgridline_id] = 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);
|
||||
|
||||
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 = [
|
||||
{ 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_nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
||||
{ field: 'rh_prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
||||
{ field: 'rh_email', headerName: 'Email', hide: true, flex: 1, minWidth: 200 },
|
||||
{ field: 'rh_ismanager', headerName: 'Manager', hide: true, minWidth: 50, flex: 1, maxWidth: 100 },
|
||||
{ field: 'rh_fonction', headerName: 'Fonction', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_telephone_mobile', headerName: 'Mobile', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_adresse', headerName: 'Adesse', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_code_postal', headerName: 'CP', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_ville', headerName: 'Ville', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_adr_pays', headerName: 'Pays', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ 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: 200, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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: 250, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'rh_ismanager', headerName: 'Manager', hide: true, minWidth: 50, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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, 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_fin', headerName: 'Ctrat Au', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_type_contrat', headerName: 'Ctrat Type', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_type_employe', headerName: 'Ctrat Empl.', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_cout', headerName: 'Ctrat Cout', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_periodicite', headerName: 'Ctrat Périodicité', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_quantite', headerName: 'Ctrat Qte', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ 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_cout', headerName: 'Grp Prix Cout', hide: true, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_contrat_groupe_prix_achat_periodicite', headerName: 'Grp Prix Périodicité', 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: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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: 150, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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_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_even_comment', headerName: 'Planning Comment', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_event_planning_event_type', headerName: 'Planning Type', hide: false, minWidth: 100, flex: 1, maxWidth: 100 },
|
||||
{ field: 'rh_event_planning_event_duration_hour', headerName: 'Planning Durée (h)', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
||||
{ field: 'rh_event_planning_agenda_date_jour', headerName: 'Planning Date', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
{ field: 'rh_event_planning_event_start', headerName: 'Planning Début', 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 },
|
||||
{ field: 'rh_event_planning_event_cost', headerName: 'Planning Cout Total (HT)', hide: false, minWidth: 150, flex: 1, maxWidth: 150 },
|
||||
{ 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: true, minWidth: 100, flex: 1, maxWidth: 150, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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: 100, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ 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, 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_to, setp_filter_date_to] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||
|
||||
|
@ -109,6 +153,9 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
|||
form.append("session_start_date", date_from);
|
||||
form.append("session_end_date", date_to);
|
||||
form.append("filter_value", filter_value);
|
||||
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);
|
||||
|
@ -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(() => {
|
||||
|
||||
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 (
|
||||
<div className="dashbord_session" style={{ "marginLeft": "1px", "marginRight": "2px" }}>
|
||||
{isLoading && <div className="loader-container">
|
||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </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 className="titre1" style={{ "float": "left", "cursor": "none" }}>
|
||||
|
@ -456,6 +740,8 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
|||
}
|
||||
|
||||
}}
|
||||
getEstimatedRowHeight={() => 200}
|
||||
getRowHeight={() => "auto"}
|
||||
|
||||
|
||||
/>
|
||||
|
@ -463,7 +749,26 @@ const Dashbord_Ressources_Humaines_Tache_Couts = (props) => {
|
|||
<br />
|
||||
|
||||
</div>
|
||||
{Getall_Qry_RH_Task_Cost_Data_result &&
|
||||
Getall_Qry_RH_Task_Cost_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>}
|
||||
|
||||
{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>
|
||||
|
|
|
@ -20,9 +20,18 @@ import {
|
|||
} from "@mui/material";
|
||||
|
||||
import { ResponsiveBar } from "@nivo/bar";
|
||||
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
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 [gridline_id, setgridline_id] = useState("");
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
@ -32,27 +41,57 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
|||
var date_today_90j = new Date();
|
||||
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 = [
|
||||
{ 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: 'nom', headerName: 'Nom', hide: false, flex: 1, minWidth: 20 },
|
||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200 },
|
||||
{ field: 'email', headerName: 'Email', hide: false, flex: 1, minWidth: 200 },
|
||||
{ field: 'ismanager', headerName: 'Manager', hide: false, minWidth: 50, flex: 1, maxWidth: 100 },
|
||||
{ field: 'fonction', headerName: 'Fonction', hide: false, minWidth: 100, flex: 1, maxWidth: 150 },
|
||||
|
||||
{ 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: '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: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ field: 'prenom', headerName: 'Prénom', hide: false, flex: 1, minWidth: 200, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ field: 'email', headerName: 'Email', hide: true, flex: 1, minWidth: 250, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ field: 'ismanager', headerName: 'Manager', hide: true, minWidth: 100, flex: 1, maxWidth: 100, renderCell: (params) => <ExpandableCell_50 {...params} /> },
|
||||
{ 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: 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'));
|
||||
|
@ -95,6 +134,9 @@ const Dashbord_Ressources_Humaines_Tache_by_rhid = (props) => {
|
|||
form.append("session_start_date", date_from);
|
||||
form.append("session_end_date", date_to);
|
||||
form.append("filter_value", filter_value);
|
||||
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);
|
||||
|
@ -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(() => {
|
||||
|
||||
setp_filter_date_from(props.user_dashbord_filter_start);
|
||||
|
||||
|
||||
setp_filter_date_to(props.user_dashbord_filter_end);
|
||||
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 (
|
||||
<div className="dashbord_session" style={{ "marginLeft": "1px", "marginRight": "2px" }}>
|
||||
{isLoading && <div className="loader-container">
|
||||
<div className="mysy_spinner"> <img src={img_loading_spin} /> </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 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 />
|
||||
|
||||
</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>
|
||||
|
||||
|
|
|
@ -170,6 +170,46 @@ const Mon_Tableau_De_Bord = (props) => {
|
|||
</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>}
|
||||
|
||||
{/* Gestion des TBD des ressources humaines */}
|
||||
{display_nb_column && <div>
|
||||
{Get_Connected_User_Dashbord_result &&
|
||||
|
@ -218,45 +258,6 @@ const Mon_Tableau_De_Bord = (props) => {
|
|||
</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>
|
||||
|
||||
|
||||
|
|
|
@ -4170,6 +4170,9 @@ const Partner_Commande = (props) => {
|
|||
setp_add_cmd_header_vendeur_id_label(value.label);
|
||||
|
||||
|
||||
} else {
|
||||
setp_add_cmd_header_vendeur_id("");
|
||||
setp_add_cmd_header_vendeur_id_label("");
|
||||
}
|
||||
}}
|
||||
|
||||
|
|
|
@ -2047,7 +2047,7 @@
|
|||
.bton_put_to_invoice {
|
||||
background: #d5f38f;
|
||||
color: black;
|
||||
width: 25% !important;
|
||||
width: 100% !important;
|
||||
height: 3rem !important;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue