From 215520a9e994d31fea852044dbc96f4fc9b4a91d Mon Sep 17 00:00:00 2001 From: cherif Date: Sat, 8 Feb 2025 22:29:17 +0100 Subject: [PATCH] 08/02/205 - 22h30 --- src/App.js | 19 +- src/components/DisplayPartnerSession.js | 24 +- .../DisplayPartnerUnite_Enseignement.js | 2 +- src/components/ESign.js | 5 +- src/components/ESignDiplayDignedDocument.js | 5 +- src/components/Emarge_QR_Code.js | 12 +- src/components/Module_Agenda.js | 534 ++++++++++++++---- src/components/Partner_Commande.js | 405 ++++++++++--- src/components/SurveyDocument.js | 6 - src/components/UpdateAttendeeList.js | 54 +- .../new_fonctionalites_2025.css | 8 +- src/index.css | 9 +- src/pages/NotFound.js | 11 +- src/pages/automaticquotation.js | 10 +- src/pages/eSigne.js | 11 +- src/pages/edigndiplaydigneddocument.js | 12 +- src/pages/emarge_qr_code.js | 15 +- src/pages/partner.js | 2 +- src/pages/surveydocument.js | 13 +- src/pages/updateattendeelist.js | 12 +- src/styles/components/_module_agenda.scss | 3 + src/styles/index.scss | 91 +-- 22 files changed, 926 insertions(+), 337 deletions(-) diff --git a/src/App.js b/src/App.js index 9d9ea93..46a29b1 100644 --- a/src/App.js +++ b/src/App.js @@ -178,14 +178,7 @@ function App() { - - - - - - - - + @@ -242,6 +235,8 @@ function App() { + + {/* ex : http://localhost:3009/detaile-formation/habilitation-electrique-882*/} @@ -259,6 +254,14 @@ function App() { + + + + + + + + {/* Fin Migration */} diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index d29ce18..f1d7d65 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -116,7 +116,11 @@ import 'moment/locale/fr'; import Timeline, { TimelineHeaders, SidebarHeader, - DateHeader + DateHeader, + TimelineMarkers, + CustomMarker, + TodayMarker, + CursorMarker } from 'react-calendar-timeline'; @@ -166,7 +170,6 @@ const DisplayPartnerSession = (props) => { const [submenu, setsubmenu] = useState(""); const [rowss, setRows] = useState([]); - const [actionmass_preinsc_val, setactionmass_preinsc_val] = useState(); const [one_SessionstartDateInscription, setone_SessionstartDateInscription] = useState(); const [one_SessionendDateInscription, setone_SessionendDateInscription] = useState(); @@ -2126,7 +2129,7 @@ const DisplayPartnerSession = (props) => { /** Pour l'affichage en mode timeline */ const [New_Getall_TrainingSession_result_Timeline_Item, setNew_Getall_TrainingSession_result_Timeline_Item] = useState([]); - const [New_Getall_TrainingSession_result_Timeline_Group, setNew_Getall_TrainingSession_result_Timeline_Group] = useState({}); + const [New_Getall_TrainingSession_result_Timeline_Group, setNew_Getall_TrainingSession_result_Timeline_Group] = useState([]); /** Fin Pour l'affichage en mode timeline */ const [New_Getall_TrainingSession_result, setNew_Getall_TrainingSession_result] = useState(); @@ -2304,6 +2307,8 @@ const DisplayPartnerSession = (props) => { setNew_Getall_TrainingSession_result(new_data2); setNew_Getall_TrainingSession_result_Timeline_Item(timeline_item); setNew_Getall_TrainingSession_result_Timeline_Group(timeline_grp); + + } } @@ -11812,7 +11817,7 @@ const DisplayPartnerSession = (props) => { console.log(" ### tab_my_inscription_ids = ", tab_my_inscription_ids); console.log(" ### url = ", url); - + //console.log(" nom_fichier_cmd = ", nom_fichier_cmd, " --- selected_session_id = ", selected_session_id, " --- selected_convention_id =", selected_convention_id); setLoading(true); @@ -11835,9 +11840,9 @@ const DisplayPartnerSession = (props) => { setdisplay_alert_mysy("1"); setalert_message(" Impossible de télécharger la convention"); setalert_type("error"); - - // alert(" Impossible de télécharger la convention ") + + // alert(" Impossible de télécharger la convention ") }); @@ -18675,6 +18680,10 @@ const DisplayPartnerSession = (props) => { labelFormat="DD/MM" style={{ height: 50 }} /> + + + + @@ -19657,6 +19666,9 @@ const DisplayPartnerSession = (props) => { labelFormat="DD/MM" style={{ height: 50 }} /> + + + diff --git a/src/components/DisplayPartnerUnite_Enseignement.js b/src/components/DisplayPartnerUnite_Enseignement.js index 8637d74..737a888 100644 --- a/src/components/DisplayPartnerUnite_Enseignement.js +++ b/src/components/DisplayPartnerUnite_Enseignement.js @@ -2573,7 +2573,7 @@ const DisplayPartnerUnite_Enseignement = (props) => { } {ue_data_edit_mode && String(ue_data_edit_mode) === "1" &&
-
Compétence
+
Compétences
{ diff --git a/src/components/ESign.js b/src/components/ESign.js index f231064..60a2059 100644 --- a/src/components/ESign.js +++ b/src/components/ESign.js @@ -696,7 +696,6 @@ function ESign() {
} -

Signature Electronique

@@ -810,9 +809,7 @@ function ESign() {
 
-
-
-
+
); } diff --git a/src/components/ESignDiplayDignedDocument.js b/src/components/ESignDiplayDignedDocument.js index f073850..1a6e4c4 100644 --- a/src/components/ESignDiplayDignedDocument.js +++ b/src/components/ESignDiplayDignedDocument.js @@ -143,7 +143,6 @@ function ESignDiplayDignedDocument() {
} -

Document Electronique

@@ -168,9 +167,7 @@ function ESignDiplayDignedDocument() {
 
-
-
-
+ ); } diff --git a/src/components/Emarge_QR_Code.js b/src/components/Emarge_QR_Code.js index 7042f85..9a4d005 100644 --- a/src/components/Emarge_QR_Code.js +++ b/src/components/Emarge_QR_Code.js @@ -14,11 +14,7 @@ import parse from 'html-react-parser'; import { FcViewDetails, FcDisapprove } from "react-icons/fc"; import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' -import add_plus from "../mysy_img/plus.png"; -import excel_icone from "../mysy_img/excel_icone.png"; -import participants from "../mysy_img/participants.png"; -import fileDownload from 'js-file-download' -import Autocomplete from '@mui/material/Autocomplete'; + import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; @@ -786,8 +782,6 @@ function Emarge_QR_Code() { } -
-

Emargement électronique

@@ -1032,9 +1026,7 @@ function Emarge_QR_Code() {
 
-
-
-
+
); } diff --git a/src/components/Module_Agenda.js b/src/components/Module_Agenda.js index 1fe7986..9fc721b 100644 --- a/src/components/Module_Agenda.js +++ b/src/components/Module_Agenda.js @@ -6,17 +6,12 @@ import Button from '@mui/material/Button'; import axios from "axios"; import { getCookie, setCookie } from 'react-use-cookie'; import { useHistory } from "react-router-dom"; -import CheckOut from "./CheckOut"; -import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid'; + import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css"; -import { Editor } from '@tinymce/tinymce-react'; -import parse from 'html-react-parser'; -import { FcViewDetails, FcDisapprove } from "react-icons/fc"; + import 'react-tooltip/dist/react-tooltip.css' import { Tooltip } from 'react-tooltip' -import add_plus from "../mysy_img/plus.png"; -import excel_icone from "../mysy_img/excel_icone.png"; -import participants from "../mysy_img/participants.png"; + import fileDownload from 'js-file-download' import Popup from 'reactjs-popup'; import 'reactjs-popup/dist/index.css'; @@ -25,13 +20,7 @@ import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; import { format } from 'date-fns' import moment from "moment"; -import InputAdornment from '@mui/material/InputAdornment'; -import { AiFillCloseCircle } from "react-icons/ai"; -import Box from '@mui/material/Box'; -import { Typography, LinearProgress, sliderClasses } from '@mui/material'; -import styled from 'styled-components'; -import { CiTrash } from "react-icons/ci"; -import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md"; + import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; import DialogContent from '@mui/material/DialogContent'; @@ -45,8 +34,7 @@ import daygridPlugin from "@fullcalendar/daygrid"; //import timeGridPlugin from "@fullcalendar/timegrid"; import allLocales from '@fullcalendar/core/locales-all' -import { RepeatOnRounded } from "@mui/icons-material"; -import { alignPropType } from "react-bootstrap/esm/types"; + import ToggleSwitch from "./ToggleSwitch"; import Autocomplete from '@mui/material/Autocomplete'; @@ -54,13 +42,26 @@ import FullCalendar, { formatDate } from "@fullcalendar/react"; import dayGridPlugin from "@fullcalendar/daygrid"; import timeGridPlugin from "@fullcalendar/timegrid"; import interactionPlugin from "@fullcalendar/interaction"; +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; +import Timeline, { + TimelineHeaders, + SidebarHeader, + DateHeader, + TimelineMarkers, + CustomMarker, + TodayMarker, + CursorMarker +} from 'react-calendar-timeline'; import { ListItem, ListItemText, useTheme, } from "@mui/material"; +import { gridClasses } from '@mui/x-data-grid'; +import Box from '@mui/material/Box'; +import { Background } from "victory"; const Module_Agenda = (props) => { @@ -289,7 +290,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"); @@ -332,7 +333,7 @@ const Module_Agenda = (props) => { }); setmysy_events(tab_event); - console.log(" ### tab_event = ", tab_event); + // console.log(" ### tab_event = ", tab_event); } @@ -353,6 +354,104 @@ const Module_Agenda = (props) => { }) } + const [Get_List_Agenda_Events_For_Many_Users_api, setGet_List_Agenda_Events_For_Many_Users_api] = useState(); + const [Get_List_Agenda_Events_For_Many_Users_message, setGet_List_Agenda_Events_For_Many_Users_message] = useState(); + const [Get_List_Agenda_Events_For_Many_Users_result, setGet_List_Agenda_Events_For_Many_Users_result] = useState(); + function Get_List_Agenda_Events_For_Many_Users(tab_json_data, related_collection) { + + var local_tab_ids = [] + for (var i = 0; i < tab_json_data.length; i++) { + var myid = String(tab_json_data[i]['_id']); + local_tab_ids.push(myid); + } + + var form = new FormData(); + const stored_cookie = getCookie('tokenmysypart'); + + form.append("token", stored_cookie); + form.append("related_collection", related_collection); + form.append("tab_related_collection_recid", local_tab_ids); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/get_Agenda_Event_List_For_Many_Users/"; + + setLoading(true); + + axios.post(myurl, form).then(res => { + //console.log(" In Get_List_Agenda_Events_For_Many_Users res.data.status = " + res.data.status); + // console.log(" In Get_List_Agenda_Events_For_Many_Users res.data.message r_class = " + res.data.message); + setLoading(false); + if (String(res.data.status) === String("true")) { + setGet_List_Agenda_Events_For_Many_Users_api("true"); + setGet_List_Agenda_Events_For_Many_Users_result(res.data.message); + + var tab_event = [] + var filtre2 = res.data.message.map(obj => { + + var local_val = {}; + + var local_comment = ""; + if (JSON.parse(obj).comment) { + local_comment = String(JSON.parse(obj).comment); + } + + + var bg_color = ""; + var local_sequence_session_id = ""; + if (JSON.parse(obj).sequence_session_id) { + local_sequence_session_id = String(JSON.parse(obj).sequence_session_id); + bg_color = "Olive" + } + + local_val = { + 'title': String(JSON.parse(obj).event_title), + 'start': String(JSON.parse(obj).event_start), + 'end': String(JSON.parse(obj).event_end), + 'id': String(JSON.parse(obj)._id), + 'group': String(JSON.parse(obj).group), + '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), + "start_time": moment(JSON.parse(obj).event_start), + "end_time": moment(JSON.parse(obj).event_end), + "canMove": false, + + } + + // console.log(" ### local_val = ", local_val); + + tab_event.push(local_val); + + + + }); + setmysy_events(tab_event); + setNew_Getall_Object_result_Timeline_Item(tab_event); + + // console.log(" ### tab_event = ", tab_event); + + + } + else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + else { + setGet_List_Agenda_Events_For_Many_Users_api("false"); + setGet_List_Agenda_Events_For_Many_Users_message(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Get_List_Agenda_Events_For_Many_Users = ', error); + setGet_List_Agenda_Events_For_Many_Users_api("false"); + //setmyApimyApiMessage("") + }) + } + + const [Get_List_Agenda_Events_For_Me_api, setGet_List_Agenda_Events_For_Me_api] = useState(); const [Get_List_Agenda_Events_For_Me_message, setGet_List_Agenda_Events_For_Me_message] = useState(); const [Get_List_Agenda_Events_For_Me_result, setGet_List_Agenda_Events_For_Me_result] = useState(); @@ -494,7 +593,10 @@ const Module_Agenda = (props) => { else { setGetAttendee_api("false"); setGetAttendee_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -511,7 +613,11 @@ const Module_Agenda = (props) => { const handleSelect = (info) => { if (String(selected_employee_id).length < 2) { - alert(" Vous devez choisir un employé ou un materiel"); + // alert(" Vous devez choisir un employé ou un materiel"); + + setdisplay_alert_mysy("1"); + setalert_message(" Vous devez choisir un employé ou un materiel"); + setalert_type("error"); return; } if (String(props.write_access) !== "1") { @@ -563,7 +669,11 @@ const Module_Agenda = (props) => { const handleEventClick = (arg) => { if (String(selected_employee_id).length < 2) { - alert(" Vous devez choisir un employé ou un materiel"); + // alert(" Vous devez choisir un employé ou un materiel"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez choisir un employé ou un materiel"); + setalert_type("error"); return; } @@ -659,8 +769,10 @@ const Module_Agenda = (props) => { //--- var node = { "_id": local_id, - "id": localid, + // "id": localid, cas particulier pour gerer l'affichage timeline, on met id = _id + "id": local_id, "label": local_nom + " " + local_prenom, + "title": local_nom + " " + String(local_prenom)[0] + ".", "nom": local_nom, "prenom": local_prenom, "ismanager": local_ismanager @@ -676,7 +788,10 @@ const Module_Agenda = (props) => { else { setGetall_Training_Employee_No_Filter_api("false"); setGetall_Training_Employee_No_Filter_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -788,12 +903,19 @@ const Module_Agenda = (props) => { var local_related_collection = p_filtre1; if (String(selected_employee_id).length < 2) { - alert(" Vous devez choisir un employé ou un materiel"); + // alert(" Vous devez choisir un employé ou un materiel"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez choisir un employé ou un materiel"); + setalert_type("error"); return; } if (moment(endDate) <= moment(startDate)) { - alert(" Les dates de début et de fin sont incohérentes"); + // alert(" Les dates de début et de fin sont incohérentes"); + setdisplay_alert_mysy("1"); + setalert_message("Les dates de début et de fin sont incohérentes"); + setalert_type("error"); return; } var new_title = p_detail_title; @@ -846,14 +968,20 @@ const Module_Agenda = (props) => { setp_detail_justified(false); setp_detail_event_type(); - alert(res.data.message); + // alert(res.data.message) + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); Close_Dialog_Detail_Event_open(); } else { setUpdate_One_Agenda_Event_api("false"); setUpdate_One_Agenda_Event_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -911,14 +1039,20 @@ const Module_Agenda = (props) => { setp_detail_justified(false); setp_detail_event_type(); - alert(res.data.message); + // alert(res.data.message) + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); Close_Dialog_Detail_Event_open(); } else { setDelete_One_Agenda_Event_api("false"); setDelete_One_Agenda_Event_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -972,8 +1106,10 @@ const Module_Agenda = (props) => { //--- var node = { "_id": local_id, - "id": localid, + // "id": localid, cas particulier pour gerer l'affichage timeline, on met id = _id + "id": local_id, "label": local_nom, + "title": local_nom, "nom": local_nom, "ref_interne": local_ref_interne, @@ -987,7 +1123,10 @@ const Module_Agenda = (props) => { else { setGetall_Training_Materiel_No_Filter_api("false"); setGetall_Training_Materiel_No_Filter_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -1004,7 +1143,7 @@ const Module_Agenda = (props) => { const [display_other_agenda, setdisplay_other_agenda] = useState(); const [agenda_owner_name, setagenda_owner_name] = useState("Mon Planning"); - const [agenda_owner_type, setagenda_owner_type] = useState("Employe"); + const [agenda_owner_type, setagenda_owner_type] = useState("Employé"); function show_other_agenda() { @@ -1061,12 +1200,64 @@ const Module_Agenda = (props) => { } ] + + //const defaultTimeStart = moment().startOf("hour").add(-3, "hour").toDate(); + //const defaultTimeEnd = moment().startOf("hour").add(+8, "hour").toDate(); + /** Pour l'affichage en mode timeline */ + const [New_Getall_Object_result_Timeline_Item, setNew_Getall_Object_result_Timeline_Item] = useState([]); + + const [New_Getall_Object_result_Timeline_Group, setNew_Getall_Object_result_Timeline_Group] = useState([]); + + const today = Date.now(); + const tomorrow = new Date(today) + tomorrow.setDate(tomorrow.getDate() + 1) + + /** Fin Pour l'affichage en mode timeline */ + + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + const fixedVal = []; + const [tab_selected_users, settab_selected_users] = useState([...fixedVal]); + + const [defaultTimeStart, setdefaultTimeStart] = useState(moment().startOf("hour").add(-3, "hour").toDate()); + const [defaultTimeEnd, setdefaultTimeEnd] = useState(moment().startOf("hour").add(+8, "hour").toDate()); + + const [visible_start, setvisible_start] = useState(moment().startOf("hour").add(-3, "hour").toDate()); + const [visible_end, setvisible_end] = useState(moment().startOf("hour").add(+15, "hour").toDate()); + + const [date_timeline_goto, setdate_timeline_goto] = useState(new Date()); + + + return (
{isLoading &&
} + {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + { else setp_detail_justified(true); - } } + }} id="toggleSwitchNav" name="toggleSwitchNav"> { value={p_detail_comment} onChange={(e) => { - console.log(" dans comment p_detail_sequence_session_id = ", p_detail_sequence_session_id); + // console.log(" dans comment p_detail_sequence_session_id = ", p_detail_sequence_session_id); if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") setp_detail_comment(e.target.value); } @@ -1331,7 +1522,7 @@ const Module_Agenda = (props) => { setselected_employee_id(""); setselected_related_collection(value.value); setp_filtre1_label(value.label) - + settab_selected_users([]); } }} @@ -1343,33 +1534,12 @@ const Module_Agenda = (props) => { } /> - {/* { - setp_filtre1(e.target.value); - setselected_employee_id(""); - setselected_related_collection(e.target.value); - - }} - > - Employé   - Materiel   - - - */}
- - {p_filtre1 && String(p_filtre1) === "ressource_humaine" &&
- { //value={selected_employee_id} onChange={(event, value) => { if (value && value._id) { - Get_Ressource_Data(value._id) setselected_employee_id(value._id); Get_List_Agenda_Events_For_Given_User(value._id); @@ -1390,47 +1559,46 @@ const Module_Agenda = (props) => { renderInput={(params) => } - /> + />*/} + + { + settab_selected_users([ + ...fixedVal, + ...value.filter((i) => fixedVal.indexOf(i) === -1), + ]); + + if (value.length > 1) { + Get_List_Agenda_Events_For_Many_Users(value, "ressource_humaine"); + } else { + if (value[0] && value[0]._id) { + Get_Ressource_Data(value[0]._id) + setselected_employee_id(value[0]._id); + Get_List_Agenda_Events_For_Given_User(value[0]._id); + } + } }} - disabled={false} - className="disabled_style" - value={selected_employee_id} - onChange={(e) => { - Get_Ressource_Data(e.target.value) - setselected_employee_id(e.target.value); - Get_List_Agenda_Events_For_Given_User(e.target.value); - - - }} - > - {Getall_Training_Employee_No_Filter_result && - Getall_Training_Employee_No_Filter_result.map((myclient) => ( - - {JSON.parse(myclient).nom}  {JSON.parse(myclient).prenom} - - - ))} - - */} + renderInput={(params) => + } + />
} {p_filtre1 && String(p_filtre1) === "ressource_materielle" &&
- - - { /> } - /> + />*/} - - {/*} { + + // console.log(" ### matos value = ", value) + settab_selected_users([ + ...fixedVal, + ...value.filter((i) => fixedVal.indexOf(i) === -1), + ]); + if (value.length > 1) { + Get_List_Agenda_Events_For_Many_Users(value, "ressource_materielle"); + } else { + if (value[0] && value[0]._id) { + Get_Ressource_Data(value[0]._id) + setselected_employee_id(value[0]._id); + Get_List_Agenda_Events_For_Given_User(value[0]._id); + } + } }} - disabled={false} - className="disabled_style" - value={selected_employee_id} - onChange={(e) => { - Get_Ressource_Data(e.target.value) - setselected_employee_id(e.target.value); - Get_List_Agenda_Events_For_Given_User(e.target.value); - }} - > - {Getall_Training_Materiel_No_Filter_result && - Getall_Training_Materiel_No_Filter_result.map((myclient) => ( - - {JSON.parse(myclient).nom}  - - ))} - - */} + renderInput={(params) => + } + />
} @@ -1494,12 +1665,12 @@ const Module_Agenda = (props) => {   -
+ {tab_selected_users.length <= 1 &&
{agenda_owner_name && String(agenda_owner_name) === "Mon Planning" &&
{agenda_owner_name}
} - {agenda_owner_name && String(agenda_owner_name) !== "Mon Planning" &&
Vous êtes sur le planning de {agenda_owner_name} - ({agenda_owner_type})
} -
+ {agenda_owner_name && String(agenda_owner_name) !== "Mon Planning" && tab_selected_users.length === 1 &&
Vous êtes sur le planning de {agenda_owner_name} - ({agenda_owner_type})
} +
} -
+ {tab_selected_users.length <= 1 &&
  { }} //eventContent={(info) => } //plugins={[timeGridPlugin]} - plugins={[timeGridPlugin, daygridPlugin, interactionPlugin, ]} + plugins={[timeGridPlugin, daygridPlugin, interactionPlugin,]} views={["dayGridMonth", "dayGridWeek", "dayGridDay"]} slotMinTime={Partner_Debut_Journee} slotMaxTime={Partner_Fin_Journee} @@ -1527,15 +1698,128 @@ const Module_Agenda = (props) => { eventContent={renderEventContent} eventClick={handleEventClick} eventColor='#378006' - - /> +
} -
+ {tab_selected_users.length > 1 &&
+ + }} + > +
+
+
+   + +
+
+
+ { + + return setdate_timeline_goto(date); + } + } + + + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> +
+
+
+ + { + }} + + > + + + + + + + + + + + + + + + {({ styles }) => { + const newStyles = { ...styles, backgroundColor: "blue" }; + return
; + }} + + + + + + + +
+ + + +
} + +
) } diff --git a/src/components/Partner_Commande.js b/src/components/Partner_Commande.js index b5b234e..ca3bae7 100644 --- a/src/components/Partner_Commande.js +++ b/src/components/Partner_Commande.js @@ -72,6 +72,8 @@ import { } from '@mui/x-data-grid'; import * as XLSX from 'xlsx'; +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; + const useStyles = makeStyles((theme) => ({ dialog: { @@ -563,12 +565,18 @@ const Partner_Commande = (props) => { behavior: "smooth", }); } - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setDelete_Order_Header_AndLine_Data_api("false"); setDelete_Order_Header_AndLine_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -679,12 +687,18 @@ const Partner_Commande = (props) => { Display_Detail_Order_data(selected_id); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setDelete_Order_Line_Data_api("false"); setDelete_Order_Line_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } @@ -876,7 +890,10 @@ const Partner_Commande = (props) => { else { setGetall_Partner_Product_Service_api("false"); setGetall_Partner_Product_Service_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -975,7 +992,10 @@ const Partner_Commande = (props) => { else { setGetall_Parter_Devis_Config_Points_api("false"); setGetall_Parter_Devis_Config_Points_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } }).catch((error) => { @@ -1056,7 +1076,10 @@ const Partner_Commande = (props) => { else { setGetall_Parter_Orders_No_Filter_api("false"); setGetall_Parter_Orders_No_Filter_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -1125,7 +1148,10 @@ const Partner_Commande = (props) => { else { setGetall_Parter_Orders_With_Filter_api("false"); setGetall_Parter_Orders_With_Filter_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -1164,7 +1190,10 @@ const Partner_Commande = (props) => { else { setGetall_Parter_Orders_With_Filter_On_Client_Id_api("false"); setGetall_Parter_Orders_With_Filter_On_Client_Id_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } }).catch((error) => { @@ -1189,7 +1218,11 @@ const Partner_Commande = (props) => { //console.log("file_size = ",file_size," file_type = ",file_type); if (file_size > 1000000) { - alert("Le fichier ne doit pas dépasser un 1 Méga octets"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas dépasser un 1 Méga octets"); + setalert_type("error"); + // alert("Le fichier ne doit pas dépasser un 1 Méga octets"); return; } @@ -1225,7 +1258,13 @@ const Partner_Commande = (props) => { setliste_sessions_file_change_api("true"); //Getall_Training_Employee(); - alert(" Les employés ont été correctement importés"); + // alert(" Les employés ont été correctement importés"); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Les employés ont été correctement importés"); + setalert_type("success"); + } @@ -1623,7 +1662,11 @@ const Partner_Commande = (props) => { order_header_submenu_main(); } else { - alert(" Aucune commande/devis recuperé"); + // alert(" Aucune commande/devis recuperé"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Aucune commande/devis recuperé"); + setalert_type("error"); } @@ -1637,7 +1680,10 @@ const Partner_Commande = (props) => { setLoading(false); setGetAttendee_api("false"); setGetAttendee_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -1678,7 +1724,10 @@ const Partner_Commande = (props) => { setLoading(false); setGet_Partner_Orders_Lines_from_header_id_api("false"); setGet_Partner_Orders_Lines_from_header_id_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -1878,7 +1927,11 @@ const Partner_Commande = (props) => { } } else { - alert(" Aucun taux de TVA récuperé") + // alert(" Aucun taux de TVA récuperé") + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Aucun taux de TVA récuperé"); + setalert_type("error"); } } else if (String(res.data.status) === String("Err_Connexion")) { @@ -2138,7 +2191,11 @@ const Partner_Commande = (props) => { ; } else { - alert(" Aucune ligne commande/devis recuperée"); + // alert(" Aucune ligne commande/devis recuperée"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Aucune ligne commande/devis recuperée"); + setalert_type("error"); } @@ -2150,7 +2207,10 @@ const Partner_Commande = (props) => { else { setGet_Given_Line_Of_Partner_Order_Line_Data_api("false"); setGet_Given_Line_Of_Partner_Order_Line_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -2791,7 +2851,11 @@ const Partner_Commande = (props) => { } else { - alert(" Type de commande inconnu."); + // alert(" Type de commande inconnu."); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Type de commande inconnu."); + setalert_type("error"); return; } setLoading(true); @@ -2811,7 +2875,13 @@ const Partner_Commande = (props) => { setOrder_data_changed(""); setorder_data_edit_mode(""); Display_Detail_Order_data(selected_id); - alert(" La mise à jour du " + String(p_detail_header_type) + " été correctement faite."); + // alert(" La mise à jour du " + String(p_detail_header_type) + " été correctement faite."); + // alert(res.data.message); + + var txt = "La mise à jour du " + String(p_detail_header_type) + " été correctement faite." + setdisplay_alert_mysy("1"); + setalert_message(txt); + setalert_type("success"); if (document.getElementById('myRef_head')) { var divh = document.getElementById('myRef_head').offsetTop; @@ -2826,7 +2896,10 @@ const Partner_Commande = (props) => { else { setUpdate_One_Order_Data_api("false"); setUpdate_One_Order_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -2903,7 +2976,10 @@ const Partner_Commande = (props) => { else { setGetall_Training_Employee_No_Filter_api("false"); setGetall_Training_Employee_No_Filter_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3034,30 +3110,52 @@ const Partner_Commande = (props) => { // Controle des champs obligatoires if (!p_add_line_item || String(p_add_line_item).length < 2) { - alert(" Vous devez choisir une formation "); + //alert(" Vous devez choisir une formation "); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez choisir une formation "); + setalert_type("error"); return; } if (!p_add_line_item_qty || parseFloat(String(p_add_line_item_qty)) <= 0) { - alert(" La quantité choisie est incorrecte "); + // alert(" La quantité choisie est incorrecte "); + setdisplay_alert_mysy("1"); + setalert_message(" La quantité choisie est incorrecte "); + setalert_type("error"); return; } if (!p_add_line_item_price || parseFloat(String(p_add_line_item_price)) < 0) { - alert(" Le prix unitaire est incorrecte "); + // alert(" Le prix unitaire est incorrecte "); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Le prix unitaire est incorrecte "); + setalert_type("error"); return; } if (String(p_add_line_item_type_reduction) === "percent" && (parseFloat(String(p_add_line_item_reduction_value)) < 0 || parseFloat(String(p_add_line_item_reduction_value)) > 100)) { - alert(" Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100 "); + // alert(" Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100 "); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Pour une reduction de type 'pourcentage', la valeur doit être comprise entre 0 et 100"); + setalert_type("error"); + return; } if (String(p_add_line_item_type_reduction) === "fixe" && (parseFloat(String(p_add_line_item_reduction_value)) < 0 || parseFloat(String(p_add_line_item_reduction_value)) > parseFloat(String(p_add_line_item_price)))) { - alert(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); + // alert(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Pour une reduction de type 'fixe', la valeur ne doit pas excéder le prix unitaire de l'article "); + setalert_type("error"); return; } @@ -3078,7 +3176,13 @@ const Partner_Commande = (props) => { clean_article_detail_fields(); Display_Detail_Order_data(selected_id); - alert(" L'article a été correctement ajouté / mis à jour."); + // alert(" L'article a été correctement ajouté / mis à jour."); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("L'article a été correctement ajouté / mis à jour."); + setalert_type("success"); + setDialog_Detail_Article_open(false); //myRef_head.current.scrollIntoView({ behavior: "smooth" }); @@ -3087,7 +3191,10 @@ const Partner_Commande = (props) => { else { setAdd_Update_One_Order_Line_Data_api("false"); setAdd_Update_One_Order_Line_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3221,7 +3328,11 @@ const Partner_Commande = (props) => { if (!p_add_cmd_header_client_id || String(p_add_cmd_header_client_id).length < 2) { - alert(" Vous devez choisir un client"); + // alert(" Vous devez choisir un client"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Vous devez choisir un client"); + setalert_type("error"); return; } //console.log("### form = ", form); @@ -3242,7 +3353,11 @@ const Partner_Commande = (props) => { } else if (String(p_add_cmd_header_order_type) === "commande") { myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Order/"; } else { - alert(" Type de commande inconnu"); + // alert(" Type de commande inconnu"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Type de commande inconnu"); + setalert_type("error"); return; } @@ -3260,9 +3375,15 @@ const Partner_Commande = (props) => { Getall_Parter_Orders_No_Filter(); if (String(p_add_cmd_header_order_type) === "devis") { - alert(" La devis à jour été correctement ajouté."); + // alert(" La devis à jour été correctement ajouté."); + setdisplay_alert_mysy("1"); + setalert_message(" La devis à jour été correctement ajouté."); + setalert_type("success"); } else if (String(p_add_cmd_header_order_type) === "commande") { - alert(" La commande à jour été correctement ajoutée."); + // alert(" La commande à jour été correctement ajoutée."); + setdisplay_alert_mysy("1"); + setalert_message("La commande à jour été correctement ajoutée."); + setalert_type("success"); } if (document.getElementById('myRef_head')) { @@ -3277,7 +3398,10 @@ const Partner_Commande = (props) => { else { setAdd_Dialog_Detail_Order_api("false"); setAdd_Dialog_Detail_Order_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3287,9 +3411,20 @@ const Partner_Commande = (props) => { setAdd_Dialog_Detail_Order_api("false"); if (String(p_add_cmd_header_order_type) === "devis") { - alert(" Impossible d'ajouter le devis"); + // alert(" Impossible d'ajouter le devis"); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Impossible d'ajouter le devis"); + setalert_type("error"); + } else if (String(p_add_cmd_header_order_type) === "commande") { - alert(" La commande d'ajouter la commande."); + // alert(" La commande d'ajouter la commande."); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("La commande d'ajouter la commande."); + setalert_type("error"); } }) @@ -3579,7 +3714,11 @@ const Partner_Commande = (props) => { function Compute_Order_Header_Price() { if (String(Order_data_changed) === "1") { - alert(" Merci d'enregistrer les modification avant de lancer le calcul"); + // alert(" Merci d'enregistrer les modification avant de lancer le calcul"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" Merci d'enregistrer les modification avant de lancer le calcul"); + setalert_type("error"); } Compute_Partner_Order(); @@ -3614,7 +3753,10 @@ const Partner_Commande = (props) => { Get_Order_Data(selected_id); Get_Partner_Orders_Lines_from_header_id(selected_id); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else if (String(res.data.status) === String("Err_Connexion")) { alert('Erreur: ' + res.data.message); @@ -3623,7 +3765,10 @@ const Partner_Commande = (props) => { else { setCompute_Partner_Order_api("false"); setCompute_Partner_Order_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3697,13 +3842,19 @@ const Partner_Commande = (props) => { Get_Order_Data(selected_id); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setSend_Order_By_Email_api("false"); setSend_Order_By_Email_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3713,9 +3864,15 @@ const Partner_Commande = (props) => { setSend_Order_By_Email_api("false"); if (String(p_add_cmd_header_order_type) === "devis") { - alert(" Impossible d'envoyer le devis par email"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible d'envoyer le devis par email"); + setalert_type("error"); + // alert(" Impossible d'envoyer le devis par email"); } else if (String(p_add_cmd_header_order_type) === "commande") { - alert(" Impossible d'envoyer la commande par email"); + // alert(" Impossible d'envoyer la commande par email"); + setdisplay_alert_mysy("1"); + setalert_message("Impossible d'envoyer la commande par email"); + setalert_type("error"); } }) @@ -3749,13 +3906,19 @@ const Partner_Commande = (props) => { setConfirm_Order_Data_message(res.data.message); Getall_Training_Employee_No_Filter(); Display_Detail_Order_data(selected_id); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setConfirm_Order_Data_api("false"); setConfirm_Order_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3765,9 +3928,19 @@ const Partner_Commande = (props) => { setConfirm_Order_Data_api("false"); if (String(p_add_cmd_header_order_type) === "devis") { - alert(" Impossible de confirmer le devis"); + // alert(" Impossible de confirmer le devis"); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de confirmer le devis"); + setalert_type("error"); + } else if (String(p_add_cmd_header_order_type) === "commande") { - alert(" Impossible de confirmer la commande"); + // alert(" Impossible de confirmer la commande"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Impossible de confirmer la commande"); + setalert_type("error"); } }) @@ -3802,13 +3975,19 @@ const Partner_Commande = (props) => { setMake_Order_Ready_To_Invoice_message(res.data.message); Getall_Training_Employee_No_Filter(); Display_Detail_Order_data(selected_id); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setMake_Order_Ready_To_Invoice_api("false"); setMake_Order_Ready_To_Invoice_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3853,13 +4032,19 @@ const Partner_Commande = (props) => { setCancel_Order_Data_message(res.data.message); Getall_Training_Employee_No_Filter(); Display_Detail_Order_data(selected_id); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setCancel_Order_Data_api("false"); setCancel_Order_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3915,13 +4100,19 @@ const Partner_Commande = (props) => { } - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setConvert_Quotation_To_Order_Data_api("false"); setConvert_Quotation_To_Order_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -3977,14 +4168,19 @@ const Partner_Commande = (props) => { }); } - - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setValide_Quotation_And_Insert_To_Session_api("false"); setValide_Quotation_And_Insert_To_Session_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4045,15 +4241,19 @@ const Partner_Commande = (props) => { behavior: "smooth", }); } - - - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } else { setInvoice_Order_Data_api("false"); setInvoice_Order_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4102,7 +4302,10 @@ const Partner_Commande = (props) => { setGet_Class_Data_api("false"); setGet_Class_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); } }).catch((error) => { @@ -4194,7 +4397,10 @@ const Partner_Commande = (props) => { else { setGetall_Partner_Paiement_Condition_api("false"); setGetall_Partner_Paiement_Condition_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4356,7 +4562,10 @@ const Partner_Commande = (props) => { setorder_data_edit_mode(""); Display_Detail_Order_data(selected_id); Close_Dialog_Cloture_Devis_open(); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); if (document.getElementById('myRef_head')) { var divh = document.getElementById('myRef_head').offsetTop; @@ -4371,7 +4580,10 @@ const Partner_Commande = (props) => { else { setClosure_Given_Quotation_api("false"); setClosure_Given_Quotation_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4463,7 +4675,10 @@ const Partner_Commande = (props) => { Close_Dialog_Create_Session_open(); handleClick_edit_order_From_Line(selected_order_line_row_number_id); Getall_TrainingSession(); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); /*if (document.getElementById('myRef_head')) { var divh = document.getElementById('myRef_head').offsetTop; @@ -4478,7 +4693,10 @@ const Partner_Commande = (props) => { else { setCreate_Session_From_Quotation_api("false"); setCreate_Session_From_Quotation_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -4558,15 +4776,23 @@ const Partner_Commande = (props) => { if (file_type !== "application/pdf") { - alert("Le fichier n'est pas de type PDF"); + // alert("Le fichier n'est pas de type PDF"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier n'est pas de type PDF"); + setalert_type("error"); return; } if (file_size > 10000000) { - alert("Le fichier ne doit pas depasser un 1 Méga octets"); - console.log("Le fichier ne doit pas depasser un 1 Méga octets"); + // alert("Le fichier ne doit pas depasser un 1 Méga octets"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("Le fichier ne doit pas depasser un 1 Méga octets"); + setalert_type("error"); + // console.log("Le fichier ne doit pas depasser un 1 Méga octets"); return; } @@ -4755,6 +4981,19 @@ const Partner_Commande = (props) => { } }; + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } return ( @@ -4763,6 +5002,18 @@ const Partner_Commande = (props) => {
} + {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/} + + {/* Dialog affichage historique commande/devis */} { onClose={() => null} > MySy Information - +
@@ -4865,7 +5116,13 @@ const Partner_Commande = (props) => { console.log(" date_start_session = ", date_start_session);*/ if (local_date > date_end_session) { - alert(" La date est après la fin de la session"); + // alert(" La date est après la fin de la session"); + + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(" La date est après la fin de la session"); + setalert_type("error"); + return; } @@ -4901,7 +5158,11 @@ const Partner_Commande = (props) => { if (local_date < date_start_session) { - alert(" La date est avant le début de la session"); + // alert(" La date est avant le début de la session"); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message("La date est avant le début de la session"); + setalert_type("error"); return; } @@ -7056,7 +7317,7 @@ const Partner_Commande = (props) => { - {String(order_data_edit_mode) !== "1" &&
Nom Client aa
+ {String(order_data_edit_mode) !== "1" &&
Nom Client
-
 
@@ -569,10 +567,6 @@ function SurveyDocument() {  
- -
-
-
); } diff --git a/src/components/UpdateAttendeeList.js b/src/components/UpdateAttendeeList.js index 718332a..de982e1 100644 --- a/src/components/UpdateAttendeeList.js +++ b/src/components/UpdateAttendeeList.js @@ -28,6 +28,7 @@ import 'reactjs-popup/dist/index.css'; import Display_Action_And_Class from "./Display_Action_And_Class"; +import Module_Alert_Confirmation from "./Module_Alert_Confirmation"; function UpdateAttendeeList() { @@ -136,7 +137,10 @@ function UpdateAttendeeList() { else { setGetall_Client_Communication_Contact_api("false"); setGetall_Client_Communication_Contact_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); setdocument_checked("1"); } @@ -226,7 +230,10 @@ function UpdateAttendeeList() { else { setGetall_TrainingParticipant_api("false"); setGetall_TrainingParticipant_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -370,13 +377,20 @@ function UpdateAttendeeList() { setLoading(false); if (String(res.data.status) === String("true")) { - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("success"); + history.push("/"); } else { setRecord_New_Attendee_Data_api("false"); setRecord_New_Attendee_Data_message(res.data.message); - alert(res.data.message); + // alert(res.data.message); + setdisplay_alert_mysy("1"); + setalert_message(res.data.message); + setalert_type("error"); } }).catch((error) => { @@ -388,6 +402,20 @@ function UpdateAttendeeList() { }) } + const [display_alert_mysy, setdisplay_alert_mysy] = useState(""); + const [alert_message, setalert_message] = useState(""); + const [alert_type, setalert_type] = useState(""); + + function clear_alert_message() { + setalert_message(""); + } + function clear_alert_type() { + setalert_type(""); + } + function clear_display_alert_mysy() { + setdisplay_alert_mysy(""); + } + return (
@@ -396,8 +424,16 @@ function UpdateAttendeeList() {
} - -
+ {/*** Affichage des messages d'alerte*/} + {display_alert_mysy && String(display_alert_mysy) === "1" && + + } + {/*** FIN Affichage des messages d'alerte*/}
  @@ -606,11 +642,7 @@ function UpdateAttendeeList() {
 
- - -
-
-
+
); } diff --git a/src/components/fonctionalites_automatic_files/new_fonctionalites_2025.css b/src/components/fonctionalites_automatic_files/new_fonctionalites_2025.css index 0a86263..68dbdd1 100644 --- a/src/components/fonctionalites_automatic_files/new_fonctionalites_2025.css +++ b/src/components/fonctionalites_automatic_files/new_fonctionalites_2025.css @@ -798,7 +798,7 @@ /* Auto layout */ display: flex; flex-direction: row; - justify-content: flex-end; + justify-content: center; align-items: center; padding: 0px; gap: 50px; @@ -1475,7 +1475,7 @@ /* Auto layout */ display: flex; flex-direction: row; - justify-content: flex-end; + justify-content: center; align-items: center; padding: 0px; gap: 50px; @@ -2151,10 +2151,10 @@ /* Auto layout */ display: flex; flex-direction: row; - justify-content: flex-end; + justify-content: center; align-items: center; padding: 0px; - gap: 50px; + gap: 80px; height: 48px; diff --git a/src/index.css b/src/index.css index e12c05a..a3f541d 100644 --- a/src/index.css +++ b/src/index.css @@ -13,6 +13,7 @@ code { } + :root { --foundationwhite: rgba(255, 255, 255, 1); --foundation-bluelight: rgba(236, 241, 252, 1); @@ -52,10 +53,4 @@ code { --button-base-bold-line-height: 122%; --button-base-bold-font-style: normal; --bottom-bar-dark: ; -} - - - - - - +} \ No newline at end of file diff --git a/src/pages/NotFound.js b/src/pages/NotFound.js index 5b28f46..9365b6d 100644 --- a/src/pages/NotFound.js +++ b/src/pages/NotFound.js @@ -5,6 +5,9 @@ import { Helmet } from "react-helmet"; import Footer from "./../components/Fotter"; import Header from "./../components/Header"; import Fotter_v3 from "./../components/Fotter_v3"; +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; const NotFound = () => { @@ -25,7 +28,7 @@ const NotFound = () => { } return ( - +
@@ -40,7 +43,7 @@ const NotFound = () => { -
+
@@ -72,9 +75,7 @@ const NotFound = () => {
-
- -
+
) diff --git a/src/pages/automaticquotation.js b/src/pages/automaticquotation.js index a47e4e5..88ea3c0 100644 --- a/src/pages/automaticquotation.js +++ b/src/pages/automaticquotation.js @@ -8,7 +8,9 @@ import Header from "./../components/Header"; import { useParams } from 'react-router-dom'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import axios from "axios"; - +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; const Automaticquotation = () => { @@ -124,7 +126,7 @@ const Automaticquotation = () => { -
+
@@ -154,9 +156,7 @@ const Automaticquotation = () => {
-
-
-
+
diff --git a/src/pages/eSigne.js b/src/pages/eSigne.js index e815ff8..9acaf22 100644 --- a/src/pages/eSigne.js +++ b/src/pages/eSigne.js @@ -2,16 +2,17 @@ import Link from "next/link"; import Navigation from "../components/Navigation"; import ESign from "../components/ESign"; - +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; export default function Login() { return (
- -
+ + - -
+
); } diff --git a/src/pages/edigndiplaydigneddocument.js b/src/pages/edigndiplaydigneddocument.js index dae1e63..bb7ee0f 100644 --- a/src/pages/edigndiplaydigneddocument.js +++ b/src/pages/edigndiplaydigneddocument.js @@ -1,17 +1,19 @@ import Link from "next/link"; import Navigation from "../components/Navigation"; import ESignDiplayDignedDocument from "../components/ESignDiplayDignedDocument"; - +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; export default function Login() { return (
- -
+ + - -
+ +
); } diff --git a/src/pages/emarge_qr_code.js b/src/pages/emarge_qr_code.js index be970ee..8634e7b 100644 --- a/src/pages/emarge_qr_code.js +++ b/src/pages/emarge_qr_code.js @@ -2,16 +2,19 @@ import Link from "next/link"; import Navigation from "../components/Navigation"; import Emarge_QR_Code from "../components/Emarge_QR_Code"; - +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; export default function emarge_qr_code() { return (
- -
- - -
+ + + + + +
); } diff --git a/src/pages/partner.js b/src/pages/partner.js index 1592590..b7d9689 100644 --- a/src/pages/partner.js +++ b/src/pages/partner.js @@ -8,7 +8,7 @@ const recherche_draft = () => { return (
- + diff --git a/src/pages/surveydocument.js b/src/pages/surveydocument.js index 2a86b76..85d2dc1 100644 --- a/src/pages/surveydocument.js +++ b/src/pages/surveydocument.js @@ -1,17 +1,18 @@ import Link from "next/link"; import Navigation from "../components/Navigation"; import SurveyDocument from "../components/SurveyDocument" - +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; export default function Login() { return (
- -
- - -
+ + + +
); } diff --git a/src/pages/updateattendeelist.js b/src/pages/updateattendeelist.js index 65fe7e7..7427c17 100644 --- a/src/pages/updateattendeelist.js +++ b/src/pages/updateattendeelist.js @@ -1,17 +1,19 @@ import Link from "next/link"; import Navigation from "../components/Navigation"; import UpdateAttendeeList from "../components/UpdateAttendeeList" - - +import New_Navigation_2025 from "../components/New_Navigation_2025"; +import New_C_Header_2025_V2 from "../components/header_automatic_files/Header"; +import New_C_Footer_Without_Testimony_2025_V2 from "../components/footer_automatic_files/Layout_Without_Testimony"; + export default function Login() { return (
- -
+ + -
+
); } diff --git a/src/styles/components/_module_agenda.scss b/src/styles/components/_module_agenda.scss index f391758..5248dd6 100644 --- a/src/styles/components/_module_agenda.scss +++ b/src/styles/components/_module_agenda.scss @@ -2576,6 +2576,9 @@ } + .remove_border_bottom{ + border: unset; + } } diff --git a/src/styles/index.scss b/src/styles/index.scss index 1dc1cdf..fb592fd 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,45 +1,54 @@ :root { - --foundationwhite: rgba(255, 255, 255, 1); - --foundation-bluelight: rgba(236, 241, 252, 1); - --foundation-bluenormal: rgba(62, 110, 227, 1); - --foundation-bluedarker: rgba(22, 39, 79, 1); - --foundation-greennormal: rgba(10, 166, 144, 1); - --foundation-greendarker: rgba(4, 58, 50, 1); - --foundationblacklight-hover: rgba(220, 220, 220, 1); - --foundationblacknormal: rgba(23, 23, 23, 1); - --foundation-blue-greynormal: rgba(75, 81, 98, 1); - --browser-uidark-bg: rgba(61, 61, 61, 0.94); - --text-color600-body: rgba(113, 128, 150, 1); - --text-color100: rgba(249, 250, 251, 1); - --text-color400: rgba(203, 213, 224, 1); - --desktop-hn-h2-desktop-font-family: "DM Sans", Helvetica; - --desktop-hn-h2-desktop-font-weight: 700; - --desktop-hn-h2-desktop-font-size: 40px; - --desktop-hn-h2-desktop-letter-spacing: 0px; - --desktop-hn-h2-desktop-line-height: 120.00000762939453%; - --desktop-hn-h2-desktop-font-style: normal; - --mobile-hn-h2-mobile-font-family: "DM Sans", Helvetica; - --mobile-hn-h2-mobile-font-weight: 700; - --mobile-hn-h2-mobile-font-size: 32px; - --mobile-hn-h2-mobile-letter-spacing: 0px; - --mobile-hn-h2-mobile-line-height: 120.00000762939453%; - --mobile-hn-h2-mobile-font-style: normal; - --16px-regular-font-family: "Inter", Helvetica; - --16px-regular-font-weight: 400; - --16px-regular-font-size: 16px; - --16px-regular-letter-spacing: 0px; - --16px-regular-line-height: 24px; - --16px-regular-font-style: normal; - --button-base-bold-font-family: "DM Sans", Helvetica; - --button-base-bold-font-weight: 700; - --button-base-bold-font-size: 16px; - --button-base-bold-letter-spacing: 0px; - --button-base-bold-line-height: 122%; - --button-base-bold-font-style: normal; - --bottom-bar-dark: ; - } - - @import "./setting"; + --foundationwhite: rgba(255, 255, 255, 1); + --foundation-bluelight: rgba(236, 241, 252, 1); + --foundation-bluenormal: rgba(62, 110, 227, 1); + --foundation-bluedarker: rgba(22, 39, 79, 1); + --foundation-greennormal: rgba(10, 166, 144, 1); + --foundation-greendarker: rgba(4, 58, 50, 1); + --foundationblacklight-hover: rgba(220, 220, 220, 1); + --foundationblacknormal: rgba(23, 23, 23, 1); + --foundation-blue-greynormal: rgba(75, 81, 98, 1); + --browser-uidark-bg: rgba(61, 61, 61, 0.94); + --text-color600-body: rgba(113, 128, 150, 1); + --text-color100: rgba(249, 250, 251, 1); + --text-color400: rgba(203, 213, 224, 1); + --desktop-hn-h2-desktop-font-family: "DM Sans", Helvetica; + --desktop-hn-h2-desktop-font-weight: 700; + --desktop-hn-h2-desktop-font-size: 40px; + --desktop-hn-h2-desktop-letter-spacing: 0px; + --desktop-hn-h2-desktop-line-height: 120.00000762939453%; + --desktop-hn-h2-desktop-font-style: normal; + --mobile-hn-h2-mobile-font-family: "DM Sans", Helvetica; + --mobile-hn-h2-mobile-font-weight: 700; + --mobile-hn-h2-mobile-font-size: 32px; + --mobile-hn-h2-mobile-letter-spacing: 0px; + --mobile-hn-h2-mobile-line-height: 120.00000762939453%; + --mobile-hn-h2-mobile-font-style: normal; + --16px-regular-font-family: "Inter", Helvetica; + --16px-regular-font-weight: 400; + --16px-regular-font-size: 16px; + --16px-regular-letter-spacing: 0px; + --16px-regular-line-height: 24px; + --16px-regular-font-style: normal; + --button-base-bold-font-family: "DM Sans", Helvetica; + --button-base-bold-font-weight: 700; + --button-base-bold-font-size: 16px; + --button-base-bold-letter-spacing: 0px; + --button-base-bold-line-height: 122%; + --button-base-bold-font-style: normal; + --bottom-bar-dark: ; +} + +.react-calendar-timeline .rct-header-root { + background: #FFF !important; +} + +.rct-sidebar-row .rct-sidebar-row-even .rct-sidebar{ + font-size: 12px !important; +} + + +@import "./setting"; @import "./components/contact"; @import "./components/navigation"; @import "./components/footer";