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 (
@@ -2391,8 +2401,6 @@ function GestionAdministrative(props) {
} - ----- - {String(display_detail_insc) === "1" && mysession &&
Detail inscription
@@ -2595,6 +2603,7 @@ function GestionAdministrative(props) { dateFormat="dd/MM/yyyy HH:mm" className="disabled_style" locale='fr-FR' + />
@@ -2605,31 +2614,41 @@ function GestionAdministrative(props) { name="note_eval" id="note_eval" type="number" + + InputLabelProps={{ shrink: true, }} - inputProps={{ min: "0", max: "5", step: "1" }} - disabled={false} + inputProps={{ min: "0", max: "5", step: "1", readOnly: true, }} + className="disabled_style" />
Evaluation
- editorRef_evaluation.current = editor} + initialValue={field_evaluation} + onKeyUp={editor_keyup} + disabled = {true} - InputLabelProps={{ - shrink: true, + init={{ + resize: false, + + height: 100, + menubar: false, + plugins: [ + 'advlist autolink lists link image charmap print preview anchor', + 'searchreplace visualblocks code fullscreen', + 'insertdatetime media table paste code help wordcount' + ], + toolbar: false, + content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }' }} - maxRows={4} - rows={4} - disabled={false} - className="disabled_style" - /> + + +
@@ -2655,9 +2674,6 @@ function GestionAdministrative(props) { - - - } @@ -2674,7 +2690,7 @@ function GestionAdministrative(props) { name="certif_date" id="certif_date" selected={detailuser_date_certification} - + dateFormat="dd/MM/yyyy HH:mm" className="disabled_style" locale='fr-FR' @@ -2732,9 +2748,6 @@ function GestionAdministrative(props) { } - - - -----