diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index 0f7fe64..c038d00 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -3062,6 +3062,12 @@ const DisplayPartnerSession = (props) => { function close_edit_form() { setEdite_session("0"); + setaddOneSession(""); + setEdite_session(""); + submenu_detail_session(); + setedit_session_form(false); + setsubmenu(""); + setSelectionModel([]); } diff --git a/src/components/TestUrl_new.js b/src/components/TestUrl_new.js index 5c44aff..a76969f 100644 --- a/src/components/TestUrl_new.js +++ b/src/components/TestUrl_new.js @@ -8,7 +8,10 @@ import fileDownload from 'js-file-download' import { RichTextEditor } from '@mantine/rte'; import { Editor } from '@tinymce/tinymce-react'; import Button from '@mui/material/Button'; - +import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; +import { getCookie, setCookie } from 'react-use-cookie'; +import { useHistory } from "react-router-dom"; const TestUrl_New = (props) => { @@ -18,7 +21,7 @@ const TestUrl_New = (props) => { const [editorRef_programme_limite, seteditorRef_programme] = useState(1000); const [field_programme, setfield_programme] = useState(""); const [editor_tochange, seteditor_tochange] = useState(""); - + function editor_keyup() { seteditor_tochange("1"); } @@ -29,8 +32,84 @@ const TestUrl_New = (props) => { function add_text() { console.log(" Ajouter un texte "); - editorRef_programme.current.insertContent(" OKKK "); - } + editorRef_programme.current.insertContent(" OKKK "); + } + + function add_nom() { + editorRef_programme.current.insertContent(" {{nom}} "); + } + + function add_prenom() { + editorRef_programme.current.insertContent(" {{prenom}} "); + } + + function add_document() { + var programme = editorRef_programme.current.getContent(); + console.log(" doc text = ", programme); + } + + function delete_document() { + + } + + const [p_filtre1, setp_filtre1] = useState(); + const [p_filtre1_value, setp_filtre1_value] = useState(); + + const [p_champ_table, setp_champ_table] = useState(); + const [p_collection, setp_collection] = useState(); + + + const [p_champ_table_bis, setp_champ_table_bis] = useState(); + + const [Get_Personnalisable_Collection_and_Fields_api, setGet_Personnalisable_Collection_and_Fields_api] = useState(); + const [Get_Personnalisable_Collection_and_Fields_message, setGet_Personnalisable_Collection_and_Fields_message] = useState(); + const [Get_Personnalisable_Collection_and_Fields_result, setGet_Personnalisable_Collection_and_Fields_result] = useState(); + const [Get_Personnalisable_Collection_and_Fields_result_line, setGet_Personnalisable_Collection_and_Fields_result_line] = useState(); + function Get_Personnalisable_Collection_and_Fields() { + + 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_Personnalisable_Collection/"; + + + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + console.log(" In Get_Personnalisable_Collection_and_Fields res.data.status = " + res.data.status); + console.log(" In Get_Personnalisable_Collection_and_Fields res.data.message r_class = " + res.data.message); + + setGet_Personnalisable_Collection_and_Fields_api("true"); + setGet_Personnalisable_Collection_and_Fields_result(res.data.message); + setGet_Personnalisable_Collection_and_Fields_result_line(res.data.message.fieldss); + + } + else { + setGet_Personnalisable_Collection_and_Fields_api("false"); + setGet_Personnalisable_Collection_and_Fields_message(res.data.message); + alert(res.data.message) + } + + }).catch((error) => { + console.warn('Not good man :( Get_Personnalisable_Collection_and_Fields = ', error); + setGet_Personnalisable_Collection_and_Fields_api("false"); + alert(" Impossible de recuperer la liste des collection et champs personnalisables"); + //setmyApimyApiMessage("") + }) + } + + useEffect(() => { + Get_Personnalisable_Collection_and_Fields(); + + }, []) + + + return (
@@ -46,6 +125,29 @@ const TestUrl_New = (props) => {

Page de test * testurl_new

parametres courseid = {courseid}, tabid = {tabid}
+ +
+ { + setp_filtre1(e.target.value); + + }} + > + Convocation   + Document 2   + Document 3  + Document 4   + + + +
+ +
Programme (max 1000 caractères)
@@ -63,25 +165,135 @@ const TestUrl_New = (props) => { }} init={{ resize: false, - height: 300, - menubar: false, + height: 500, + menubar: true, plugins: [ - 'advlist autolink lists link image charmap print preview anchor', - 'searchreplace visualblocks code fullscreen', - 'insertdatetime media table paste code help wordcount' + 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'print', 'preview', 'anchor', 'searchreplace', + 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'paste', 'code', 'help', 'wordcount', + 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', + ], + toolbar: 'undo redo | casechange blocks | bold italic backcolor | ' + + 'alignleft aligncenter alignright alignjustify | ' + + 'bullist numlist checklist outdent indent | removeformat | a11ycheck code table help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px; }' }} /> + + + +
+ + +
Action
-
+ + +   + +   + +