20/12/22 - 21h30

recette2
cherif 2022-12-20 22:12:05 +01:00
parent 6952e01f30
commit 9cb4b8bf95
1 changed files with 48 additions and 35 deletions

View File

@ -1,4 +1,4 @@
import React, { useState, useEffect, } from "react"; import React, { useState, useEffect, useRef} from "react";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { getCookie, setCookie } from 'react-use-cookie'; import { getCookie, setCookie } from 'react-use-cookie';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
@ -27,6 +27,9 @@ import { ConsoleView } from "react-device-detect";
import { confirmAlert } from 'react-confirm-alert'; import { confirmAlert } from 'react-confirm-alert';
import SendIcon from '@mui/icons-material/Send'; import SendIcon from '@mui/icons-material/Send';
import { FcViewDetails } from "react-icons/fc"; import { FcViewDetails } from "react-icons/fc";
import parse from 'html-react-parser'
import { Editor } from '@tinymce/tinymce-react';
function GestionAdministrative(props) { function GestionAdministrative(props) {
@ -297,7 +300,7 @@ function GestionAdministrative(props) {
); );
} }
}, },
] ]
@ -1650,7 +1653,7 @@ function GestionAdministrative(props) {
if (mylocalattendee.email) { if (mylocalattendee.email) {
document.getElementsByName("detail_mail")[0].value = mylocalattendee.email; document.getElementsByName("detail_mail")[0].value = mylocalattendee.email;
} }
document.getElementsByName("detail_tel")[0].value = ""; document.getElementsByName("detail_tel")[0].value = "";
if (mylocalattendee.telephone) { if (mylocalattendee.telephone) {
@ -1672,7 +1675,7 @@ function GestionAdministrative(props) {
document.getElementsByName("detail_ville")[0].value = mylocalattendee.ville; document.getElementsByName("detail_ville")[0].value = mylocalattendee.ville;
} }
document.getElementsByName("detail_cout")[0].value = ""; document.getElementsByName("detail_cout")[0].value = "";
if (mylocalattendee.price) { if (mylocalattendee.price) {
@ -1692,20 +1695,21 @@ function GestionAdministrative(props) {
} }
document.getElementsByName("date_evaluation")[0].value = ""; 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")); var date_eval = new Date(moment(mylocalattendee.eval_date, "YYYY/MM/DD"));
setdetailuser_date_evaluation(date_eval); setdetailuser_date_evaluation(date_eval);
} }
document.getElementsByName("note_eval")[0].value = ""; document.getElementsByName("note_eval")[0].value = "";
if (mylocalattendee.note_evaluation) { if (mylocalattendee.eval_note) {
document.getElementsByName("note_eval")[0].value = mylocalattendee.note_evaluation; document.getElementsByName("note_eval")[0].value = mylocalattendee.eval_note;
} }
document.getElementsByName("detail_evalution")[0].value = "";
if (mylocalattendee.evaluation) { if (mylocalattendee.eval_eval) {
document.getElementsByName("detail_evalution")[0].value = mylocalattendee.evaluation; 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 ( return (
<div className='gestionadministrative'> <div className='gestionadministrative'>
<Helmet> <Helmet>
@ -2391,8 +2401,6 @@ function GestionAdministrative(props) {
</div>} </div>}
</div> </div>
-----
{String(display_detail_insc) === "1" && mysession && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}> {String(display_detail_insc) === "1" && mysession && <div className="div_row" style={{ "border": "None", "background": '#F8F9F9', "padding": '5px' }}>
Detail inscription Detail inscription
<div className="div_row" style={{ "border": "None" }}> <div className="div_row" style={{ "border": "None" }}>
@ -2595,6 +2603,7 @@ function GestionAdministrative(props) {
dateFormat="dd/MM/yyyy HH:mm" dateFormat="dd/MM/yyyy HH:mm"
className="disabled_style" className="disabled_style"
locale='fr-FR' locale='fr-FR'
/> />
</div> </div>
@ -2605,31 +2614,41 @@ function GestionAdministrative(props) {
name="note_eval" name="note_eval"
id="note_eval" id="note_eval"
type="number" type="number"
InputLabelProps={{ InputLabelProps={{
shrink: true, shrink: true,
}} }}
inputProps={{ min: "0", max: "5", step: "1" }} inputProps={{ min: "0", max: "5", step: "1", readOnly: true, }}
disabled={false}
className="disabled_style" className="disabled_style"
/> />
</div> </div>
<div className="session_caract"> Evaluation<br /> <div className="session_caract"> Evaluation<br />
<TextField <Editor
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} onInit={(evt, editor) => editorRef_evaluation.current = editor}
required initialValue={field_evaluation}
name="detail_evalution" onKeyUp={editor_keyup}
id="detail_evalution" disabled = {true}
InputLabelProps={{ init={{
shrink: true, 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"
/> />
</div> </div>
@ -2655,9 +2674,6 @@ function GestionAdministrative(props) {
<Button variant="contained" className="bton_fermer" onClick={DownloadAttendeeDetail}>Imprimer fiche detaillee <Button variant="contained" className="bton_fermer" onClick={DownloadAttendeeDetail}>Imprimer fiche detaillee
</Button> </Button>
</div> </div>
</div>} </div>}
@ -2674,7 +2690,7 @@ function GestionAdministrative(props) {
name="certif_date" name="certif_date"
id="certif_date" id="certif_date"
selected={detailuser_date_certification} selected={detailuser_date_certification}
dateFormat="dd/MM/yyyy HH:mm" dateFormat="dd/MM/yyyy HH:mm"
className="disabled_style" className="disabled_style"
locale='fr-FR' locale='fr-FR'
@ -2732,9 +2748,6 @@ function GestionAdministrative(props) {
</div> </div>
</div>} </div>}
-----
</div> </div>
<div className="pieddepage"> <div className="pieddepage">
<Footer /> <Footer />