diff --git a/package-lock.json b/package-lock.json index 8499111..0932473 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,10 +18,15 @@ "@fortawesome/free-regular-svg-icons": "^6.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1", "@fortawesome/react-fontawesome": "^0.1.18", - "@fullcalendar/core": "^6.1.9", + "@fullcalendar/core": "^6.1.11", "@fullcalendar/daygrid": "^6.1.9", "@fullcalendar/interaction": "^6.1.9", + "@fullcalendar/multimonth": "^6.1.11", "@fullcalendar/react": "^6.1.9", + "@fullcalendar/resource": "^6.1.11", + "@fullcalendar/resource-timegrid": "^6.1.11", + "@fullcalendar/resource-timeline": "^6.1.11", + "@fullcalendar/scrollgrid": "^6.1.11", "@fullcalendar/timegrid": "^6.1.9", "@mantine/core": "^4.2.10", "@mantine/hooks": "^4.2.10", @@ -3224,19 +3229,19 @@ } }, "node_modules/@fullcalendar/core": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.9.tgz", - "integrity": "sha512-eeG+z9BWerdsU9Ac6j16rpYpPnE0wxtnEHiHrh/u/ADbGTR3hCOjCD9PxQOfhOTHbWOVs7JQunGcksSPu5WZBQ==", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.11.tgz", + "integrity": "sha512-TjG7c8sUz+Vkui2FyCNJ+xqyu0nq653Ibe99A66LoW95oBo6tVhhKIaG1Wh0GVKymYiqAQN/OEdYTuj4ay27kA==", "dependencies": { "preact": "~10.12.1" } }, "node_modules/@fullcalendar/daygrid": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.9.tgz", - "integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.11.tgz", + "integrity": "sha512-hF5jJB7cgUIxWD5MVjj8IU407HISyLu7BWXcEIuTytkfr8oolOXeCazqnnjmRbnFOncoJQVstTtq6SIhaT32Xg==", "peerDependencies": { - "@fullcalendar/core": "~6.1.9" + "@fullcalendar/core": "~6.1.11" } }, "node_modules/@fullcalendar/interaction": { @@ -3247,6 +3252,25 @@ "@fullcalendar/core": "~6.1.9" } }, + "node_modules/@fullcalendar/multimonth": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/multimonth/-/multimonth-6.1.11.tgz", + "integrity": "sha512-7DbPC+AAlaKnquGVdw1Z85Q3nSZ4GZ1NcVIk4k7bLnqDlntwHPPsrDlSIzUWKcN0q5/u7jQHm4PU1m3LAl70Sg==", + "dependencies": { + "@fullcalendar/daygrid": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11" + } + }, + "node_modules/@fullcalendar/premium-common": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/premium-common/-/premium-common-6.1.11.tgz", + "integrity": "sha512-3WsSizkGDJEu+AlgQlFXKI+/DYCYTRp0PQRz0vS63qKBEUsVzfSD0oi/7jCylZJlCUteIjbi4Hu1I2I5o6UHrQ==", + "peerDependencies": { + "@fullcalendar/core": "~6.1.11" + } + }, "node_modules/@fullcalendar/react": { "version": "6.1.9", "resolved": "https://registry.npmjs.org/@fullcalendar/react/-/react-6.1.9.tgz", @@ -3257,15 +3281,90 @@ "react-dom": "^16.7.0 || ^17 || ^18" } }, - "node_modules/@fullcalendar/timegrid": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.9.tgz", - "integrity": "sha512-le7UV05wVE1Trdr054kgJXTwa+A1pEI8nlCBnPWdcyrL+dTLoPvQ4AWEVCnV7So+4zRYaCqnqGXfCJsj0RQa0g==", + "node_modules/@fullcalendar/resource": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource/-/resource-6.1.11.tgz", + "integrity": "sha512-hxTQQ+eywfcC28JeyQEdJov+Jqa73zy4xU0Gg7DTTOVlS2lFVrQKM5aMXW8iz800rPbvHFAyVwfFNHclJrRoeQ==", "dependencies": { - "@fullcalendar/daygrid": "~6.1.9" + "@fullcalendar/premium-common": "~6.1.11" }, "peerDependencies": { - "@fullcalendar/core": "~6.1.9" + "@fullcalendar/core": "~6.1.11" + } + }, + "node_modules/@fullcalendar/resource-daygrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource-daygrid/-/resource-daygrid-6.1.11.tgz", + "integrity": "sha512-d/tuNS3mEDELlcohaJ/tQh4SbfeJzO6+1jLZ7Zzpm2oerdYskAzroB0qUlzhs4F9E5WeMj5RfXWUbZ+bmeoYvQ==", + "dependencies": { + "@fullcalendar/daygrid": "~6.1.11", + "@fullcalendar/premium-common": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11", + "@fullcalendar/resource": "~6.1.11" + } + }, + "node_modules/@fullcalendar/resource-timegrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource-timegrid/-/resource-timegrid-6.1.11.tgz", + "integrity": "sha512-oomckSrvBjRpp2U8knsimhUWIaIcHf834gWOHpNMwxthzDX1CZ+QzQ3/ZSwMSu0N+L8y2TMpfcBwddX3gCEkTA==", + "dependencies": { + "@fullcalendar/premium-common": "~6.1.11", + "@fullcalendar/resource-daygrid": "~6.1.11", + "@fullcalendar/timegrid": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11", + "@fullcalendar/resource": "~6.1.11" + } + }, + "node_modules/@fullcalendar/resource-timeline": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource-timeline/-/resource-timeline-6.1.11.tgz", + "integrity": "sha512-RIQOwGxN8n2jSIOsEGUjzoGgdYDZq8t4sUvSUfnahGwyCesMqsYNmpA+58PFy/BHPIgxyvy8awH2CnjjSN7Uiw==", + "dependencies": { + "@fullcalendar/premium-common": "~6.1.11", + "@fullcalendar/scrollgrid": "~6.1.11", + "@fullcalendar/timeline": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11", + "@fullcalendar/resource": "~6.1.11" + } + }, + "node_modules/@fullcalendar/scrollgrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/scrollgrid/-/scrollgrid-6.1.11.tgz", + "integrity": "sha512-GRhhU8ACHqgfxdMnP59VPThfNG3Stkp9zq1sLnI992g1fZQ+V2UhYvl5qhu3eEVSp2KTDPx4NaoR35cQGrC1Mw==", + "dependencies": { + "@fullcalendar/premium-common": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11" + } + }, + "node_modules/@fullcalendar/timegrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.11.tgz", + "integrity": "sha512-0seUHK/ferH89IeuCvV4Bib0zWjgK0nsptNdmAc9wDBxD/d9hm5Mdti0URJX6bDoRtsSfRDu5XsRcrzwoc+AUQ==", + "dependencies": { + "@fullcalendar/daygrid": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11" + } + }, + "node_modules/@fullcalendar/timeline": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/timeline/-/timeline-6.1.11.tgz", + "integrity": "sha512-MGUEAHlFBWxpuhSWhZbHOtD9i+b8GZjqNV82MH+vwPHq1Jjqe8qj9Wby00vKikdWH+RuAB+IuiKjQaROEU0Ecw==", + "dependencies": { + "@fullcalendar/premium-common": "~6.1.11", + "@fullcalendar/scrollgrid": "~6.1.11" + }, + "peerDependencies": { + "@fullcalendar/core": "~6.1.11" } }, "node_modules/@googlemaps/js-api-loader": { @@ -35898,34 +35997,101 @@ } }, "@fullcalendar/core": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.9.tgz", - "integrity": "sha512-eeG+z9BWerdsU9Ac6j16rpYpPnE0wxtnEHiHrh/u/ADbGTR3hCOjCD9PxQOfhOTHbWOVs7JQunGcksSPu5WZBQ==", + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.11.tgz", + "integrity": "sha512-TjG7c8sUz+Vkui2FyCNJ+xqyu0nq653Ibe99A66LoW95oBo6tVhhKIaG1Wh0GVKymYiqAQN/OEdYTuj4ay27kA==", "requires": { "preact": "~10.12.1" } }, "@fullcalendar/daygrid": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.9.tgz", - "integrity": "sha512-o/6joH/7lmVHXAkbaa/tUbzWYnGp/LgfdiFyYPkqQbjKEeivNZWF1WhHqFbhx0zbFONSHtrvkjY2bjr+Ef2quQ==" + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.11.tgz", + "integrity": "sha512-hF5jJB7cgUIxWD5MVjj8IU407HISyLu7BWXcEIuTytkfr8oolOXeCazqnnjmRbnFOncoJQVstTtq6SIhaT32Xg==" }, "@fullcalendar/interaction": { "version": "6.1.9", "resolved": "https://registry.npmjs.org/@fullcalendar/interaction/-/interaction-6.1.9.tgz", "integrity": "sha512-I3FGnv0kKZpIwujg3HllbKrciNjTqeTYy3oJG226oAn7lV6wnrrDYMmuGmA0jPJAGN46HKrQqKN7ItxQRDec4Q==" }, + "@fullcalendar/multimonth": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/multimonth/-/multimonth-6.1.11.tgz", + "integrity": "sha512-7DbPC+AAlaKnquGVdw1Z85Q3nSZ4GZ1NcVIk4k7bLnqDlntwHPPsrDlSIzUWKcN0q5/u7jQHm4PU1m3LAl70Sg==", + "requires": { + "@fullcalendar/daygrid": "~6.1.11" + } + }, + "@fullcalendar/premium-common": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/premium-common/-/premium-common-6.1.11.tgz", + "integrity": "sha512-3WsSizkGDJEu+AlgQlFXKI+/DYCYTRp0PQRz0vS63qKBEUsVzfSD0oi/7jCylZJlCUteIjbi4Hu1I2I5o6UHrQ==" + }, "@fullcalendar/react": { "version": "6.1.9", "resolved": "https://registry.npmjs.org/@fullcalendar/react/-/react-6.1.9.tgz", "integrity": "sha512-ioxu0V++pYz2u/N1LL1V8DkMyiKGRun0gMAll2tQz3Kzi3r9pTwncGKRb1zO8h0e+TrInU08ywk/l5lBwp7eog==" }, - "@fullcalendar/timegrid": { - "version": "6.1.9", - "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.9.tgz", - "integrity": "sha512-le7UV05wVE1Trdr054kgJXTwa+A1pEI8nlCBnPWdcyrL+dTLoPvQ4AWEVCnV7So+4zRYaCqnqGXfCJsj0RQa0g==", + "@fullcalendar/resource": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource/-/resource-6.1.11.tgz", + "integrity": "sha512-hxTQQ+eywfcC28JeyQEdJov+Jqa73zy4xU0Gg7DTTOVlS2lFVrQKM5aMXW8iz800rPbvHFAyVwfFNHclJrRoeQ==", "requires": { - "@fullcalendar/daygrid": "~6.1.9" + "@fullcalendar/premium-common": "~6.1.11" + } + }, + "@fullcalendar/resource-daygrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource-daygrid/-/resource-daygrid-6.1.11.tgz", + "integrity": "sha512-d/tuNS3mEDELlcohaJ/tQh4SbfeJzO6+1jLZ7Zzpm2oerdYskAzroB0qUlzhs4F9E5WeMj5RfXWUbZ+bmeoYvQ==", + "requires": { + "@fullcalendar/daygrid": "~6.1.11", + "@fullcalendar/premium-common": "~6.1.11" + } + }, + "@fullcalendar/resource-timegrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource-timegrid/-/resource-timegrid-6.1.11.tgz", + "integrity": "sha512-oomckSrvBjRpp2U8knsimhUWIaIcHf834gWOHpNMwxthzDX1CZ+QzQ3/ZSwMSu0N+L8y2TMpfcBwddX3gCEkTA==", + "requires": { + "@fullcalendar/premium-common": "~6.1.11", + "@fullcalendar/resource-daygrid": "~6.1.11", + "@fullcalendar/timegrid": "~6.1.11" + } + }, + "@fullcalendar/resource-timeline": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/resource-timeline/-/resource-timeline-6.1.11.tgz", + "integrity": "sha512-RIQOwGxN8n2jSIOsEGUjzoGgdYDZq8t4sUvSUfnahGwyCesMqsYNmpA+58PFy/BHPIgxyvy8awH2CnjjSN7Uiw==", + "requires": { + "@fullcalendar/premium-common": "~6.1.11", + "@fullcalendar/scrollgrid": "~6.1.11", + "@fullcalendar/timeline": "~6.1.11" + } + }, + "@fullcalendar/scrollgrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/scrollgrid/-/scrollgrid-6.1.11.tgz", + "integrity": "sha512-GRhhU8ACHqgfxdMnP59VPThfNG3Stkp9zq1sLnI992g1fZQ+V2UhYvl5qhu3eEVSp2KTDPx4NaoR35cQGrC1Mw==", + "requires": { + "@fullcalendar/premium-common": "~6.1.11" + } + }, + "@fullcalendar/timegrid": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.11.tgz", + "integrity": "sha512-0seUHK/ferH89IeuCvV4Bib0zWjgK0nsptNdmAc9wDBxD/d9hm5Mdti0URJX6bDoRtsSfRDu5XsRcrzwoc+AUQ==", + "requires": { + "@fullcalendar/daygrid": "~6.1.11" + } + }, + "@fullcalendar/timeline": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@fullcalendar/timeline/-/timeline-6.1.11.tgz", + "integrity": "sha512-MGUEAHlFBWxpuhSWhZbHOtD9i+b8GZjqNV82MH+vwPHq1Jjqe8qj9Wby00vKikdWH+RuAB+IuiKjQaROEU0Ecw==", + "requires": { + "@fullcalendar/premium-common": "~6.1.11", + "@fullcalendar/scrollgrid": "~6.1.11" } }, "@googlemaps/js-api-loader": { diff --git a/package.json b/package.json index fc55b8b..a625e80 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,15 @@ "@fortawesome/free-regular-svg-icons": "^6.1.1", "@fortawesome/free-solid-svg-icons": "^6.1.1", "@fortawesome/react-fontawesome": "^0.1.18", - "@fullcalendar/core": "^6.1.9", + "@fullcalendar/core": "^6.1.11", "@fullcalendar/daygrid": "^6.1.9", "@fullcalendar/interaction": "^6.1.9", + "@fullcalendar/multimonth": "^6.1.11", "@fullcalendar/react": "^6.1.9", + "@fullcalendar/resource": "^6.1.11", + "@fullcalendar/resource-timegrid": "^6.1.11", + "@fullcalendar/resource-timeline": "^6.1.11", + "@fullcalendar/scrollgrid": "^6.1.11", "@fullcalendar/timegrid": "^6.1.9", "@mantine/core": "^4.2.10", "@mantine/hooks": "^4.2.10", diff --git a/src/components/AddClassManual.js b/src/components/AddClassManual.js index 55e3b63..422f6cd 100644 --- a/src/components/AddClassManual.js +++ b/src/components/AddClassManual.js @@ -121,6 +121,33 @@ const AddClassManual = (props) => { { field: '_id', headerName: '_id', hide: true }, { field: 'code', headerName: 'Code', minWidth: 150, flex: 1, renderCell: (params) => , }, { field: 'titre', headerName: 'Titre', minWidth: 150, flex: 1, renderCell: (params) => , }, + { field: 'credit', headerName: 'Credit', minWidth: 150, flex: 1, renderCell: (params) => , }, + { + field: 'pres_dist_hyp', headerName: 'Animation', minWidth: 150, flex: 1, + renderCell: (cellValues) => { + return ( +
+ {cellValues.row.pres_dist_hyp && String(cellValues.row.pres_dist_hyp) === "1" && "Distanciel"} + {cellValues.row.pres_dist_hyp && String(cellValues.row.pres_dist_hyp) === "0" && "Présentiel"} + {cellValues.row.pres_dist_hyp && String(cellValues.row.pres_dist_hyp) === "2" && "Hybride"} +
+ + ); + } + }, + { + field: 'is_noted', headerName: 'Evalué', minWidth: 150, flex: 1, renderCell: (params) => , + renderCell: (cellValues) => { + return ( +
+ {cellValues.row.is_noted && String(cellValues.row.is_noted) === "1" && "Oui"} + {cellValues.row.is_noted && String(cellValues.row.is_noted) === "0" && "Non"} + +
+ + ); + } + }, { field: 'duration_concat', headerName: 'Durée', minWidth: 150, flex: 1, renderCell: (params) => , }, { field: 'duration', headerName: 'Durée', minWidth: 150, hide: true, flex: 1, renderCell: (params) => , }, { field: 'duration_unite', headerName: 'Unit.', minWidth: 150, hide: true, editable: false, renderCell: (params) => , }, @@ -133,7 +160,7 @@ const AddClassManual = (props) => { @@ -187,7 +214,7 @@ const AddClassManual = (props) => { ] - function handleClick_delete_UE_From_Class(event, cellValues){ + function handleClick_delete_UE_From_Class(event, cellValues) { Delete_Given_UE_From_Class(cellValues.row._id); } @@ -197,40 +224,40 @@ const AddClassManual = (props) => { function Delete_Given_UE_From_Class(local_ue_id) { - var form = new FormData(); + var form = new FormData(); - const stored_cookie = getCookie('tokenmysypart'); - form.append("token", stored_cookie); - form.append("class_id", props.mytrainingclass['class_id']); - form.append("ue_id", local_ue_id); + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + form.append("class_id", props.mytrainingclass['class_id']); + form.append("ue_id", local_ue_id); - var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_UE_From_Class/"; + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_UE_From_Class/"; - axios.post(myurl, form).then(res => { - //console.log(" In Delete_Given_UE_From_Class res.data.status = " + res.data.status); - //console.log(" In Delete_Given_UE_From_Class res.data.message r_class = " + res.data.message); + axios.post(myurl, form).then(res => { + //console.log(" In Delete_Given_UE_From_Class res.data.status = " + res.data.status); + //console.log(" In Delete_Given_UE_From_Class res.data.message r_class = " + res.data.message); - if (String(res.data.status) === String("true")) { - setDelete_Given_UE_From_Class_api("true"); - setDelete_Given_UE_From_Class_result(res.data.message); - Getall_Class_List_UE(); - alert(res.data.message) - } - else { - setDelete_Given_UE_From_Class_api("false"); - setDelete_Given_UE_From_Class_message(res.data.message); + if (String(res.data.status) === String("true")) { + setDelete_Given_UE_From_Class_api("true"); + setDelete_Given_UE_From_Class_result(res.data.message); + Getall_Class_List_UE(); + alert(res.data.message) + } + else { + setDelete_Given_UE_From_Class_api("false"); + setDelete_Given_UE_From_Class_message(res.data.message); - alert(res.data.message); + alert(res.data.message); - } + } - }).catch((error) => { + }).catch((error) => { - console.warn('Delete_Given_UE_From_Class : Not good man :( mysearchtext = ' + error); - setDelete_Given_UE_From_Class_api("false"); - alert(" Impossible de supprimer l'UE "); - }) + console.warn('Delete_Given_UE_From_Class : Not good man :( mysearchtext = ' + error); + setDelete_Given_UE_From_Class_api("false"); + alert(" Impossible de supprimer l'UE "); + }) } const [ue_gridline_id, setue_gridline_id] = useState(""); @@ -864,13 +891,13 @@ const AddClassManual = (props) => { } if (mylocaltraining.presentiel.distantiel) { - console.log(" ### distantiel distantiel distantiel = ", mylocaltraining.presentiel.distantiel); + setmydistance(mylocaltraining.presentiel.distantiel); var result2 = presentiel.filter((local_mymanager) => local_mymanager.value === String((mylocaltraining.presentiel.distantiel))) - if (result2[0]){ + if (result2[0]) { setmydistance_label(result2[0].label); - console.log(" IN DISTANTIEL : result2[0].label = ", result2[0].label) + } } else { setmydistance("0"); @@ -880,13 +907,13 @@ const AddClassManual = (props) => { if (mylocaltraining.presentiel.presentiel) { - console.log(" ### presentiel presentiel presentiel = ", mylocaltraining.presentiel.presentiel); + setmypresence(mylocaltraining.presentiel.presentiel); var result2 = presentiel.filter((local_mymanager) => local_mymanager.value === String((mylocaltraining.presentiel.presentiel))) - if (result2[0]){ + if (result2[0]) { setmypresence_label(result2[0].label); - console.log(" IN PRESEINTIEL : result2[0].label = ", result2[0].label) + } } else { setmypresence("0"); @@ -1514,7 +1541,7 @@ const AddClassManual = (props) => { .then((data) => data.json()) .then((data) => { setLoading(false); - // console.log(' IN Get_List_Metiers Success:', data['message'], "data['status'] = ", data['status']); + // console.log(' IN Get_List_Metiers Success:', data['message'], "data['status'] = ", data['status']); if (String(data['status']) === String("true")) { setGet_List_Metiers_api("true"); @@ -2339,6 +2366,9 @@ const AddClassManual = (props) => { }; + + const [add_one_eu_to_class, setadd_one_eu_to_class] = useState(""); + const [Record_All_PJ_api, setRecord_All_PJ_api] = useState(); const [Record_All_PJ_result, setRecord_All_PJ_result] = useState(); const [Record_All_PJ_message, setRecord_All_PJ_message] = useState(); @@ -2603,9 +2633,7 @@ const AddClassManual = (props) => { const [selected_ue_id, setselected_ue_id] = useState(""); const [selected_ue_credit, setselected_ue_credit] = useState(""); - const [selected_ue_is_noted, setselected_ue_is_noted] = useState(""); - const [selected_ue_pres_dist_hyp, setselected_ue_pres_dist_hyp] = useState(""); const New_Option_Is_Noted = [ @@ -2629,15 +2657,27 @@ const AddClassManual = (props) => { setselected_ue_credit(""); setselected_ue_is_noted(""); setselected_ue_pres_dist_hyp(""); + setadd_one_eu_to_class(""); }; + + function clean_ue_data() { + setselected_ue_id(""); + setselected_ue_credit(""); + setselected_ue_is_noted(""); + setselected_ue_pres_dist_hyp(""); + setadd_one_eu_to_class(""); + + } + const Dialog_Unite_Enseignement_handleClose_buton = () => { setDialog_Unite_Enseignement_open(false); setselected_ue_id(""); setselected_ue_credit(""); setselected_ue_is_noted(""); setselected_ue_pres_dist_hyp(""); + setadd_one_eu_to_class(""); }; const [Dialog_1_message, setDialog_1_message] = React.useState(false); @@ -2693,6 +2733,13 @@ const AddClassManual = (props) => { }) } + + const [gridline_ue_id, setgridline_ue_id] = useState(""); + + const sleep = (milliseconds) => { + return new Promise(resolve => setTimeout(resolve, milliseconds)) + } + return (
{isLoading &&
@@ -2712,35 +2759,56 @@ const AddClassManual = (props) => { {Dialog_1_message} + -
Choisir une unité d'enseignement - Choisir une unité d'enseignement + {New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && + (data)._id === String(selected_ue_id))[0].label} + onChange={(event, value) => { + if (value && value._id) { - onChange={(event, value) => { - if (value && value._id) { + setselected_ue_id(value._id); - setselected_ue_id(value._id); + } else { + setselected_ue_id(""); + } + }} - } else { - setselected_ue_id(""); + renderInput={(params) => } - }} + />} - renderInput={(params) => } - /> - } + + + {add_one_eu_to_class && String(add_one_eu_to_class) !== "1" && + New_Getall_Partner_List_UE_result && New_Getall_Partner_List_UE_result.length > 0 && + selected_ue_id &&
Unité d'enseignement + (data)._id === String(selected_ue_id))[0].label} + />
+ + }
Crédits { id="event_dialog_credit" type="number" fullWidth - //value={p_detail_tuteur1_nom} + value={selected_ue_credit} onChange={(e) => { setselected_ue_credit(e.target.value); } @@ -2761,11 +2829,12 @@ const AddClassManual = (props) => {
Est Evalué
- (data).value === String(p_detail_tuteur1_civilite))[0].label} + value={New_Option_Is_Noted.filter((data) => (data).id === String(selected_ue_is_noted))[0].label} fullWidth @@ -2780,8 +2849,7 @@ const AddClassManual = (props) => { renderInput={(params) => - } + />} /> @@ -2792,7 +2860,7 @@ const AddClassManual = (props) => { disablePortal name="event_dialog_mode_animation" id="event_dialog_mode_animation" - //value={New_civilite.filter((data) => (data).value === String(p_detail_tuteur1_civilite))[0].label} + value={New_Option_pres_dist_hyp.filter((data) => (data).id === String(selected_ue_pres_dist_hyp))[0].label} fullWidth @@ -2948,6 +3016,11 @@ const AddClassManual = (props) => { _id: JSON.parse(item)._id, code: JSON.parse(item).code, titre: JSON.parse(item).titre, + + credit: JSON.parse(item).credit, + pres_dist_hyp: JSON.parse(item).pres_dist_hyp, + is_noted: JSON.parse(item).is_noted, + duration: JSON.parse(item).duration, duration_unite: JSON.parse(item).duration_unite, duration_concat: JSON.parse(item).duration_concat, @@ -2959,24 +3032,22 @@ const AddClassManual = (props) => { pageSize={10} className="datagridclass" - /* onRowDoubleClick={(newSelectionModel) => { - setgridline_id(newSelectionModel.row.id); - - setsequence_gridline_id(""); - - setaddOneSession("0"); - setEdite_session("0"); - setsessionChanged(false); - //handleClick_edit_session_From_Line(newSelectionModel.row.id); - - setselected_session_id(newSelectionModel.row._id); - - setsession_selected_row_id(newSelectionModel.row.id); - - setDialog_2_message(String(JSON.parse(rowss[newSelectionModel.row.id]).title)); - setDialog_2_open(true); - - }}*/ + onRowDoubleClick={(newSelectionModel) => { + clean_ue_data(); + setgridline_ue_id(newSelectionModel.row.id); + setselected_ue_id(newSelectionModel.row._id) + + var current_class_ue_data = New_Getall_Class_List_UE_result.filter((ue_data) => ue_data._id === String((newSelectionModel.row._id))) + + setselected_ue_credit(current_class_ue_data[0]['credit']); + setselected_ue_is_noted(current_class_ue_data[0]['is_noted']); + setselected_ue_pres_dist_hyp(current_class_ue_data[0]['pres_dist_hyp']); + setadd_one_eu_to_class("0"); + + setDialog_Unite_Enseignement_open(true); + + + }} @@ -3041,10 +3112,11 @@ const AddClassManual = (props) => {
@@ -3241,8 +3313,8 @@ const AddClassManual = (props) => { onChange={(event, value) => { if (value && value.value) { - - + + setmypresence(value.value); setmypresence_label(value.label); setdatamodification("1"); diff --git a/src/components/DisplayPartnerSession.js b/src/components/DisplayPartnerSession.js index a19a696..a220060 100644 --- a/src/components/DisplayPartnerSession.js +++ b/src/components/DisplayPartnerSession.js @@ -62,6 +62,7 @@ import FullCalendar from "@fullcalendar/react"; import daygridPlugin from "@fullcalendar/daygrid"; import interactionPlugin from "@fullcalendar/interaction"; import timeGridPlugin from "@fullcalendar/timegrid"; +import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid'; import allLocales from '@fullcalendar/core/locales-all' @@ -10044,10 +10045,7 @@ const DisplayPartnerSession = (props) => { const handleSelect = (info) => { - /*if (String(selected_attendee_email).length < 2) { - alert(" Vous devez choisir un stagiaire"); - return; - } + setp_detail_title("Nouvelle") @@ -10060,12 +10058,26 @@ const DisplayPartnerSession = (props) => { setStartDate(info.start); setendDate(info.end); - setDialog_1_open(true);*/ + setDialog_DIALOG_AGENDA_open(true); }; + const [p_detail_event_id, setp_detail_event_id] = useState(); + const [p_detail_title, setp_detail_title] = useState(); + const [p_detail_start, setp_detail_start] = useState(); + const [p_detail_end, setp_detail_end] = useState(); + const [p_detail_comment, setp_detail_comment] = useState(); + const [p_detail_sequence_session_id, setp_detail_sequence_session_id] = useState(""); + + const [p_detail_justified, setp_detail_justified] = useState(false); + const [p_detail_event_type, setp_detail_event_type] = useState(); + + + const [startDate, setStartDate] = useState(new Date()); + const [endDate, setendDate] = useState(new Date()); + const [mysy_events, setmysy_events] = useState(); const [Partner_Debut_Journee, setPartner_Debut_Journee] = useState("7:00"); @@ -10073,51 +10085,72 @@ const DisplayPartnerSession = (props) => { const handleEventClick = (arg) => { - /* if (String(selected_attendee_email).length < 2) { - alert(" Vous devez choisir un stagiaire"); - return; - } - - - setp_detail_title(arg.event.title) - setp_detail_start(arg.event.start) - setp_detail_end(arg.event.end) - setp_detail_event_id(arg.event.id); - - if (arg.event.extendedProps.comment) { - setp_detail_comment(arg.event.extendedProps.comment); - } - else - setp_detail_comment(""); - - - if (arg.event.extendedProps.justified) { - if (String(arg.event.extendedProps.justified) === "true") - setp_detail_justified(true); - - else - setp_detail_justified(false); - - - } - else - setp_detail_justified(false); - - - - if (arg.event.extendedProps.type) { - setp_detail_event_type(arg.event.extendedProps.type); - } - else - setp_detail_event_type(""); - - - setStartDate(arg.event.start); - setendDate(arg.event.end); - setDialog_1_open(true); - */ + + setp_detail_title(arg.event.title) + setp_detail_start(arg.event.start) + setp_detail_end(arg.event.end) + setp_detail_event_id(arg.event.id); + + /* + if (arg.event.extendedProps.comment) { + setp_detail_comment(arg.event.extendedProps.comment); + } + else + setp_detail_comment(""); + + + if (arg.event.extendedProps.justified) { + if (String(arg.event.extendedProps.justified) === "true") + setp_detail_justified(true); + + else + setp_detail_justified(false); + + + } + else + setp_detail_justified(false); + + + + if (arg.event.extendedProps.type) { + setp_detail_event_type(arg.event.extendedProps.type); + } + else + setp_detail_event_type(""); +*/ + + setStartDate(arg.event.start); + setendDate(arg.event.end); + setDialog_DIALOG_AGENDA_open(true); + } + +const [Dialog_DIALOG_AGENDA_message, setDialog_DIALOG_AGENDA_message] = React.useState(false); +const [Dialog_DIALOG_AGENDA_open, setDialog_DIALOG_AGENDA_open] = React.useState(false); +function Dialog_DIALOG_AGENDA_handle_change_participant_session(message) { + setDialog_DIALOG_AGENDA_message(message); + setDialog_DIALOG_AGENDA_open(true); +} + +const Dialog_DIALOG_AGENDA_handleClose = () => { + //alert(" Utiliser le bouton 'fermer' "); + //setOpen(false); +}; + +const Dialog_DIALOG_AGENDA_handleClose_buton = () => { + setDialog_DIALOG_AGENDA_open(false); +}; + +const New_Option_Type_Event = [ + + { "id": "0", "label": "Absence", "value": "absence" }, + { "id": "1", "label": "Planning", "value": "planning" }, + { "id": "2", "label": "Autre", "value": "autre" }, +] + + return (
@@ -10361,6 +10394,219 @@ const DisplayPartnerSession = (props) => { {/*** fin dialog choix modele sequence */} + + {/**** Dialogue pour agenda */} + + + + MySy Information + + + {Dialog_DIALOG_AGENDA_message} + + +
+ + + + + +
+ + + {String(p_detail_event_type) !== "planning" &&
+ + + +
} + +
Titre + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + setp_detail_title(e.target.value); + } + } + + /> + +
+ +
Debut + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + return setStartDate(date); + } + } + + + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
+ + +
Fin + { + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + return setendDate(date); + } + } + + + className="disabled_style session_caract_Dialog_DatePicker" + locale='fr-FR' + showTimeSelect + timeFormat="HH:mm" + timeIntervals={15} + dateFormat="dd/MM/yyyy HH:mm" + is24Hour + + /> + +
+ +
Commentaire + { + + console.log(" dans comment p_detail_sequence_session_id = ", p_detail_sequence_session_id); + if (String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "") + setp_detail_comment(e.target.value); + } + } + multiline + minRows={2} + maxRows={2} + rows={2} + + /> + +
+ + +
+ + + + +
+ {String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" &&
+ {p_detail_event_id && String(p_detail_event_id) !== "" && } + {(!p_detail_event_id || String(p_detail_event_id) === "") && } + + + +
} +
+ +
+
+ +
+ + + + + {String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" && + +
+ +
+ + +
} + +
+ + + {/*** fin dialogue pr agenda */} {
-
+
Affichage :
@@ -14255,7 +14501,7 @@ const DisplayPartnerSession = (props) => { }} //eventContent={(info) => } //plugins={[timeGridPlugin]} - plugins={[timeGridPlugin, daygridPlugin, interactionPlugin]} + plugins={[timeGridPlugin, daygridPlugin, interactionPlugin, resourceTimeGridPlugin]} views={["dayGridMonth", "dayGridWeek", "dayGridDay"]} slotMinTime={Partner_Debut_Journee} slotMaxTime={Partner_Fin_Journee} diff --git a/src/components/DisplayPartnerUnite_Enseignement.js b/src/components/DisplayPartnerUnite_Enseignement.js index 76410ff..9607aab 100644 --- a/src/components/DisplayPartnerUnite_Enseignement.js +++ b/src/components/DisplayPartnerUnite_Enseignement.js @@ -42,6 +42,8 @@ import { TransitionProps } from '@mui/material/transitions'; import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif"; import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5"; import { gridClasses } from '@mui/x-data-grid'; +import Link from '@mui/material/Link'; +import { PiDotsThree } from "react-icons/pi"; const DisplayPartnerUnite_Enseignement = (props) => { const history = useHistory(); @@ -52,11 +54,18 @@ const DisplayPartnerUnite_Enseignement = (props) => { var date_today_90j = new Date(); date_today_90j.setDate(date_today_90j.getDate() + 90); - const [p_filtre1, setp_filtre1] = useState(); - const [p_filtre1_value, setp_filtre1_value] = useState(); + const [p_filtre1, setp_filtre1] = useState(""); + const [p_filtre1_value, setp_filtre1_value] = useState(""); + + const [p_filtre2, setp_filtre2] = useState(""); + const [p_filtre2_value, setp_filtre2_value] = useState(""); + + const [p_filtre3, setp_filtre3] = useState(""); + const [p_filtre3_value, setp_filtre3_value] = useState(); + + const [p_filtre4, setp_filtre4] = useState(""); + const [p_filtre4_value, setp_filtre4_value] = useState(); - const [p_filtre2, setp_filtre2] = useState(); - const [p_filtre2_value, setp_filtre2_value] = useState(); const [isLoading, setLoading] = useState(); @@ -65,9 +74,9 @@ const DisplayPartnerUnite_Enseignement = (props) => { const columns = [ { field: '_id', headerName: '_id', hide: true }, { field: 'id', headerName: 'id', hide: true }, - { field: 'code', headerName: 'Code', flex: 1, hide: false, editable: false }, - { field: 'titre', headerName: 'Titre', flex: 1, hide: false, editable: false }, - { field: 'duration_concat', headerName: 'Durée', flex: 1, hide: true, editable: false }, + { field: 'code', headerName: 'Code', flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'titre', headerName: 'Titre', flex: 1, hide: false, editable: false, renderCell: (params) => , }, + { field: 'duration_concat', headerName: 'Durée', flex: 1, hide: false, editable: false, renderCell: (params) => , }, { field: 'duration', headerName: 'Durée', flex: 1, hide: true, editable: false }, { field: 'duration_unite', headerName: 'Unit.', flex: 1, hide: true, editable: false }, @@ -133,6 +142,38 @@ const DisplayPartnerUnite_Enseignement = (props) => { ] + + + function ExpandableCell_50({ value }) { + const [expanded, setExpanded] = React.useState(false); + + return ( + + ); + } + + function handleClick_delete(event, cellValues) { Delete_Given_UE(cellValues.row._id); @@ -243,6 +284,95 @@ const DisplayPartnerUnite_Enseignement = (props) => { }) } + const [Getall_Parter_Unite_Enseignement_with_Filter_api, setGetall_Parter_Unite_Enseignement_with_Filter_api] = useState(); + const [Getall_Parter_Unite_Enseignement_with_Filter_message, setGetall_Parter_Unite_Enseignement_with_Filter_message] = useState(); + const [Getall_Parter_Unite_Enseignement_with_Filter_result, setGetall_Parter_Unite_Enseignement_with_Filter_result] = useState([]); + function Getall_Parter_Unite_Enseignement_with_Filter(event) { + + var form = new FormData(); + // Recuperation des parametres + var filtre1 = p_filtre1; + var filtre2 = p_filtre2; + var filtre3 = p_filtre3; + var filtre4 = p_filtre4; + + var filtre1_value = ""; + var filtre2_value = ""; + var filtre3_value = ""; + var filtre4_value = ""; + // Recuperation des valeurs de filtres + + if (p_filtre1_value) { + filtre1_value = p_filtre1_value; + form.append(filtre1, filtre1_value); + } + + if (p_filtre2_value) { + filtre2_value = p_filtre2_value; + form.append(filtre2, filtre2_value); + } + + if (p_filtre3_value) { + filtre3_value = p_filtre3_value; + form.append(filtre3, p_filtre3_value); + } + + if (p_filtre4_value) { + filtre4_value = p_filtre4_value; + form.append(filtre4, p_filtre4_value); + } + + + const stored_cookie = getCookie('tokenmysypart'); + form.append("token", stored_cookie); + + + var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Unite_Enseignement_with_filter/"; + + axios.post(myurl, form).then(res => { + + if (String(res.data.status) === String("true")) { + //console.log(" In Getall_Parter_Unite_Enseignement_with_Filter res.data.status = " + res.data.status); + //console.log(" In Getall_Parter_Unite_Enseignement_with_Filter res.data.message r_class = " + res.data.message); + setGetall_Parter_Unite_Enseignement_with_Filter_api("true"); + setGetall_Parter_Unite_Enseignement_with_Filter_result(res.data.message); + setRows(res.data.message); + } + else { + setGetall_Parter_Unite_Enseignement_with_Filter_api("false"); + setGetall_Parter_Unite_Enseignement_with_Filter_message(res.data.message); + alert(res.data.message); + } + + }).catch((error) => { + console.warn('Not good man :( Getall_Parter_Unite_Enseignement_with_Filter = ', error); + setGetall_Parter_Unite_Enseignement_with_Filter_api("false"); + alert(" Impossible de recuperer la liste des unités d'enseignement "); + //setmyApimyApiMessage("") + }) + } + + function clean_all_filters() { + + setgridline_id(''); + + setp_filtre1(""); + setp_filtre1_value(""); + + setp_filtre2(""); + setp_filtre2_value(""); + + setp_filtre3(""); + setp_filtre3_value(""); + + setp_filtre4(""); + setp_filtre4_value(""); + + + setSelectionModel([]); + + Getall_Parter_Unite_Enseignement(); + } const [Get_Given_Unite_Enseignement_api, setGet_Given_Unite_Enseignement_api] = useState(); const [Get_Given_Unite_Enseignement_message, setGet_Given_Unite_Enseignement_message] = useState(); @@ -321,6 +451,13 @@ const DisplayPartnerUnite_Enseignement = (props) => { setfield_objectif(""); } + if (local_ue.methode_evaluation) { + setfield_suivi_eval(local_ue.methode_evaluation); + } else { + setfield_suivi_eval(""); + } + + if (local_ue.methode_pedagogique) { setfield_methode_pedago(local_ue.methode_pedagogique); } else { @@ -328,8 +465,6 @@ const DisplayPartnerUnite_Enseignement = (props) => { } - - if (local_ue.description) { setfield_description(local_ue.description); } else { @@ -602,8 +737,14 @@ const DisplayPartnerUnite_Enseignement = (props) => { clean_fields(); alert(res.data.message); - + if (document.getElementById('myRef_head')) { + var divh = document.getElementById('myRef_head').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } } else { setAdd_Update_UE_Data_api("false"); @@ -626,6 +767,14 @@ const DisplayPartnerUnite_Enseignement = (props) => { setdisplay_ue("0"); setue_data_edit_mode(""); setadd_one_ue("1"); + + if (document.getElementById('myRef')) { + var divh = document.getElementById('myRef').offsetTop; + window.scrollTo({ + top: divh, + behavior: "smooth", + }); + } } const [p_detail_code, setp_detail_code] = useState(""); @@ -716,6 +865,14 @@ const DisplayPartnerUnite_Enseignement = (props) => { setadd_one_ue(""); } + const New_Option_Filter = [ + { "id": "titre", "label": "Titre ", "value": "titre" }, + { "id": "code", "label": "Code", "value": "code" }, + { "id": "", "label": "", "value": "" }, + { "id": "1", "label": "", "value": "1" }, // Cette ligne pour couvrir l'ajout d'une ligne de filter. C'est fait expres. + ] + + return (
{isLoading &&
@@ -747,21 +904,30 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Utilisez les filtres !
- 0 && { - setp_filtre1(e.target.value); + id="filtre1" + className="disabled_style" + value={New_Option_Filter.filter((data) => (data).value === String(p_filtre1))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre1(value.value); + + } }} - > - Nom du point de configuration   + + renderInput={(params) => + } + />} -
@@ -810,8 +976,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {   { - setp_filtre1(); - setp_filtre1_value(); + setp_filtre1(""); + setp_filtre1_value(""); }} /> @@ -820,15 +986,184 @@ const DisplayPartnerUnite_Enseignement = (props) => {
+ {p_filtre2 && +
+
+ + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre2))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre2(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + +
+
+ {String(p_filtre2).length > 2 && + setp_filtre2_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre2_value(""); + }} /> + + ), + }} + + />} +
+ + {String(p_filtre2).length > 2 && } + + {String(p_filtre2).length > 2 && } + +
+ } + + + {p_filtre3 && +
+
+ + {New_Option_Filter && New_Option_Filter.length > 0 && (data).value === String(p_filtre3))[0].label} + options={New_Option_Filter} + onChange={(event, value) => { + if (value && value.value) { + setp_filtre3(value.value); + + } + + }} + + renderInput={(params) => + } + />} + + +
+
+ {String(p_filtre3).length > 2 && + setp_filtre3_value(e.target.value)} + InputProps={{ + endAdornment: ( + + { + setp_filtre3_value(""); + }} /> + + ), + }} + + />} +
+ + {String(p_filtre2).length > 2 && } + + {String(p_filtre3).length > 2 && } +
+ } + +
-
-
@@ -839,6 +1174,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
+
@@ -980,7 +1316,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
@@ -1039,14 +1375,14 @@ const DisplayPartnerUnite_Enseignement = (props) => { required name="duree_01" id="duree_01" - + InputLabelProps={{ shrink: true, }} //disabled={true} className="disabled_style" value={p_detail_duration} - + />
@@ -1064,7 +1400,7 @@ const DisplayPartnerUnite_Enseignement = (props) => { //disabled={true} className="disabled_style" value={p_detail_duration_unite} - + />
@@ -1125,7 +1461,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
-
Pré-requis * (max 1000 caractères)
+
Pré-requis (max 1000 caractères)
{
-
Description * (max 1000 caractères)
+
Description (max 1000 caractères)
{
-
Objectif* (max 1000 caractères)
+
Objectif (max 1000 caractères)
editorRef_objectif.current = editor} initialValue={field_objectif} @@ -1338,13 +1674,13 @@ const DisplayPartnerUnite_Enseignement = (props) => { } {String(ue_data_edit_mode) !== "1" && -
+
Pré-requis :
- {parse(field_preprequis.replace(/(<([^>]+)>)/ig, '')) } + {parse(field_preprequis.replace(/(<([^>]+)>)/ig, ''))}

@@ -1352,8 +1688,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Desscription :
- {parse(field_description.replace(/(<([^>]+)>)/ig, '')) } - + {parse(field_description.replace(/(<([^>]+)>)/ig, ''))} +

@@ -1361,8 +1697,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Objectif :
- {parse(field_objectif.replace(/(<([^>]+)>)/ig, '')) } - + {parse(field_objectif.replace(/(<([^>]+)>)/ig, ''))} +

@@ -1371,8 +1707,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Programme :
- - {parse(field_programme.replace(/(<([^>]+)>)/ig, '')) } + + {parse(field_programme.replace(/(<([^>]+)>)/ig, ''))}

@@ -1381,8 +1717,9 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Suivi & Evaluation :
- {parse(field_suivi_eval.replace(/(<([^>]+)>)/ig, '')) } - + {parse(field_suivi_eval.replace(/(<([^>]+)>)/ig, ''))} + +

@@ -1391,8 +1728,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
Méthode Pédagogique :
- - {parse(field_methode_pedago.replace(/(<([^>]+)>)/ig, '')) } + + {parse(field_methode_pedago.replace(/(<([^>]+)>)/ig, ''))}

@@ -1531,7 +1868,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
-
Pré-requis * (max 1000 caractères)
+
Pré-requis (max 1000 caractères)
{
-
Description * (max 1000 caractères)
+
Description (max 1000 caractères)
{
-
Objectif* (max 1000 caractères)
+
Objectif (max 1000 caractères)
editorRef_objectif.current = editor} initialValue={field_objectif} @@ -1748,7 +2085,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
-
diff --git a/src/components/Module_Agenda.js b/src/components/Module_Agenda.js index e32a557..4803850 100644 --- a/src/components/Module_Agenda.js +++ b/src/components/Module_Agenda.js @@ -54,6 +54,9 @@ import FullCalendar, { formatDate } from "@fullcalendar/react"; import dayGridPlugin from "@fullcalendar/daygrid"; import timeGridPlugin from "@fullcalendar/timegrid"; import interactionPlugin from "@fullcalendar/interaction"; +import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid'; + +import resourceTimelinePlugin from '@fullcalendar/resource-timeline' import { ListItem, @@ -1033,6 +1036,36 @@ const Module_Agenda = (props) => { { "id": "1", "label": "Materiel", "value": "ressource_materielle" }, ] + + const events_test = [{ + "id": 1, + "type": null, + "resourceIds": [21], + "title": "Meeting With John", + "start": "2024-05-04 09:00:00", + "end": "2024-05-04 11:20:00" + }, + { + "id": 1, + "type": null, + "resourceIds": [22], + "title": "Meeting With ssss", + "start": "2024-05-04 09:30:00", + "end": "2024-05-04 14:20:00" + } + ] + + const resources_test = [ + { + id: 21, + title: "User A" + }, + { + id: 22, + title: "User B" + } + ] + return (
{isLoading &&
@@ -1078,9 +1111,9 @@ const Module_Agenda = (props) => { }} renderInput={(params) => + /> } /> {/* { - {String(props.write_access) === "1" && String(p_detail_sequence_session_id) === "" && p_detail_event_id && String(p_detail_event_id) !== "" && - -
- -
+ } className="bton_supprime_dialog">Supprimer l'événement +
- } + }
@@ -1312,9 +1345,9 @@ const Module_Agenda = (props) => { }} renderInput={(params) => + /> } /> @@ -1423,9 +1456,9 @@ const Module_Agenda = (props) => { }} renderInput={(params) => + /> } /> @@ -1493,7 +1526,7 @@ const Module_Agenda = (props) => { }} //eventContent={(info) => } //plugins={[timeGridPlugin]} - plugins={[timeGridPlugin, daygridPlugin, interactionPlugin]} + plugins={[timeGridPlugin, daygridPlugin, interactionPlugin, resourceTimeGridPlugin]} views={["dayGridMonth", "dayGridWeek", "dayGridDay"]} slotMinTime={Partner_Debut_Journee} slotMaxTime={Partner_Fin_Journee} @@ -1506,10 +1539,10 @@ const Module_Agenda = (props) => { /> - -
+ +
) }