03/01/2025 - 17h30
parent
a4e297a7db
commit
862494bd80
|
@ -155,5 +155,12 @@
|
|||
<priority>1.0000</priority>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>https://www.mysy-training.com/Display-Detail-Article/pourquoi-choisir-mysy-training-pour-gerer-votre-organisme-de-formation</loc>
|
||||
<lastmod>2025-01-03T11:35:41+00:00</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
<priority>1.0000</priority>
|
||||
</url>
|
||||
|
||||
|
||||
</urlset>
|
|
@ -148,7 +148,7 @@ const Article = (props) => {
|
|||
setLoading(false);
|
||||
if (String(res.data.status) === "true") {
|
||||
//console.log(" In Get_Partner_Article_Avis_Data res.data.status = " + res.data.status);
|
||||
// console.log(" In Get_Partner_Article_Avis_Data res.data.message r_class = " + res.data.message);
|
||||
console.log(" In Get_Partner_Article_Avis_Data res.data.message r_class = " + res.data.message);
|
||||
setGet_Partner_Article_Avis_Data_api("true");
|
||||
setGet_Partner_Article_Avis_Data_result(res.data.message);
|
||||
|
||||
|
@ -304,6 +304,8 @@ const Article = (props) => {
|
|||
setarticle_avis_sujet("");
|
||||
setarticle_avis_avis("");
|
||||
setis_data_changed("");
|
||||
setarticle_avis_meta_description("");
|
||||
setarticle_avis_display_header_img(false);
|
||||
}
|
||||
|
||||
const [article_avis_date_publication, setarticle_avis_date_publication] = useState(new Date().toLocaleDateString('fr-FR'));
|
||||
|
@ -374,9 +376,9 @@ const Article = (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", local_meta_description);
|
||||
|
||||
|
@ -492,7 +494,7 @@ const Article = (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");
|
||||
return;
|
||||
|
@ -834,7 +836,7 @@ const Article = (props) => {
|
|||
</nav>
|
||||
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
||||
<input type="file"
|
||||
accept=".png, .jpg"
|
||||
accept=".png, .jpg, .webp"
|
||||
ref={hiddenFileInput_logo}
|
||||
style={{ display: 'none' }}
|
||||
name="liste_formation_file"
|
||||
|
@ -885,7 +887,7 @@ const Article = (props) => {
|
|||
<TextField
|
||||
maxRows={4}
|
||||
minRows={3}
|
||||
inputProps={{ maxLength: 180 }}
|
||||
inputProps={{ maxLength: 200 }}
|
||||
multiline
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
|
@ -911,7 +913,7 @@ const Article = (props) => {
|
|||
|
||||
<div className="div_row_dialog">
|
||||
<div className="div_row_dialog" style={{ "textAlign": 'left' }}>
|
||||
<b> Texte Article o</b>
|
||||
<b> Texte Article</b>
|
||||
</div>
|
||||
<div className="div_row_dialog" >
|
||||
|
||||
|
|
|
@ -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) => <Display_Colunm_text {...params} />, },
|
||||
{ field: 'metier', headerName: 'Métier', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, hide: true, editable: false, renderCell: (params) => <Display_Colunm_text {...params} />, },
|
||||
|
||||
|
||||
{ field: 'categorie', headerName: 'Catégorie', minWidth: 100, flex: 1, maxWidth: 200, hideable: true, hide: true, editable: false, renderCell: (params) => <Display_Colunm_text {...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) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
{ field: 'version', headerName: 'Version Catalogue', hide: true, minWidth: 100, maxWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...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);
|
||||
|
||||
}}
|
||||
|
||||
|
||||
>
|
||||
<MoreVertIcon />
|
||||
</IconButton>
|
||||
|
@ -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 (
|
||||
|
||||
<div className='displaypartnertrainingpagination'>
|
||||
|
@ -2732,7 +2781,39 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
|
||||
<div style={{ height: "800px", width: '100%', paddingRight: '10px' }}>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
<div className='block_groupe_class'>
|
||||
<nav className='block_groupe_class_text' > Grouper par </nav>
|
||||
<nav className='block_groupe_class_list'>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="filtre11"
|
||||
id="filtre11"
|
||||
className="disabled_style"
|
||||
options={New_option_group_by}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value.value) {
|
||||
setdata_row_grouped_by(value.value);
|
||||
setdata_row_grouped_field(value.value);
|
||||
datagrid_grouped_by(value.value);
|
||||
|
||||
} else {
|
||||
setdata_row_grouped_by("");
|
||||
setdata_row_grouped_field("");
|
||||
datagrid_grouped_by("");
|
||||
}
|
||||
}}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une période"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
{/*!createtraining && <div className='div_row' >
|
||||
|
||||
<Button variant="outlined" onClick={Createtraining}
|
||||
|
@ -2742,11 +2823,11 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
</Button>
|
||||
|
||||
</div>*/}
|
||||
<div className="session_data">
|
||||
{(!data_row_grouped_by || String(data_row_grouped_by) === "") && <div className="session_data">
|
||||
<div style={{ "border": "None", paddingRight: '10px' }}>
|
||||
<Box
|
||||
sx={{
|
||||
height: "500px",
|
||||
height: "700px",
|
||||
width: '100%',
|
||||
paddingRight: '2px',
|
||||
'& .cell--published': {
|
||||
|
@ -2796,7 +2877,7 @@ const DistplayPartnerTraningsPage = (props) => {
|
|||
|
||||
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) => {
|
|||
|
||||
|
||||
/>}
|
||||
|
||||
|
||||
|
||||
</Box>
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row"> </div>
|
||||
</div>}
|
||||
|
||||
{data_row_grouped_by && (String(data_row_grouped_by) === "domain" || String(data_row_grouped_by) === "metier") &&
|
||||
<div className="div_row">
|
||||
<Box
|
||||
sx={{
|
||||
height: "700px",
|
||||
width: '100%',
|
||||
paddingRight: '2px',
|
||||
'& .cell--published': {
|
||||
backgroundColor: '#a2cf6e',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
'& .cell--unpublished': {
|
||||
backgroundColor: '#ffac33',
|
||||
color: '#1a3e72',
|
||||
fontWeight: 'light',
|
||||
},
|
||||
'& .line--published': {
|
||||
backgroundColor: '#E6F7C8',
|
||||
color: 'black',
|
||||
},
|
||||
'& .line--unpublished': {
|
||||
backgroundColor: '#FAD7A0',
|
||||
color: 'black',
|
||||
},
|
||||
|
||||
|
||||
'& .line--statut--selected': {
|
||||
backgroundColor: '#FBF2EF',
|
||||
color: 'black',
|
||||
},
|
||||
[`& .${gridClasses.cell}`]: {
|
||||
py: 1,
|
||||
},
|
||||
|
||||
}}
|
||||
>
|
||||
<DataGridPro
|
||||
initialState={{
|
||||
columns: {
|
||||
columnVisibilityModel: {
|
||||
// Hide columns id and lastname.
|
||||
// Other columns will remain visible
|
||||
id: false,
|
||||
_id: false,
|
||||
lms_class_code: false,
|
||||
duration: false,
|
||||
presentiel: false,
|
||||
distanciel: false,
|
||||
cible: false,
|
||||
duration_unit: false,
|
||||
duration_in_hour: false,
|
||||
currency: false,
|
||||
zone_diffusion: false,
|
||||
internal_url: false,
|
||||
url: false,
|
||||
description: false,
|
||||
|
||||
},
|
||||
},
|
||||
}}
|
||||
|
||||
treeData
|
||||
getTreeDataPath={getTreeDataPath}
|
||||
checkboxSelection
|
||||
components={{
|
||||
Toolbar: CustomToolbar
|
||||
}}
|
||||
componentsProps={{ toolbar: { data_colums: columns } }}
|
||||
|
||||
|
||||
onSelectionModelChange={(newSelectionModel) => {
|
||||
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}
|
||||
|
||||
|
||||
/>
|
||||
|
||||
</Box>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div className="div_row"> ensss masss</div>
|
||||
<div className="div_row">
|
||||
{selectionModel && selectionModel.length >= 1 && <div className="block_en_mass">
|
||||
<nav >Traitement en masse </nav>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) => {
|
|||
</nav>
|
||||
{logo_file_name && <nav className="okUpdateData"><i>{logo_file_name}</i></nav>}
|
||||
<input type="file"
|
||||
accept=".png, .jpg"
|
||||
accept=".png, .jpg, .webp"
|
||||
ref={hiddenFileInput_logo}
|
||||
style={{ display: 'none' }}
|
||||
name="liste_formation_file"
|
||||
|
@ -1350,7 +1352,7 @@ const RechercheArticles_new_v2 = (props) => {
|
|||
<TextField
|
||||
maxRows={4}
|
||||
minRows={3}
|
||||
inputProps={{ maxLength: 180 }}
|
||||
inputProps={{ maxLength: 200 }}
|
||||
multiline
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
|
|
|
@ -44,6 +44,13 @@ import ReactAudioPlayer from 'react-audio-player';
|
|||
import AudioPlayer from 'react-audio-player';
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
|
||||
import { styled } from '@mui/material/styles';
|
||||
|
||||
|
||||
import { DataGridPro } from '@mui/x-data-grid-pro';
|
||||
|
||||
|
||||
|
||||
import { makeStyles } from '@material-ui/core/styles';
|
||||
|
||||
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
|
||||
|
@ -57,6 +64,9 @@ import { useDemoData } from '@mui/x-data-grid-generator';
|
|||
|
||||
import SignatureCanvas from 'react-signature-canvas';
|
||||
|
||||
import BuildIcon from '@mui/icons-material/Build';
|
||||
import PersonIcon from '@mui/icons-material/Person';
|
||||
|
||||
import Box from '@mui/material/Box';
|
||||
import {
|
||||
DataGrid, frFR, GridToolbar, GridToolbarContainer, GridToolbarExport, GridToolbarColumnsButton,
|
||||
|
@ -959,7 +969,7 @@ const TestUrl_New = (props) => {
|
|||
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 (
|
||||
<div className="testurl_new">
|
||||
|
||||
|
@ -1149,102 +1293,28 @@ const TestUrl_New = (props) => {
|
|||
parametres courseid = {courseid}, tabid = {tabid}
|
||||
<br />
|
||||
|
||||
{/*<div> <h1> test microphone </h1>
|
||||
|
||||
<div>
|
||||
<p>Microphone: {listening ? 'on' : 'off'}</p>
|
||||
<button onClick={SpeechRecognition.startListening}>Start</button>
|
||||
<button onClick={SpeechRecognition.stopListening}>Stop</button>
|
||||
<button onClick={resetTranscript}>Reset</button>
|
||||
<p>{transcript}</p>
|
||||
</div>
|
||||
|
||||
</div>*/}
|
||||
|
||||
<div>
|
||||
<Button variant="outlined" color="primary" onClick={handleClickOpen1}>
|
||||
Open form dialog laa
|
||||
</Button>
|
||||
<Dialog
|
||||
open={open1}
|
||||
onClose={handleClose1}
|
||||
// PaperComponent={PaperComponent}
|
||||
aria-labelledby="draggable-dialog-title"
|
||||
|
||||
PaperProps={{
|
||||
className: classes.paper, // Apply the paper style
|
||||
style: {
|
||||
overflowY: 'unset',
|
||||
},
|
||||
}}
|
||||
|
||||
>
|
||||
<DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">
|
||||
Subscribe
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>
|
||||
To subscribe to this website, please enter your email address here.
|
||||
We will send updates occasionally.
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<IconButton
|
||||
autoFocus
|
||||
onClick={handleClose1}
|
||||
color="primary"
|
||||
className={classes.customizedButton}
|
||||
>
|
||||
<CancelPresentationIcon />
|
||||
</IconButton>
|
||||
<Button onClick={handleClose} color="primary">
|
||||
Subscribe
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
<div style={{ height: 400, width: '100%' }}> Datagrid Grouping <br />
|
||||
Grouper par <nav onClick={datagrid_grouped_by_domain} style={{ cursor: "pointer" }}> Domaine </nav>
|
||||
<DataGridPro
|
||||
// treeData
|
||||
rows={rows}
|
||||
columns={columns_no_group}
|
||||
// getTreeDataPath={getTreeDataPath}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
ZZZZ
|
||||
<div>
|
||||
{/* NOTICE: id must be unique between EVERY <ContextMenuTrigger> and <ContextMenu> pair */}
|
||||
{/* NOTICE: inside the pair, <ContextMenuTrigger> and <ContextMenu> must have the same id */}
|
||||
|
||||
<ContextMenuTrigger id="same_unique_identifier">
|
||||
<div className="well">Click Droite Menu </div>
|
||||
<TextField > TTTTTTTTTTTTTTTTtt </TextField>
|
||||
|
||||
</ContextMenuTrigger>
|
||||
|
||||
<ContextMenu id="same_unique_identifier" hideOnLeave={true} style={{ backgroundColor: 'red', zIndex: "99" }}>
|
||||
<MenuItem data={{ foo: 'bar' }} valuess="list" onClick={handleClick}>
|
||||
ContextMenu Item 1
|
||||
</MenuItem>
|
||||
<MenuItem data={{ foo: 'bar' }} valuess="list02" onClick={handleClick}>
|
||||
ContextMenu Item 2
|
||||
</MenuItem>
|
||||
<MenuItem divider />
|
||||
<MenuItem data={{ foo: 'bar' }} valuess="list03" onClick={handleClick}>
|
||||
ContextMenu Item 3
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
|
||||
</div>
|
||||
|
||||
{data &&
|
||||
data.columns.map((column) => (
|
||||
|
||||
<div>
|
||||
column.field = {column.field}<br />
|
||||
|
||||
----
|
||||
|
||||
</div>
|
||||
))}
|
||||
|
||||
{data_row_grouped_by && String(data_row_grouped_by) === "domaine" && <div style={{ height: 400, width: '100%' }}> Datagrid Grouping <br />
|
||||
<DataGridPro
|
||||
treeData
|
||||
rows={rows}
|
||||
columns={columns}
|
||||
getTreeDataPath={getTreeDataPath}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
<div>
|
||||
<h2> enregistrement audio </h2> <br />
|
||||
<h2> EN COURS : A NE PAS SUPPRIMER enregistrement audio </h2> <br />
|
||||
|
||||
|
||||
< div >
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue