From a6abe58b2fd6d28850cef4481d24e72f5172b2d7 Mon Sep 17 00:00:00 2001 From: cherif Date: Mon, 1 Jan 2024 17:50:28 +0100 Subject: [PATCH] 01/01/2024- 18h --- .../Dashbord_Ressources_Humaines.js | 335 +++++++++++- ...ashbord_Ressources_Humaines_Tache_Couts.js | 483 ++++++++++++++++++ src/components/Employes.js | 109 +++- src/components/Module_Absence.js | 2 +- src/components/Module_Agenda.js | 69 ++- src/components/Mon_Tableau_De_Bord.js | 29 +- src/components/Partner_Client.js | 10 +- src/components/Partner_Prix_Achat.js | 18 +- src/styles/components/_module_agenda.scss | 8 +- 9 files changed, 1001 insertions(+), 62 deletions(-) create mode 100644 src/components/Dashbord_Ressources_Humaines_Tache_Couts.js diff --git a/src/components/Dashbord_Ressources_Humaines.js b/src/components/Dashbord_Ressources_Humaines.js index 0261c6c..e1c79d2 100644 --- a/src/components/Dashbord_Ressources_Humaines.js +++ b/src/components/Dashbord_Ressources_Humaines.js @@ -62,8 +62,55 @@ const Dashbord_Ressources_Humaines = (props) => { { 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 }, + ] + const [selectionModel_task_cost, setSelectionModel_task_cost] = React.useState([]); + 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_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_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 }, + ] @@ -78,7 +125,7 @@ const Dashbord_Ressources_Humaines = (props) => { const [tdb_title, settdb_title] = useState(); const [display_nb_column, setdisplay_nb_column] = useState("1"); - const [display_column_size, setdisplay_column_size] = useState("50%"); + const [display_column_size, setdisplay_column_size] = useState("100%"); @@ -147,6 +194,71 @@ const Dashbord_Ressources_Humaines = (props) => { }) } + const [Getall_Qry_RH_Task_Cost_Data_result_JSON, setGetall_Qry_RH_Task_Cost_Data_result_JSON] = useState([]); + const [Getall_Qry_RH_Task_Cost_Data_api, setGetall_Qry_RH_Task_Cost_Data_api] = useState(); + const [Getall_Qry_RH_Task_Cost_Data_message, setGetall_Qry_RH_Task_Cost_Data_message] = useState(); + const [Getall_Qry_RH_Task_Cost_Data_result, setGetall_Qry_RH_Task_Cost_Data_result] = useState([]); + function Getall_Qry_RH_Task_Cost_Data(event) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("session_start_date", date_from); + form.append("session_end_date", date_to); + form.append("filter_value", filter_value); + form.append("tab_rh_id", "all"); + + form.append("event_type", filter_type_tache); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Humain_Ressource_With_Planning_And_Cost/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Qry_RH_Task_Cost_Data res.data.status = " + res.data.status); + //console.log(" In Getall_Qry_RH_Task_Cost_Data res.data.message r_class = " + res.data.message); + + setGetall_Qry_RH_Task_Cost_Data_result_JSON(JSON.parse('[' + res.data.message + ']')); + + var jsonObj = JSON.parse('[' + res.data.message + ']'); + + setGetall_Qry_RH_Task_Cost_Data_api("true"); + setGetall_Qry_RH_Task_Cost_Data_result(res.data.message); + + + } + else { + setGetall_Qry_RH_Task_Cost_Data_api("false"); + setGetall_Qry_RH_Task_Cost_Data_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Qry_RH_Task_Cost_Data = ', error); + setGetall_Qry_RH_Task_Cost_Data_api("false"); + alert("Impossible de récuperer les données demandées") + //setmyApimyApiMessage("") + }) + } + const [dashbord_internal_code, setdashbord_internal_code] = useState(""); const [gridline_id, setgridline_id] = useState(""); @@ -233,6 +345,7 @@ const Dashbord_Ressources_Humaines = (props) => { useEffect(() => { Getall_Qry_RH_Data(); + Getall_Qry_RH_Task_Cost_Data(); window.scrollTo({ top: 0, @@ -366,6 +479,7 @@ const Dashbord_Ressources_Humaines = (props) => {
@@ -379,7 +493,7 @@ const Dashbord_Ressources_Humaines = (props) => {
- +
+
+ + +
+
+ + + + + +
+ + {tdb_title && String(tdb_title) === "3" && } + + +   + +
+
+ +
+   + + { + setSelectionModel_task_cost(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_task_cost} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Qry_RH_Task_Cost_Data_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + rh_civilite: JSON.parse(item).rh_civilite, + rh_nom: JSON.parse(item).rh_nom, + rh_prenom: JSON.parse(item).rh_prenom, + rh_email: JSON.parse(item).rh_email, + rh_ismanager: JSON.parse(item).rh_ismanager, + rh_fonction: JSON.parse(item).rh_fonction, + rh_telephone_mobile: JSON.parse(item).rh_telephone_mobile, + rh_adr_adresse: JSON.parse(item).rh_adr_adresse, + rh_adr_code_postal: JSON.parse(item).rh_adr_code_postal, + rh_adr_ville: JSON.parse(item).rh_adr_ville, + rh_adr_pays: JSON.parse(item).rh_adr_pays, + rh_contrat_date_debut: JSON.parse(item).rh_contrat_date_debut, + 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_employe: JSON.parse(item).rh_contrat_type_employe, + rh_contrat_cout: JSON.parse(item).rh_contrat_cout, + rh_contrat_periodicite: JSON.parse(item).rh_contrat_periodicite, + 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_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_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_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_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_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_cost: JSON.parse(item).rh_event_planning_event_cost, + + + + + } + ))} + + columns={columns_task_cost} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + + }} + + + + rowsPerPageOptions={[10]} + disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + }} + + getRowClassName={(params) => { + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + }} + + + /> + +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ +
) } diff --git a/src/components/Dashbord_Ressources_Humaines_Tache_Couts.js b/src/components/Dashbord_Ressources_Humaines_Tache_Couts.js new file mode 100644 index 0000000..e51ede4 --- /dev/null +++ b/src/components/Dashbord_Ressources_Humaines_Tache_Couts.js @@ -0,0 +1,483 @@ +import React, { useRef, useState, useEffect } from "react"; +import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css +import axios from "axios"; +import { getCookie, setCookie } from 'react-use-cookie'; +import { useHistory } from "react-router-dom"; +import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; +import 'react-tooltip/dist/react-tooltip.css' +import { Tooltip } from 'react-tooltip' +import fileDownload from 'js-file-download' +import Popup from 'reactjs-popup'; +import 'reactjs-popup/dist/index.css'; +import "react-datepicker/dist/react-datepicker.css"; +import Box from '@mui/material/Box'; +import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; +import { tokens } from "../theme"; +import { MdDeleteForever } from "react-icons/md"; +import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; +import { + useTheme, +} from "@mui/material"; + +import { ResponsiveBar } from "@nivo/bar"; + +import { RiFileExcel2Line } from "react-icons/ri"; + +const Dashbord_Ressources_Humaines_Tache_Couts = (props) => { + const [gridline_id, setgridline_id] = useState(""); + const [isLoading, setLoading] = useState(); + const [selectionModel, setSelectionModel] = React.useState([]); + const [user_dashbord_id, setuser_dashbord_id] = useState(props.user_dashbord_id); + + var date_today_90j = new Date(); + date_today_90j.setDate(date_today_90j.getDate() - 90); + + const [selectionModel_task_cost, setSelectionModel_task_cost] = React.useState([]); + 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_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_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 }, + + ] + + 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 [event_type_filter, setevent_type_filter] = useState(props.user_dashbord_filter_type_envent); + + const [filter_value, setfilter_value] = useState(""); + + const [Getall_Qry_RH_Task_Cost_Data_result_JSON, setGetall_Qry_RH_Task_Cost_Data_result_JSON] = useState([]); + const [Getall_Qry_RH_Task_Cost_Data_api, setGetall_Qry_RH_Task_Cost_Data_api] = useState(); + const [Getall_Qry_RH_Task_Cost_Data_message, setGetall_Qry_RH_Task_Cost_Data_message] = useState(); + const [Getall_Qry_RH_Task_Cost_Data_result, setGetall_Qry_RH_Task_Cost_Data_result] = useState([]); + function Getall_Qry_RH_Task_Cost_Data(event) { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + var date_from = ""; + if (p_filter_date_from) { + date_from = p_filter_date_from; + + } + + var date_to = ""; + if (p_filter_date_to) { + date_to = p_filter_date_to; + + } + + + form.append("token", stored_cookie); + form.append("session_start_date", date_from); + form.append("session_end_date", date_to); + form.append("filter_value", filter_value); + form.append("tab_rh_id", "all"); + + form.append("event_type", event_type_filter); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Humain_Ressource_With_Planning_And_Cost/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Qry_RH_Task_Cost_Data res.data.status = " + res.data.status); + //console.log(" In Getall_Qry_RH_Task_Cost_Data res.data.message r_class = " + res.data.message); + + setGetall_Qry_RH_Task_Cost_Data_result_JSON(JSON.parse('[' + res.data.message + ']')); + + var jsonObj = JSON.parse('[' + res.data.message + ']'); + + setGetall_Qry_RH_Task_Cost_Data_api("true"); + setGetall_Qry_RH_Task_Cost_Data_result(res.data.message); + + + } + else { + setGetall_Qry_RH_Task_Cost_Data_api("false"); + setGetall_Qry_RH_Task_Cost_Data_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Qry_RH_Task_Cost_Data = ', error); + setGetall_Qry_RH_Task_Cost_Data_api("false"); + alert("Impossible de récuperer les données demandées") + //setmyApimyApiMessage("") + }) + } + + + + const [Remove_From_User_TBD_api, setRemove_From_User_TBD_api] = useState(); + const [Remove_From_User_TBD_message, setRemove_From_User_TBD_message] = useState(); + const [Remove_From_User_TBD_result, setRemove_From_User_TBD_result] = useState(); + function Remove_From_User_TBD() { + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + + + form.append("token", stored_cookie); + form.append("user_dashbord_id", user_dashbord_id); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_To_User_Dashbord/"; + + //console.log(" ## myurl = ", myurl); + + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Remove_From_User_TBD res.data.status = " + res.data.status); + //console.log(" In Remove_From_User_TBD res.data.message r_class = " + res.data.message); + + setRemove_From_User_TBD_api("true"); + setRemove_From_User_TBD_result(res.data.message); + Getall_Qry_RH_Task_Cost_Data(); + alert(res.data.message); + window.location.reload(); + + + } + else { + setRemove_From_User_TBD_api("false"); + setRemove_From_User_TBD_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Remove_From_User_TBD = ', error); + setRemove_From_User_TBD_api("false"); + alert("Impossible de supprimer le tableau de bord de votre liste"); + //setmyApimyApiMessage("") + }) + } + + 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); + + + Getall_Qry_RH_Task_Cost_Data(); + + + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + + }, []) + + + function Export_Dashbord_to_CSV(local_dashbord_internal_id) { + + const stored_cookie = getCookie('tokenmysypart'); + + var nom_fichier_cmd = "export_csv.csv"; + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- local_dashbord_internal_id = ", local_dashbord_internal_id); + + var url = process.env.REACT_APP_API_URL + "myclass/api/TBD_RH_01_Export_Dashbord_To_Csv/" + stored_cookie + "/" + local_dashbord_internal_id; + + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_id = ", selected_id, " --- url =", url); + setLoading(true); + axios.get(url, { responseType: 'blob', },) + .then((res) => { + setLoading(false); + //console.log(" In Export_Dashbord_to_CSV res.data = " + res.data); + if (String(res.data) === String("false")) { + alert("Impossible d'exporter les données (2) "); + } else { + fileDownload(res.data, nom_fichier_cmd) + + } + }).catch((error) => { + setLoading(false); + console.error('Error:', error); + alert(" Impossible d'exporter les données ") + + }); + + } + + return ( +
+ {isLoading &&
+
+
} + +
+ +
+ + + + + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, le tableau sera supprimé de votre tableau de bord global.
+ Vous pourrez le rajouter à nouveau si besoin.
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
+
+ + + + + + +
+ + +   + +
+
+ +
+   + + { + setSelectionModel_task_cost(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_task_cost} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Qry_RH_Task_Cost_Data_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + rh_civilite: JSON.parse(item).rh_civilite, + rh_nom: JSON.parse(item).rh_nom, + rh_prenom: JSON.parse(item).rh_prenom, + rh_email: JSON.parse(item).rh_email, + rh_ismanager: JSON.parse(item).rh_ismanager, + rh_fonction: JSON.parse(item).rh_fonction, + rh_telephone_mobile: JSON.parse(item).rh_telephone_mobile, + rh_adr_adresse: JSON.parse(item).rh_adr_adresse, + rh_adr_code_postal: JSON.parse(item).rh_adr_code_postal, + rh_adr_ville: JSON.parse(item).rh_adr_ville, + rh_adr_pays: JSON.parse(item).rh_adr_pays, + rh_contrat_date_debut: JSON.parse(item).rh_contrat_date_debut, + 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_employe: JSON.parse(item).rh_contrat_type_employe, + rh_contrat_cout: JSON.parse(item).rh_contrat_cout, + rh_contrat_periodicite: JSON.parse(item).rh_contrat_periodicite, + 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_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_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_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_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_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_cost: JSON.parse(item).rh_event_planning_event_cost, + + + + + } + ))} + + columns={columns_task_cost} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + + }} + + + + rowsPerPageOptions={[10]} + disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + }} + + getRowClassName={(params) => { + + // Pour la gestion de la couleur de zone double cliquée + if (String(params.row.id) === String(gridline_id)) { + + return 'line--statut--selected'; + } + else if (parseInt(String(params.row.id)) % 2 === 0) { + return 'line--statut--pair'; + } + else if (parseInt(String(params.row.id)) % 2 !== 0) { + return 'line--statut--impair'; + } + + }} + + + /> + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ ) +} + + +export default Dashbord_Ressources_Humaines_Tache_Couts; \ No newline at end of file diff --git a/src/components/Employes.js b/src/components/Employes.js index 86f41ae..124d999 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -81,8 +81,9 @@ const Employes = (props) => { const [p_filtre4_value, setp_filtre4_value] = useState(); const columns = [ - { field: '_id', headerName: '_id', hide: true }, - { field: 'id', headerName: 'id', hide: true }, + { field: '_id', headerName: '_id', hide: true, Width: 0 }, + { field: 'id', headerName: 'id', hide: true, Width: 0 }, + { field: 'date_naissance', headerName: 'date_naissance', hide: true , Width: 0}, { field: 'civilite', headerName: 'Civilité', minWidth: 50, flex: 1, maxWidth: 100, hide: false, @@ -109,7 +110,7 @@ const Employes = (props) => { { field: 'adr_code_postal', headerName: 'Code Postal', width: 100, hide: false, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, { field: 'adr_ville', headerName: 'Ville', width: 100, hide: false, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, { field: 'adr_pays', headerName: 'Pays', width: 100, hide: true, editable: false, minWidth: 50, maxWidth: 70, flex: 1 }, - + { field: 'profil', headerName: 'profil', width: 150, hide: false, }, @@ -318,6 +319,7 @@ const Employes = (props) => { { field: 'type_employe', headerName: 'Type Employé', flex: 1, hide: false, width: 150, }, { field: 'qte', headerName: 'Quanité', flex: 1, hide: true, width: 150, }, { field: 'cout', headerName: 'Prix', flex: 1, hide: true, width: 150, }, + { field: 'periodicite', headerName: 'Périodicité', flex: 1, minWidth: 150, hide: false, editable: false }, { field: 'comment', headerName: 'Commentaire', flex: 1, hide: true, width: 150, }, @@ -847,7 +849,7 @@ const Employes = (props) => { setp_one_detail_ismanager_label(''); setp_one_detail_resp_hierarchie_nom(''); setp_one_detail_resp_hierarchie_prenom(''); - + } function handleClick_delete(event, cellValues) { @@ -888,7 +890,7 @@ const Employes = (props) => { const [p_detail_linkedIn, setp_detail_linkedIn] = useState(); const [p_detail_facebook, setp_detail_facebook] = useState(); const [p_detail_twitter, setp_detail_twitter] = useState(); - const [p_detail_ismanager, setp_detail_ismanager] = useState(); + const [p_detail_ismanager, setp_detail_ismanager] = useState("0"); const [p_detail_ismanager_label, setp_detail_ismanager_label] = useState(); const [p_detail_resp_hierarchie_nom, setp_detail_resp_hierarchie_nom] = useState(""); const [p_detail_resp_hierarchie_prenom, setp_detail_resp_hierarchie_prenom] = useState(""); @@ -920,7 +922,7 @@ const Employes = (props) => { const [p_one_detail_facebook, setp_one_detail_facebook] = useState(); const [p_one_detail_twitter, setp_one_detail_twitter] = useState(); const [p_one_detail_ismanager, setp_one_detail_ismanager] = useState(); - const [p_one_detail_ismanager_label, setp_one_detail_ismanager_label] = useState(); + const [p_one_detail_ismanager_label, setp_one_detail_ismanager_label] = useState("0"); const [p_one_detail_resp_hierarchie_nom, setp_one_detail_resp_hierarchie_nom] = useState(); const [p_one_detail_resp_hierarchie_prenom, setp_one_detail_resp_hierarchie_prenom] = useState(); @@ -1041,7 +1043,7 @@ const Employes = (props) => { } - + setp_detail_ismanager("0"); if (mylocal_employe.ismanager) { setp_detail_ismanager(mylocal_employe.ismanager); if (String(mylocal_employe.ismanager) === "1") @@ -1843,6 +1845,7 @@ const Employes = (props) => { setemployee_data_changed(""); setemployee_data_edit_mode(""); Get_Employee_Data(selected_id); + setgridline_id(''); alert(" La mise à jour été correctement faite."); @@ -2269,6 +2272,7 @@ const Employes = (props) => { setdisplay_detail_employe(); setadd_One_Employee(); setsubmenu(""); + setgridline_id(''); setSelectionModel([]); } @@ -3907,6 +3911,7 @@ const Employes = (props) => { setp_employe_contrat_type_employe(""); setp_employe_contrat_cout(""); setp_employe_contrat_comment(""); + setp_employe_contrat_periodicite(""); setp_employe_contrat_groupe_prix_achat_id(""); setp_employe_contrat_quantite(""); setp_employe_contrat_date_debut(new Date().toLocaleDateString('fr-FR')); @@ -3988,6 +3993,7 @@ const Employes = (props) => { const [p_employe_contrat_date_debut, setp_employe_contrat_date_debut] = useState(new Date().toLocaleDateString('fr-FR')); const [p_employe_contrat_date_fin, setp_employe_contrat_date_fin] = useState(date_today_90j.toLocaleDateString('fr-FR')); const [p_employe_contrat_comment, setp_employe_contrat_comment] = useState(""); + const [p_employe_contrat_periodicite, setp_employe_contrat_periodicite] = useState(""); const [Get_Partner_Purchase_Prices_api, setGet_Partner_Purchase_Prices_api] = useState(); const [Get_Partner_Purchase_Prices_message, setGet_Partner_Purchase_Prices_message] = useState(); @@ -4045,6 +4051,8 @@ const Employes = (props) => { setp_employe_contrat_comment(line.comment); + setp_employe_contrat_periodicite(line.periodicite); + setp_employe_contrat_groupe_prix_achat_id(line.groupe_prix_achat_id); @@ -4078,20 +4086,30 @@ const Employes = (props) => { return; } + + if (!p_employe_contrat_date_debut || String(p_employe_contrat_date_debut).trim() === "") { alert(" Le début du contrat est obigatoire "); return; } + if (!p_employe_contrat_groupe_prix_achat_id || String(p_employe_contrat_groupe_prix_achat_id).trim() === "") { if (!p_employe_contrat_cout || String(p_employe_contrat_cout).trim() === "") { alert(" Le prix est obigatoire "); return; } + if (!p_employe_contrat_periodicite || String(p_employe_contrat_periodicite).trim() === "") { + alert(" La périodicité est obigatoire "); + return; + } } + + + const stored_cookie = getCookie('tokenmysypart'); form.append("token", stored_cookie); @@ -4111,6 +4129,7 @@ const Employes = (props) => { form.append("type_contrat", p_employe_contrat_type_contrat); form.append("type_employe", p_employe_contrat_type_employe); form.append("cout", p_employe_contrat_cout); + form.append("periodicite", p_employe_contrat_periodicite); form.append("quantite", p_employe_contrat_quantite); form.append("groupe_prix_achat_id", p_employe_contrat_groupe_prix_achat_id); form.append("comment", p_employe_contrat_comment); @@ -4127,6 +4146,7 @@ const Employes = (props) => { form.append("type_contrat", p_employe_contrat_type_contrat); form.append("type_employe", p_employe_contrat_type_employe); form.append("cout", p_employe_contrat_cout); + form.append("periodicite", p_employe_contrat_periodicite); form.append("quantite", p_employe_contrat_quantite); form.append("groupe_prix_achat_id", p_employe_contrat_groupe_prix_achat_id); form.append("comment", p_employe_contrat_comment); @@ -4191,13 +4211,14 @@ const Employes = (props) => { setuserimgclassprofil(""); setselected_row_data_json_age(""); - //setgridline_id(''); + setDialog_employe_open(false); - + setgridline_id(""); + }; - function Show_Detailled_employe_Data(){ - + function Show_Detailled_employe_Data() { + setselected_row_data_json_age(""); setDialog_employe_open(false); handleClick_edit_employee_From_Line(gridline_id); @@ -4236,7 +4257,7 @@ const Employes = (props) => {
Civilité
- {Getall_Training_Employee_No_Filter_result && selected_id && + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && String(selected_id).length > 0 &&
{JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).civilite}
} @@ -4246,7 +4267,7 @@ const Employes = (props) => {
Nom & Prénom
- {Getall_Training_Employee_No_Filter_result && selected_id && + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && String(selected_id).length > 0 &&
{JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).nom.toUpperCase()} {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).prenom.charAt(0).toUpperCase() + JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).prenom.slice(1)} @@ -4259,7 +4280,7 @@ const Employes = (props) => {
E-mail
- {Getall_Training_Employee_No_Filter_result && selected_id && + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && String(selected_id).length > 0 &&
{JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).email}
} @@ -4270,7 +4291,7 @@ const Employes = (props) => {
Téléphone
- {Getall_Training_Employee_No_Filter_result && selected_id && + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && String(selected_id).length > 0 &&
{JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).telephone}
} @@ -4280,7 +4301,7 @@ const Employes = (props) => {
Age
- {Getall_Training_Employee_No_Filter_result && selected_id && + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && String(selected_id).length > 0 &&
{selected_row_data_json_age} ans - {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).date_naissance}
} @@ -4290,13 +4311,13 @@ const Employes = (props) => {
- Adresse postale + Adresse postale
- {Getall_Training_Employee_No_Filter_result && selected_id && JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).pays && + {String(gridline_id) !== "" && Getall_Training_Employee_No_Filter_result && selected_id && String(selected_id).length > 0 &&
- {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adresse}
- {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).code_postal} {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).ville}
- {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).pays.toUpperCase()} + {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_adresse}
+ {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_code_postal} {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_ville}
+ {JSON.parse(Getall_Training_Employee_No_Filter_result[gridline_id]).adr_pays.toUpperCase()}
}
@@ -4680,9 +4701,9 @@ const Employes = (props) => { } - {String(p_employe_contrat_groupe_prix_achat_id) === "" &&
Prix + {String(p_employe_contrat_groupe_prix_achat_id) === "" &&
Taux Horaire Brut (HT) - + {
} + + {String(p_employe_contrat_groupe_prix_achat_id) === "" &&
Périodicité + + + + { + setp_employe_contrat_periodicite(e.target.value); + setdialog_contrat_data_changed("1"); + } + } + > + Fixe   + Par heure   + {/*Par jour   + Par mois   + Par année  */} + + +
+ } +
Commentaire { adr_code_postal: JSON.parse(item).adr_code_postal, adr_ville: JSON.parse(item).adr_ville, adr_pays: JSON.parse(item).adr_pays, + date_naissance: JSON.parse(item).date_naissance, } @@ -5195,17 +5252,20 @@ const Employes = (props) => { setgridline_id(newSelectionModel.row.id); var local_date_naissance = newSelectionModel.row.date_naissance; + if (local_date_naissance) { var date_eval = new Date(moment(local_date_naissance, "DD/MM/YYYY")); var diff = Date.now() - date_eval.getTime(); var age = new Date(diff); var reel_age = Math.abs(age.getUTCFullYear() - 1970); setselected_row_data_json_age(reel_age) + + } setDialog_employe_open(true); - + //handleClick_edit_employee_From_Line(newSelectionModel.row.id); }} @@ -7454,6 +7514,7 @@ const Employes = (props) => { qte: JSON.parse(item).quantite, cout: JSON.parse(item).cout, comment: JSON.parse(item).comment, + periodicite: JSON.parse(item).periodicite, } diff --git a/src/components/Module_Absence.js b/src/components/Module_Absence.js index 3520f61..425e169 100644 --- a/src/components/Module_Absence.js +++ b/src/components/Module_Absence.js @@ -228,7 +228,7 @@ const Module_Absence = (props) => { 'start': String(JSON.parse(obj).event_start), 'end': String(JSON.parse(obj).event_end), 'id': String(JSON.parse(obj)._id), - 'type': String(JSON.parse(obj)._id), + 'type': String(JSON.parse(obj).event_type), 'justified': String(JSON.parse(obj).justified), } diff --git a/src/components/Module_Agenda.js b/src/components/Module_Agenda.js index 06568c5..db36289 100644 --- a/src/components/Module_Agenda.js +++ b/src/components/Module_Agenda.js @@ -49,7 +49,7 @@ import { RepeatOnRounded } from "@mui/icons-material"; import { alignPropType } from "react-bootstrap/esm/types"; import ToggleSwitch from "./ToggleSwitch"; - +import Autocomplete from '@mui/material/Autocomplete'; import FullCalendar, { formatDate } from "@fullcalendar/react"; import dayGridPlugin from "@fullcalendar/daygrid"; import timeGridPlugin from "@fullcalendar/timegrid"; @@ -146,6 +146,8 @@ const Module_Agenda = (props) => { 'comment': String(local_comment), 'sequence_session_id': String(local_sequence_session_id), 'backgroundColor': bg_color, + 'type': String(JSON.parse(obj).event_type), + 'justified': String(JSON.parse(obj).justified), } @@ -229,6 +231,8 @@ const Module_Agenda = (props) => { 'comment': String(local_comment), 'sequence_session_id': String(local_sequence_session_id), 'backgroundColor': bg_color, + 'type': String(JSON.parse(obj).event_type), + 'justified': String(JSON.parse(obj).justified), } @@ -283,7 +287,7 @@ const Module_Agenda = (props) => { axios.post(myurl, form).then(res => { //console.log(" In Get_List_Agenda_Events_For_Given_User res.data.status = " + res.data.status); - //console.log(" In Get_List_Agenda_Events_For_Given_User res.data.message r_class = " + res.data.message); + console.log(" In Get_List_Agenda_Events_For_Given_User res.data.message r_class = " + res.data.message); setLoading(false); if (String(res.data.status) === String("true")) { setGet_List_Agenda_Events_For_Given_User_api("true"); @@ -315,6 +319,8 @@ const Module_Agenda = (props) => { 'comment': String(local_comment), 'sequence_session_id': String(local_sequence_session_id), 'backgroundColor': bg_color, + 'type': String(JSON.parse(obj).event_type), + 'justified': String(JSON.parse(obj).justified), } @@ -399,6 +405,8 @@ const Module_Agenda = (props) => { 'comment': String(local_comment), 'sequence_session_id': String(local_sequence_session_id), 'backgroundColor': bg_color, + 'type': String(JSON.parse(obj).event_type), + 'justified': String(JSON.parse(obj).justified), } @@ -608,6 +616,8 @@ const Module_Agenda = (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(); @@ -632,6 +642,34 @@ const Module_Agenda = (props) => { //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"); @@ -1214,7 +1252,30 @@ const Module_Agenda = (props) => { {p_filtre1 && String(p_filtre1) === "ressource_humaine" &&
- { + if (value && value._id) { + + Get_Ressource_Data(value._id) + setselected_employee_id(value._id); + Get_List_Agenda_Events_For_Given_User(value._id); + + } + }} + + renderInput={(params) => + } + /> + + {/* { ))} - + */}
} diff --git a/src/components/Mon_Tableau_De_Bord.js b/src/components/Mon_Tableau_De_Bord.js index daf7bf3..17a081c 100644 --- a/src/components/Mon_Tableau_De_Bord.js +++ b/src/components/Mon_Tableau_De_Bord.js @@ -23,6 +23,7 @@ import Dashbord_Session_Taux_Remplissage from "./Dashbord_Session_Taux_Remplissa import Dashbord_Session_Repartition_Fteur from "./Dashbord_Session_Repartition_Fteur"; import Dashbord_Formation_Evol_Session from "./Dashbord_Formation_Evol_Session"; import Dashbord_Ressources_Humaines_Tache_by_rhid from "./Dashbord_Ressources_Humaines_Tache_by_rhid"; +import Dashbord_Ressources_Humaines_Tache_Couts from "./Dashbord_Ressources_Humaines_Tache_Couts"; import { TbColumns2, TbColumns1 } from "react-icons/tb"; @@ -157,14 +158,36 @@ const Mon_Tableau_De_Bord = (props) => { user_dashbord_filter_end={String(JSON.parse(step).end_date)} /> } + +
+ + ))} +
} + + {display_nb_column &&
+ {Get_Connected_User_Dashbord_result && + Get_Connected_User_Dashbord_result.map((step) => ( + +
+ + + {String(JSON.parse(step).dashbord_internal_code) === "tbd_rh_01" && - - + } + + {String(JSON.parse(step).dashbord_internal_code) === "tbd_rh_02" && + } diff --git a/src/components/Partner_Client.js b/src/components/Partner_Client.js index c016b55..bb1ed7c 100644 --- a/src/components/Partner_Client.js +++ b/src/components/Partner_Client.js @@ -582,17 +582,17 @@ const Partner_Client = (props) => {
Adresse postale
- {Get_List_Partner_Clients_result && selected_id && JSON.parse(Get_List_Partner_Clients_result[gridline_id]).pays && + {Get_List_Partner_Clients_result && selected_id && String(selected_id).length > 0 &&
- {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).adresse}
- {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).code_postal} {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).ville}
- {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).pays.toUpperCase()} + {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).adr_adresse}
+ {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).adr_code_postal} {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).adr_pays}
+ {JSON.parse(Get_List_Partner_Clients_result[gridline_id]).adr_pays.toUpperCase()}
}
- Site Web + Site Web
{Get_List_Partner_Clients_result && selected_id && String(selected_id).length > 0 &&
diff --git a/src/components/Partner_Prix_Achat.js b/src/components/Partner_Prix_Achat.js index e512ca3..3266f87 100644 --- a/src/components/Partner_Prix_Achat.js +++ b/src/components/Partner_Prix_Achat.js @@ -75,10 +75,11 @@ const Partner_Prix_Achat = (props) => { { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, { field: 'code_groupe_prix', headerName: 'Code', hide: false, editable: false, flex: 1, minWidth: 150, }, - { field: 'periodicite', headerName: 'Périodicité', flex: 1, minWidth: 150, hide: false, editable: false }, + - { field: 'date_debut', headerName: 'Début', flex: 1, minWidth: 150, hide: true, editable: false }, + { field: 'date_debut', headerName: 'Début', flex: 1, minWidth: 150, hide: false, editable: false }, { field: 'date_fin', headerName: 'Fin', flex: 1, minWidth: 150, hideable: false, }, + { field: 'periodicite', headerName: 'Périodicité', flex: 1, minWidth: 150, hide: false, editable: false }, { field: 'fournisseur', headerName: 'Fournisseur', flex: 1, minWidth: 150, hide: true, editable: false }, { field: 'prix', headerName: 'prix', flex: 1, minWidth: 150, hideable: false, editable: false }, @@ -433,6 +434,12 @@ const Partner_Prix_Achat = (props) => {
Périodicité + + { > Fixe   Par heure   - Par jour   + {/*Par jour   Par mois   - Par année   + Par année  */} +
@@ -501,7 +509,7 @@ const Partner_Prix_Achat = (props) => {
-
Prix +
Taux Horaire Brut (HT)