diff --git a/src/components/DisplayPartnerTrainingsPagination.js b/src/components/DisplayPartnerTrainingsPagination.js
index a0f2582..5d6acef 100644
--- a/src/components/DisplayPartnerTrainingsPagination.js
+++ b/src/components/DisplayPartnerTrainingsPagination.js
@@ -37,7 +37,7 @@ import DialogTitle from '@mui/material/DialogTitle';
import ToggleSwitch from "./ToggleSwitch";
import SendIcon from '@mui/icons-material/Send';
import { GrDocumentCsv } from "react-icons/gr";
-
+import { DataGridPro } from '@mui/x-data-grid-pro';
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
@@ -292,7 +292,7 @@ const DistplayPartnerTraningsPage = (props) => {
})
.then((data) => data.json())
.then((data) => {
- //console.log('GetAllClass_WOfilter : Success:', data['message'], "data['status'] = ", data['status']);
+ console.log('GetAllClass_WOfilter : Success:', data['message'], "data['status'] = ", data['status']);
setTableData(data['message']);
setRows(data['message']);
@@ -307,6 +307,7 @@ const DistplayPartnerTraningsPage = (props) => {
}
+
function GetAllClass_new(event) {
var form = new FormData();
@@ -350,7 +351,8 @@ const DistplayPartnerTraningsPage = (props) => {
})
.then((data) => data.json())
.then((data) => {
- //console.log('Success:', data['message'], "data['status'] = ", data['status']);
+ // console.log('GetAllClass_new ==> Success:', data['message'], "data['status'] = ", data['status']);
+ console.log(" String(data['status'] = ", String(data['status']));
setTableData(data['message']);
setRows(data['message']);
if (String(data['status']) === String("false")) {
@@ -361,6 +363,10 @@ const DistplayPartnerTraningsPage = (props) => {
else {
setmyApiResponse("True");
+
+
+
+
}
}).catch((error) => {
@@ -499,8 +505,8 @@ const DistplayPartnerTraningsPage = (props) => {
const columns = [
- { field: 'id', headerName: 'id', hide: true, maxWidth: 1, disableExport: true, },
- { field: '_id', headerName: '_id', hide: true, maxWidth: 1, disableExport: true, },
+ { field: "id", hide: true, filterable: false, disableExport: true },
+ { field: '_id', headerName: '_id', hide: true, disableExport: true, Width: 0, },
{ field: 'lms_class_code', headerName: 'lms_class_code', hide: true, Width: 0, },
{ field: 'duration', headerName: 'duration', hide: true, Width: 0, },
{ field: 'presentiel', headerName: 'Présentiel', hide: true, Width: 0, },
@@ -517,6 +523,7 @@ const DistplayPartnerTraningsPage = (props) => {
{ field: 'domain', headerName: 'Domaine', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, editable: false, renderCell: (params) =>
, },
{ field: 'metier', headerName: 'Métier', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, hide: true, editable: false, renderCell: (params) =>
, },
+
{ field: 'categorie', headerName: 'Catégorie', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, hide: true, editable: false, renderCell: (params) =>
, },
@@ -560,8 +567,9 @@ const DistplayPartnerTraningsPage = (props) => {
},
-
{ field: 'url', headerName: 'lien', minWidth: 20, hideable: true, hide: true, editable: false, },
+
+
{ field: 'description', headerName: 'Description', hide: true, resizable: true, minWidth: 250, maxWidth: 300, flex: 1, renderCell: (params) =>
, },
{ field: 'version', headerName: 'Version Catalogue', hide: true, minWidth: 100, maxWidth: 200, flex: 1, renderCell: (params) =>
, },
@@ -760,13 +768,13 @@ const DistplayPartnerTraningsPage = (props) => {
aria-controls={open ? 'long-menu' : undefined}
aria-expanded={open ? 'true' : undefined}
aria-haspopup="true"
- // onClick={handleClick_option_button_vertical}
+ // onClick={handleClick_option_button_vertical}
onClick={(e) => {
handleClick_option_button_vertical(e);
setworking_cellValues(cellValues);
}}
-
+
>
@@ -969,6 +977,8 @@ const DistplayPartnerTraningsPage = (props) => {
},
]
+
+
const [working_cellValues, setworking_cellValues] = useState(false);
const [dialogOpen_supp, setdialogOpen_supp] = useState(false);
@@ -2221,6 +2231,45 @@ const DistplayPartnerTraningsPage = (props) => {
// FIN EXPORT EXCEL DATAGRID
const classes = useStyles();
+ // const [getTreeDataPath, setgetTreeDataPath] = useState("");
+
+
+
+ const [data_row_grouped_by, setdata_row_grouped_by] = useState("");
+
+ const [data_row_grouped_field, setdata_row_grouped_field] = useState("");
+
+ function getTreeDataPath(param) {
+
+ var local_tmp = data_row_grouped_field;
+
+ var local_tab_array = [];
+
+
+ if (param[local_tmp]) {
+ local_tab_array.push(String(param[local_tmp]));
+ } else {
+ local_tab_array.push("");
+ }
+
+ local_tab_array.push(String(param["external_code"]));
+
+ return local_tab_array;
+ }
+
+
+ function datagrid_grouped_by(champ_filtre) {
+ setdata_row_grouped_field(champ_filtre);
+
+ getTreeDataPath(rowss)
+ }
+
+ const New_option_group_by = [
+ { "id": "", "label": "Aucun", "value": "" },
+ { "id": "domain", "label": "Domaine", "value": "domain" },
+ { "id": "metier", "label": "Métier ", "value": "metier" },
+ ]
+
return (
@@ -2732,7 +2781,39 @@ const DistplayPartnerTraningsPage = (props) => {
-
+
+
+
+
+
+
{/*!createtraining &&
*/}
-
+ {(!data_row_grouped_by || String(data_row_grouped_by) === "") &&
{
onSelectionModelChange={(newSelectionModel) => {
setSelectionModel(newSelectionModel);
- //console.log("ch selected--" + newSelectionModel);
+ // console.log("ch selected 001--" + newSelectionModel);
}}
selectionModel={selectionModel}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
@@ -2811,8 +2892,10 @@ const DistplayPartnerTraningsPage = (props) => {
title: parse((JSON.parse(item).title).replace(/(<([^>]+)>)/ig, '')),
domain: New_Get_List_Domaines_result.filter((data) => (data)._id === String(JSON.parse(item).domaine))[0].label,
+ domain_code: New_Get_List_Domaines_result.filter((data) => (data)._id === String(JSON.parse(item).domaine))[0].code,
metier: New_Get_List_Metiers_result.filter((data) => (data)._id === String(JSON.parse(item).metier))[0].label,
+ metier_code: New_Get_List_Metiers_result.filter((data) => (data)._id === String(JSON.parse(item).metier))[0].code,
categorie: New_Get_List_Categorie_result.filter((data) => (data)._id === String(JSON.parse(item).categorie))[0].label,
@@ -2898,10 +2981,197 @@ const DistplayPartnerTraningsPage = (props) => {
/>}
+
+
+
-
-
+
}
+
+ {data_row_grouped_by && (String(data_row_grouped_by) === "domain" || String(data_row_grouped_by) === "metier") &&
+
+
+ {
+ setSelectionModel(newSelectionModel);
+ console.log("ch selected--" + newSelectionModel);
+ }}
+ selectionModel={selectionModel}
+ localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
+ rows={rowss.map((item, index) => (
+
+ {
+ id: index,
+ _id: JSON.parse(item)._id,
+ internal_url: JSON.parse(item).internal_url,
+ zone_diffusion: JSON.parse(item).zone_diffusion_str,
+ external_code: JSON.parse(item).external_code,
+ title: parse((JSON.parse(item).title).replace(/(<([^>]+)>)/ig, '')),
+
+ domain: New_Get_List_Domaines_result.filter((data) => (data)._id === String(JSON.parse(item).domaine))[0].label,
+
+ metier: New_Get_List_Metiers_result.filter((data) => (data)._id === String(JSON.parse(item).metier))[0].label,
+
+ categorie: New_Get_List_Categorie_result.filter((data) => (data)._id === String(JSON.parse(item).categorie))[0].label,
+
+
+ url: JSON.parse(item).url,
+
+ price: JSON.parse(item).price,
+ description: parse((JSON.parse(item).description).replace(/(<([^>]+)>)/ig, '')),
+ published: JSON.parse(item).published,
+ lms_class_code: JSON.parse(item).lms_class_code,
+ duration: JSON.parse(item).duration,
+ duration_unit: JSON.parse(item).duration_unit,
+ duration_in_hour: JSON.parse(item).duration_in_hour,
+ presentiel: JSON.parse(item).presentiel.presentiel,
+ distanciel: JSON.parse(item).presentiel.distantiel,
+ cible: JSON.parse(item).pourqui,
+ currency: JSON.parse(item).currecny,
+
+ version: JSON.parse(item).version,
+
+ nb_session_formation: JSON.parse(item).nb_session_formation,
+
+
+ }
+ ))}
+
+ columns={columns}
+ pageSize={10}
+ className="datagridclass"
+
+ onRowDoubleClick={(newSelectionModel) => {
+
+ setgridline_id(newSelectionModel.row.id);
+ Closecreatetraining();
+ closeTrainingForm();
+
+ var al = JSON.parse(rowss[newSelectionModel.row.id])
+
+ setselected_row_data_json(JSON.parse(rowss[newSelectionModel.row.id]));
+ setclassidtrainingtoupdate(newSelectionModel.row._id);
+
+ setreftrainingtoupdate(newSelectionModel.row.internal_url);
+ setexternalcodetraining_toupdate(newSelectionModel.row.external_code);
+ setDialog_formation_open(true);
+
+ }
+ }
+
+ rowsPerPageOptions={[10]}
+ disableSelectionOnClick
+ /* components={{
+ Toolbar: GridToolbar,
+ }}*/
+
+ getCellClassName={(params) => {
+ if (params.field === 'published' && String(params.value) === "1") {
+ return 'cell--published';
+ }
+
+ if (params.field === "published" && String(params.value) !== "1") {
+ return 'cell--unpublished'
+ }
+
+ }}
+ 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';
+ }
+
+ if (String(params.row.published) === "1") {
+ return 'line--published';
+ }
+
+ if (String(params.row.published) !== "1") {
+ return 'line--unpublished';
+ }
+
+ }}
+ getEstimatedRowHeight={() => 200}
+ getRowHeight={() => "auto"}
+
+ sx={datagridSx}
+
+
+ />
+
+
+
+ }
+
+
+
ensss masss
{selectionModel && selectionModel.length >= 1 &&
diff --git a/src/components/HebergementLms.js b/src/components/HebergementLms.js
index ce73e4f..196a2d6 100644
--- a/src/components/HebergementLms.js
+++ b/src/components/HebergementLms.js
@@ -246,7 +246,7 @@ function HebergementLms(props) {
}
//image/png
- if (String(file_type) !== "image/png") {
+ if (String(file_type) !== "image/png" && String(file_type) !== "image/jpg" && String(file_type) !== "image/webp" ) {
alert("Le fichier n'est pas au format PNG");
return;
}
@@ -492,7 +492,7 @@ function HebergementLms(props) {
}
//image/png
- if (String(file_type) !== "image/png") {
+ if (String(file_type) !== "image/png" && String(file_type) !== "image/jpg" && String(file_type) !== "image/webp" ) {
alert("Le fichier n'est pas au format PNG");
return;
}
diff --git a/src/components/RechercheArticles_new_v2.js b/src/components/RechercheArticles_new_v2.js
index a988d56..586d78b 100644
--- a/src/components/RechercheArticles_new_v2.js
+++ b/src/components/RechercheArticles_new_v2.js
@@ -4,7 +4,7 @@ import axios from "axios";
import Articles from "../components/Article";
import { FaSearch, FaRegArrowAltCircleDown, FaRegArrowAltCircleUp } from 'react-icons/fa';
import { format } from 'date-fns'
-import moment from "moment";
+import moment from "moment";
import Pagination from "./TestPagination";
import data from "./data/mock-data.json";
import { useHistory } from "react-router-dom";
@@ -23,7 +23,7 @@ import connect_white from "../mysy_img/connect_white_v2.png";
import connect_green from "../mysy_img/connect_green.png";
import { BsFillXCircleFill } from "react-icons/bs";
import Fotter_v3 from "./Fotter_v3";
-
+
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -780,6 +780,8 @@ const RechercheArticles_new_v2 = (props) => {
setarticle_avis_avis("");
setis_data_changed("");
setarticle_avis_internal_url("");
+ setarticle_avis_display_header_img(false);
+ setarticle_avis_meta_description("");
}
const [article_avis_date_publication, setarticle_avis_date_publication] = useState(new Date().toLocaleDateString('fr-FR'));
@@ -850,11 +852,11 @@ const RechercheArticles_new_v2 = (props) => {
// Si une balise meta description n'est pas fourni, alors on lui donne le titre
var local_meta_description = "";
if (article_avis_meta_description) {
- local_meta_description = String(article_avis_meta_description).trim().toLocaleLowerCase().substring(0, 154);
+ local_meta_description = String(article_avis_meta_description).trim().toLocaleLowerCase().substring(0, 200);
} else {
- local_meta_description = String(article_avis_title_formation).trim().toLocaleLowerCase().substring(0, 154);
+ local_meta_description = String(article_avis_title_formation).trim().toLocaleLowerCase().substring(0, 200);
}
- form.append("meta_description", state);
+ form.append("meta_description", local_meta_description);
// console.log(" ## form = ", form);
@@ -945,7 +947,7 @@ const RechercheArticles_new_v2 = (props) => {
//image/png
- if (String(file_type) !== "image/png" && String(file_type) !== "image/jpg" &&
+ if (String(file_type) !== "image/png" && String(file_type) !== "image/jpg" && String(file_type) !== "image/webp" &&
String(file_type) !== "image/jpeg") {
alert("Le fichier n'est pas au format PNG, String(file_type)" + String(file_type));
return;
@@ -1299,7 +1301,7 @@ const RechercheArticles_new_v2 = (props) => {
{logo_file_name &&
}
{
{
if (result['repeat_instruction'] && result['repeat_instruction'] === "1" && result['collection_instruction_id']) {
setcollection_instruction_id(result['collection_instruction_id']);
}
- else if (result['repeat_instruction'] && result['repeat_instruction'] !== "1" ) {
+ else if (result['repeat_instruction'] && result['repeat_instruction'] !== "1") {
setcollection_instruction_id("");
}
@@ -1047,6 +1057,140 @@ const TestUrl_New = (props) => {
const [isLoading, setLoading] = useState();
+ const columns = [
+ { field: 'jobTitle', headerName: 'Job Title', width: 200 },
+ {
+ field: 'recruitmentDate',
+ headerName: 'Recruitment Date',
+ type: 'date',
+ width: 150,
+ },
+ ];
+
+ const columns_no_group = [
+ { field: 'hierarchy', headerName: 'hierarchy Tes', width: 200 },
+ { field: 'jobTitle', headerName: 'Job Title', width: 200 },
+ {
+ field: 'recruitmentDate', headerName: 'Recruitment Date', type: 'date', width: 150,
+ },
+ ];
+
+ const rows = [
+ {
+ hierarchy: ['Sarah'],
+ jobTitle: 'Head of Human Resources',
+ recruitmentDate: new Date(2020, 8, 12),
+ id: 0,
+ },
+ {
+ hierarchy: ['Thomas'],
+ jobTitle: 'Head of Sales',
+ recruitmentDate: new Date(2017, 3, 4),
+ id: 1,
+ },
+ {
+ hierarchy: ['Thomas', 'Robert'],
+ jobTitle: 'Sales Person',
+ recruitmentDate: new Date(2020, 11, 20),
+ id: 2,
+ },
+ {
+ hierarchy: ['Thomas', ''],
+ jobTitle: 'Sales Person',
+ recruitmentDate: new Date(2020, 10, 14),
+ id: 3,
+ },
+ {
+ hierarchy: ['Thomas', 'Nancy'],
+ jobTitle: 'Sales Person',
+ recruitmentDate: new Date(2017, 10, 29),
+ id: 4,
+ },
+ {
+ hierarchy: ['Thomas', 'Daniel'],
+ jobTitle: 'Sales Person',
+ recruitmentDate: new Date(2020, 7, 21),
+ id: 5,
+ },
+ {
+ hierarchy: ['Thomas', 'Christopher'],
+ jobTitle: 'Sales Person',
+ recruitmentDate: new Date(2020, 7, 20),
+ id: 6,
+ },
+ {
+ hierarchy: ['Thomas', 'Donald'],
+ jobTitle: 'Sales Person',
+ recruitmentDate: new Date(2019, 6, 28),
+ id: 7,
+ },
+ {
+ hierarchy: ['Mary'],
+ jobTitle: 'Head of Engineering',
+ recruitmentDate: new Date(2016, 3, 14),
+ id: 8,
+ },
+ {
+ hierarchy: ['Mary', 'Jennifer'],
+ jobTitle: 'Tech lead front',
+ recruitmentDate: new Date(2016, 5, 17),
+ id: 9,
+ },
+ {
+ hierarchy: ['Mary', 'Jennifer', 'Anna'],
+ jobTitle: 'Front-end developer',
+ recruitmentDate: new Date(2019, 11, 7),
+ id: 10,
+ },
+ {
+ hierarchy: ['Mary', 'Michael'],
+ jobTitle: 'Tech lead devops',
+ recruitmentDate: new Date(2021, 7, 1),
+ id: 11,
+ },
+ {
+ hierarchy: ['Mary', 'Linda'],
+ jobTitle: 'Tech lead back',
+ recruitmentDate: new Date(2017, 0, 12),
+ id: 12,
+ },
+ {
+ hierarchy: ['Mary', 'Linda', 'Elizabeth'],
+ jobTitle: 'Back-end developer',
+ recruitmentDate: new Date(2019, 2, 22),
+ id: 13,
+ },
+ {
+ hierarchy: ['Mary', 'Linda', 'William'],
+ jobTitle: 'Back-end developer',
+ recruitmentDate: new Date(2018, 4, 19),
+ id: 14,
+ },
+ ];
+
+
+ const getTreeDataPath = (param) => param.hierarchy;
+
+ const HeaderWithIconRoot = styled('div')(({ theme }) => ({
+ overflow: 'hidden',
+ display: 'flex',
+ alignItems: 'center',
+ '& span': {
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ marginRight: theme.spacing(0.5),
+ },
+ }));
+
+
+ const [data_row_grouped_by, setdata_row_grouped_by] = useState("");
+
+ function datagrid_grouped_by_domain() {
+ setdata_row_grouped_by("domaine");
+ getTreeDataPath(rows)
+ }
+
+
return (
@@ -1149,102 +1293,28 @@ const TestUrl_New = (props) => {
parametres courseid = {courseid}, tabid = {tabid}
- {/*
test microphone
-
-
Microphone: {listening ? 'on' : 'off'}
-
-
-
-
{transcript}
-
-
-
*/}
-
-
-
-
+
Datagrid Grouping
+ Grouper par
+
-
- ZZZZ
-
- {/* NOTICE: id must be unique between EVERY
and pair */}
- {/* NOTICE: inside the pair, and must have the same id */}
-
-
- Click Droite Menu
- TTTTTTTTTTTTTTTTtt
-
-
-
-
-
-
-
-
-
-
-
-
- {data &&
- data.columns.map((column) => (
-
-
- column.field = {column.field}
-
- ----
-
-
- ))}
-
+ {data_row_grouped_by && String(data_row_grouped_by) === "domaine" &&
Datagrid Grouping
+
+
}
-
enregistrement audio
+ EN COURS : A NE PAS SUPPRIMER enregistrement audio
< div >
diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js
index 41770f7..f98af6b 100644
--- a/src/components/UpdatePartnerInfo.js
+++ b/src/components/UpdatePartnerInfo.js
@@ -2176,7 +2176,7 @@ function UpdateParnterInfo(props) {
}
//image/png
- if (String(file_type) !== "image/png") {
+ if (String(file_type) !== "image/png" && String(file_type) !== "image/jpg" && String(file_type) !== "image/webp" ) {
alert("Le fichier n'est pas au format PNG");
return;
}
@@ -2388,7 +2388,7 @@ function UpdateParnterInfo(props) {
}
//image/png
- if (String(file_type) !== "image/png") {
+ if (String(file_type) !== "image/png" && String(file_type) !== "image/jpg" && String(file_type) !== "image/webp" ) {
alert("Le fichier n'est pas au format PNG");
return;
}
diff --git a/src/styles/components/_displaypartnertrainingpagination.scss b/src/styles/components/_displaypartnertrainingpagination.scss
index 8134b51..aa7bf88 100644
--- a/src/styles/components/_displaypartnertrainingpagination.scss
+++ b/src/styles/components/_displaypartnertrainingpagination.scss
@@ -26,7 +26,7 @@
background: white;
background-color: transparent;
}
-
+
.css-qc6sy-singleValue {
color: white !important;
}
@@ -510,6 +510,25 @@
}
+ .block_groupe_class{
+ width: 100%;
+ float: right;
+
+ }
+
+ .block_groupe_class_text{
+ width: 100%;
+ float: left;
+ text-align: left;
+ padding-top: 15px;
+ }
+
+ .block_groupe_class_list{
+ width: 100%;
+ text-align: right;
+ float: left;
+
+ }
}
@media only screen and (min-width: 601px) and (max-width: 991px) {
@@ -972,6 +991,25 @@
width: 10%;
}
+ .block_groupe_class{
+ width: 50%;
+ float: right;
+
+ }
+
+ .block_groupe_class_text{
+ width: 30%;
+ float: left;
+ text-align: left;
+ padding-top: 15px;
+ }
+
+ .block_groupe_class_list{
+ width: 69%;
+ text-align: right;
+ float: left;
+
+ }
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
@@ -1431,6 +1469,25 @@
width: 10%;
}
+ .block_groupe_class{
+ width: 50%;
+ float: right;
+
+ }
+
+ .block_groupe_class_text{
+ width: 45%;
+ float: left;
+ text-align: left;
+ padding-top: 15px;
+ }
+
+ .block_groupe_class_list{
+ width: 54%;
+ text-align: right;
+ float: left;
+
+ }
}
@media only screen and (min-width: 1200px) {
@@ -1888,7 +1945,27 @@
width: 10%;
}
+ .block_groupe_class{
+ width: 30%;
+ float: right;
+
+ }
+
+ .block_groupe_class_text{
+ width: 30%;
+ float: left;
+ text-align: left;
+ padding-top: 15px;
+ }
+
+ .block_groupe_class_list{
+ width: 65%;
+ text-align: right;
+ float: left;
+
+ }
}
+
// end media
}
\ No newline at end of file