- {String(participant_data_changed) === "1" && String(participant_data_edit_mode) === "1" &&
+ {String(participant_data_changed) === "1" && String(participant_data_edit_mode) === "1" &&
diff --git a/src/components/GestionAdministrative.js b/src/components/GestionAdministrative.js
index cf3ee6c..1203eab 100644
--- a/src/components/GestionAdministrative.js
+++ b/src/components/GestionAdministrative.js
@@ -52,7 +52,8 @@ function GestionAdministrative(props) {
const columns_preinscrit = [
{ field: 'id', headerName: 'id', hide: true },
- { field: 'email', headerName: 'email', width: 200, hideable: false, flex: 1 },
+ { field: '_id', headerName: '_id', hide: true },
+ { field: 'email', headerName: 'email', width: 150, hideable: false, },
{ field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true },
{ field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: true },
{ field: 'employeur', headerName: 'Employeur', width: 200, hide: false, editable: true },
@@ -308,6 +309,7 @@ function GestionAdministrative(props) {
const columns_inscrit = [
{ field: 'id', headerName: 'id', hide: true },
+ { field: '_id', headerName: '_id', hide: true },
{ field: 'email', headerName: 'emails', width: 200, hideable: false, flex: 1, minWidth: 150, maxWidth: 300 },
{ field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true, resizable: true },
{ field: 'prenom', headerName: 'prenom', width: 150, hide: false, editable: true },
@@ -377,6 +379,7 @@ function GestionAdministrative(props) {
const columns_list_emargement = [
{ field: 'id', headerName: 'id', hide: true },
+ { field: '_id', headerName: '_id', hide: true },
{ field: 'date', headerName: 'date', width: 100, hideable: false, flex: 1 },
{ field: 'email', headerName: 'email', width: 250, hideable: false, flex: 1 },
{ field: 'nom', headerName: 'nom', width: 150, hide: false, editable: true },
@@ -657,6 +660,8 @@ function GestionAdministrative(props) {
var nom = cellValues.row.nom;
var email = cellValues.row.email;
var prenom = cellValues.row.prenom;
+ var object_id = cellValues.row._id;
+
var opco = cellValues.row.opco;
if (String(opco) === "undefined") {
opco = ""
@@ -674,7 +679,7 @@ function GestionAdministrative(props) {
}
- UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur);
+ UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, "", object_id);
}
function handleClick_update_data(event, cellValues) {
@@ -687,6 +692,8 @@ function GestionAdministrative(props) {
var nom = cellValues.row.nom;
var email = cellValues.row.email;
var prenom = cellValues.row.prenom;
+ var object_id = cellValues.row._id;
+
var opco = cellValues.row.opco;
if (String(opco) === "undefined") {
opco = ""
@@ -706,7 +713,7 @@ function GestionAdministrative(props) {
var comment = "";
- UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, comment);
+ UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, comment, object_id);
}
function handleClick_refuse(event, cellValues) {
@@ -721,6 +728,7 @@ function GestionAdministrative(props) {
var nom = cellValues.row.nom;
var email = cellValues.row.email;
var prenom = cellValues.row.prenom;
+ var object_id = cellValues.row._id;
var opco = cellValues.row.opco;
if (String(opco) === "undefined") {
@@ -738,7 +746,7 @@ function GestionAdministrative(props) {
employeur = ""
}
- UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, motif_refus);
+ UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, motif_refus, object_id);
}
const [submenu, setsubmenu] = useState("preinscrit");
@@ -849,7 +857,7 @@ function GestionAdministrative(props) {
const [UpdateStagiaireData_api, setUpdateStagiaireData_api] = useState();
const [UpdateStagiaireData_message, setUpdateStagiaireData_message] = useState();
const [UpdateStagiaireData_result, setUpdateStagiaireData_result] = useState();
- function UpdateStagiaireData(nom, prenom, email, status, price, opco, modefinancement, employeur, comment) {
+ function UpdateStagiaireData(nom, prenom, email, status, price, opco, modefinancement, employeur, comment, object_id) {
setSendInscriptionCancell_api();
var form = new FormData();
@@ -872,12 +880,13 @@ function GestionAdministrative(props) {
form.append("opco", opco);
form.append("modefinancement", modefinancement);
form.append("comment", comment);
+ form.append("_id", object_id);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/UpdateStagiairetoClass/";
axios.post(myurl, form).then(res => {
- console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
- console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
+ //console.log(" In UpdateStagiaireData res.data.status = " + res.data.status);
+ //console.log(" In UpdateStagiaireData res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setUpdateStagiaireData_api("true");
@@ -3485,6 +3494,9 @@ function GestionAdministrative(props) {
var nom = line.nom;
var prenom = line.prenom;
+ var object_id = line.row._id;
+
+
var opco = line.opco;
if (String(opco) === "undefined") {
opco = ""
@@ -3503,10 +3515,10 @@ function GestionAdministrative(props) {
}
if (String(actionmass_preinsc_val) === "valider") {
- UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur);
+ UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, "", object_id);
}
else if (String(actionmass_preinsc_val) === "refuser") {
- UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, motif);
+ UpdateStagiaireData(nom, prenom, email, status, montant, opco, modefinancement, employeur, motif, object_id);
}
//console.log(" retval de ", email + " = retval_ch =", retval_ch);
@@ -4966,6 +4978,7 @@ function GestionAdministrative(props) {
rows={rowss.map((item, index) => (
{
id: index,
+ _id: JSON.parse(item)._id,
nom: JSON.parse(item).nom,
prenom: JSON.parse(item).prenom,
employeur: JSON.parse(item).employeur,
@@ -5080,6 +5093,7 @@ function GestionAdministrative(props) {
rows={rowss_insc.map((item, index) => (
{
id: index,
+ _id: JSON.parse(item)._id,
nom: JSON.parse(item).nom,
prenom: JSON.parse(item).prenom,
employeur: JSON.parse(item).employeur,
diff --git a/src/components/TestUrl.js b/src/components/TestUrl.js
index f9f3615..0567cd1 100644
--- a/src/components/TestUrl.js
+++ b/src/components/TestUrl.js
@@ -817,6 +817,7 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
+