diff --git a/src/components/DisplayPartnerPromotion.js b/src/components/DisplayPartnerPromotion.js index 77f2ede..58dafb4 100644 --- a/src/components/DisplayPartnerPromotion.js +++ b/src/components/DisplayPartnerPromotion.js @@ -1644,6 +1644,7 @@ const DisplayPartnerPromotion = (props) => { { field: 'id', headerName: 'id', hide: true }, { field: '_id', headerName: '_id', hide: true }, { field: 'date', headerName: 'date', width: 100, hide: true, flex: 1 }, + { field: 'sequence_title', headerName: 'Titre', width: 150, renderCell: (params) => , }, { field: 'sequence_start', headerName: 'Début', width: 150, renderCell: (params) => , }, { field: 'sequence_end', headerName: 'Fin', width: 150, renderCell: (params) => , }, { field: 'is_present', headerName: 'Présent', width: 90, hide: false, editable: true, type: 'boolean', }, @@ -4309,12 +4310,34 @@ const DisplayPartnerPromotion = (props) => { var local_event_type = JSON.parse(x).event_type; + var local_liste_groupe_code = JSON.parse(x).liste_groupe_code; + + var local_obligatoire = "" + var local_obligatoire_label = "" + if (JSON.parse(x).obligatoire) { + local_obligatoire = JSON.parse(x).obligatoire; + if (local_obligatoire === "1") + local_obligatoire_label = "Oblig." + + } + + + if (JSON.parse(x).mode_animation) var local_mode_animation = JSON.parse(x).mode_animation; else var local_mode_animation = "" + + var label = "" + if (local_liste_groupe_code) { + label = JSON.parse(x).sequence_start + "-" + JSON.parse(x).sequence_end + " // " + String(local_obligatoire_label) + " // " + String(local_liste_groupe_code) + } else { + label = JSON.parse(x).sequence_start + " - " + JSON.parse(x).sequence_end + } + + //--- var node = { "_id": localid, @@ -4327,7 +4350,7 @@ const DisplayPartnerPromotion = (props) => { "local_comment": local_session_comment, "local_event_type": local_event_type, "local_mode_animation": local_mode_animation, - "label": JSON.parse(x).sequence_start + " - " + JSON.parse(x).sequence_end + "label": label }; new_data2.push(node); }); @@ -11926,8 +11949,6 @@ const DisplayPartnerPromotion = (props) => { var local_cible = JSON.parse(x).cible; var local_joint_pdf = JSON.parse(x).joint_pdf; - - //--- var node = { "_id": local_id, @@ -12002,7 +12023,7 @@ const DisplayPartnerPromotion = (props) => { //var myurl = process.env.REACT_APP_API_URL + "myclass/api/CreateTableauEmargement/"; // Update du 23/11/2023 : Les emargements sont basé sur les séquence déjà créées - var myurl = process.env.REACT_APP_API_URL + "myclass/api/CreateTableauEmargement_From_Sequence/"; + var myurl = process.env.REACT_APP_API_URL + "myclass/api/CreateTableauEmargement_From_Sequence_FI/"; setLoading(true); axios.post(myurl, form).then(res => { @@ -27854,7 +27875,7 @@ const DisplayPartnerPromotion = (props) => { setDialog_Emargement_Selection_open(true); - }}>Initialiser émargement} + }}>Initialiser émargement }