diff --git a/src/components/GestionAdministrative.js b/src/components/GestionAdministrative.js index 5e37129..a2c59a7 100644 --- a/src/components/GestionAdministrative.js +++ b/src/components/GestionAdministrative.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect, } from "react"; +import React, { useState, useEffect, useRef} from "react"; import { useForm } from "react-hook-form"; import { getCookie, setCookie } from 'react-use-cookie'; import Box from '@mui/material/Box'; @@ -27,6 +27,9 @@ import { ConsoleView } from "react-device-detect"; import { confirmAlert } from 'react-confirm-alert'; import SendIcon from '@mui/icons-material/Send'; import { FcViewDetails } from "react-icons/fc"; +import parse from 'html-react-parser' +import { Editor } from '@tinymce/tinymce-react'; + function GestionAdministrative(props) { @@ -297,7 +300,7 @@ function GestionAdministrative(props) { ); } }, - + ] @@ -1650,7 +1653,7 @@ function GestionAdministrative(props) { if (mylocalattendee.email) { document.getElementsByName("detail_mail")[0].value = mylocalattendee.email; } - + document.getElementsByName("detail_tel")[0].value = ""; if (mylocalattendee.telephone) { @@ -1672,7 +1675,7 @@ function GestionAdministrative(props) { document.getElementsByName("detail_ville")[0].value = mylocalattendee.ville; } - + document.getElementsByName("detail_cout")[0].value = ""; if (mylocalattendee.price) { @@ -1692,20 +1695,21 @@ function GestionAdministrative(props) { } document.getElementsByName("date_evaluation")[0].value = ""; - if (mylocalattendee.date_evaluation) { + if (mylocalattendee.eval_date) { - var date_eval = new Date(moment(mylocalattendee.date_evaluation, "DD/MM/YYYY HH:mm:ss")); - setdetailuser_date_evaluation(date_eval); + var date_eval = new Date(moment(mylocalattendee.eval_date, "YYYY/MM/DD")); + setdetailuser_date_evaluation(date_eval); } document.getElementsByName("note_eval")[0].value = ""; - if (mylocalattendee.note_evaluation) { - document.getElementsByName("note_eval")[0].value = mylocalattendee.note_evaluation; + if (mylocalattendee.eval_note) { + document.getElementsByName("note_eval")[0].value = mylocalattendee.eval_note; } - document.getElementsByName("detail_evalution")[0].value = ""; - if (mylocalattendee.evaluation) { - document.getElementsByName("detail_evalution")[0].value = mylocalattendee.evaluation; + + if (mylocalattendee.eval_eval) { + setfield_evaluation(mylocalattendee.eval_eval); + } @@ -1811,6 +1815,12 @@ function GestionAdministrative(props) { } + const editorRef_evaluation = useRef(null); + const [field_evaluation, setfield_evaluation] = useState(""); + function editor_keyup() { + + } + return (