diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js
index 6c5e162..b8d7a84 100644
--- a/src/components/AddClassManual.js
+++ b/src/components/AddClassManual.js
@@ -772,8 +772,8 @@ const AddClassManual = (props) => {
}
-
- getClassImage(mylocaltraining._id);
+
+ getClassImage(mylocaltraining._id);
/*
* Update 22/10/2023 :
Gestion des champs spécifiques. ils commencent tous par 'my_'
@@ -806,7 +806,8 @@ const AddClassManual = (props) => {
}
} else {
-
+ if (document.getElementById(String(field_name)))
+ document.getElementById(String(field_name)).value = "";
}
}
@@ -1155,15 +1156,15 @@ const AddClassManual = (props) => {
)
.then((response) => response.json())
.then((result) => {
- console.log('Success:', result['message'], "result['status'] = ", result['status'], "result['class_id'] = ", result['class_id']);
+ console.log('Success:', result['message'], "result['status'] = ", result['status'], "result['class_id'] = ", result['class_id']);
setLoading(false);
setimportmessage(result['message']);
setmyApiResponse(result['status']);
setdatamodification("0");
- if ( String(result['status']) === "true") {
+ if (String(result['status']) === "true") {
- var myclass_id = String(result['class_id']);
+ var myclass_id = String(result['class_id']);
console.log(" ####GRRRRR myclass_id = ", myclass_id);
if (String(userimgclassprofilchanged) === "1")
@@ -1403,7 +1404,7 @@ const AddClassManual = (props) => {
form.append("token", stored_cookie);
form.append("class_external_code", class_external_code);
form.append("related_collection", "myclass");
- form.append("related_collection_recid", selected_class_id);
+ form.append("related_collection_recid", selected_class_id);
form.append("type", "partner");
setLoading(true);
fetch(
@@ -1508,7 +1509,7 @@ const AddClassManual = (props) => {
const [myclassimage, setmyclassimage] = useState();
const [isclassimage, setisclassimage] = useState();
- function getClassImage( local_class_id) {
+ function getClassImage(local_class_id) {
var myurl = process.env.REACT_APP_API_URL + "myclass/api/getRecodedClassImage/";
var class_external_code = props.mytrainingclass['class_external_code'];
@@ -1613,7 +1614,7 @@ const AddClassManual = (props) => {
fillfield();
if (props.mytrainingclass['class_external_code']) {
-
+
//console.log("props.mytrainingclass['plus_produit'] = " + props.mytrainingclass['plus_produit']);
setplus_produit_enabled(props.mytrainingclass['plus_produit']);
setmots_cle_enabled(props.mytrainingclass['mots_cle']);
diff --git a/src/components/Apprenant.js b/src/components/Apprenant.js
index 3e26fc2..e4f1979 100644
--- a/src/components/Apprenant.js
+++ b/src/components/Apprenant.js
@@ -635,7 +635,8 @@ const Apprenant = (props) => {
}
} else {
-
+ if (document.getElementById(String(field_name)))
+ document.getElementById(String(field_name)).value = "";
}
}
diff --git a/src/components/Config_Champs_Personnalise.js b/src/components/Config_Champs_Personnalise.js
index 73d6974..50d3c61 100644
--- a/src/components/Config_Champs_Personnalise.js
+++ b/src/components/Config_Champs_Personnalise.js
@@ -39,6 +39,7 @@ import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import { TransitionProps } from '@mui/material/transitions';
import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
+import { gridClasses } from '@mui/x-data-grid';
const Config_Champs_Personnalise = (props) => {
const history = useHistory();
@@ -49,9 +50,9 @@ const Config_Champs_Personnalise = (props) => {
const columns = [
{ field: '_id', headerName: '_id', hide: true },
{ field: 'id', headerName: 'id', hide: true },
- { field: 'field_name', headerName: 'Nom champ', flex: 1 },
- { field: 'field_label', headerName: 'label', flex: 1 },
- { field: 'related_collection', headerName: 'Entité metier', width: 150, },
+ { field: 'field_name', headerName: 'Nom champ', flex: 1 },
+ { field: 'field_label', headerName: 'label', flex: 1 },
+ { field: 'related_collection', headerName: 'Entité metier', width: 150, },
{
field: 'is_displayed', headerName: 'Affichable', width: 150, hide: false, editable: false,
valueFormatter: (params) => {
@@ -396,6 +397,8 @@ const Config_Champs_Personnalise = (props) => {
setSelectionModel([]);
+ setgridline_id("");
+
alert(" Le document a été correctement supprimé.");
//myRef_head.current.scrollIntoView({ behavior: "smooth" });
if (document.getElementById('myRef_head')) {
@@ -770,6 +773,8 @@ const Config_Champs_Personnalise = (props) => {
}
+ const [gridline_id, setgridline_id] = useState("");
+
function clear_one_detail_fields() {
setp_one_detail_field_name("");
setp_one_detail_field_label();
@@ -897,6 +902,7 @@ const Config_Champs_Personnalise = (props) => {
setpersonal_field_data_changed("0");
Getall_Partner_Personalised_Fields_No_filter();
Get_Given_Specific_Fields(selected_id);
+ setgridline_id("");
alert(res.data.message);
}
@@ -1015,6 +1021,7 @@ const Config_Champs_Personnalise = (props) => {
clear_one_detail_fields();
setdisplay_personalised_field();
setadd_one_personal_field();
+ setgridline_id("");
alert(res.data.message);
if (document.getElementById('myRef_head')) {
var divh = document.getElementById('myRef_head').offsetTop;
@@ -1243,7 +1250,7 @@ const Config_Champs_Personnalise = (props) => {
-
+
@@ -1255,52 +1262,36 @@ const Config_Champs_Personnalise = (props) => {
width: '100%',
paddingRight: '1px',
- // Gestion des cellule a distance ou presentiel
- '& .cell--distantiel': {
- backgroundColor: '#AFE1AF',
- color: 'black',
- },
-
- '& .cell--presentiel': {
- backgroundColor: '#AFE1AF',
- color: 'black',
- },
-
-
- // gestion couleur des lignes avec le statut d'inscription
- '& .line--statut--annule': {
- backgroundColor: '#D8D8D8',
- color: 'white',
- },
-
- '& .line--statut--inscrit': {
- backgroundColor: '#CEF6D8',
- color: 'black',
- },
- '& .line--statut--preinscrit': {
- backgroundColor: '#F7F2E0',
- color: 'black',
- },
-
- /*"& .MuiDataGrid-virtualScrollerRenderZone": {
- "& .MuiDataGrid-row": {
- "&:nth-child(2n)": { backgroundColor: "rgba(235, 235, 235, .7)" }
- }
- },*/
"& .MuiDataGrid-columnHeaders": {
backgroundColor: "#c8cfd5",
color: "black",
fontSize: 14
},
+ '& .line--statut--selected': {
+ backgroundColor: '#FBF2EF',
+ color: 'black',
+ },
+ '& .line--statut--pair': {
+ backgroundColor: 'rgba(235, 235, 235, .7)',
+ color: 'black',
+ },
+ '& .line--statut--impair': {
+ backgroundColor: '#FFFFFF',
+ color: 'black',
+ },
+ [`& .${gridClasses.cell}`]: {
+ py: 1,
+ },
+
}}
>
{
setSelectionModel(newSelectionModel);
- if (newSelectionModel.length === 1)
- handleClick_display_personal_field(newSelectionModel);
+ /*if (newSelectionModel.length === 1)
+ handleClick_display_personal_field(newSelectionModel);*/
if (newSelectionModel.length !== 1) {
setpersonal_field_data_edit_mode();
setpersonal_field_data_changed();
@@ -1332,6 +1323,11 @@ const Config_Champs_Personnalise = (props) => {
pageSize={10}
className="datagridclass"
+ onRowDoubleClick={(newSelectionModel) => {
+ setgridline_id(newSelectionModel.row.id);
+ handleClick_display_personal_field(newSelectionModel.row.id);
+ }}
+
rowsPerPageOptions={[10]}
//disableSelectionOnClick
components={{
@@ -1363,6 +1359,16 @@ const Config_Champs_Personnalise = (props) => {
}}
getRowClassName={(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';
+ }
if (String(params.row.status) === "-1") {
return 'line--statut--annule';
@@ -1375,6 +1381,15 @@ const Config_Champs_Personnalise = (props) => {
}
}}
+ getEstimatedRowHeight={() => 200}
+ getRowHeight={() => "auto"}
+ sx={{
+ "& .MuiDataGrid-cellContent": {
+ minHeight: 50,
+
+ }
+ }}
+
/>
diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js
index 4479a94..2e80320 100644
--- a/src/components/DisplayPartnerSession.js
+++ b/src/components/DisplayPartnerSession.js
@@ -195,7 +195,7 @@ const DisplayPartnerSession = (props) => {
},
{
- field: 'etape', headerName: 'Etape', hide: false, width: datagrid_columns_size_model2, renderCell: (params) => ,
+ field: 'etape', headerName: 'Etape', hide: true, width: datagrid_columns_size_model2, renderCell: (params) => ,
},
{ field: 'class_external_code', headerName: 'Code Formation', align: "center", hideable: true, flex: 1, hide: true, minWidth: 150, renderCell: (params) => , },
@@ -5573,7 +5573,8 @@ const DisplayPartnerSession = (props) => {
}
} else {
-
+ if (document.getElementById(String(field_name)))
+ document.getElementById(String(field_name)).value = "";
}
}
@@ -10205,6 +10206,7 @@ const DisplayPartnerSession = (props) => {
Getall_Survey_hot_evaluation_By_Session();
setSelectionModel_evaluation([]);
+ setactionmass_eval_val("");
alert(res.data.message);
} else if (String(res.data.status) === String("Err_Connexion")) {
@@ -12274,7 +12276,7 @@ const DisplayPartnerSession = (props) => {
- {actionmass_ftion_val &&