27/01/23 - 15h
parent
3842041485
commit
971c1a994e
|
@ -20,7 +20,7 @@ import { RichTextEditor } from '@mantine/rte';
|
||||||
import { Editor } from '@tinymce/tinymce-react';
|
import { Editor } from '@tinymce/tinymce-react';
|
||||||
import { IoArrowUndoCircle } from "react-icons/io5";
|
import { IoArrowUndoCircle } from "react-icons/io5";
|
||||||
import { GrUserAdmin, GrOrderedList } from "react-icons/gr";
|
import { GrUserAdmin, GrOrderedList } from "react-icons/gr";
|
||||||
|
import parse from 'html-react-parser';
|
||||||
|
|
||||||
import GestionAdministrative from "./GestionAdministrative";
|
import GestionAdministrative from "./GestionAdministrative";
|
||||||
|
|
||||||
|
@ -453,8 +453,15 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
|
|
||||||
const editorRef_description = useRef(null);
|
const editorRef_description = useRef(null);
|
||||||
|
const [editorRef_description_limite, seteditorRef_description_limite] = useState(700);
|
||||||
|
|
||||||
|
|
||||||
const editorRef_objectif = useRef(null);
|
const editorRef_objectif = useRef(null);
|
||||||
|
const [editorRef_objectif_limite, seteditorRef_objectif] = useState(300);
|
||||||
|
|
||||||
const editorRef_programme = useRef(null);
|
const editorRef_programme = useRef(null);
|
||||||
|
const [editorRef_programme_limite, seteditorRef_programme] = useState(700);
|
||||||
|
|
||||||
const editorRef_prerequis = useRef(null);
|
const editorRef_prerequis = useRef(null);
|
||||||
const editorRef_pourqui = useRef(null);
|
const editorRef_pourqui = useRef(null);
|
||||||
const editorRef_mots_cle = useRef(null);
|
const editorRef_mots_cle = useRef(null);
|
||||||
|
@ -492,11 +499,21 @@ const AddClassManual = (props) => {
|
||||||
var objectif = "";
|
var objectif = "";
|
||||||
if (editorRef_objectif.current) {
|
if (editorRef_objectif.current) {
|
||||||
objectif = editorRef_objectif.current.getContent();
|
objectif = editorRef_objectif.current.getContent();
|
||||||
|
if( parse(objectif.replace(/(<([^>]+)>)/ig, '')).length > editorRef_objectif_limite){
|
||||||
|
alert(" Champ 'Objectif', limite depassée !")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var programme = "";
|
var programme = "";
|
||||||
if (editorRef_programme.current) {
|
if (editorRef_programme.current) {
|
||||||
programme = editorRef_programme.current.getContent();
|
programme = editorRef_programme.current.getContent();
|
||||||
|
|
||||||
|
if( parse(programme.replace(/(<([^>]+)>)/ig, '')).length > editorRef_programme_limite){
|
||||||
|
alert(" Champ 'Programme', limite depassée !")
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var prerequis = "";
|
var prerequis = "";
|
||||||
|
@ -507,6 +524,11 @@ const AddClassManual = (props) => {
|
||||||
var description = "";
|
var description = "";
|
||||||
if (editorRef_description.current) {
|
if (editorRef_description.current) {
|
||||||
description = editorRef_description.current.getContent();
|
description = editorRef_description.current.getContent();
|
||||||
|
|
||||||
|
if( parse(description.replace(/(<([^>]+)>)/ig, '')).length > editorRef_description_limite){
|
||||||
|
alert(" Champ 'Description', limite depassée !")
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1313,7 +1335,7 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
<div className="training_text">
|
<div className="training_text">
|
||||||
<div className="plus_produit_desabled">
|
<div className="plus_produit_desabled">
|
||||||
<div className="titre_training_text"> Description </div>
|
<div className="titre_training_text"> Description (max 700 caractères) </div>
|
||||||
<Editor
|
<Editor
|
||||||
onInit={(evt, editor) => editorRef_description.current = editor}
|
onInit={(evt, editor) => editorRef_description.current = editor}
|
||||||
initialValue={field_description}
|
initialValue={field_description}
|
||||||
|
@ -1346,7 +1368,7 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
<div className="training_text" >
|
<div className="training_text" >
|
||||||
<div className="plus_produit_desabled">
|
<div className="plus_produit_desabled">
|
||||||
<div className="titre_training_text"> Objectif</div>
|
<div className="titre_training_text"> Objectif (max 300 caractères) </div>
|
||||||
<Editor
|
<Editor
|
||||||
onInit={(evt, editor) => editorRef_objectif.current = editor}
|
onInit={(evt, editor) => editorRef_objectif.current = editor}
|
||||||
initialValue={field_objectif}
|
initialValue={field_objectif}
|
||||||
|
@ -1377,7 +1399,7 @@ const AddClassManual = (props) => {
|
||||||
|
|
||||||
<div className="training_text">
|
<div className="training_text">
|
||||||
<div className="plus_produit_desabled">
|
<div className="plus_produit_desabled">
|
||||||
<div className="titre_training_text"> Programme</div>
|
<div className="titre_training_text"> Programme (max 700 caractères) </div>
|
||||||
<Editor
|
<Editor
|
||||||
onInit={(evt, editor) => editorRef_programme.current = editor}
|
onInit={(evt, editor) => editorRef_programme.current = editor}
|
||||||
initialValue={field_programme}
|
initialValue={field_programme}
|
||||||
|
|
|
@ -17,7 +17,7 @@ function PartenairStat() {
|
||||||
const [state, setState] = useState([
|
const [state, setState] = useState([
|
||||||
{
|
{
|
||||||
startDate: today.setDate(tomorrow.getDate() - 8),
|
startDate: today.setDate(tomorrow.getDate() - 8),
|
||||||
endDate: today.setDate(tomorrow.getDate() - 1),
|
endDate: today.setDate(tomorrow.getDate()),
|
||||||
key: "selection"
|
key: "selection"
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
@ -142,7 +142,7 @@ Recuperation de toutes les formation du partenaire
|
||||||
|
|
||||||
|
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.warn('Not good man :( mysearchtext = ');
|
console.warn('Not good man :( mysearchtext = ', error);
|
||||||
|
|
||||||
//setmyApimyApiMessage("")
|
//setmyApimyApiMessage("")
|
||||||
})
|
})
|
||||||
|
@ -172,7 +172,7 @@ Recuperation de toutes les formation du partenaire
|
||||||
form.append("date_start", date_start);
|
form.append("date_start", date_start);
|
||||||
form.append("date_end", date_end);
|
form.append("date_end", date_end);
|
||||||
form.append('token', stored_part);
|
form.append('token', stored_part);
|
||||||
form.append('topX', '6');
|
form.append('topX', '8');
|
||||||
|
|
||||||
//alert("myurl = "+myurl);
|
//alert("myurl = "+myurl);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue