diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js
index f5b2836..f2f9ee3 100644
--- a/src/components/DisplayPartnerSession.js
+++ b/src/components/DisplayPartnerSession.js
@@ -54,6 +54,7 @@ import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import Module_Editique from "./Module_Editique";
import Module_Attestation_Formation from "./Module_Attestation_Formation";
+import Module_Evaluation_Positionnement from "./Module_Evaluation_Positionnement";
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
@@ -2610,6 +2611,90 @@ const DisplayPartnerSession = (props) => {
}
+
+
+ async function submenu_q_positionnement() {
+ setsubmenu("positionnement");
+
+ //await sleep(5);
+ if (!edit_session_form) {
+ desableSessionFields();
+ }
+
+ if (document.getElementById("q_positionnement")) {
+ document.getElementById("q_positionnement").style.backgroundColor = "#104277";
+ document.getElementById("q_positionnement").style.color = "white";
+ document.getElementById("q_positionnement").style.fontWeight = "bold";
+ }
+
+
+ if (document.getElementById("attestation")) {
+ document.getElementById("attestation").style.backgroundColor = "#d8edfc";
+ document.getElementById("attestation").style.color = "black";
+ document.getElementById("attestation").style.fontWeight = "normal";
+ }
+
+ if (document.getElementById("evaluation")) {
+ document.getElementById("evaluation").style.backgroundColor = "#d8edfc";
+ document.getElementById("evaluation").style.color = "black";
+ document.getElementById("evaluation").style.fontWeight = "normal";
+ }
+
+
+ if (document.getElementById("emargement")) {
+ document.getElementById("emargement").style.backgroundColor = "#d8edfc";
+ document.getElementById("emargement").style.color = "black";
+ document.getElementById("emargement").style.fontWeight = "normal";
+ }
+
+ if (document.getElementById("editique")) {
+ document.getElementById("editique").style.backgroundColor = "#d8edfc";
+ document.getElementById("editique").style.color = "black";
+ document.getElementById("editique").style.fontWeight = "normal";
+ }
+
+ if (document.getElementById("sequence_session")) {
+ document.getElementById("sequence_session").style.backgroundColor = "#d8edfc";
+ document.getElementById("sequence_session").style.color = "black";
+ document.getElementById("sequence_session").style.fontWeight = "normal";
+ }
+
+
+ if (document.getElementById("detail_session")) {
+ document.getElementById("detail_session").style.backgroundColor = "#d8edfc";
+ document.getElementById("detail_session").style.color = "black";
+ document.getElementById("detail_session").style.fontWeight = "normal";
+ }
+
+ if (document.getElementById("inscrit")) {
+ document.getElementById("inscrit").style.backgroundColor = "#d8edfc";
+ document.getElementById("inscrit").style.color = "black";
+ document.getElementById("inscrit").style.fontWeight = "normal";
+ }
+
+ if (document.getElementById("preinscrit")) {
+ document.getElementById("preinscrit").style.backgroundColor = "#d8edfc";
+ document.getElementById("preinscrit").style.color = "black";
+ document.getElementById("preinscrit").style.fontWeight = "normal";
+ }
+
+
+ if (document.getElementById("historique")) {
+ document.getElementById("historique").style.backgroundColor = "#d8edfc";
+ document.getElementById("historique").style.color = "black";
+ document.getElementById("historique").style.fontWeight = "normal";
+ }
+
+ if (document.getElementById("piece_jointe")) {
+ document.getElementById("piece_jointe").style.backgroundColor = "#d8edfc";
+ document.getElementById("piece_jointe").style.color = "black";
+ document.getElementById("piece_jointe").style.fontWeight = "normal";
+ }
+
+
+ }
+
+
function handleClickSessionManagement(event, cellValues) {
var code_session = cellValues.row.code_session;
setselected_code_session(cellValues.row.code_session);
@@ -11892,7 +11977,8 @@ const DisplayPartnerSession = (props) => {
Emargement
- Pièces Jointes
+ Positionnement
+ Pièces Jointes
Historique
@@ -12866,25 +12952,6 @@ const DisplayPartnerSession = (props) => {
/>
- {/*
Prix session
- {
- setp_prix_session(e.target.value);
- IssessionChanged();
- }}
- />
-
*/}
Prix session
{
}
+ {String(submenu) === String("positionnement") &&
+
+
+
+
}
+
+
+
{String(submenu) === String("piece_jointe") &&
Les pièces jointes
diff --git a/src/components/Module_Attestation_Formation.js b/src/components/Module_Attestation_Formation.js
index ee20ef8..2f92bc6 100644
--- a/src/components/Module_Attestation_Formation.js
+++ b/src/components/Module_Attestation_Formation.js
@@ -10,29 +10,14 @@ import { useHistory } from "react-router-dom";
import CheckOut from "./CheckOut";
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
-import { Editor } from '@tinymce/tinymce-react';
-import parse from 'html-react-parser';
-
import 'react-tooltip/dist/react-tooltip.css'
-import { Tooltip } from 'react-tooltip'
-import add_plus from "../mysy_img/plus.png";
-import excel_icone from "../mysy_img/excel_icone.png";
-import participants from "../mysy_img/participants.png";
-import fileDownload from 'js-file-download'
-import Popup from 'reactjs-popup';
+
+import Popup from 'reactjs-popup'
import 'reactjs-popup/dist/index.css';
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
-import { format } from 'date-fns'
-import moment from "moment";
-import InputAdornment from '@mui/material/InputAdornment';
-import { AiFillCloseCircle } from "react-icons/ai";
import Box from '@mui/material/Box';
-import { Typography, LinearProgress, sliderClasses } from '@mui/material';
-import styled from 'styled-components';
-import { CiTrash } from "react-icons/ci";
-import { MdAddCircleOutline, MdRemoveCircleOutline } from "react-icons/md";
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -40,37 +25,7 @@ import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import { TransitionProps } from '@mui/material/transitions';
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
-//import FullCalendar from "@fullcalendar/react";
-import daygridPlugin from "@fullcalendar/daygrid";
-//import interactionPlugin from "@fullcalendar/interaction";
-//import timeGridPlugin from "@fullcalendar/timegrid";
-
-import allLocales from '@fullcalendar/core/locales-all'
-import { RepeatOnRounded } from "@mui/icons-material";
-import { alignPropType } from "react-bootstrap/esm/types";
-
-
-import ToggleSwitch from "./ToggleSwitch";
-import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
import Autocomplete from '@mui/material/Autocomplete';
-import FullCalendar, { formatDate } from "@fullcalendar/react";
-import dayGridPlugin from "@fullcalendar/daygrid";
-import timeGridPlugin from "@fullcalendar/timegrid";
-import interactionPlugin from "@fullcalendar/interaction";
-import { FcSearch } from "react-icons/fc";
-import { Fab } from "@material-ui/core";
-import {
- ListItem,
- ListItemText,
- useTheme,
-} from "@mui/material";
-
-import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
-import ChevronRightIcon from '@mui/icons-material/ChevronRight';
-import { TreeView } from '@mui/x-tree-view/TreeView';
-import { TreeItem } from '@mui/x-tree-view/TreeItem';
-import { IoMdAddCircle, IoIosRemoveCircleOutline } from "react-icons/io";
-import { FcViewDetails, FcDisapprove, FcInfo } from "react-icons/fc";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
@@ -217,7 +172,6 @@ const Module_Attestation_Formation = (props) => {
]
const New_Option_attestation_Masse = [
-
{ "id": "resend", "label": "(R)envoyer", "value": "resend" },
]
const [gridline_id, setgridline_id] = useState("");
@@ -440,12 +394,10 @@ const Module_Attestation_Formation = (props) => {
async function actionmass_ftion_Traitemet() {
-
if (String(actionmass_attesation_val) === String("reinit")) {
alert(" ### reinit");
-
}
else if (String(actionmass_attesation_val) === String("resend")) {
@@ -716,76 +668,7 @@ const Module_Attestation_Formation = (props) => {
}
- {/*}
- {String(selected_convention_type) === "email" && Type Document
-
-
-
- {String(selected_convention_type) === "email" && {
-
- if (selected_convention_email_test) {
- var validRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
- if (!selected_convention_email_test.match(validRegex)) {
- alert("L'adresse email de test est invalide.");
- return;
- }
- // Send_Stagiaire_Conventions_By_Email_Test();
- } else {
- alert("L'adresse email de test est invalide.");
- }
-
-
-
- }} > Test }
-
-
}
-
- {String(selected_convention_type) === "pdf" && Type Document
-
-
-
-
-
}
-
- */}
-
- {/*String(selected_convention_type) === "email" && */
- }
+
{String(selected_convention_type) === "pdf" && Recevoir un pré-envoie
{
}
- {/*
- {String(selected_convention_type) === "email" &&
- String(actionmass_ftion_val) !== String("convention") && Email destinaitaire
- {
- setselected_convention_email_destinataire_prod(e.target.value);
- }
- }
- />
-
-
- }
-
-
- {String(selected_convention_type) === "pdf" &&
- String(actionmass_ftion_val) !== String("convention") && Email destinaitaire
-
-
-
- }
-
-
- */}
-
+
@@ -1058,7 +900,7 @@ const Module_Attestation_Formation = (props) => {
else if (parseInt(String(params.row.id)) % 2 !== 0) {
return 'line--statut--impair';
}
-
+
}}
getRowClassName={(params) => {
@@ -1194,8 +1036,6 @@ const Module_Attestation_Formation = (props) => {
-
-
)
}
diff --git a/src/components/Module_Evaluation_Positionnement.js b/src/components/Module_Evaluation_Positionnement.js
new file mode 100644
index 0000000..1bc0212
--- /dev/null
+++ b/src/components/Module_Evaluation_Positionnement.js
@@ -0,0 +1,858 @@
+
+import React, { useRef, useState, useEffect } from "react";
+import TextField from '@mui/material/TextField';
+import MenuItem from '@mui/material/MenuItem';
+import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
+import Button from '@mui/material/Button';
+import axios from "axios";
+import { getCookie, setCookie } from 'react-use-cookie';
+import { useHistory } from "react-router-dom";
+import CheckOut from "./CheckOut";
+import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
+import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
+import 'react-tooltip/dist/react-tooltip.css'
+
+import Popup from 'reactjs-popup'
+import 'reactjs-popup/dist/index.css';
+import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
+import DatePicker from "react-datepicker";
+import "react-datepicker/dist/react-datepicker.css";
+import Box from '@mui/material/Box';
+import Dialog from '@mui/material/Dialog';
+import DialogActions from '@mui/material/DialogActions';
+import DialogContent from '@mui/material/DialogContent';
+import DialogContentText from '@mui/material/DialogContentText';
+import DialogTitle from '@mui/material/DialogTitle';
+import { TransitionProps } from '@mui/material/transitions';
+import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
+import Autocomplete from '@mui/material/Autocomplete';
+import { gridClasses } from '@mui/x-data-grid';
+import Link from '@mui/material/Link';
+import { PiDotsThree } from "react-icons/pi";
+
+const Module_Evaluation_Positionnement = (props) => {
+
+ const myconntected_employee_id = props.conntected_employee_id;
+
+ const [selected_employee_id, setselected_employee_id] = useState(props.conntected_employee_id);
+
+ const history = useHistory();
+ const [isLoading, setLoading] = useState();
+
+
+ const columns_q_position = [
+ { field: 'id', headerName: 'id', hide: true },
+ { field: '_id', headerName: '_id', hide: true },
+ { field: 'Form. Code', headerName: 'form_code', minwidth: 200, flex: 1, hideable: true, resizable: true, },
+ { field: 'email', headerName: 'email', minwidth: 200, flex: 1, hideable: true, resizable: true, },
+ { field: 'nom', headerName: 'nom', minwidth: 200, flex: 1, hide: false, editable: true, },
+ { field: 'prenom', headerName: 'prenom', minwidth: 200, flex: 1, hide: false, editable: false, },
+ {
+ field: 'status', headerName: 'Statut', width: 100, editable: false, flex: true,
+ valueFormatter: (params) => {
+ if (String(params.value) === "0")
+ return "Init";
+ else if (String(params.value) === "1")
+ return "Envoyé";
+ else if (String(params.value) === "2")
+ return "Répondu";
+ else
+ return " ?";
+ },
+ },
+ {
+ field: 'date_envoie', headerName: 'Date Envoi', width: 150, editable: false,
+ valueFormatter: (params) => {
+ return String(params.value).substring(0, 16)
+
+ },
+ },
+ {/*
+ field: "voir", headerName: 'voir',
+ renderCell: (cellValues) => {
+ return (
+
+ {
+ //handleClick_valide_emargement(event, cellValues);
+
+
+ }}
+ >
+
+
+
+
+ );
+ }
+ */ },
+
+ {/*
+ field: "envoyer", headerName: 'Envoyer',
+ renderCell: (cellValues) => {
+ return (
+
+ {
+ //handleClick_valide_emargement(event, cellValues);
+
+
+ }}
+ >
+
+
+
+
+ );
+ }
+ */},
+
+ ]
+
+ const [Dialog_1_message, setDialog_1_message] = React.useState(false);
+ const [Dialog_1_open, setDialog_1_open] = React.useState(false);
+ function Dialog_1_handle_change_participant_session(message) {
+ setDialog_1_message(message);
+ setDialog_1_open(true);
+ }
+
+ const Dialog_1_handleClose = () => {
+ //alert(" Utiliser le bouton 'fermer' ");
+ //setOpen(false);
+ };
+
+ const Dialog_1_handleClose_buton = () => {
+ setDialog_1_open(false);
+ };
+ function Close_Dialog_Detail_Event_open() {
+ setDialog_1_open(false);
+ }
+
+
+ const [Dialog_LIST_POSITION_QUESTION_open, setDialog_LIST_POSITION_QUESTION_open] = React.useState(false);
+ const Dialog_LIST_POSITION_QUESTION_handleClose = () => {
+ //alert(" Utiliser le bouton 'fermer' ");
+ //setOpen(false);
+ };
+
+ const Dialog_LIST_POSITION_QUESTION_handleClose_buton = () => {
+ setDialog_LIST_POSITION_QUESTION_open(false);
+ };
+
+ const [selectionModel_q_position, setselectionModel_q_position] = React.useState([]);
+
+ const [Getall_Survey_Q_Positionnement_By_Session_api, setGetall_Survey_Q_Positionnement_By_Session_api] = useState();
+ const [Getall_Survey_Q_Positionnement_By_Session_message, setGetall_Survey_Q_Positionnement_By_Session_message] = useState();
+ const [Getall_Survey_Q_Positionnement_By_Session_result, setGetall_Survey_Q_Positionnement_By_Session_result] = useState([]);
+ function Getall_Survey_Q_Positionnement_By_Session(event) {
+
+ setselectionModel_q_position([])
+
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("session_id", props.related_collection_recid);
+ form.append("formulaire_type", "pos");
+
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Survey_with_filter/";
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+
+ if (String(res.data.status) === String("true")) {
+ // console.log(" In Getall_Survey_Q_Positionnement_By_Session res.data.status = " + res.data.status);
+ console.log(" In Getall_Survey_Q_Positionnement_By_Session res.data.message r_class = " + res.data.message);
+ setGetall_Survey_Q_Positionnement_By_Session_api("true");
+ setGetall_Survey_Q_Positionnement_By_Session_result(res.data.message);
+
+
+ }
+ else {
+ setGetall_Survey_Q_Positionnement_By_Session_api("false");
+ setGetall_Survey_Q_Positionnement_By_Session_message(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Getall_Survey_Q_Positionnement_By_Session = ', error);
+ setGetall_Survey_Q_Positionnement_By_Session_api("false");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+ useEffect(() => {
+ setselected_session_id(props.related_collection_recid);
+ Getall_Survey_Q_Positionnement_By_Session();
+
+ }, [])
+
+
+
+ const New_Option_Type_Document = [
+ { "id": "email", "label": "Email", "value": "email" },
+ ]
+
+ const [selected_formulaire_id, setselected_formulaire_id] = useState();
+ const [selected_formulaire_type, setselected_formulaire_type] = useState("");
+
+ const [New_Getall_Partner_Formulaires_with_Filter, setNew_Getall_Partner_Formulaires_with_Filter] = useState([]);
+
+ const [Getall_Partner_Formulaires_with_Filter_api, setGetall_Partner_Formulaires_with_Filter_api] = useState();
+ const [Getall_Partner_Formulaires_with_Filter_message, setGetall_Partner_Formulaires_with_Filter_message] = useState();
+ const [Getall_Partner_Formulaires_with_Filter_result, setGetall_Partner_Formulaires_with_Filter_result] = useState([]);
+ function Getall_Partner_Formulaires_with_Filter(event) {
+
+ var form = new FormData();
+
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("type", "pos");
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Formulaire_with_filter/";
+
+
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+ setLoading(false);
+
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In Getall_Partner_Formulaires_with_Filter res.data.status = " + res.data.status);
+ //console.log(" In Getall_Partner_Formulaires_with_Filter res.data.message r_class = " + res.data.message);
+ setGetall_Partner_Formulaires_with_Filter_api("true");
+ setGetall_Partner_Formulaires_with_Filter_result(res.data.message);
+
+ var new_data2 = [];
+ const new_data = res.data.message.map((x) => {
+
+ //---
+ var localid = JSON.parse(x).id;
+ var local_id = JSON.parse(x)._id;
+ var local_code = JSON.parse(x).code;
+ var local_nom = JSON.parse(x).nom;
+
+
+ //---
+ var node = {
+ "_id": local_id,
+ "id": localid,
+ "label": local_code + " " + local_nom,
+ "nom": local_nom,
+ "code": local_code,
+ };
+ new_data2.push(node);
+ });
+
+ var node = {
+ "_id": "",
+ "id": "",
+ "label": "",
+ "nom": "",
+ "code": "",
+
+ };
+ new_data2.push(node);
+
+ if (new_data2.length > 0)
+ setNew_Getall_Partner_Formulaires_with_Filter(new_data2);
+ }
+ else {
+ setGetall_Partner_Formulaires_with_Filter_api("false");
+ setGetall_Partner_Formulaires_with_Filter_message(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Not good man :( Getall_Partner_Formulaires_with_Filter = ', error);
+ setGetall_Partner_Formulaires_with_Filter_api("false");
+ //setmyApimyApiMessage("")
+ })
+ }
+
+ const [gridline_id, setgridline_id] = useState("");
+
+ const [selected_session_id, setselected_session_id] = useState("");
+
+ const [Create_List_Survey_For_Session_For_Inscrit_api, setCreate_List_Survey_For_Session_For_Inscrit_api] = useState();
+ const [Create_List_Survey_For_Session_For_Inscrit_message, setCreate_List_Survey_For_Session_For_Inscrit_message] = useState();
+ const [Create_List_Survey_For_Session_For_Inscrit_result, setCreate_List_Survey_For_Session_For_Inscrit_result] = useState();
+ function Create_List_Survey_For_Session_For_Inscrit() {
+ var form = new FormData();
+ //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("session_id", props.related_collection_recid);
+ form.append("formulaire_id", selected_formulaire_id);
+ form.append("survey_type", "pos");
+
+
+ //alert(" mysession = "+mysession); zzzz
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Init_Survey_Tab_For_All_Session_Inscrit/";
+
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
+ //console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
+ setCreate_List_Survey_For_Session_For_Inscrit_api("true");
+ setCreate_List_Survey_For_Session_For_Inscrit_result(res.data.message);
+ Getall_Survey_Q_Positionnement_By_Session();
+ alert(res.data.message);
+
+ } else if (String(res.data.status) === String("Err_Connexion")) {
+ alert('Erreur: ' + res.data.message);
+ history.push("/Connexion");
+ }
+ else {
+ setCreate_List_Survey_For_Session_For_Inscrit_api("false");
+ setCreate_List_Survey_For_Session_For_Inscrit_message(res.data.message);
+ alert(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Create_List_Survey_For_Session_For_Inscrit : Not good man :( mysearchtext = ' + error);
+ setCreate_List_Survey_For_Session_For_Inscrit_api("false");
+ alert(" Impossible d'initialiser la liste des enquête de positionnement ");
+
+ })
+ }
+
+ const New_Option_q_position_Masse = [
+ { "id": "resend", "label": "(R)envoyer", "value": "resend" },
+ ]
+
+ const [actionmass_q_position_val, setactionmass_q_position_val] = useState();
+
+ async function actionmass_ftion_Traitemet() {
+
+ if (String(actionmass_q_position_val) === String("reinit")) {
+
+ alert(" ### reinit");
+
+ }
+
+ else if (String(actionmass_q_position_val) === String("resend")) {
+ var tab_ids_survey = []
+ for (var i = 0; i < selectionModel_q_position.length; i++) {
+ var myid = parseInt(String(selectionModel_q_position[i]));
+ var line = JSON.parse(Getall_Survey_Q_Positionnement_By_Session_result[myid]);
+ var line_id = JSON.parse(Getall_Survey_Q_Positionnement_By_Session_result[myid])._id;
+
+ tab_ids_survey.push(line_id);
+ }
+
+
+ console.log(" ### tab_ids_survey === ", tab_ids_survey);
+
+ Send_Survey_By_Email_For_Ids(tab_ids_survey);
+
+ }
+
+ }
+
+
+
+ const [Send_Survey_By_Email_For_Ids_api, setSend_Survey_By_Email_For_Ids_api] = useState();
+ const [Send_Survey_By_Email_For_Ids_message, setSend_Survey_By_Email_For_Ids_message] = useState();
+ const [Send_Survey_By_Email_For_Ids_result, setSend_Survey_By_Email_For_Ids_result] = useState();
+ function Send_Survey_By_Email_For_Ids(tab_survey) {
+ var form = new FormData();
+ //form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
+ const stored_cookie = getCookie('tokenmysypart');
+ form.append("token", stored_cookie);
+ form.append("tab_ids", tab_survey);
+
+
+ //alert(" mysession = "+mysession);
+
+ var myurl = process.env.REACT_APP_API_URL + "myclass/api/Send_Survey_TabIds/";
+
+
+ setLoading(true);
+ axios.post(myurl, form).then(res => {
+
+ setLoading(false);
+ if (String(res.data.status) === String("true")) {
+ //console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
+ //console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
+ setSend_Survey_By_Email_For_Ids_api("true");
+ setSend_Survey_By_Email_For_Ids_result(res.data.message);
+ Getall_Survey_Q_Positionnement_By_Session();
+
+ setselectionModel_q_position([]);
+ alert(res.data.message);
+
+ } else if (String(res.data.status) === String("Err_Connexion")) {
+ alert('Erreur: ' + res.data.message);
+ history.push("/Connexion");
+ }
+ else {
+ setSend_Survey_By_Email_For_Ids_api("false");
+ setSend_Survey_By_Email_For_Ids_message(res.data.message);
+ alert(res.data.message);
+ }
+
+ }).catch((error) => {
+ setLoading(false);
+ console.warn('Send_Survey_By_Email_For_Ids : Not good man :( mysearchtext = ' + error);
+ setSend_Survey_By_Email_For_Ids_api("false");
+ alert(" Impossible d'envoyer les demandes");
+
+ })
+ }
+
+
+ return (
+
+
+ {isLoading &&
}
+
+
+
+ MySy Information
+
+
+ {Dialog_1_message}
+
+
+
+
+ Action a traiter
+
+
+
+ Action a traiter
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mettre à jour
+
+
+
+ Fermer
+
+
+
+
+
+
+
+
+
+ {/* Dialog pour gerer les LIST_POSITION_QUESTION */}
+
+
+ MySy Information
+
+
+ {Dialog_1_message}
+
+
+
+ Choisir un questionnaire de positionnement
+
{
+ if (value && value._id) {
+
+ setselected_formulaire_id(value._id);
+
+ } else {
+ setselected_formulaire_id("");
+ }
+ }}
+
+ renderInput={(params) =>
+ }
+ />
+
+
+
+
+
+
+
+ {
+
+ var tab_ids_inscription = []
+ for (var i = 0; i < selectionModel_q_position.length; i++) {
+ var myid = parseInt(String(selectionModel_q_position[i]));
+ var line = JSON.parse(selectionModel_q_position[myid]);
+ var line_id = JSON.parse(selectionModel_q_position[myid])._id;
+ tab_ids_inscription.push(line_id);
+ }
+
+
+
+ Create_List_Survey_For_Session_For_Inscrit();
+ Dialog_LIST_POSITION_QUESTION_handleClose_buton();
+
+ }}
+ className="bton_enreg_dialog">Initialiser la liste
+
+
+
+
+
+
+
+
+
+ Fermer
+
+
+
+
+
+
+ {/* FIN Dialog pour gerer les LIST_POSITION_QUESTION */}
+
+
+
+
+
Initialiser le questionnaire
+ }
+ modal
+ nested
+ position="center center"
+
+ >
+
+ {close => (
+
+
+ ×
+
+
MySy Information
+
+ {' '}
+
+
+ Confirmez la (ré)initialisation l'enquête.
+ /!\ Si une enquête de positionnement existe pour cette session, elle sera supprimée et récréée
+
+
+
+
+
+
+ {
+ Getall_Partner_Formulaires_with_Filter();
+ setDialog_LIST_POSITION_QUESTION_open(true);
+ close();
+ }}> Valider
+
+
+
+ {
+ //console.log('modal closed ');
+ close();
+ }}
+ >
+ Annuler
+
+
+
+
+ )}
+
+
+
+
+
{
+ Getall_Survey_Q_Positionnement_By_Session();
+ }}>Actualiser la liste
+
+
+
+
+
+
+
+
+
+ {
+ setselectionModel_q_position(newSelectionModel);
+ /*if (newSelectionModel.length === 1)
+ handleClick_edit_session_From_Line(newSelectionModel);*/
+ if (newSelectionModel.length !== 1) {
+
+ }
+ }}
+ selectionModel={selectionModel_q_position}
+
+ localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
+ rows={Getall_Survey_Q_Positionnement_By_Session_result.map((item, index) => (
+ {
+ id: index,
+ _id: JSON.parse(item)._id,
+ email: JSON.parse(item).email,
+ nom: JSON.parse(item).nom,
+ prenom: JSON.parse(item).prenom,
+ status: JSON.parse(item).statut,
+ form_code: JSON.parse(item).formulaire.description,
+
+
+ }
+ ))}
+
+ columns={columns_q_position}
+ pageSize={10}
+ className="datagridclass"
+
+ onRowDoubleClick={(newSelectionModel) => {
+
+ }}
+
+
+
+ rowsPerPageOptions={[10]}
+ disableSelectionOnClick
+ components={{
+ Toolbar: GridToolbar,
+ }}
+ //sx={datagridSx}
+ getCellClassName={(params) => {
+
+ // Pour la gestion de la couleur de zone double cliquée
+ if (String(params.row.id) === String(gridline_id)) {
+ return 'line--statut--selected';
+ }
+ else if (parseInt(String(params.row.id)) % 2 === 0) {
+ return 'line--statut--pair';
+ }
+ else if (parseInt(String(params.row.id)) % 2 !== 0) {
+ return 'line--statut--impair';
+ }
+
+ }}
+
+ getRowClassName={(params) => {
+
+
+ if (String(params.row.status) === "1") {
+
+ return 'line--attestion_envoye';
+ }
+
+ // Pour la gestion de la couleur de zone double cliquée
+ if (String(params.row.id) === String(gridline_id)) {
+
+ return 'line--statut--selected';
+ }
+ else if (parseInt(String(params.row.id)) % 2 === 0) {
+ return 'line--statut--pair';
+ }
+ else if (parseInt(String(params.row.id)) % 2 !== 0) {
+ return 'line--statut--impair';
+ }
+
+ }}
+ getEstimatedRowHeight={() => 200}
+ getRowHeight={() => "auto"}
+ sx={{
+ "& .MuiDataGrid-cellContent": {
+ minHeight: 50,
+
+ },
+ [`& .${gridClasses.cell}`]: {
+ py: 1,
+ },
+ }}
+
+
+ />
+
+
+
+
+
+
+
+ {selectionModel_q_position && selectionModel_q_position.length >= 1 &&
+
Traitement en masse
+
+
{
+ if (value && value.value) {
+ if (String(value.value) === "reinit" || String(value.value) === "resend") {
+
+ setactionmass_q_position_val(value.value);
+
+ }
+ else {
+ setactionmass_q_position_val("");
+ }
+
+ }
+
+ }}
+
+ renderInput={(params) =>
+ }
+ />
+
+
+
+ {actionmass_q_position_val &&
+
+
+ Traiter
+
+ }
+ modal
+ nested
+ position="center center"
+
+ >
+
+ {close => (
+
+
+ ×
+
+
MySy Information
+
+ {' '}
+ {String(actionmass_q_position_val) === "resend" &&
+
+ Confirmer l'envoi de en masse de {selectionModel_q_position.length} attestation(s) de formation.
+ }
+
+
+
+ {
+ actionmass_ftion_Traitemet();
+ close();
+ }}> Valider
+
+
+
+ {
+ //console.log('modal closed ');
+ close();
+ }}
+ >
+ Annuler
+
+
+
+
+ )}
+
+
+ }
+
+ }
+
+
+
+
+
+
+
+ )
+}
+
+
+export default Module_Evaluation_Positionnement;
diff --git a/src/components/Partner_Config_Formulaires.js b/src/components/Partner_Config_Formulaires.js
index 19b787d..95c38b4 100644
--- a/src/components/Partner_Config_Formulaires.js
+++ b/src/components/Partner_Config_Formulaires.js
@@ -72,6 +72,7 @@ const Partner_Config_Formulaires = (props) => {
{ field: 'id', headerName: 'id', hide: true },
{ field: 'code', headerName: 'code', flex: 1, hide: false, editable: false },
{ field: 'nom', headerName: 'nom', flex: 1, hide: false, editable: false },
+ { field: 'type', headerName: 'Type', flex: 1, hide: false, editable: false },
{ field: 'description', headerName: 'description', flex: 1, hide: true, editable: false },
{ field: 'commentaire', headerName: 'commentaire', flex: 1, hide: true, editable: false },
@@ -438,12 +439,18 @@ const Partner_Config_Formulaires = (props) => {
const [p_detail_from_commentaire, setp_detail_from_commentaire] = useState("");
const [p_detail_from_list_question, setp_detail_from_list_question] = useState([]);
+ const [p_detail_from_message_intro, setp_detail_from_message_intro] = useState("");
+ const [p_detail_from_type, setp_detail_from_type] = useState("");
+
+
const [p_detail_one_from_code, setp_detail_one_from_code] = useState("");
const [p_detail_one_from_nom, setp_detail_one_from_nom] = useState("");
const [p_detail_one_from_description, setp_detail_one_from_description] = useState("");
const [p_detail_one_from_commentaire, setp_detail_one_from_commentaire] = useState("");
const [p_detail_one_from_list_question, setp_detail_one_from_list_question] = useState([]);
+ const [p_detail_one_from_message_intro, setp_detail_one_from_message_intro] = useState("");
+ const [p_detail_one_from_type, setp_detail_one_from_type] = useState("");
const [add_new_form, setadd_new_form] = useState("");
const [display_form, setdisplay_form] = useState("");
@@ -484,6 +491,10 @@ const Partner_Config_Formulaires = (props) => {
if (mylocal_form_data.code)
setp_detail_from_code(mylocal_form_data.code);
+ setp_detail_from_type("");
+ if (mylocal_form_data.type)
+ setp_detail_from_type(mylocal_form_data.type);
+
setp_detail_from_nom("");
if (mylocal_form_data.nom)
setp_detail_from_nom(mylocal_form_data.nom);
@@ -496,6 +507,11 @@ const Partner_Config_Formulaires = (props) => {
if (mylocal_form_data.commentaire)
setp_detail_from_commentaire(mylocal_form_data.commentaire);
+ setp_detail_from_message_intro("");
+ if (mylocal_form_data.message_introduction)
+ setp_detail_from_message_intro(mylocal_form_data.message_introduction);
+
+
setp_detail_from_list_question([]);
if (mylocal_form_data.list_questions) {
setp_detail_from_list_question(mylocal_form_data.list_questions);
@@ -535,6 +551,12 @@ const Partner_Config_Formulaires = (props) => {
document.getElementsByName("detail_config_code")[0].style.backgroundColor = "#ECEFF1";
}
+ if (document.getElementsByName("detail_config_type") && document.getElementsByName("detail_config_type")[0]) {
+ document.getElementsByName("detail_config_type")[0].disabled = true;
+ document.getElementsByName("detail_config_type")[0].style.backgroundColor = "#ECEFF1";
+ }
+
+
if (document.getElementsByName("detail_config_nom") && document.getElementsByName("detail_config_nom")[0]) {
document.getElementsByName("detail_config_nom")[0].disabled = true;
document.getElementsByName("detail_config_nom")[0].style.backgroundColor = "#ECEFF1";
@@ -550,6 +572,11 @@ const Partner_Config_Formulaires = (props) => {
document.getElementsByName("detail_config_commentaire")[0].disabled = true;
document.getElementsByName("detail_config_commentaire")[0].style.backgroundColor = "#ECEFF1";
}
+
+ if (document.getElementsByName("detail_config_message_intro") && document.getElementsByName("detail_config_message_intro")[0]) {
+ document.getElementsByName("detail_config_message_intro")[0].disabled = true;
+ document.getElementsByName("detail_config_message_intro")[0].style.backgroundColor = "#ECEFF1";
+ }
}
@@ -562,6 +589,12 @@ const Partner_Config_Formulaires = (props) => {
document.getElementsByName("detail_config_code")[0].style.backgroundColor = "#FFFFFF";
}
+ if (document.getElementsByName("detail_config_type") && document.getElementsByName("detail_config_type")[0]) {
+ document.getElementsByName("detail_config_type")[0].disabled = false;
+ document.getElementsByName("detail_config_type")[0].style.backgroundColor = "#FFFFFF";
+ }
+
+
if (document.getElementsByName("detail_config_nom") && document.getElementsByName("detail_config_nom")[0]) {
document.getElementsByName("detail_config_nom")[0].disabled = false;
document.getElementsByName("detail_config_nom")[0].style.backgroundColor = "#FFFFFF";
@@ -577,6 +610,11 @@ const Partner_Config_Formulaires = (props) => {
document.getElementsByName("detail_config_commentaire")[0].disabled = false;
document.getElementsByName("detail_config_commentaire")[0].style.backgroundColor = "#FFFFFF";
}
+
+ if (document.getElementsByName("detail_config_message_intro") && document.getElementsByName("detail_config_message_intro")[0]) {
+ document.getElementsByName("detail_config_message_intro")[0].disabled = false;
+ document.getElementsByName("detail_config_message_intro")[0].style.backgroundColor = "#FFFFFF";
+ }
}
@@ -655,10 +693,14 @@ const Partner_Config_Formulaires = (props) => {
{ "id": "entier", "label": "Entier", "value": "entier" },
{ "id": "qcm", "label": "QCM", "value": "qcm" },
{ "id": "", "label": "", "value": "" },
-
]
-
+ const New_Option_type_Formulaire = [
+ { "id": "pos", "label": "Q. Positionnement", "value": "pos" },
+ { "id": "hot_eval", "label": "Eval. Chaud ", "value": "hot_eval" },
+ { "id": "cool_eval", "label": "Eval. Froid", "value": "cool_eval" },
+ { "id": "", "label": "", "value": "" },
+ ]
function annule_edit_formulaire() {
clear_detail_field();
@@ -685,6 +727,9 @@ const Partner_Config_Formulaires = (props) => {
form.append("nom", p_detail_from_nom);
form.append("description", p_detail_from_description);
form.append("commentaire", p_detail_from_commentaire);
+ form.append("message_introduction", p_detail_from_message_intro);
+ form.append("type", p_detail_from_type);
+
form.append("form_id", selected_id);
//console.log(" form == ", form);
@@ -807,6 +852,8 @@ const Partner_Config_Formulaires = (props) => {
form.append("nom", p_detail_one_from_nom);
form.append("description", p_detail_one_from_description);
form.append("commentaire", p_detail_one_from_commentaire);
+ form.append("message_introduction", p_detail_one_from_message_intro);
+ form.append("type", p_detail_one_from_type);
//console.log(" form == ", form);
@@ -1494,6 +1541,7 @@ const Partner_Config_Formulaires = (props) => {
nom: JSON.parse(item).nom,
description: JSON.parse(item).description,
commentaire: JSON.parse(item).commentaire,
+ type: JSON.parse(item).type,
}
))}
@@ -1614,7 +1662,25 @@ const Partner_Config_Formulaires = (props) => {
value={p_detail_from_code}
/>
+
+ { New_Option_type_Formulaire.length > 0 && Type
+ (data).value === String(p_detail_from_type))[0].label}
+ />
+
}
+
+
Nom
@@ -1649,6 +1715,23 @@ const Partner_Config_Formulaires = (props) => {
/>
+ Message d'introduction
+
+
+
+
Commentaire
{
+ {String(form_edit_mode) === "1" && New_Option_type_Formulaire.length > 0 && Type
+
(data).value === String(p_detail_from_type))[0].label}
+
+ onChange={(event, value) => {
+ setconfig_data_changed("1");
+ if (value && value.value) {
+ setp_detail_from_type(value.value);
+ } else {
+ setp_detail_from_type("");
+ }
+ }}
+
+ renderInput={(params) =>
+ }
+ />
+ }
Nom
{
/>
+ Message d'introduction
+ {
+ setp_detail_from_message_intro(e.target.value);
+ setconfig_data_changed("1");
+ }}
+ multiline={true}
+ rows={2}
+ />
+
+
Commentaire
{
/>
+ {New_Option_type_Formulaire && Type
+
(data).value === String(p_detail_one_from_type))[0].label}
+
+ onChange={(event, value) => {
+ if (value && value.value) {
+ setp_detail_one_from_type(value.value);
+ } else {
+ setp_detail_one_from_type("");
+ }
+ }}
+
+ renderInput={(params) =>
+ }
+ />
+ }
Nom
@@ -2084,6 +2240,27 @@ const Partner_Config_Formulaires = (props) => {
/>
+ Message d'introduction
+ {
+ setp_detail_one_from_message_intro(e.target.value);
+
+ }}
+ />
+
+
+
Commentaire
+
+
+
{String(get_Given_Survey_Data_api) === "true" &&
@@ -223,7 +226,7 @@ function SurveyDocument() {
- {question.question}
+ {question.question}
{question.type && String(question.type) === "text" &&
@@ -274,7 +277,7 @@ function SurveyDocument() {
{question.type && String(question.type) === "bool" &&
-
+