sdssd
parent
f97248e89f
commit
88b405feda
|
@ -94,6 +94,7 @@
|
|||
"react-canvas-js": "^1.0.1",
|
||||
"react-comments-section": "^2.0.10",
|
||||
"react-confirm-alert": "^2.8.0",
|
||||
"react-contextmenu": "^2.14.0",
|
||||
"react-cookie": "^4.1.1",
|
||||
"react-csv": "^2.2.2",
|
||||
"react-custom-share": "^0.4.8",
|
||||
|
@ -25294,6 +25295,20 @@
|
|||
"react-dom": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-contextmenu": {
|
||||
"version": "2.14.0",
|
||||
"resolved": "https://registry.npmjs.org/react-contextmenu/-/react-contextmenu-2.14.0.tgz",
|
||||
"integrity": "sha512-ktqMOuad6sCFNJs/ltEwppN8F0YeXmqoZfwycgtZR/MxOXMYx1xgYC44SzWH259HdGyshk1/7sXGuIRwj9hzbw==",
|
||||
"dependencies": {
|
||||
"classnames": "^2.2.5",
|
||||
"object-assign": "^4.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^0.14.0 || ^15.0.0 || ^16.0.1",
|
||||
"react-dom": "^0.14.0 || ^15.0.0 || ^16.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-cookie": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-4.1.1.tgz",
|
||||
|
@ -52789,6 +52804,15 @@
|
|||
"resolved": "https://registry.npmjs.org/react-confirm-alert/-/react-confirm-alert-2.8.0.tgz",
|
||||
"integrity": "sha512-qvNjJWuWUpTh+q4NecUjCMIWLNDl8IwW6JRIky5pzoiFBXsLWSA2Z1VsaDsQedwgyxEpKnMEJFETkDogBpv/kA=="
|
||||
},
|
||||
"react-contextmenu": {
|
||||
"version": "2.14.0",
|
||||
"resolved": "https://registry.npmjs.org/react-contextmenu/-/react-contextmenu-2.14.0.tgz",
|
||||
"integrity": "sha512-ktqMOuad6sCFNJs/ltEwppN8F0YeXmqoZfwycgtZR/MxOXMYx1xgYC44SzWH259HdGyshk1/7sXGuIRwj9hzbw==",
|
||||
"requires": {
|
||||
"classnames": "^2.2.5",
|
||||
"object-assign": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"react-cookie": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-4.1.1.tgz",
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
"react-canvas-js": "^1.0.1",
|
||||
"react-comments-section": "^2.0.10",
|
||||
"react-confirm-alert": "^2.8.0",
|
||||
"react-contextmenu": "^2.14.0",
|
||||
"react-cookie": "^4.1.1",
|
||||
"react-csv": "^2.2.2",
|
||||
"react-custom-share": "^0.4.8",
|
||||
|
|
|
@ -124,9 +124,7 @@ function App() {
|
|||
}
|
||||
|
||||
|
||||
} else {
|
||||
console.log(" passs insite 12223 = ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}, []);
|
||||
|
|
|
@ -140,7 +140,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
function Display_Colunm_text({ value }) {
|
||||
|
||||
return (
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all", }}>
|
||||
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all", }}>
|
||||
{value}
|
||||
|
||||
</div>
|
||||
|
@ -653,6 +653,12 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
setp_detail_titre("");
|
||||
}
|
||||
|
||||
if (local_ue.detail_cours) {
|
||||
setp_detail_detail_cours(local_ue.detail_cours);
|
||||
} else {
|
||||
setp_detail_detail_cours({});
|
||||
}
|
||||
|
||||
if (local_ue.support) {
|
||||
setp_detail_support(local_ue.support);
|
||||
} else {
|
||||
|
@ -771,44 +777,16 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
const [enable_editor, setenable_editor] = useState(0);
|
||||
|
||||
function desable_detail_fields() {
|
||||
|
||||
setue_data_edit_mode("0");
|
||||
|
||||
if (document.getElementsByName("code_session") && document.getElementsByName("code_session")[0]) {
|
||||
document.getElementsByName("code_session")[0].disabled = true;
|
||||
document.getElementsByName("code_session")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("titre") && document.getElementsByName("code_session")[0]) {
|
||||
document.getElementsByName("titre")[0].disabled = true;
|
||||
document.getElementsByName("titre")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("description") && document.getElementsByName("code_session")[0]) {
|
||||
document.getElementsByName("description")[0].disabled = true;
|
||||
document.getElementsByName("description")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
const list_menu_header_names = ['code_session', 'titre', 'description', 'duree_01', 'unit_duree', 'domaine',
|
||||
'bloc',]
|
||||
|
||||
|
||||
if (document.getElementsByName("duree_01") && document.getElementsByName("duree_01")[0]) {
|
||||
document.getElementsByName("duree_01")[0].disabled = true;
|
||||
document.getElementsByName("duree_01")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("unit_duree") && document.getElementsByName("unit_duree")[0]) {
|
||||
document.getElementsByName("unit_duree")[0].disabled = true;
|
||||
document.getElementsByName("unit_duree")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("domaine") && document.getElementsByName("domaine")[0]) {
|
||||
document.getElementsByName("domaine")[0].disabled = true;
|
||||
document.getElementsByName("domaine")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("bloc") && document.getElementsByName("bloc")[0]) {
|
||||
document.getElementsByName("bloc")[0].disabled = true;
|
||||
document.getElementsByName("bloc")[0].style.backgroundColor = "#ECEFF1";
|
||||
for (let i = 0; i < list_menu_header_names.length; i++) {
|
||||
if (document.getElementsByName(String(list_menu_header_names[i])) && document.getElementsByName(String(list_menu_header_names[i]))[0]) {
|
||||
document.getElementsByName(String(list_menu_header_names[i]))[0].disabled = true;
|
||||
document.getElementsByName(String(list_menu_header_names[i]))[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -816,40 +794,25 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
function enable_detail_fields() {
|
||||
|
||||
setue_data_edit_mode("1");
|
||||
const list_menu_header_names = ['code_session', 'titre', 'description', 'duree_01', 'unit_duree', 'domaine',
|
||||
'bloc',]
|
||||
|
||||
|
||||
if (document.getElementsByName("code_session") && document.getElementsByName("code_session")[0]) {
|
||||
document.getElementsByName("code_session")[0].disabled = false;
|
||||
document.getElementsByName("code_session")[0].style.backgroundColor = "#FFFFFF";
|
||||
for (let i = 0; i < list_menu_header_names.length; i++) {
|
||||
if (document.getElementsByName(String(list_menu_header_names[i])) && document.getElementsByName(String(list_menu_header_names[i]))[0]) {
|
||||
document.getElementsByName(String(list_menu_header_names[i]))[0].disabled = false;
|
||||
document.getElementsByName(String(list_menu_header_names[i]))[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
}
|
||||
|
||||
if (document.getElementsByName("titre") && document.getElementsByName("code_session")[0]) {
|
||||
document.getElementsByName("titre")[0].disabled = false;
|
||||
document.getElementsByName("titre")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("description") && document.getElementsByName("code_session")[0]) {
|
||||
document.getElementsByName("description")[0].disabled = false;
|
||||
document.getElementsByName("description")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("domaine") && document.getElementsByName("domaine")[0]) {
|
||||
document.getElementsByName("domaine")[0].disabled = false;
|
||||
document.getElementsByName("domaine")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("bloc") && document.getElementsByName("bloc")[0]) {
|
||||
document.getElementsByName("bloc")[0].disabled = false;
|
||||
document.getElementsByName("bloc")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
Get_List_Domaines();
|
||||
|
||||
Get_List_Type_Cours();
|
||||
|
||||
Getall_Parter_Unite_Enseignement();
|
||||
|
||||
if (document.getElementById('myRef_head')) {
|
||||
|
@ -1049,6 +1012,9 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
}
|
||||
|
||||
const [p_detail_code, setp_detail_code] = useState("");
|
||||
const [p_detail_detail_cours, setp_detail_detail_cours] = useState("");
|
||||
|
||||
|
||||
const [p_detail_titre, setp_detail_titre] = useState("");
|
||||
const [p_detail_bloc, setp_detail_bloc] = useState("");
|
||||
|
||||
|
@ -1059,6 +1025,9 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
const [p_detail_duration, setp_detail_duration] = useState("");
|
||||
const [p_detail_duration_unite, setp_detail_duration_unite] = useState("");
|
||||
|
||||
const [p_detail_ects, setp_detail_ects] = useState("");
|
||||
const [p_detail_seuil_validation, setp_detail_seuil_validation] = useState("");
|
||||
|
||||
|
||||
const editorRef_description = useRef(null);
|
||||
const [editorRef_description_limite, seteditorRef_description_limite] = useState(5000);
|
||||
|
@ -1235,6 +1204,90 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
const [New_Get_List_Type_Cours_result, setNew_Get_List_Type_Cours_result] = useState([]);
|
||||
|
||||
const [Get_List_Type_Cours_api, setGet_List_Type_Cours_api] = useState();
|
||||
const [Get_List_Type_Cours_message, setGet_List_Type_Cours_message] = useState();
|
||||
const [Get_List_Type_Cours_result, setGet_List_Type_Cours_result] = useState();
|
||||
function Get_List_Type_Cours() {
|
||||
var form = new FormData();
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Type_Cours/";
|
||||
|
||||
fetch(myurl,
|
||||
{
|
||||
method: 'POST',
|
||||
body: form,
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => {
|
||||
//console.log(' IN Get_List_Type_Cours Success:', data['message'], "data['status'] = ", data['status']);
|
||||
|
||||
if (String(data['status']) === String("true")) {
|
||||
setGet_List_Type_Cours_api("true");
|
||||
setGet_List_Type_Cours_result(data['message']);
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = data['message'].map((x) => {
|
||||
|
||||
//---
|
||||
var localid = JSON.parse(x).id;
|
||||
var local_id = JSON.parse(x)._id;
|
||||
var local_code = JSON.parse(x).code;
|
||||
var local_nom = JSON.parse(x).nom;
|
||||
var local_description = JSON.parse(x).description;
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"id": localid,
|
||||
"_id": local_id,
|
||||
"nom": local_nom,
|
||||
"code": local_code,
|
||||
"label": local_nom,
|
||||
"description": local_description,
|
||||
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
var node = {
|
||||
"id": "",
|
||||
"_id": "",
|
||||
"nom": "",
|
||||
"code": "",
|
||||
"label": "",
|
||||
"description": "",
|
||||
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
if (new_data2.length > 0) {
|
||||
setNew_Get_List_Type_Cours_result(new_data2);
|
||||
|
||||
// console.log(" ## new_data2 = ", new_data2);
|
||||
// console.log(" ## New_Get_List_Type_Cours_result = ", New_Get_List_Type_Cours_result);
|
||||
} else {
|
||||
setNew_Get_List_Type_Cours_result([])
|
||||
}
|
||||
}
|
||||
else {
|
||||
setGet_List_Type_Cours_api("false");
|
||||
setGet_List_Type_Cours_message(data['message']);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.error('Error Get_List_Type_Cours :', error);
|
||||
setGet_List_Type_Cours_api("false");
|
||||
});
|
||||
}
|
||||
|
||||
async function submenu_detail() {
|
||||
setsubmenu("detail_ue");
|
||||
submenu_color_management("detail_ue");
|
||||
|
@ -2252,8 +2305,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="unit_duree"
|
||||
id="unit_duree"
|
||||
name="domaine"
|
||||
id="domaine"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
|
@ -2267,14 +2320,73 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
|
||||
</div>}
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div>
|
||||
<div className="session_caract"> ECTS <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="ects"
|
||||
id="ects"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
//disabled={true}
|
||||
className="disabled_style"
|
||||
value={p_detail_ects}
|
||||
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div>
|
||||
<div className="session_caract"> Seuil Validation <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="seuil_validation"
|
||||
id="seuil_validation"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
//disabled={true}
|
||||
className="disabled_style"
|
||||
value={p_detail_seuil_validation}
|
||||
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div style={{width:'100%', float:'left'}}> Type de Cours : <br/>
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" &&
|
||||
New_Get_List_Type_Cours_result && New_Get_List_Type_Cours_result.length > 0 &&
|
||||
New_Get_List_Type_Cours_result.map((type_cours) => (
|
||||
<nav style={{width:'20%', float:'left'}}>
|
||||
{type_cours && type_cours.code && <div>{type_cours.code} ==
|
||||
{p_detail_detail_cours[String(type_cours.code).toLocaleLowerCase()] &&
|
||||
<font> {p_detail_detail_cours[String(type_cours.code).toLocaleLowerCase()]} </font>
|
||||
}
|
||||
|
||||
</div>}
|
||||
</nav>
|
||||
))}
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div>
|
||||
<div className="session_caract"> Durée <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="duree_01"
|
||||
id="duree_01"
|
||||
name="duree"
|
||||
id="duree"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
|
@ -2300,14 +2412,63 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
//disabled={true}
|
||||
className="disabled_style"
|
||||
value={p_detail_duration_unite}
|
||||
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" && <div>
|
||||
<div className="session_caract"> ECTS <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="ects"
|
||||
id="ects"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
//disabled={true}
|
||||
className="disabled_style"
|
||||
value={p_detail_ects}
|
||||
onChange={(e) => {
|
||||
setp_detail_ects(e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" && <div>
|
||||
<div className="session_caract"> Seuil Validation <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="seuil_validation"
|
||||
id="seuil_validation"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
//disabled={true}
|
||||
className="disabled_style"
|
||||
value={p_detail_seuil_validation}
|
||||
onChange={(e) => {
|
||||
setp_detail_seuil_validation(e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" &&
|
||||
<div>
|
||||
<div className="session_caract"> Durée <br />
|
||||
|
@ -2353,6 +2514,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
</a>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" &&
|
||||
<div className="div_row">
|
||||
|
||||
|
@ -2568,8 +2731,6 @@ const DisplayPartnerUnite_Enseignement = (props) => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
@ -398,9 +398,6 @@ const Employes = (props) => {
|
|||
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -53,6 +53,10 @@ import {
|
|||
import { tokens } from "../theme";
|
||||
import { DataGrid, GridToolbar, frFR } from '@mui/x-data-grid';
|
||||
|
||||
|
||||
import { FcPrint } from "react-icons/fc";
|
||||
|
||||
|
||||
const Mon_Tableau_De_Bord = (props) => {
|
||||
|
||||
const theme = useTheme();
|
||||
|
@ -2446,11 +2450,20 @@ const Mon_Tableau_De_Bord = (props) => {
|
|||
|
||||
<hr className="hr_break" />
|
||||
|
||||
<div className="div_row" onClick={(event) => {
|
||||
Export_BPF_PDF();
|
||||
<div className="div_row">
|
||||
|
||||
}}>
|
||||
<nav style={{ width: "5rem", float: "right", "marginRight": "1rem" }}> Imprimer </nav>
|
||||
<Button style={{ width: "10rem", float: "right", "marginRight": "1rem" }}
|
||||
onClick={(e) => {
|
||||
Export_BPF_PDF();
|
||||
|
||||
}}
|
||||
>
|
||||
Imprimer <FcPrint/>
|
||||
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import ToggleSwitch from "./ToggleSwitch";
|
|||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
|
||||
const Partner_Domaine_Categorie_Metier = (props) => {
|
||||
const Partner_domaine_Categorie_Metier = (props) => {
|
||||
|
||||
const history = useHistory();
|
||||
const [submenu, setsubmenu] = useState("technique");
|
||||
|
@ -99,7 +99,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
{ field: 'description', headerName: 'Description', hide: false, minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
|
||||
{/*
|
||||
{
|
||||
field: "delete", headerName: 'Supprimer',
|
||||
renderCell: (cellValues) => {
|
||||
return (
|
||||
|
@ -129,7 +129,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
<button className="gest_bton_popup" onClick={(event) => {
|
||||
// handleClick_delete_Categorie(event, cellValues);
|
||||
handleClick_delete_domaine(event, cellValues);
|
||||
//console.log('modal closed ');
|
||||
close();
|
||||
}}> Valider </button>
|
||||
|
@ -154,7 +154,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
|
||||
);
|
||||
}
|
||||
*/}
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
|
@ -401,6 +401,57 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [handleClick_delete_domaine_api, sethandleClick_delete_domaine_api] = useState();
|
||||
const [handleClick_delete_domaine_message, sethandleClick_delete_domaine_message] = useState();
|
||||
const [handleClick_delete_domaine_result, sethandleClick_delete_domaine_result] = useState();
|
||||
function handleClick_delete_domaine(event, cellValues) {
|
||||
|
||||
var type_client_id = cellValues.row._id;
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("_id", type_client_id);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Delete_Class_domaine/";
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
setLoading(false);
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In handleClick_delete_domaine res.data.status = " + res.data.status);
|
||||
//console.log(" In handleClick_delete_domaine res.data.message r_class = " + res.data.message);
|
||||
sethandleClick_delete_domaine_api("true");
|
||||
sethandleClick_delete_domaine_result(res.data.message);
|
||||
|
||||
setdomaine_data_edit_mode("");
|
||||
setdomaine_data_changed("");
|
||||
setdisplay_detail_domaine("");
|
||||
|
||||
|
||||
Getall_Partner_Class_Domaine();
|
||||
alert(res.data.message);
|
||||
|
||||
}
|
||||
else {
|
||||
sethandleClick_delete_domaine_api("false");
|
||||
sethandleClick_delete_domaine_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( handleClick_delete_domaine = ', error);
|
||||
sethandleClick_delete_domaine_api("false");
|
||||
alert(" Impossible de supprimer la catégorie");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [gridline_domaine_id, setgridline_domaine_id] = useState("");
|
||||
const [gridline_categorie_id, setgridline_categorie_id] = useState("");
|
||||
|
@ -504,11 +555,11 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
const myRef = useRef(null)
|
||||
|
||||
|
||||
const [New_Getall_Partner_Class_Domaine_result, setNew_Getall_Partner_Class_Domaine_result] = useState([]);
|
||||
const [New_Getall_Partner_Class_domaine_result, setNew_Getall_Partner_Class_domaine_result] = useState([]);
|
||||
|
||||
const [Getall_Partner_Class_Domaine_api, setGetall_Partner_Class_Domaine_api] = useState();
|
||||
const [Getall_Partner_Class_Domaine_message, setGetall_Partner_Class_Domaine_message] = useState();
|
||||
const [Getall_Partner_Class_Domaine_result, setGetall_Partner_Class_Domaine_result] = useState([]);
|
||||
const [Getall_Partner_Class_domaine_api, setGetall_Partner_Class_domaine_api] = useState();
|
||||
const [Getall_Partner_Class_domaine_message, setGetall_Partner_Class_domaine_message] = useState();
|
||||
const [Getall_Partner_Class_domaine_result, setGetall_Partner_Class_domaine_result] = useState([]);
|
||||
function Getall_Partner_Class_Domaine(event) {
|
||||
|
||||
var form = new FormData();
|
||||
|
@ -525,8 +576,8 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_Partner_Class_Domaine res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_Partner_Class_Domaine res.data.message r_class = " + res.data.message);
|
||||
setGetall_Partner_Class_Domaine_api("true");
|
||||
setGetall_Partner_Class_Domaine_result(res.data.message);
|
||||
setGetall_Partner_Class_domaine_api("true");
|
||||
setGetall_Partner_Class_domaine_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = res.data.message.map((x) => {
|
||||
|
@ -568,20 +619,20 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Partner_Class_Domaine_result(new_data2);
|
||||
setNew_Getall_Partner_Class_domaine_result(new_data2);
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
setGetall_Partner_Class_Domaine_api("false");
|
||||
setGetall_Partner_Class_Domaine_message(res.data.message);
|
||||
setGetall_Partner_Class_domaine_api("false");
|
||||
setGetall_Partner_Class_domaine_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('Not good man :( Getall_Partner_Class_Domaine = ', error);
|
||||
setGetall_Partner_Class_Domaine_api("false");
|
||||
setGetall_Partner_Class_domaine_api("false");
|
||||
alert(" Impossible de recuperer la liste des domaines de formation ");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
|
@ -931,7 +982,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async function Disable_Metier_DetailFields() {
|
||||
|
@ -999,6 +1050,124 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
}
|
||||
|
||||
|
||||
async function Disable_domaine_DetailFields() {
|
||||
await sleep(10);
|
||||
setdomaine_data_edit_mode("0");
|
||||
|
||||
if (document.getElementsByName("detail_domaine_code") && document.getElementsByName("detail_domaine_code")[0]) {
|
||||
document.getElementsByName("detail_domaine_code")[0].disabled = true;
|
||||
document.getElementsByName("detail_domaine_code")[0].style.backgroundColor = "#ECEFF1";
|
||||
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_domaine_nom") && document.getElementsByName("detail_domaine_nom")[0]) {
|
||||
document.getElementsByName("detail_domaine_nom")[0].disabled = true;
|
||||
document.getElementsByName("detail_domaine_nom")[0].style.backgroundColor = "#ECEFF1";
|
||||
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_domaine_description") && document.getElementsByName("detail_domaine_description")[0]) {
|
||||
document.getElementsByName("detail_domaine_description")[0].disabled = true;
|
||||
document.getElementsByName("detail_domaine_description")[0].style.backgroundColor = "#ECEFF1";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function Enable_domaine_DetailFields() {
|
||||
setdomaine_data_edit_mode("1")
|
||||
|
||||
if (document.getElementsByName("detail_domaine_code")[0] && document.getElementsByName("detail_domaine_code")[0]) {
|
||||
document.getElementsByName("detail_domaine_code")[0].disabled = false;
|
||||
document.getElementsByName("detail_domaine_code")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_domaine_nom")[0] && document.getElementsByName("detail_domaine_nom")[0]) {
|
||||
document.getElementsByName("detail_domaine_nom")[0].disabled = false;
|
||||
document.getElementsByName("detail_domaine_nom")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_domaine_description")[0] && document.getElementsByName("detail_domaine_description")[0]) {
|
||||
document.getElementsByName("detail_domaine_description")[0].disabled = false;
|
||||
document.getElementsByName("detail_domaine_description")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function clear_domaine_DetailFields() {
|
||||
setp_detail_domaine_id("");
|
||||
setp_detail_domaine_code("");
|
||||
setp_detail_domaine_nom("");
|
||||
setp_detail_domaine_description("");
|
||||
setp_detail_domaine_class_domaine_id("");
|
||||
|
||||
setselected_domaine_id("");
|
||||
setgridline_domaine_id("");
|
||||
|
||||
}
|
||||
|
||||
function Annule_domaine_DetailFields() {
|
||||
var line = JSON.parse(Getall_Partner_Class_domaine_result[gridline_domaine_id]);
|
||||
|
||||
setselected_domaine_id(line._id);
|
||||
|
||||
setp_detail_domaine_id(line._id);
|
||||
setp_detail_domaine_code(line.code);
|
||||
setp_detail_domaine_nom(line.nom);
|
||||
setp_detail_domaine_description(line.description);
|
||||
|
||||
|
||||
setdisplay_detail_domaine("");
|
||||
setdisplay_detail_metier("");
|
||||
setdisplay_detail_domaine("1");
|
||||
|
||||
|
||||
|
||||
if (document.getElementById('myRef')) {
|
||||
var divh = document.getElementById('myRef').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
Disable_domaine_DetailFields();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function handleClick_edit_domaine_From_Line(selected_row_id) {
|
||||
|
||||
var line = JSON.parse(Getall_Partner_Class_domaine_result[selected_row_id]);
|
||||
|
||||
setselected_domaine_id(line._id);
|
||||
|
||||
setp_detail_domaine_id(line._id);
|
||||
setp_detail_domaine_code(line.code);
|
||||
setp_detail_domaine_nom(line.nom);
|
||||
setp_detail_domaine_description(line.description);
|
||||
setp_detail_domaine_class_domaine_id(line.class_domaine_id);
|
||||
|
||||
setdisplay_detail_domaine("");
|
||||
setdisplay_detail_metier("");
|
||||
setdisplay_detail_domaine("1");
|
||||
|
||||
Disable_domaine_DetailFields();
|
||||
|
||||
if (document.getElementById('myRef')) {
|
||||
var divh = document.getElementById('myRef').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Getall_Partner_Class_Domaine();
|
||||
|
@ -1279,6 +1448,136 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
const [Update_domaine_Data_api, setUpdate_domaine_Data_api] = useState();
|
||||
const [Update_domaine_Data_message, setUpdate_domaine_Data_message] = useState();
|
||||
const [Update_domaine_Data_result, setUpdate_domaine_Data_result] = useState();
|
||||
function Update_domaine_Data() {
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("_id", p_detail_domaine_id);
|
||||
form.append("code", p_detail_domaine_code);
|
||||
form.append("nom", p_detail_domaine_nom);
|
||||
form.append("description", p_detail_domaine_description);
|
||||
|
||||
//console.log(" form ttt == ", form);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Class_domaine/";
|
||||
setLoading(true);
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
setLoading(false);
|
||||
//console.log(" In Update_domaine_Data res.data.status = " + res.data.status);
|
||||
//console.log(" In Update_domaine_Data res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
setUpdate_domaine_Data_api("true");
|
||||
setUpdate_domaine_Data_result(res.data.message);
|
||||
|
||||
Getall_Partner_Class_Domaine();
|
||||
clear_domaine_DetailFields();
|
||||
|
||||
setdisplay_detail_domaine("");
|
||||
setcategorie_data_edit_mode("");
|
||||
setcategorie_data_changed("");
|
||||
|
||||
alert(res.data.message);
|
||||
if (document.getElementById('myRef_head')) {
|
||||
var divh = document.getElementById('myRef_head').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
setUpdate_domaine_Data_api("false");
|
||||
setUpdate_domaine_Data_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('UpdateStagiaireData : Not good man :( Update_domaine_Data = ' + error);
|
||||
setUpdate_domaine_Data_api("false");
|
||||
alert(" Impossible de mettre à jour le métier ");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
const [Add_domaine_Data_api, setAdd_domaine_Data_api] = useState();
|
||||
const [Add_domaine_Data_message, setAdd_domaine_Data_message] = useState();
|
||||
const [Add_domaine_Data_result, setAdd_domaine_Data_result] = useState();
|
||||
function Add_domaine_Data() {
|
||||
var form = new FormData();
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
|
||||
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("code", p_detail_domaine_code);
|
||||
form.append("nom", p_detail_domaine_nom);
|
||||
form.append("description", p_detail_domaine_description);
|
||||
//form.append("class_domaine_id", p_detail_domaine_class_domaine_id);
|
||||
|
||||
|
||||
//console.log(" form == ", form);
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Class_Domaine/";
|
||||
setLoading(true);
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
setLoading(false);
|
||||
//console.log(" In Add_domaine_Data res.data.status = " + res.data.status);
|
||||
//console.log(" In Add_domaine_Data res.data.message r_class = " + res.data.message);
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
|
||||
|
||||
|
||||
setAdd_domaine_Data_api("true");
|
||||
setAdd_domaine_Data_result(res.data.message);
|
||||
|
||||
Getall_Partner_Class_Domaine();
|
||||
clear_domaine_DetailFields();
|
||||
|
||||
setdisplay_detail_domaine("");
|
||||
setcategorie_data_edit_mode("");
|
||||
setcategorie_data_changed("");
|
||||
|
||||
Dialog_domaine_1_handleClose_buton();
|
||||
|
||||
alert(res.data.message);
|
||||
if (document.getElementById('myRef_head')) {
|
||||
var divh = document.getElementById('myRef_head').offsetTop;
|
||||
window.scrollTo({
|
||||
top: divh,
|
||||
behavior: "smooth",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
setAdd_domaine_Data_api("false");
|
||||
setAdd_domaine_Data_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
setLoading(false);
|
||||
console.warn('UpdateStagiaireData : Not good man :( Add_domaine_Data = ' + error);
|
||||
setAdd_domaine_Data_api("false");
|
||||
alert(" Impossible d'ajouter le métier ");
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const [Dialog_Categorie_1_message, setDialog_Categorie_1_message] = React.useState(false);
|
||||
const [Dialog_Categorie_1_open, setDialog_Categorie_1_open] = React.useState(false);
|
||||
|
||||
|
@ -1316,6 +1615,26 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
};
|
||||
|
||||
|
||||
const [p_detail_domaine_class_domaine_id, setp_detail_domaine_class_domaine_id] = useState("");
|
||||
|
||||
const [Dialog_domaine_1_message, setDialog_domaine_1_message] = React.useState(false);
|
||||
const [Dialog_domaine_1_open, setDialog_domaine_1_open] = React.useState(false);
|
||||
|
||||
function Dialog_1_handle_change_Domaine(message) {
|
||||
setDialog_domaine_1_message(message);
|
||||
setDialog_domaine_1_open(true);
|
||||
}
|
||||
|
||||
const Dialog_domaine_1_handleClose = () => {
|
||||
//alert(" Utiliser le bouton 'fermer' ");
|
||||
//setOpen(false);
|
||||
};
|
||||
|
||||
const Dialog_domaine_1_handleClose_buton = () => {
|
||||
clear_domaine_DetailFields();
|
||||
setDialog_domaine_1_open(false);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="partner_domaine_categorie_metier">
|
||||
|
@ -1324,6 +1643,101 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
</div>}
|
||||
|
||||
|
||||
{/***Domaine */}
|
||||
<Dialog
|
||||
open={Dialog_domaine_1_open}
|
||||
onClose={Dialog_domaine_1_handleClose}
|
||||
|
||||
className="displaypartnersession"
|
||||
|
||||
>
|
||||
|
||||
<DialogTitle>Domaine de Formation </DialogTitle>
|
||||
<DialogContent className="DialogContent_width">
|
||||
<DialogContentText>
|
||||
{Dialog_domaine_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > <b>Code </b>
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_code"
|
||||
id="event_dialog_code"
|
||||
|
||||
fullWidth
|
||||
|
||||
value={p_detail_domaine_code}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_code(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > <b>Nom</b>
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_nom"
|
||||
id="event_dialog_nom"
|
||||
|
||||
fullWidth
|
||||
|
||||
value={p_detail_domaine_nom}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_nom(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="session_caract_Dialog" > Description
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
||||
name="event_dialog_description"
|
||||
id="event_dialog_description"
|
||||
|
||||
fullWidth
|
||||
|
||||
value={p_detail_domaine_description}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_description(e.target.value);
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</DialogContent>
|
||||
|
||||
|
||||
<DialogActions>
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
|
||||
{String(selected_domaine_id).trim().length > 2 && <Button onClick={"Add_Update_Client_Type"} className="bton_enreg_dialog">Mettre à jour</Button>}
|
||||
{String(selected_domaine_id).trim() === "" && <Button onClick={Add_domaine_Data} className="bton_enreg_dialog">Ajouter</Button>}
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_domaine_1_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
</Dialog>
|
||||
|
||||
{/*** FinDomaine */}
|
||||
|
||||
{/***Categorie */}
|
||||
<Dialog
|
||||
open={Dialog_Categorie_1_open}
|
||||
|
@ -1339,15 +1753,15 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
{Dialog_Categorie_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
{New_Getall_Partner_Class_Domaine_result && New_Getall_Partner_Class_Domaine_result.length > 0 && <div className="session_caract_Dialog" > <b> Domaine Formation </b>
|
||||
{New_Getall_Partner_Class_domaine_result && New_Getall_Partner_Class_domaine_result.length > 0 && <div className="session_caract_Dialog" > <b> Domaine Formation </b>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_domaine"
|
||||
id="event_dialog_domaine"
|
||||
//className="disabled_style"
|
||||
fullWidth
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_categorie_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_Domaine_result}
|
||||
value={New_Getall_Partner_Class_domaine_result.filter((data) => (data)._id === String(p_detail_categorie_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_domaine_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
|
||||
|
@ -1466,15 +1880,15 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
{Dialog_Metier_1_message}
|
||||
</DialogContentText>
|
||||
|
||||
{New_Getall_Partner_Class_Domaine_result && New_Getall_Partner_Class_Domaine_result.length > 0 && <div className="session_caract_Dialog" > <b> Domaine Formation </b>
|
||||
{New_Getall_Partner_Class_domaine_result && New_Getall_Partner_Class_domaine_result.length > 0 && <div className="session_caract_Dialog" > <b> Domaine Formation </b>
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="event_dialog_domaine"
|
||||
id="event_dialog_domaine"
|
||||
//className="disabled_style"
|
||||
fullWidth
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_metier_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_Domaine_result}
|
||||
value={New_Getall_Partner_Class_domaine_result.filter((data) => (data)._id === String(p_detail_metier_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_domaine_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
|
||||
|
@ -1581,7 +1995,6 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
<Button variant="outlined" onClick={submenu_domaine} className="detail_class_submenu" id='domaine' name='domaine'>Domaines </Button>
|
||||
<Button variant="outlined" onClick={submenu_categorie} className="detail_class_submenu" id='categorie' name='categorie'>Catégories </Button>
|
||||
<Button variant="outlined" onClick={submenu_metier} className="detail_class_submenu" id='metier' name='metier'> Métiers </Button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -1643,7 +2056,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
selectionModel={selectionModel_domaine}
|
||||
disableSelectionOnClick
|
||||
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
|
||||
rows={Getall_Partner_Class_Domaine_result.map((item, index) => (
|
||||
rows={Getall_Partner_Class_domaine_result.map((item, index) => (
|
||||
{
|
||||
id: index,
|
||||
_id: JSON.parse(item)._id,
|
||||
|
@ -1661,8 +2074,8 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
|
||||
onRowDoubleClick={(newSelectionModel) => {
|
||||
setgridline_domaine_id(newSelectionModel.row.id);
|
||||
handleClick_edit_domaine_From_Line(newSelectionModel.row.id);
|
||||
|
||||
// handleClick_edit_config_From_Line(newSelectionModel.row.id);
|
||||
|
||||
}}
|
||||
|
||||
|
@ -1705,51 +2118,81 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
</div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
<div className="div_row_gauche div_row_gauche_etendu" style={{ "textAlign": "left", "paddingLeft": "5px" }}>
|
||||
<Button variant="outlined" onClick={() => {
|
||||
setdisplay_detail_domaine("");
|
||||
setdomaine_data_edit_mode("");
|
||||
setdomaine_data_changed("");
|
||||
|
||||
clear_domaine_DetailFields();
|
||||
setDialog_domaine_1_open(true);
|
||||
|
||||
}}
|
||||
className="detail_class_submenu bton_add_session"
|
||||
id='menu_import_participant' name='menu_import_participant'>Ajout 1 Domaine
|
||||
<IoAddCircleOutline style={{ "fontSize": "x-large", "color": "green" }} />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="div_row" ref={myRef} id="myRef"> </div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{New_Getall_Partner_Class_Domaine_result && display_detail_domaine && String(display_detail_domaine) === "1" && <div className="div_row">
|
||||
{String(display_detail_domaine) === "1" && <div className="div_row">
|
||||
|
||||
{domaine_data_edit_mode && String(domaine_data_edit_mode) !== "1" &&
|
||||
<div className="session_caract"> Code<br />
|
||||
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_domaine_code"
|
||||
id="detail_domaine_code"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_code}
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{domaine_data_edit_mode && String(domaine_data_edit_mode) === "1" &&
|
||||
<div className="session_caract"> Code<br />
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_domaine_code"
|
||||
id="detail_domaine_code"
|
||||
className="disabled_style"
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_Domaine_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value && value.value && value.value === "signature_digital") {
|
||||
alert(" Vos droits d'accès ne vous permettent pas modifier la configuration : 'signature_digital'");
|
||||
return;
|
||||
}
|
||||
if (value && value._id) {
|
||||
setp_detail_domaine_id(value._id);
|
||||
setdomaine_data_changed("1");
|
||||
} else {
|
||||
setp_detail_domaine_id("");
|
||||
setdomaine_data_changed("1");
|
||||
}
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_code}
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_code(e.target.value);
|
||||
setdomaine_data_changed("1");
|
||||
}
|
||||
}
|
||||
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(domaine_data_edit_mode) !== "1" &&
|
||||
<div className="session_caract"> Nom <br />
|
||||
<TextField
|
||||
|
@ -1764,38 +2207,74 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_nom}
|
||||
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{String(domaine_data_edit_mode) === "1" && <div className="session_caract"> Nom<br />
|
||||
{String(domaine_data_edit_mode) === "1" &&
|
||||
<div className="session_caract"> Nom<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_domaine_nom"
|
||||
id="detail_domaine_nom"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_nom}
|
||||
onChange={(e) => {
|
||||
setp_detail_domaine_nom(e.target.value);
|
||||
setdomaine_data_changed("1");
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
{String(domaine_data_edit_mode) !== "1" &&
|
||||
<div className="session_caract"> Description <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_domaine_description"
|
||||
id="detail_domaine_description"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_description}
|
||||
|
||||
|
||||
/>
|
||||
</div>}
|
||||
|
||||
{String(domaine_data_edit_mode) === "1" && <div className="session_caract"> Description<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_domaine_nom"
|
||||
id="detail_domaine_nom"
|
||||
name="detail_domaine_description"
|
||||
id="detail_domaine_description"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_domaine_nom}
|
||||
value={p_detail_domaine_description}
|
||||
onChange={(e) => {
|
||||
|
||||
setp_detail_domaine_nom(e.target.value);
|
||||
setp_detail_domaine_description(e.target.value);
|
||||
setdomaine_data_changed("1");
|
||||
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<div className="div_row" style={{ "border": "None" }}>
|
||||
|
||||
|
@ -1807,13 +2286,13 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
|
||||
{String(domaine_data_edit_mode) === "1" && String(domaine_data_changed) === "1" && <div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
|
||||
<Button variant="contained" className="bton_enreg" onClick={"Update_One_Config_Data"}>Enregistrer les modifications
|
||||
<Button variant="contained" className="bton_enreg" onClick={Update_domaine_Data}>Enregistrer les modifications
|
||||
</Button>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(domaine_data_edit_mode) === "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }} >
|
||||
<Button variant="contained" className="bton_annule" onClick={"Annule_Order_DetailFields"}>Annuler
|
||||
<Button variant="contained" className="bton_annule" onClick={Annule_domaine_DetailFields}>Annuler
|
||||
</Button>
|
||||
</div>}
|
||||
</div>
|
||||
|
@ -1821,7 +2300,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
|
||||
{String(domaine_data_edit_mode) !== "1" && <div className="div_row_droite" style={{ "textAlign": 'right', 'marginRight': '15px' }}>
|
||||
|
||||
<Button variant="contained" className="bton_edit" onClick={"Enable_Config_DetailFields"}>Editer
|
||||
<Button variant="contained" className="bton_edit" onClick={Enable_domaine_DetailFields}>Editer
|
||||
</Button>
|
||||
|
||||
</div>}
|
||||
|
@ -1988,8 +2467,8 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
name="detail_categorie_domaine"
|
||||
id="detail_categorie_domaine"
|
||||
className="disabled_style"
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_categorie_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_Domaine_result}
|
||||
value={New_Getall_Partner_Class_domaine_result.filter((data) => (data)._id === String(p_detail_categorie_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_domaine_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
|
||||
|
@ -2027,7 +2506,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_categorie_class_domaine_id))[0].label}
|
||||
value={New_Getall_Partner_Class_domaine_result.filter((data) => (data)._id === String(p_detail_categorie_class_domaine_id))[0].label}
|
||||
|
||||
/>
|
||||
</div>}
|
||||
|
@ -2342,7 +2821,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
<div className="div_row" ref={myRef} id="myRef"> </div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{New_Getall_Partner_Class_Metier_result && display_detail_metier && String(display_detail_metier) === "1" &&
|
||||
<div className="div_row">
|
||||
|
||||
|
@ -2354,8 +2833,8 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
name="detail_metier_domaine"
|
||||
id="detail_metier_domaine"
|
||||
className="disabled_style"
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_metier_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_Domaine_result}
|
||||
value={New_Getall_Partner_Class_domaine_result.filter((data) => (data)._id === String(p_detail_metier_class_domaine_id))[0].label}
|
||||
options={New_Getall_Partner_Class_domaine_result}
|
||||
onChange={(event, value) => {
|
||||
|
||||
|
||||
|
@ -2393,7 +2872,7 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
disabled={false}
|
||||
className="disabled_style"
|
||||
|
||||
value={New_Getall_Partner_Class_Domaine_result.filter((data) => (data)._id === String(p_detail_metier_class_domaine_id))[0].label}
|
||||
value={New_Getall_Partner_Class_domaine_result.filter((data) => (data)._id === String(p_detail_metier_class_domaine_id))[0].label}
|
||||
|
||||
/>
|
||||
</div>}
|
||||
|
@ -2569,4 +3048,4 @@ const Partner_Domaine_Categorie_Metier = (props) => {
|
|||
}
|
||||
|
||||
|
||||
export default Partner_Domaine_Categorie_Metier;
|
||||
export default Partner_domaine_Categorie_Metier;
|
|
@ -55,6 +55,8 @@ import {
|
|||
} from '@mui/x-data-grid';
|
||||
|
||||
//import { utils, writeFileXLSX } from "xlsx";
|
||||
import { ContextMenu, ContextMenuTrigger } from "react-contextmenu";
|
||||
import zIndex from "@material-ui/core/styles/zIndex";
|
||||
|
||||
|
||||
const Partner_Facture = (props) => {
|
||||
|
@ -1021,7 +1023,7 @@ const Partner_Facture = (props) => {
|
|||
|
||||
var line = JSON.parse(rowss[selected_row_id]);
|
||||
|
||||
console.log("### line = ", line);
|
||||
//console.log("### line = ", line);
|
||||
var invoice_id = line._id;
|
||||
setselected_id(invoice_id);
|
||||
|
||||
|
@ -2395,6 +2397,10 @@ const Partner_Facture = (props) => {
|
|||
]
|
||||
|
||||
|
||||
function handleClick_menu_droite_facture(e) {
|
||||
console.log(" III ");
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
<div className="partner_facture">
|
||||
|
@ -2809,6 +2815,22 @@ const Partner_Facture = (props) => {
|
|||
{/*** Fin annotation */}
|
||||
|
||||
|
||||
{/******* Menu droire 'Client_Facturé' */}
|
||||
<ContextMenu id="facture_menu_droite" hideOnLeave={true} style={{ backgroundColor: 'red', zIndex:"100" }}>
|
||||
<MenuItem onClick={handleClick_menu_droite_facture}>
|
||||
ContextMenu Item 1
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleClick_menu_droite_facture}>
|
||||
ContextMenu Item 2
|
||||
</MenuItem>
|
||||
<MenuItem divider />
|
||||
<MenuItem onClick={handleClick_menu_droite_facture}>
|
||||
ContextMenu Item 3
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
|
||||
{/******* Fin Menu droire 'Client_Facturé' */}
|
||||
|
||||
<h3> Vos Factures </h3>
|
||||
<div className="div_row">
|
||||
<div className="titre1"> Utilisez les filtres !</div>
|
||||
|
@ -3376,24 +3398,25 @@ const Partner_Facture = (props) => {
|
|||
|
||||
|
||||
|
||||
<div className="session_caract"> Nom Client<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_nom_client"
|
||||
id="detail_nom_client"
|
||||
<div className="session_caract"> Nom Client aa<br />
|
||||
<ContextMenuTrigger id="facture_menu_droite" style={{zIndex:'99'}}>
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
required
|
||||
name="detail_nom_clientzzz"
|
||||
id="detail_nom_clientzzz"
|
||||
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_header_client_nom}
|
||||
|
||||
|
||||
/>
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
disabled={false}
|
||||
className="disabled_style"
|
||||
value={p_detail_header_client_nom}
|
||||
> </TextField>
|
||||
</ContextMenuTrigger>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="session_caract"> Email Client<br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
@ -4114,7 +4137,7 @@ const Partner_Facture = (props) => {
|
|||
{String(header_submenu) !== "paiement" && <div className="session_data" >
|
||||
|
||||
<div style={{ "border": "None" }}>
|
||||
|
||||
|
||||
<div style={{ height: 550, width: '100%', paddingRight: '1px' }}>
|
||||
|
||||
<Box
|
||||
|
|
|
@ -21,6 +21,8 @@ import 'react-tooltip/dist/react-tooltip.css'
|
|||
import 'reactjs-popup/dist/index.css';
|
||||
import { FcCancel, FcApproval, FcAcceptDatabase, FcPrint } from "react-icons/fc";
|
||||
|
||||
|
||||
|
||||
function Partner_Invoicing_Data(props) {
|
||||
|
||||
const [p_nom, setp_nom] = useState("");
|
||||
|
|
|
@ -54,6 +54,9 @@ import Draggable from 'react-draggable';
|
|||
import SignatureCanvas from 'react-signature-canvas';
|
||||
|
||||
|
||||
//import ContextMenu from 'react-jsx-context-menu';
|
||||
import { ContextMenu, ContextMenuTrigger } from "react-contextmenu";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
paper: {
|
||||
overflowY: 'unset',
|
||||
|
@ -295,14 +298,14 @@ const TestUrl_New = (props) => {
|
|||
|
||||
const [tab_label, settab_label] = useState([]);
|
||||
|
||||
function Get_Local_Label(){
|
||||
function Get_Local_Label() {
|
||||
var new_data2 = [];
|
||||
var node1 = {
|
||||
"_id": "@text1",
|
||||
"_id": "@text1",
|
||||
"label": "text1_label",
|
||||
};
|
||||
|
||||
|
||||
|
||||
var node2 = {
|
||||
"_id": "@text2",
|
||||
"label": "text2_label",
|
||||
|
@ -676,6 +679,10 @@ const TestUrl_New = (props) => {
|
|||
setOpen1(false);
|
||||
};
|
||||
|
||||
function handleClick(e) {
|
||||
console.log(" CKILLLLL ");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="testurl_new">
|
||||
<Helmet>
|
||||
|
@ -815,7 +822,54 @@ const TestUrl_New = (props) => {
|
|||
</Dialog>
|
||||
</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'}}>
|
||||
<MenuItem onClick={handleClick}>
|
||||
ContextMenu Item 1
|
||||
</MenuItem>
|
||||
<MenuItem onClick={handleClick}>
|
||||
ContextMenu Item 2
|
||||
</MenuItem>
|
||||
<MenuItem divider />
|
||||
<MenuItem onClick={handleClick}>
|
||||
ContextMenu Item 3
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{/*<div>
|
||||
<ContextMenu
|
||||
menu={
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
}}
|
||||
>
|
||||
<button>Button 1</button>
|
||||
<button>Button 2</button>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<div>
|
||||
Right click me to see the context menu
|
||||
</div>
|
||||
</ContextMenu>
|
||||
</div>*/}
|
||||
|
||||
<h2> Module attestation </h2>
|
||||
<Module_Attestation_Formation conntected_employee_id={"1234"} related_collection={"session_formation"} related_collection_recid={"65b378562f89e592bf0e4b78"} />
|
||||
|
||||
|
@ -830,7 +884,7 @@ const TestUrl_New = (props) => {
|
|||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
<div className="div_row">
|
||||
liste des events =
|
||||
|
|
Loading…
Reference in New Issue