diff --git a/src/components/Crm_Opportunite.js b/src/components/Crm_Opportunite.js new file mode 100644 index 0000000..af974ad --- /dev/null +++ b/src/components/Crm_Opportunite.js @@ -0,0 +1,1548 @@ +import React, { useRef, useState, useEffect } from "react"; +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css +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 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"; +import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc"; +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 } 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'; +import DialogContentText from '@mui/material/DialogContentText'; +import DialogTitle from '@mui/material/DialogTitle'; +import { TransitionProps } from '@mui/material/transitions'; +import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5"; +import ToggleSwitch from "./ToggleSwitch"; +import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy"; + +import Link from '@mui/material/Link'; +import { PiDotsThree } from "react-icons/pi"; + +import { useCallback, } from "react"; +import { DndProvider, useDrag } from "react-dnd"; +import { useDrop } from 'react-dnd' + +import { HTML5Backend } from "react-dnd-html5-backend"; +import update from "immutability-helper"; +import Rating from '@mui/material/Rating'; + +import { CiBoxList } from "react-icons/ci"; +import { FcPlanner } from "react-icons/fc"; + +const CRM_Opportunite = (props) => { + const history = useHistory(); + const [submenu, setsubmenu] = useState(""); + const [rowss, setRows] = useState([]); + const [selectionModel, setSelectionModel] = React.useState([]); + + var date_today_90j = new Date(); + date_today_90j.setDate(date_today_90j.getDate() + 90); + + const [p_filtre1, setp_filtre1] = useState(""); + const [p_filtre1_value, setp_filtre1_value] = useState(); + + const [p_filtre2, setp_filtre2] = useState(""); + const [p_filtre2_value, setp_filtre2_value] = useState(); + + const [p_filtre3, setp_filtre3] = useState(""); + const [p_filtre3_value, setp_filtre3_value] = useState(); + + const [p_filtre4, setp_filtre4] = useState(""); + const [p_filtre4_value, setp_filtre4_value] = useState(); + + const [selected_id, setselected_id] = useState(""); + + + const [gridline_id, setgridline_id] = useState(""); + + + const columns = [ + { field: '_id', headerName: '_id', hide: true }, + { field: 'id', headerName: 'id', hide: true }, + { field: 'partner_client_id', headerName: 'partner_client_id', flex: 1, }, + { field: 'titre', headerName: 'titre', flex: 1, hide: false, renderCell: (params) => , }, + + { field: 'description', headerName: 'description', width: 0, hide: true, renderCell: (params) => , }, + { field: 'statut', headerName: 'statut', width: 150, flex: 1, hide: false, renderCell: (params) => , }, + + { field: 'contact_nom', headerName: 'contact_nom', width: 150, flex: 1, hide: false, renderCell: (params) => , }, + { field: 'contact_email', headerName: 'contact_email', width: 150, flex: 1, hide: false, renderCell: (params) => , }, + { field: 'revenu_cible', headerName: 'revenu_cible', width: 150, flex: 1, hide: false, renderCell: (params) => , }, + { field: 'probabilite_gain', headerName: 'probabilite_gain', width: 150, flex: 1, hide: false, renderCell: (params) => , }, + { field: 'priorite', headerName: 'priorite', width: 150, flex: 1, hide: false, renderCell: (params) => , }, + { + field: "delete", headerName: 'Supprimer', + renderCell: (cellValues) => { + return ( + + { + // handleClick_delete(event, cellValues); + }} + > + + + } + modal + nested + position="center center" + > + {close => ( +
+ +
MySy Information
+
+ {' '} + + En confirmant cette opération, la salle sera définitivement supprimée.
+ +
+
+
+ + +
+
+ +
+
+
+ )} +
+ + + ); + } + } + + ] + + + function clean_all_filters() { + + setgridline_id(''); + + setp_filtre1(""); + setp_filtre1_value(""); + + setp_filtre2(""); + setp_filtre2_value(""); + + setp_filtre3(""); + setp_filtre3_value(""); + + setp_filtre4(""); + setp_filtre4_value(""); + + + setSelectionModel([]); + setsubmenu(""); + + Getall_Partner_CRM_Opportunite(); + } + + function ExpandableCell_50({ value }) { + const [expanded, setExpanded] = React.useState(false); + + return ( + + ); + } + + + const myRef_head = useRef(null); + + const [Dialog_1_message, setDialog_1_message] = React.useState(false); + const [Dialog_1_open, setDialog_1_open] = React.useState(false); + function Dialog_1_handle_change_participant_session(message) { + setDialog_1_message(message); + setDialog_1_open(true); + } + + const Dialog_1_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_1_handleClose_buton = () => { + setDialog_1_open(false); + }; + + const [isLoading, setLoading] = useState(); + + + const [session_file_name, setsession_file_name] = useState(); + + const [liste_sessions_file_change_api, setliste_sessions_file_change_api] = useState(); + const [liste_sessions_file_change_result, setliste_sessions_file_change_result] = useState(); + const [liste_sessions_file_change_message, setliste_sessions_file_change_message] = useState(); + const liste_sessions_file_change = event => { + + + const fileUploaded = event.target.files[0]; + let file_size = event.target.files[0].size; + let file_type = event.target.files[0].type; + + //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"); + return; + } + + setsession_file_name(event.target.files[0].name); + + const formData = new FormData(); + formData.append('File', fileUploaded); + //formData.append('token', 'K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA'); + const stored_cookie = getCookie('tokenmysypart'); + + formData.append("token", stored_cookie); + //console.log("token = " + stored_cookie); + + setLoading(true); + fetch( + process.env.REACT_APP_API_URL + "myclass/api/xxxxxxxxxxxxxxxxxxxxxx/", + { + method: 'POST', + body: formData, + } + ) + .then((response) => response.json()) + .then((result) => { + + setLoading(false); + //console.log(" ## result['status'] = ", result['status']) + if (String(result['status']) === String("Err_Connexion")) { + alert('Erreur: ' + result['message']); + history.push("/Connexion"); + } + + else if (String(result['status']) === String("true")) { + //console.log('Success:', result['message']); + setliste_sessions_file_change_result(result['message']); + setliste_sessions_file_change_api("true"); + clean_all_filters(); + Getall_Partner_CRM_Opportunite(); + alert(" Les opportunités ont été correctement importées"); + + } + + else { + setliste_sessions_file_change_message(result['message']); + setliste_sessions_file_change_api("false"); + alert('Erreur: ' + result['message']); + + } + + + }) + .catch((error) => { + setLoading(false); + console.error('Error:', error); + setliste_sessions_file_change_api("false"); + alert(" Impossible d'importer les opportunités "); + }); + } + + + const myRef = useRef(null) + + + + const [New_Getall_Partner_CRM_Opportunite_result, setNew_Getall_Partner_CRM_Opportunite_result] = useState([]); + + const [Getall_Partner_CRM_Opportunite_api, setGetall_Partner_CRM_Opportunite_api] = useState(); + const [Getall_Partner_CRM_Opportunite_message, setGetall_Partner_CRM_Opportunite_message] = useState(); + const [Getall_Partner_CRM_Opportunite_result, setGetall_Partner_CRM_Opportunite_result] = useState([]); + function Getall_Partner_CRM_Opportunite(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_CRM_Opportunite_no_filter/"; + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_CRM_Opportunite res.data.status = " + res.data.status); + //console.log(" In Getall_Partner_CRM_Opportunite res.data.message r_class = " + res.data.message); + setGetall_Partner_CRM_Opportunite_api("true"); + setGetall_Partner_CRM_Opportunite_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_titre = JSON.parse(x).titre; + var local_description = JSON.parse(x).description; + var local_statut = JSON.parse(x).statut; + var local_priorite = JSON.parse(x).priorite; + var local_revenu_cible = JSON.parse(x).revenu_cible; + + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_titre, + "titre": local_titre, + "title": local_titre, + "description": local_description, + "status": local_statut, + "priorite": local_priorite, + "revenu_cible": local_revenu_cible, + + }; + new_data2.push(node); + setTaskStatus(new_data2); + + var node = { + "_id": "", + "id": "", + "label": "", + "titre": "", + "title": "", + "description": "", + "status": "", + "priorite": "", + "revenu_cible": "", + }; + new_data2.push(node); + + }); + + + if (new_data2.length > 0) { + setNew_Getall_Partner_CRM_Opportunite_result(new_data2); + + } + + } + else { + setGetall_Partner_CRM_Opportunite_api("false"); + setGetall_Partner_CRM_Opportunite_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Partner_CRM_Opportunite = ', error); + setGetall_Partner_CRM_Opportunite_api("false"); + alert(" Impossible de récuperer les opportunités"); + //setmyApimyApiMessage("") + }) + } + + const [New_Option_Status, setNew_Option_Status] = useState([]); + + const [Opportunite_chanel, setOpportunite_chanel] = useState([]); + const [Opportunite_chanel_label, setOpportunite_chanel_label] = useState(); + + const [New_Getall_Partner_CRM_Opport_Step_result, setNew_Getall_Partner_CRM_Opport_Step_result] = useState([]); + + const [Getall_Partner_CRM_Opport_Step_api, setGetall_Partner_CRM_Opport_Step_api] = useState(); + const [Getall_Partner_CRM_Opport_Step_message, setGetall_Partner_CRM_Opport_Step_message] = useState(); + const [Getall_Partner_CRM_Opport_Step_result, setGetall_Partner_CRM_Opport_Step_result] = useState(); + function Getall_Partner_CRM_Opport_Step(event) { + + var form = new FormData(); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_CRM_List_Opportunite_Etape/"; + setLoading(true); + axios.post(myurl, form).then(res => { + setLoading(false); + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Partner_CRM_Opport_Step res.data.status = " + res.data.status); + //console.log(" In Getall_Partner_CRM_Opport_Step res.data.message r_class = " + res.data.message); + setGetall_Partner_CRM_Opport_Step_api("true"); + setGetall_Partner_CRM_Opport_Step_result(res.data.message); + + var new_data2 = []; + var local_opport_chanel = []; + var local_new_option = []; + var local_opport_chanel_label = {}; + const new_data = res.data.message.map((x) => { + + //--- + var localid = JSON.parse(x).id; + var local_id = JSON.parse(x)._id; + var local_code = JSON.parse(x).code; + var local_description = JSON.parse(x).description; + var local_rang = JSON.parse(x).rang; + + //--- + var node = { + "_id": local_id, + "id": localid, + "label": local_code, + "code": local_code, + "description": local_description, + "rang": local_rang + }; + new_data2.push(node); + local_opport_chanel.push(local_code); + + var node_for_status = { + "id": local_code, + "label": local_code[0].toUpperCase() + local_code.slice(1), + "value": local_code, + + }; + local_new_option.push(node_for_status); + + + }); + + var node = { + "_id": "", + "id": "", + "label": "", + "code": "", + "description": "", + "rang": "" + }; + new_data2.push(node); + + if (new_data2.length > 0) { + setNew_Getall_Partner_CRM_Opport_Step_result(new_data2); + setOpportunite_chanel(local_opport_chanel); + } else { + setNew_Getall_Partner_CRM_Opport_Step_result([]); + setOpportunite_chanel([]); + } + + var node_for_status = { + "id": "", + "label": "", + "value": "", + + }; + local_new_option.push(node_for_status); + setNew_Option_Status(local_new_option); + + for (let i = 0; i < local_opport_chanel.length; i++) { + var temp_val = String(local_opport_chanel[i]); + local_opport_chanel_label[String(local_opport_chanel[i])] = temp_val[0].toUpperCase() + temp_val.slice(1); + } + + + setOpportunite_chanel_label(local_opport_chanel_label); + + } + else { + setGetall_Partner_CRM_Opport_Step_api("false"); + setGetall_Partner_CRM_Opport_Step_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('Not good man :( Getall_Partner_CRM_Opport_Step = ', error); + setGetall_Partner_CRM_Opport_Step_api("false"); + alert(" Impossible de récuperer les étapes"); + //setmyApimyApiMessage("") + }) + } + + useEffect(() => { + + Getall_Partner_CRM_Opport_Step(); + Getall_Partner_CRM_Opportunite(); + + }, []); + + + + + + const [p_one_detail_titre, setp_one_detail_titre] = useState(); + const [p_one_detail_description, setp_one_detail_description] = useState(); + const [p_one_detail_revenu_cible, setp_one_detail_revenu_cible] = useState(); + const [p_one_detail_probabilite_gain, setp_one_detail_probabilite_gain] = useState(); + const [p_one_detail_priorite, setp_one_detail_priorite] = useState(); + + const [p_one_detail_partner_client_id, setp_one_detail_partner_client_id] = useState(); + const [p_one_detail_contact_civilite, setp_one_detail_contact_civilite] = useState(); + const [p_one_detail_contact_nom, setp_one_detail_contact_nom] = useState(); + const [p_one_detail_contact_email, setp_one_detail_contact_email] = useState(); + const [p_one_detail_contact_telephone, setp_one_detail_contact_telephone] = useState(); + + const [p_one_detail_commentaire, setp_one_detail_commentaire] = useState(); + const [p_one_detail_vendeur_id, setp_one_detail_vendeur_id] = useState(); + const [p_one_detail_statut, setp_one_detail_statut] = useState(); + const [p_one_detail_date_fermeture, setp_one_detail_date_fermeture] = useState(); + + + + + const [p_detail_titre, setp_detail_titre] = useState(); + const [p_detail_description, setp_detail_description] = useState(); + const [p_detail_revenu_cible, setp_detail_revenu_cible] = useState(); + const [p_detail_probabilite_gain, setp_detail_probabilite_gain] = useState(""); + const [p_detail_priorite, setp_detail_priorite] = useState(); + + const [p_detail_partner_client_id, setp_detail_partner_client_id] = useState(); + const [p_detail_contact_civilite, setp_detail_contact_civilite] = useState(); + const [p_detail_contact_nom, setp_detail_contact_nom] = useState(); + const [p_detail_contact_email, setp_detail_contact_email] = useState(); + const [p_detail_contact_telephone, setp_detail_contact_telephone] = useState(); + + const [p_detail_commentaire, setp_detail_commentaire] = useState(); + const [p_detail_vendeur_id, setp_detail_vendeur_id] = useState(); + const [p_detail_statut, setp_detail_statut] = useState(); + const [p_detail_date_fermeture, setp_detail_date_fermeture] = useState(); + + function clear_detail_fields() { + setp_detail_titre(""); + setp_detail_description(""); + setp_detail_revenu_cible(""); + setp_detail_probabilite_gain(""); + setp_detail_priorite(""); + setp_detail_partner_client_id(""); + setp_detail_contact_civilite(""); + setp_detail_contact_nom(""); + setp_detail_contact_email(""); + setp_detail_contact_telephone(""); + setp_detail_commentaire(""); + setp_detail_vendeur_id(""); + setp_detail_statut(""); + setp_detail_date_fermeture(date_today_90j.toLocaleDateString('fr-FR')); + + } + + function clear_One_detail_fields() { + setp_one_detail_titre(""); + setp_one_detail_description(""); + setp_one_detail_revenu_cible(""); + setp_one_detail_probabilite_gain(""); + setp_one_detail_priorite(""); + setp_one_detail_partner_client_id(""); + setp_one_detail_contact_civilite(""); + setp_one_detail_contact_nom(""); + setp_one_detail_contact_email(""); + setp_one_detail_contact_telephone(""); + setp_one_detail_commentaire(""); + setp_one_detail_vendeur_id(""); + setp_one_detail_statut(""); + setp_one_detail_date_fermeture(date_today_90j.toLocaleDateString('fr-FR')); + + } + + const [Update_Crm_Opportunite_api, setUpdate_Crm_Opportunite_api] = useState(); + const [Update_Crm_Opportunite_message, setUpdate_Crm_Opportunite_message] = useState(); + const [Update_Crm_Opportunite_result, setUpdate_Crm_Opportunite_result] = useState(); + function Update_Crm_Opportunite() { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("titre", p_detail_titre); + form.append("description", p_detail_description); + form.append("statut", p_detail_statut); + + form.append("opport_id", selected_id); + + if (p_detail_revenu_cible) + form.append("revenu_cible", p_detail_revenu_cible); + else + form.append("revenu_cible", ""); + + + if (p_detail_probabilite_gain) + form.append("probabilite_gain", p_detail_probabilite_gain); + else + form.append("probabilite_gain", ""); + + + if (p_detail_priorite) + form.append("priorite", p_detail_priorite); + else + form.append("priorite", ""); + + if (p_detail_commentaire) + form.append("commentaire", p_detail_commentaire); + else + form.append("commentaire", ""); + + + if (p_detail_vendeur_id) + form.append("vendeur_id", p_detail_vendeur_id); + else + form.append("vendeur_id", ""); + + if (p_detail_date_fermeture) + form.append("date_fermeture", p_detail_date_fermeture); + else + form.append("date_fermeture", ""); + + if (p_detail_partner_client_id) + form.append("partner_client_id", p_detail_partner_client_id); + else + form.append("partner_client_id", ""); + + if (p_detail_contact_civilite) + form.append("contact_civilite", p_detail_contact_civilite); + else + form.append("contact_civilite", ""); + + + if (p_detail_contact_nom) + form.append("contact_nom", p_detail_contact_nom); + else + form.append("contact_nom", ""); + + + if (p_detail_contact_email) + form.append("contact_email", p_detail_contact_email); + else + form.append("contact_email", ""); + + + if (p_detail_contact_telephone) + form.append("contact_telephone", p_detail_contact_telephone); + else + form.append("contact_telephone", ""); + + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_CRM_Opportunite/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_Crm_Opportunite res.data.status = " + res.data.status); + //console.log(" In Update_Crm_Opportunite res.data.message r_class = " + res.data.message); + + setLoading(false); + if (String(res.data.status) === String("true")) { + setUpdate_Crm_Opportunite_api("true"); + setUpdate_Crm_Opportunite_result(res.data.message); + + Getall_Partner_CRM_Opport_Step(); + Getall_Partner_CRM_Opportunite(); + + setgridline_id(''); + clear_detail_fields(); + alert(res.data.message); + + + if (document.getElementById('myRef_head')) { + var divh = document.getElementById('myRef_head').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } + + } + else { + setUpdate_Crm_Opportunite_api("false"); + setUpdate_Crm_Opportunite_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + setLoading(false); + console.warn('UpdateStagiaireData : Not good man :( Update_Crm_Opportunite = ' + error); + setUpdate_Crm_Opportunite_api("false"); + alert(" Impossible de mettre à jour l'opportunité"); + + }) + } + + const [Update_Crm_Opportunite_Status_api, setUpdate_Crm_Opportunite_Status_api] = useState(); + const [Update_Crm_Opportunite_Status_message, setUpdate_Crm_Opportunite_Status_message] = useState(); + const [Update_Crm_Opportunite_Status_result, setUpdate_Crm_Opportunite_Status_result] = useState(); + function Update_Crm_Opportunite_Status(local_opport_id, new_status) { + var form = new FormData(); + //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA"); + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("statut", new_status); + form.append("opport_id", local_opport_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_CRM_Opportunite/"; + + setLoading(true); + axios.post(myurl, form).then(res => { + //console.log(" In Update_Crm_Opportunite_Status res.data.status = " + res.data.status); + //console.log(" In Update_Crm_Opportunite_Status res.data.message r_class = " + res.data.message); + + //setLoading(false); + if (String(res.data.status) === String("true")) { + setUpdate_Crm_Opportunite_Status_api("true"); + setUpdate_Crm_Opportunite_Status_result(res.data.message); + + Getall_Partner_CRM_Opport_Step(); + Getall_Partner_CRM_Opportunite(); + + setgridline_id(''); + clear_detail_fields(); + Getall_Partner_CRM_Opportunite(); + + + + } + else { + setUpdate_Crm_Opportunite_Status_api("false"); + setUpdate_Crm_Opportunite_Status_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + //setLoading(false); + console.warn('UpdateStagiaireData : Not good man :( Update_Crm_Opportunite_Status = ' + error); + setUpdate_Crm_Opportunite_Status_api("false"); + alert(" Impossible de mettre à jour l'opportunité"); + + }) + } + + + function handleClick_edit_Opportunite_From_Line(selected_row_id) { + + //console.log("### selected_row_id = ", selected_row_id); + + + var line = JSON.parse(Getall_Partner_CRM_Opportunite_result[selected_row_id]); + + //console.log("### line = ", line); + var opportunite_id = line._id; + setselected_id(opportunite_id); + + //console.log(" ### employe_id = ", employe_id); + Get_Given_Opportunite_Data(opportunite_id); + setDialog_OPPORTUNITE_open(true); + + + } + + const [Get_Given_Opportunite_Data_api, setGet_Given_Opportunite_Data_api] = useState(); + const [Get_Given_Opportunite_Data_message, setGet_Given_Opportunite_Data_message] = useState(); + const [Get_Given_Opportunite_Data_result, setGet_Given_Opportunite_Data_result] = useState(); + function Get_Given_Opportunite_Data(local_opportunite_id) { + + + var form = new FormData(); + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("opport_id", local_opportunite_id); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_Given_CRM_Opportunite/"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === "true") { + //console.log(" In Get_Given_Opportunite_Data res.data.status = " + res.data.status); + //console.log(" In Get_Given_Opportunite_Data res.data.message r_class = " + res.data.message); + setGet_Given_Opportunite_Data_api("true"); + setGet_Given_Opportunite_Data_result(res.data.message); + + if (res.data.message.length > 0) { + var mylocal_opportunite = JSON.parse(res.data.message); + + + if (mylocal_opportunite.titre) + setp_detail_titre(mylocal_opportunite.titre); + + + if (mylocal_opportunite.description) + setp_detail_description(mylocal_opportunite.description); + + + if (mylocal_opportunite.revenu_cible) + setp_detail_revenu_cible(mylocal_opportunite.revenu_cible); + + if (mylocal_opportunite.probabilite_gain) + setp_detail_probabilite_gain(mylocal_opportunite.probabilite_gain); + + + if (mylocal_opportunite.priorite) + setp_detail_priorite(mylocal_opportunite.priorite); + + + + if (mylocal_opportunite.partner_client_id) + setp_detail_partner_client_id(mylocal_opportunite.partner_client_id); + + if (mylocal_opportunite.contact_civilite) + setp_detail_contact_civilite(mylocal_opportunite.contact_civilite); + + + if (mylocal_opportunite.contact_nom) + setp_detail_contact_nom(mylocal_opportunite.contact_nom); + + + if (mylocal_opportunite.contact_email) + setp_detail_contact_email(mylocal_opportunite.contact_email); + + + if (mylocal_opportunite.contact_telephone) + setp_detail_contact_telephone(mylocal_opportunite.contact_telephone); + + + if (mylocal_opportunite.commentaire) + setp_detail_commentaire(mylocal_opportunite.commentaire); + + if (mylocal_opportunite.vendeur_id) + setp_detail_vendeur_id(mylocal_opportunite.vendeur_id); + + if (mylocal_opportunite.statut) + setp_detail_statut(mylocal_opportunite.statut); + + if (mylocal_opportunite.date_fermeture) + setp_detail_date_fermeture(mylocal_opportunite.date_fermeture); + + + + } else { + alert(" Aucune opportunité récuperée"); + } + + + } else if (String(res.data.status) === String("Err_Connexion")) { + alert('Erreur: ' + res.data.message); + history.push("/Connexion"); + } + + else { + setGet_Given_Opportunite_Data_api("false"); + setGet_Given_Opportunite_Data_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Get_Given_Opportunite_Data = ', error); + setGet_Given_Opportunite_Data_api("false"); + alert(" Impossible de recuperer les données de l'opportunité"); + //setmyApimyApiMessage("") + }) + } + + + // MySy Comment : design d'une tache (couleur, taille, etc) + const classes = { + board: { + display: "flex", + margin: "0 auto", + width: "100%", + fontFamily: 'Arial, "Helvetica Neue", sans-serif' + }, + column: { + minWidth: 200, + width: "16vw", + height: "80vh", + margin: "0 auto", + backgroundColor: "#212F3D", + border: 'double #32a1ce', + + }, + columnHead: { + textAlign: "center", + padding: 10, + fontSize: "1.2em", + backgroundColor: "#C6D8AF", + border: "red", + }, + item: { + padding: 10, + margin: 10, + fontSize: "0.8em", + cursor: "pointer", + backgroundColor: "white" + } + }; + + + const KanbanColumn = ({ status, changeTaskStatus, children }) => { + const ref = useRef(null); + const [, drop] = useDrop({ + accept: "card", + drop(item) { + changeTaskStatus(item.id, status); + } + }); + drop(ref); + return
{children}
; + }; + + const KanbanItem = ({ id, children }) => { + const ref = useRef(null); + + + const [{ isDragging }, drag] = + useDrag({ + type: "card", + item: () => ({ id }), + collect: monitor => ({ + isDragging: monitor.isDragging() + }) + }); + + const opacity = isDragging ? 0 : 1; + drag(ref); + return ( +
+ {children} +
+ ); + }; + + const [tasks, setTaskStatus] = useState([]); + + // MySy Comment : quand on change la position d'une tache, dans cette fonction on appel l'api de mise à jour + const changeTaskStatus = useCallback( + (id, status) => { + let task = tasks.find(task => task._id === id); + const taskIndex = tasks.indexOf(task); + task = { ...task, status }; + let newTasks = update(tasks, { + [taskIndex]: { $set: task } + }); + + setTaskStatus(newTasks); + Update_Crm_Opportunite_Status(id, status); + + }, + [tasks] + ); + + + const [Dialog_OPPORTUNITE_open, setDialog_OPPORTUNITE_open] = React.useState(false); + const Dialog_OPPORTUNITE_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); + }; + + const Dialog_OPPORTUNITE_handleClose_buton = () => { + + setDialog_OPPORTUNITE_open(false); + clear_One_detail_fields(); + clear_detail_fields(); + }; + + const New_Option_Proba_Gain = [ + { "id": "faible", "label": "Faible", "value": "faible" }, + { "id": "moyen", "label": "Moyen", "value": "moyen" }, + { "id": "fort", "label": "Fort", "value": "fort" }, + { "id": "inconnu", "label": "Inconnu", "value": "inconnu" }, + { "id": "", "label": "", "value": "" }, + ] + + + const [opport_changed, setopport_changed] = useState("0"); + + const [display_view, setdisplay_view] = useState("kanban"); + function func_display_kanban_view() { + setdisplay_view("kanban"); + } + + function func_display_list_view() { + setdisplay_view("list"); + } + + + return ( +
+ + {isLoading &&
+
+
} + + + + MySy Information + + + {Dialog_1_message} + + + + + + + + + + + + {/* Dialog pour gerer une OPPORTUNITE */} + + + MySy Information + + + {Dialog_1_message} + + + +
Titre
+ { + setp_detail_titre(e.target.value); + setopport_changed("1"); + } + } + /> + + +
+ + +
Statut
+ {New_Option_Status && New_Option_Status.length > 0 && + p_detail_statut && String(p_detail_statut).length > 2 && (data).value === String(p_detail_statut))[0].label} + options={New_Option_Status} + onChange={(event, value) => { + if (value && value.value) { + setp_detail_statut(value.value); + } else { + setp_detail_statut("") + } + + + }} + + renderInput={(params) => + } + />} + + {/* { + setp_detail_titre(e.target.value); + setopport_changed("1"); + } + } + />*/} + + +
+ + +
Probabilité de Gain
+ + {New_Option_Proba_Gain && (data).value === String(p_detail_probabilite_gain))[0].label} + onChange={(event, value) => { + if (value && value.value) { + setp_detail_probabilite_gain(value.value); + } else { + setp_detail_probabilite_gain(""); + } + setopport_changed("1"); + }} + renderInput={(params) => + } + />} + + +
+ + +
Montant Gain (estimé) + { + setp_detail_revenu_cible(e.target.value); + setopport_changed("1"); + } + } + /> + +
+ +
Priorité  
+ + + +
+ + +
Date Fermeture
+ { + setp_detail_date_fermeture(format(date, 'd/MM/yyyy')); + setopport_changed("1"); + + } + } + showTimeSelect={false} + dateFormat="dd/MM/yyyy" + className="disabled_style" + + locale='fr-FR' + + /> + +
+ + +
+ + +
+
+ +
+ + + +
+ +
+
+ +
+ +
+ {/* FIN Dialog pour gerer une OPPORTUNITE */} + +

Vos Opportunités

+ +
+ Affichage : + +
+ + + {String(display_view) === "list" &&
+
+
+ +
+   + + { + setSelectionModel(newSelectionModel); + /*if (newSelectionModel.length === 1) + handleClick_edit_materiel_From_Line(newSelectionModel); + */ + if (newSelectionModel.length !== 1) { + setsubmenu(); + //setdisplay_detail_materiel(); + //setadd_One_Materiel(); + } + }} + selectionModel={selectionModel} + + localeText={frFR.components.MuiDataGrid.defaultProps.localeText} + rows={Getall_Partner_CRM_Opportunite_result.map((item, index) => ( + { + id: index, + _id: JSON.parse(item)._id, + partner_client_id: JSON.parse(item).partner_client_id, + titre: JSON.parse(item).titre, + description: JSON.parse(item).description, + statut: JSON.parse(item).statut, + contact_nom: JSON.parse(item).contact_nom, + contact_email: JSON.parse(item).contact_email, + revenu_cible: JSON.parse(item).revenu_cible, + probabilite_gain: JSON.parse(item).probabilite_gain, + priorite: JSON.parse(item).priorite, + + } + ))} + + columns={columns} + pageSize={10} + className="datagridclass" + + onRowDoubleClick={(newSelectionModel) => { + clear_detail_fields(); + setgridline_id(newSelectionModel.row.id); + handleClick_edit_Opportunite_From_Line(newSelectionModel.row.id); + + }} + + + rowsPerPageOptions={[10]} + //disableSelectionOnClick + components={{ + Toolbar: GridToolbar, + }} + //sx={datagridSx} + getCellClassName={(params) => { + //field === 'distantiel' + if (params.field === 'distantiel' && String(params.value) === "1") { + return 'cell--distantiel'; + } + if (params.field === "presentiel" && String(params.value) == "1") { + return 'cell--presentiel'; + } + + + //field === "statut" + if (params.field === "status" && String(params.value) == "0") { + return 'cell--statut--preinscrit'; + } + + if (params.field === "status" && String(params.value) == "1") { + return 'cell--statut--inscrit'; + } + + if (params.field === "status" && String(params.value) == "-1") { + return 'cell--statut--annule'; + } + + }} + getRowClassName={(params) => { + + if (String(params.row.status) === "-1") { + return 'line--statut--annule'; + } + if (String(params.row.status) === "0") { + return 'line--statut--preinscrit'; + } + if (String(params.row.status) === "1") { + return 'line--statut--inscrit'; + } + + // 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'; + } + + }} + + + /> + +
+ +
+ +
+ +
+ +
+ +
+ + { + } + + + + +
+ {session_file_name && } + {String(liste_sessions_file_change_api) === String("true") && } + {String(liste_sessions_file_change_api) === String("false") && } + + +
+ + +
+
 
+ + +
} + +
 
+ + {String(display_view) !== "list" &&
  Affichage Kanban + +
+ {Opportunite_chanel.map(channel => ( + +
+
{Opportunite_chanel_label[channel]}
+
+ {tasks + .filter(item => item.status === channel) + .map(item => ( + + +
{ + clear_detail_fields(); + + setselected_id(item._id) + + Get_Given_Opportunite_Data(item._id); + setDialog_OPPORTUNITE_open(true); + + // iciiiii + }} + > + + + + +
+ {String(item.description).substring(0, 20)}...
+ +
+ +
+ ))} +
+
+
+ ))} +
+
+
 
+
+ +
+ + { + } + + + + +
+ {session_file_name && } + {String(liste_sessions_file_change_api) === String("true") && } + {String(liste_sessions_file_change_api) === String("false") && } + + +
+ + +
+
 
+ +
} +
+ ); +} + +export default CRM_Opportunite; diff --git a/src/components/Employes.js b/src/components/Employes.js index d33c4ec..7e26e70 100644 --- a/src/components/Employes.js +++ b/src/components/Employes.js @@ -103,17 +103,17 @@ const Employes = (props) => { date_today_90j.setDate(date_today_90j.getDate() + 90); - const [p_filtre1, setp_filtre1] = useState(); - const [p_filtre1_value, setp_filtre1_value] = useState(); + const [p_filtre1, setp_filtre1] = useState(""); + const [p_filtre1_value, setp_filtre1_value] = useState(""); - const [p_filtre2, setp_filtre2] = useState(); - const [p_filtre2_value, setp_filtre2_value] = useState(); + const [p_filtre2, setp_filtre2] = useState(""); + const [p_filtre2_value, setp_filtre2_value] = useState(""); - const [p_filtre3, setp_filtre3] = useState(); - const [p_filtre3_value, setp_filtre3_value] = useState(); + const [p_filtre3, setp_filtre3] = useState(""); + const [p_filtre3_value, setp_filtre3_value] = useState(""); - const [p_filtre4, setp_filtre4] = useState(); - const [p_filtre4_value, setp_filtre4_value] = useState(); + const [p_filtre4, setp_filtre4] = useState(""); + const [p_filtre4_value, setp_filtre4_value] = useState(""); @@ -241,7 +241,7 @@ const Employes = (props) => { const columns_employee_affectation = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'poste', headerName: 'Poste', flex: 1, }, + { field: 'poste', headerName: 'Poste', flex: 1, }, { field: 'date_du', headerName: 'Du', width: 150, hide: false, }, { field: 'date_au', headerName: 'Au', width: 150, hide: false, }, { field: 'related_target_collection_object', headerName: 'Cible', flex: 1, hide: false, }, @@ -316,7 +316,7 @@ const Employes = (props) => { const columns_employee_acces_right = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'module', headerName: 'Module', flex: 1, }, + { field: 'module', headerName: 'Module', flex: 1, }, { field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: true, type: 'boolean', }, @@ -330,7 +330,7 @@ const Employes = (props) => { const columns_employee_acces_right_v2 = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'module', headerName: 'Module', flex: 1, }, + { field: 'module', headerName: 'Module', flex: 1, }, { field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: true, type: 'boolean', @@ -352,7 +352,7 @@ const Employes = (props) => { const columns_employee_contrat = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'rh_id', headerName: 'rh_id', flex: 1, hide: true, }, + { field: 'rh_id', headerName: 'rh_id', flex: 1, hide: true, }, { field: 'date_debut', headerName: 'Du', width: 150, hide: false, }, { field: 'date_fin', headerName: 'Au', width: 150, hide: false, }, { field: 'type_contrat', headerName: 'Type Contrat', flex: 1, hide: false, width: 150, }, @@ -447,7 +447,7 @@ const Employes = (props) => { const columns_employee_acces_right_disabled = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'module', headerName: 'Module', flex: 1, }, + { field: 'module', headerName: 'Module', flex: 1, }, { field: 'read', headerName: 'Lecture', width: 150, hide: false, editable: false, type: 'boolean', @@ -669,17 +669,17 @@ const Employes = (props) => { function clean_all_filters() { setgridline_id(''); - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(""); + setp_filtre2_value(""); - setp_filtre3(); - setp_filtre3_value(); + setp_filtre3(""); + setp_filtre3_value(""); - setp_filtre4(); - setp_filtre4_value(); + setp_filtre4(""); + setp_filtre4_value(""); setdisplay_affectation(""); setAdd_new_affectation(""); @@ -4680,6 +4680,15 @@ const Employes = (props) => { }) } + const New_Option_Filter = [ + { "id": "nom", "label": "Nom ", "value": "nom" }, + { "id": "email", "label": "Email ", "value": "email" }, + { "id": "formation", "label": "Lié a la Formation (code externe) ", "value": "formation" }, + { "id": "session", "label": "Lié a la Session (code session) ", "value": "session" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + return (
@@ -5302,7 +5311,30 @@ const Employes = (props) => {
Utilisez les filtres !
- 0 && (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { Lié a la Session (code session)   - + */}
@@ -5368,8 +5400,8 @@ const Employes = (props) => {   { - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); }} /> @@ -5381,7 +5413,30 @@ const Employes = (props) => { {p_filtre2 &&
- 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { Lié a la Session (code session)   - + */}
{String(p_filtre2).length > 2 && @@ -5448,8 +5503,8 @@ const Employes = (props) => {   { - setp_filtre2(); - setp_filtre2_value(); + setp_filtre2(""); + setp_filtre2_value(""); }} /> @@ -5462,7 +5517,30 @@ const Employes = (props) => { {p_filtre3 &&
- 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + {/* { Lié a la Session (code session)   - + */}
{String(p_filtre3).length > 2 && @@ -5527,8 +5605,8 @@ const Employes = (props) => {   { - setp_filtre3(); - setp_filtre3_value(); + setp_filtre3(""); + setp_filtre3_value(""); }} />
} @@ -5687,7 +5765,7 @@ const Employes = (props) => { '& .line--statut--impair': { backgroundColor: '#FFFFFF', color: 'black', - }, + }, [`& .${gridClasses.cell}`]: { py: 1, }, @@ -6295,10 +6373,10 @@ const Employes = (props) => { } }} - renderInput={(params) => + /> } /> @@ -6427,7 +6505,7 @@ const Employes = (props) => { }} renderInput={(params) => } @@ -7081,9 +7159,9 @@ const Employes = (props) => { }} renderInput={(params) => + /> } /> @@ -7396,7 +7474,7 @@ const Employes = (props) => { }} renderInput={(params) => } @@ -7469,9 +7547,9 @@ const Employes = (props) => { }} renderInput={(params) => + /> } /> @@ -7515,10 +7593,10 @@ const Employes = (props) => { } }} - renderInput={(params) => + /> } /> @@ -7769,7 +7847,7 @@ const Employes = (props) => { className="detail_class_submenu bton_add_session" id='menu_add_participant' name='menu_add_participant'>Ajout 1 affectation   - +
@@ -8236,10 +8314,10 @@ const Employes = (props) => { } }} - renderInput={(params) => + /> } /> diff --git a/src/components/Materiel_Salle.js b/src/components/Materiel_Salle.js index a0bbf7a..66b12dc 100644 --- a/src/components/Materiel_Salle.js +++ b/src/components/Materiel_Salle.js @@ -3035,6 +3035,7 @@ const Materiel_Salle = (props) => { > { setSelectionModel(newSelectionModel); /*if (newSelectionModel.length === 1) diff --git a/src/components/Materiels.js b/src/components/Materiels.js index 4ef0dd5..41e4b0f 100644 --- a/src/components/Materiels.js +++ b/src/components/Materiels.js @@ -2751,6 +2751,7 @@ const Materiels = (props) => { > { setSelectionModel(newSelectionModel); /*if (newSelectionModel.length === 1) diff --git a/src/components/Module_Absence.js b/src/components/Module_Absence.js index 2a6f2d2..8cdd45c 100644 --- a/src/components/Module_Absence.js +++ b/src/components/Module_Absence.js @@ -229,7 +229,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).event_type), 'justified': String(JSON.parse(obj).justified), } @@ -544,7 +544,7 @@ const Module_Absence = (props) => { ]); }*/ }; - + const handleSelect_list = (info) => { @@ -649,7 +649,7 @@ const Module_Absence = (props) => { const handleEventClick_from_list = (selected_row_id) => { - var line = JSON.parse(mysy_list_event_for_map[selected_row_id]); + var line = JSON.parse(mysy_list_event_for_map[selected_row_id]); @@ -718,12 +718,12 @@ const Module_Absence = (props) => { } - -const [Partner_Debut_Journee, setPartner_Debut_Journee] = useState("7:00"); -const [Partner_Fin_Journee, setPartner_Fin_Journee] = useState("20:00"); + + const [Partner_Debut_Journee, setPartner_Debut_Journee] = useState("7:00"); + const [Partner_Fin_Journee, setPartner_Fin_Journee] = useState("20:00"); -const [Get_Partner_Debut_Fin_Journee_api, setGet_Partner_Debut_Fin_Journee_api] = useState(); + const [Get_Partner_Debut_Fin_Journee_api, setGet_Partner_Debut_Fin_Journee_api] = useState(); const [Get_Partner_Debut_Fin_Journee_message, setGet_Partner_Debut_Fin_Journee_message] = useState(); const [Get_Partner_Debut_Fin_Journee_result, setGet_Partner_Debut_Fin_Journee_result] = useState(); function Get_Partner_Debut_Fin_Journee(event) { @@ -746,7 +746,7 @@ const [Get_Partner_Debut_Fin_Journee_api, setGet_Partner_Debut_Fin_Journee_api] setGet_Partner_Debut_Fin_Journee_api("true"); setGet_Partner_Debut_Fin_Journee_result(res.data.message); - + var val_json = JSON.parse(res.data.message); if (JSON.parse(res.data.message).planning_debut_journee) @@ -755,7 +755,7 @@ const [Get_Partner_Debut_Fin_Journee_api, setGet_Partner_Debut_Fin_Journee_api] if (JSON.parse(res.data.message).planning_fin_journee) setPartner_Fin_Journee(String(JSON.parse(res.data.message).planning_fin_journee)) - + } else if (String(res.data.status) === String("Err_Connexion")) { alert('Erreur: ' + res.data.message); @@ -1190,8 +1190,10 @@ const [Get_Partner_Debut_Fin_Journee_api, setGet_Partner_Debut_Fin_Journee_api]

Planning

-
Affichage : -
+
+ Affichage : + +
{/*
diff --git a/src/components/Partner.js b/src/components/Partner.js index 1eb4c8e..ed3d990 100644 --- a/src/components/Partner.js +++ b/src/components/Partner.js @@ -29,6 +29,7 @@ import { FaHandPointRight } from "react-icons/fa"; import OrderConfirmation from "./OrderConfirmation"; import Partner_Client from "./Partner_Client"; import Pricing from "./Pricing"; +import { MdAddShoppingCart } from "react-icons/md"; import { FcHome, FcButtingIn, FcDepartment, FcBullish, FcAddDatabase, FcFolder, FcList, FcGraduationCap, FcMultipleDevices, FcCurrencyExchange, @@ -58,6 +59,7 @@ import Dashbord_Session from "./Dashbord_Session"; import Dashbord_Ressources_Humaines from "./Dashbord_Ressources_Humaines"; import Dashbord_Inscriptions from "./Dashbord_Inscription"; import Materiel_Salle from "./Materiel_Salle"; +import CRM_Opportunite from "./Crm_Opportunite"; import Mon_Tableau_De_Bord from "./Mon_Tableau_De_Bord"; import Dashbord_Formation from "./Dashbord_Formation"; @@ -329,7 +331,7 @@ const Partner = (props) => { 'mes_stagiaires', 'mes_employes', 'mon_materiel', 'config_document', 'factures_client', "config_technique", "config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashbord_formation", "dashbord_session", "mon_tableau_de_bord", "prix_achat", "mes_apprenants", "dashbord_ressources_humaines", - "dashbord_inscriptions", "mes_salles"] + "dashbord_inscriptions", "mes_salles", "mes_opportunites"] if (action && list_menu.includes(action)) { @@ -691,6 +693,20 @@ const Partner = (props) => { } + function Display_mes_opportunites_func(event) { + var security_retval = check_user_acces_right("client", "read"); + + if (security_retval === 1) { + setmenu("mes_opportunites"); + setapiexcelimportmessage(); + setformation_file_name(); + document.body.style.backgroundColor = "#ffffff"; + history.push("/Partner/mes_opportunites"); + } else { + Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion du matériel pédagogique"); + } + } + function config_dashbord_formation_func(event) { var security_retval = check_user_acces_right("dashbord", "read"); @@ -1257,8 +1273,8 @@ const Partner = (props) => {
- -
} + {String(menu) === "mes_opportunites" && +
+ + +
+ } + {String(menu) === "mes_cmd" &&
@@ -1705,6 +1734,8 @@ const Partner = (props) => {
} + + {String(menu) === "config_document" &&
@@ -1902,7 +1933,6 @@ const Partner = (props) => {

+ +

@@ -2211,6 +2250,13 @@ const Partner = (props) => {
} + {String(menu) === "mes_opportunites" && +
+ + +
+ } + {String(menu) === "mes_cmd" &&
@@ -2264,6 +2310,14 @@ const Partner = (props) => {
} + {String(menu) === "mes_opportunites" &&
+ + + +
+ } + {String(menu) === "config_document" &&
diff --git a/src/pages/test_dnd.js b/src/pages/test_dnd.js index afede5f..3a0c286 100644 --- a/src/pages/test_dnd.js +++ b/src/pages/test_dnd.js @@ -24,12 +24,12 @@ const tasksList = [ const channels = ["backlog", "new", "wip", "review", "done", "MySy"]; const labelsMap = { - backlog: "Backlog", + "backlog": "Backlog", new: "To Do", wip: "In Progress", review: "Review", done: "Done", - MySy: "MySy Task" + "MySy": "MySy Task" }; @@ -47,9 +47,9 @@ const classes = { height: "80vh", margin: "0 auto", backgroundColor: "#212F3D", - border:'double #32a1ce', + border: 'double #32a1ce', + - }, columnHead: { textAlign: "center", @@ -71,7 +71,7 @@ const Kanban = () => { const [tasks, setTaskStatus] = useState(tasksList); -// MySy Comment : quand on change la position d'une tache, dans cette fonction on appel l'api de mise à jour + // MySy Comment : quand on change la position d'une tache, dans cette fonction on appel l'api de mise à jour const changeTaskStatus = useCallback( (id, status) => { let task = tasks.find(task => task._id === id); @@ -105,8 +105,8 @@ const Kanban = () => { .filter(item => item.status === channel) .map(item => ( -
{item.title}
buton_edit
- +
{item.title}
buton_edit
+
))}
@@ -138,14 +138,14 @@ const KanbanItem = ({ id, children }) => { const [{ isDragging }, drag] = - useDrag({ - type: "card", - item: () => ({id}), - collect: monitor => ({ - isDragging: monitor.isDragging() - }) - }); - + useDrag({ + type: "card", + item: () => ({ id }), + collect: monitor => ({ + isDragging: monitor.isDragging() + }) + }); + const opacity = isDragging ? 0 : 1; drag(ref); return ( diff --git a/src/styles/components/_apprenant.scss b/src/styles/components/_apprenant.scss index 64f747a..b80e79b 100644 --- a/src/styles/components/_apprenant.scss +++ b/src/styles/components/_apprenant.scss @@ -2657,7 +2657,6 @@ .session_caract_Dialog_DatePicker { - width: 99% !important; background-color: #FFFFFF; } diff --git a/src/styles/components/_crm_opportunite.scss b/src/styles/components/_crm_opportunite.scss new file mode 100644 index 0000000..2de6a0a --- /dev/null +++ b/src/styles/components/_crm_opportunite.scss @@ -0,0 +1,2249 @@ +.crm_opportunite { + + + + .switch{ + height: 1.5rem !important; + } + + .label{ + width: 5rem !important; + } + .tooltip_css { + background: #81BC3A; + z-index: 9999; + } + + + .Mui-disabled { + font-size: small !important; + padding: 0px !important; + padding-left: 5px !important; + } + + + + @media screen and (max-width: 600px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + + width: 100%; + border-radius: 10rem !important; + text-align: left; + + margin: 0px !important; + margin-bottom: 0.5rem !important; + margin-top: 0.5rem !important; + } + + .div_row_droite { + width: 100%; + border-radius: 10rem !important; + text-align: left; + + margin: 0px !important; + margin-bottom: 0.5rem !important; + margin-top: 0.5rem !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 10.5rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + width: 100%; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + + + .training_caract { + width: 100%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 100%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + width: 100%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + + + .css-1x5jdmq { + padding: 6px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 100%; + height: 180px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .hr_break { + border: 2px solid grey; + } + + .icon_plus { + width: 6%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 100%; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 100% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 100%; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: smaller; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + padding-right: 10px; + } + + .img_class_logo { + display: block; + width: 128px; + height: 128px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 10rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 10rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 100% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 100% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 40% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .div_row { + float: left; + border-width: 0.01rem; + width: 100%; + + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + width: 100%; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite { + float: left; + width: 100%; + border-radius: 1rem; + text-align: left; + + } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 100%; + margin-left: 10px; + margin-right: 10px; + margin-bottom: 1rem !important; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: white; + margin-bottom: 1rem !important; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 100%; + color: black; + margin-bottom: 1rem !important; + } + + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 3.5rem !important; + + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + + } + + .training_caract { + width: 100%; + + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .block_en_mass { + width: 100%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_select { + width: 100%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 100%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + } + + @media only screen and (min-width: 601px) and (max-width: 991px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 11rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + + .training_caract { + width: 48%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + width: 50%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 80%; + background: #81BC3A; + } + + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 80%; + background-color: white; + color: #104277 !important; + } + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 200px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.3); + margin-left: 5rem; + } + + .hr_break { + border: 3px solid grey; + } + + .icon_plus { + width: 6%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 50%; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 65% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 80% !important; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 80%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 80%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + margin-top: 1rem !important; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + //margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + min-width: 15rem; + } + + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + padding-top: 0.5rem !important; + border: none !important; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .block_en_mass { + width: 50%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_select { + width: 45%; + float: left; + margin-bottom: 1rem; + } + + .block_en_mass_bton_action { + width: 45%; + float: left; + margin-bottom: 1rem; + padding-top: 0.5rem !important; + } + + } + + @media only screen and (min-width: 992px) and (max-width: 1199px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + width: 11rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5x !important; + } + + .css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input { + padding: 1px !important; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + width: 33%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .css-1x5jdm { + padding: 5px; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background: #81BC3A; + + } + + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background-color: white; + color: #104277 !important; + } + + .css-1x5jdmq { + padding: 6px !important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 180px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.3); + margin-left: 5rem; + } + + .hr_break { + border: 3px solid grey; + } + + .icon_plus { + width: 8%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 40%; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 50% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 80%; + } + + .icon_excel { + width: 6%; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 65%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 65%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 168px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .titre1 { + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + } + + @media only screen and (min-width: 1200px) { + .okUpdateData { + font-size: small; + color: green; + font-style: italic; + } + + .koUpdateData { + font-size: small; + color: red; + font-style: italic; + } + + .div_row { + float: left; + //border: 1px solid black; + border-width: 0.01rem; + width: 100%; + //margin-bottom: 1rem; + border-radius: 1rem; + } + + .div_row_gauche { + float: left; + // border:1px solid black; + // border-width:0.01rem; + width: 45%; + border-radius: 1rem; + } + + .div_row_droite { + float: right; + //border:1px solid black; + //border-width:0.01rem; + width: 45%; + border-radius: 1rem; + text-align: right; + } + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .titre1_aide_finance { + margin-top: 1rem; + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .pieddepage { + z-index: 50; + width: 100%; + float: left; + margin-top: 12rem; + } + + .div_mobile { + position: absolute; + top: 8rem; + z-index: 1; + width: 100%; + } + + .zone_data { + width: 95%; + margin-left: auto; + margin-right: auto; + } + + .detail_class_submenu { + background: #d8edfc; + border-radius: 15px; + margin-right: 1rem; + padding: 0.3rem; + margin-bottom: 0.5rem; + min-width: 15rem; + text-align: center; + border: 1px solid #9cf; + color: #3b3e40; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + letter-spacing: 0.1rem; + font-weight: normal; + } + + .detail_class_submenu:hover:active, + .detail_class_submenu:hover { + background-color: #104277; + color: white; + } + + .detail_class_submenu:focus { + //border: 3px dotted green; + background-color: #104277; + color: white; + } + + .detail_class_submenu_data { + width: 100%; + min-height: 10rem; + background-color: #d8edfc; + padding-left: 5px; + text-align: left; + padding: 0; + border: 0px; + color: #3b3e40; + padding-left: 5px; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + border-radius: 10px; + border: 1px solid; + } + + .disabled_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 90% !important; + height: 3.5rem !important; + margin: 5px !important; + //border: none !important; + border-radius: 5px; + background: white; + border: solid gainsboro 1px; + } + + + + + .training_caract { + width: 30%; + padding: 5px; + float: left; + } + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input .Mui-disabled { + font: inherit; + letter-spacing: inherit; + color: currentColor; + border: 0; + box-sizing: content-box; + background: none; + background-color: rgba(0, 0, 0, 0); + margin: 0; + -webkit-tap-highlight-color: transparent; + display: block; + min-width: 0; + width: 100%; + -webkit-animation-name: mui-auto-fill-cancel; + animation-name: mui-auto-fill-cancel; + -webkit-animation-duration: 10ms; + animation-duration: 10ms; + height: 3rem !important; + padding: 0 !important; + padding-left: 5px !important; + } + + + + .selectsession { + width: 90%; + height: 3rem; + font-size: small; + border-radius: 0px !important; + } + + .session_data { + float: left; + width: 100%; + box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 1px 1px 10px 1px rgba(0, 0, 0, 0.5); + border-radius: 10px; + margin-top: 10px; + margin-bottom: 10px; + + + } + + .session_caract { + width: 33%; + padding: 5px; + float: left; + text-align: left; + font-size: small; + } + + .session_style { + //background-color: #ECEFF1; + font-size: small !important; + color: black; + width: 100% !important; + height: 2rem !important; + margin: 5px !important; + } + + .preview_certif { + display: block; + width: 90%; + height: 200px; + border-radius: 1rem !important; + margin-top: 1rem !important; + } + + .preview_certif:hover { + transform: scale(1.4); + margin-left: 10rem; + } + + + .action_mass { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + height: 2.5rem; + } + + + + .block_en_mass { + width: 50%; + float: left; + margin-bottom: 1rem; + } + + .session_open_close { + cursor: pointer; + text-align: right; + font-size: small; + margin-right: 10px; + } + + .hr_break { + border: 5px solid grey; + } + + .icon_plus { + width: 8%; + } + + .bton_add_session { + background: #c8cfd5; + color: black; + width: 25% !important; + height: 2rem !important; + } + + .bton_import_excel { + background: #c8cfd5; + color: black; + width: 40% !important; + height: 2rem !important; + } + + .div_row_gauche_etendu { + width: 80%; + } + + .icon_excel { + width: 4%; + } + + .bton_envoyer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background: #81BC3A; + } + + + .bton_traiter_en_mass { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 40%; + background: #81BC3A; + margin-left: 5%; + height: 2.5rem; + color: white; + + } + + .bton_fermer { + border-radius: 5px; + font-size: small; + padding: 0.3rem; + width: 60%; + background-color: white; + color: #104277 !important; + } + + + .enable_style { + background-color: #FFFFFF; + } + + + + .css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input:invalid { + padding-top: 5px !important; + padding-bottom: 5px !important; + padding-left: 5px !important; + } + + .css-1t10bd6-MuiFormControl-root-MuiTextField-root fieldset { + border-color: transparent !important; + border-radius: 20px !important; + } + + .bton_emarge { + border-radius: 5rem; + font-size: small; + padding: 0.5rem; + background: rgb(129, 188, 58); + margin-left: 5px; + margin-right: 5px; + } + + .css-1x5jdm { + padding: 5px; + } + + + .css-1x5jdmq { + padding: 6px !important; + height: 3rem ! important; + padding-bottom: 0px !important; + } + + .css-qiwgdb { + padding: 6px !important; + } + + + .bton_suppr { + background: transparent; + color: red; + border-radius: 5rem; + font-size: small; + text-align: center; + height: 2.5rem; + width: 40%; + margin-left: 10px; + margin-right: 10px; + } + + .bton_enreg { + border-radius: 5rem; + font-size: small; + background: #81BC3A !important; + text-align: center; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_edit { + border-radius: 5rem; + font-size: small; + background: black !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: white; + margin-left: 10px; + margin-right: 10px; + } + + .bton_annule { + border-radius: 5rem; + font-size: small; + background: lightgray !important; + text-align: right; + height: 2.5rem; + width: 40%; + color: black; + margin-left: 10px; + margin-right: 10px; + } + + + + .div_row_gauche_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + } + + .div_row_droite_image { + float: left; + //border:0px solid black; + border-width: 0.01rem; + border-radius: 1rem; + text-align: left; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + font-size: small; + padding-left: 0.2rem; + } + + .tips_img_class { + font-size: small; + font-style: italic; + margin-left: 1rem !important; + text-align: left; + float: left; + width: 100%; + } + + .img_class_logo { + display: block; + width: 170px; + height: 168px; + border-radius: 10px !important; + border: 1px solid black; + float: left; + } + + .bton_supprime_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + background: white; + color: red; + margin-top: 0.5rem; + width: 15rem; + cursor: pointer; + } + + .bton_supprime_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .bton_image_class { + font-size: small; + text-align: center; + margin-left: 0px; + box-shadow: 1px 1px 10px 1px rgb(0 0 0 / 15%); + padding: 5px; + padding-left: 10px; + padding-right: 10px; + border: 1px solid rgb(194, 186, 186); + border-radius: 10px; + width: 15rem; + cursor: pointer; + } + + .bton_image_class:hover { + box-shadow: 5px 1px 5px 1px rgb(0 0 0 / 25%); + } + + .tick_ok_ko { + max-width: 3%; + cursor: pointer; + padding-top: 4px; + } + + .texte_area { + float: left; + width: 47% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 1.5rem !important; + } + + .texte_area_filter { + float: left; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + } + + .texte_area_filter_value { + float: left !important; + width: 40% !important; + font-size: x-small !important; + font-family: "verdana", "Quicksand", "Signika", sans-serif; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + + } + + + .filter_bton_add { + float: left; + width: 5% !important; + font-size: xx-large !important; + margin: 0.4rem !important; + margin-top: 0px !important; + margin-bottom: 2px !important; + text-align: right; + cursor: pointer; + } + + + .titre1 { + font-family: "Quicksand", "Signika", sans-serif; + font-size: medium; + text-align: center; + margin-bottom: 0.8rem; + color: white; + cursor: pointer; + font-style: italic; + background-color: gray; + font-weight: normal; + } + + .file_ariane{ + font-size: large; + font-weight: 600; + width: 100%; + text-align: center; + } + + } + + .disabled_style_moitier { + width: 45% !important; + float: left; + } + + // end media + + .css-1v4ccyo { + height: 3.5rem !important; + font-size: small; + } + + + option { + font-weight: normal; + display: block; + white-space-collapse: collapse; + text-wrap: nowrap; + padding: 0px !important; + } + + .mysy_hr_text { + border: none; + border-top: 3px double #333; + color: #333; + overflow: visible; + text-align: center; + height: 5px; + } + + .mysy_hr_text:after { + background: #fff; + content: 'Détails'; + padding: 0 4px; + position: relative; + top: -13px; + } + + .MuiMenu-paper { + max-width: 30% !important; + } + + +} + +.MuiMenu-paper { + max-width: 30% !important; +} + +.tox-statusbar { + display: none !important; +} + + + + +.css-1x5jdmq { + height: 3rem !important; + font-size: small; +} + +.select_option_css { + border-radius: 0px !important; +} + +.css-9ddj71-MuiInputBase-root-MuiOutlinedInput-root { + height: 3.5rem !important; +} + + + +.react-datepicker__input-container { + width: 110%; +} + +.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + padding-left: 5px !important; +} \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index b6e8e09..40309b3 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -100,3 +100,4 @@ @import "./components/module_attestation_formation"; @import "./components/test_drag_drop"; @import "./components/materiel_salle"; +@import "./components/crm_opportunite";