04/09/2024 - 23h

recette2
cherif 2024-09-04 22:36:21 +02:00
parent 88b405feda
commit 4b14505d56
12 changed files with 868 additions and 219 deletions

View File

@ -31,6 +31,7 @@ import { PiDotsThree } from "react-icons/pi";
import { IoCloseCircleOutline } from "react-icons/io5";
import AttachFileIcon from '@mui/icons-material/AttachFile';
import Radio from '@mui/material/Radio';
import { FcOpenedFolder } from "react-icons/fc";
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
const AddParnerClient = (props) => {
@ -152,6 +153,28 @@ const AddParnerClient = (props) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
function inactive_active_menu_header(current_menu_header) {
const list_fields = ['submenu_devis', 'submenu_factures', 'submenu_piece_jointe',
'submenu_activite', 'submenu_contact', 'submenu_donnee_facturation', 'submenu_donnee_client']
for (let i = 0; i < list_fields.length; i++) {
if (document.getElementsByName(String(list_fields[i])) && document.getElementsByName(String(list_fields[i]))[0]) {
document.getElementsByName(String(list_fields[i]))[0].style.background = "#d8edfc";
document.getElementsByName(String(list_fields[i]))[0].style.color = "#3b3e40";
}
}
if (document.getElementsByName(String(current_menu_header)) && document.getElementsByName(String(current_menu_header))[0]) {
document.getElementsByName(String(current_menu_header))[0].style.background = "#104277";
document.getElementsByName(String(current_menu_header))[0].style.color = "white";
}
}
const [importmessage, setimportmessage] = useState("");
async function submenu_donnee_client() {
setsubmenu("submenu_donnee_client");
@ -165,36 +188,7 @@ const AddParnerClient = (props) => {
Enable_fields();
}
/*
document.getElementById("submenu_factures").style.background = "#d8edfc";
document.getElementById("submenu_factures").style.color = "#3b3e40";
document.getElementById("submenu_stagiaires").style.background = "#d8edfc";
document.getElementById("submenu_stagiaires").style.color = "#3b3e40";
document.getElementById("submenu_devis").style.background = "#d8edfc";
document.getElementById("submenu_devis").style.color = "#3b3e40";
document.getElementById("submenu_cmd").style.background = "#d8edfc";
document.getElementById("submenu_cmd").style.color = "#3b3e40";
*/
document.getElementById("submenu_contact").style.background = "#d8edfc";
document.getElementById("submenu_contact").style.color = "#3b3e40";
document.getElementById("submenu_activite").style.background = "#d8edfc";
document.getElementById("submenu_activite").style.color = "#3b3e40";
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
document.getElementById("submenu_donnee_client").style.background = "#104277";
document.getElementById("submenu_donnee_client").style.color = "white";
inactive_active_menu_header("submenu_donnee_client");
}
@ -212,28 +206,7 @@ const AddParnerClient = (props) => {
Enable_invoice_fields();
}
document.getElementById("submenu_contact").style.background = "#d8edfc";
document.getElementById("submenu_contact").style.color = "#3b3e40";
document.getElementById("submenu_activite").style.background = "#d8edfc";
document.getElementById("submenu_activite").style.color = "#3b3e40";
document.getElementById("submenu_donnee_client").style.background = "#d8edfc";
document.getElementById("submenu_donnee_client").style.color = "#3b3e40";
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
document.getElementById("submenu_donnee_facturation").style.background = "#104277";
document.getElementById("submenu_donnee_facturation").style.color = "white";
inactive_active_menu_header("submenu_donnee_facturation");
}
@ -244,25 +217,7 @@ const AddParnerClient = (props) => {
*/
await sleep(5);
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_activite").style.background = "#d8edfc";
document.getElementById("submenu_activite").style.color = "#3b3e40";
document.getElementById("submenu_donnee_client").style.background = "#d8edfc";
document.getElementById("submenu_donnee_client").style.color = "#3b3e40";
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
document.getElementById("submenu_contact").style.background = "#104277";
document.getElementById("submenu_contact").style.color = "white";
inactive_active_menu_header("submenu_contact");
}
@ -278,27 +233,7 @@ const AddParnerClient = (props) => {
} else {
//Enable_invoice_fields();
}
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_donnee_client").style.background = "#d8edfc";
document.getElementById("submenu_donnee_client").style.color = "#3b3e40";
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_contact").style.background = "#d8edfc";
document.getElementById("submenu_contact").style.color = "#3b3e40";
document.getElementById("submenu_piece_jointe").style.background = "#d8edfc";
document.getElementById("submenu_piece_jointe").style.color = "#3b3e40";
document.getElementById("submenu_activite").style.background = "#104277";
document.getElementById("submenu_activite").style.color = "white";
inactive_active_menu_header("submenu_activite");
}
@ -316,28 +251,7 @@ const AddParnerClient = (props) => {
} else {
//Enable_invoice_fields();
}
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_donnee_client").style.background = "#d8edfc";
document.getElementById("submenu_donnee_client").style.color = "#3b3e40";
document.getElementById("submenu_donnee_facturation").style.background = "#d8edfc";
document.getElementById("submenu_donnee_facturation").style.color = "#3b3e40";
document.getElementById("submenu_contact").style.background = "#d8edfc";
document.getElementById("submenu_contact").style.color = "#3b3e40";
document.getElementById("submenu_activite").style.background = "#d8edfc";
document.getElementById("submenu_activite").style.color = "#3b3e40";
document.getElementById("submenu_piece_jointe").style.background = "#104277";
document.getElementById("submenu_piece_jointe").style.color = "white";
inactive_active_menu_header("submenu_piece_jointe");
// Refresh affichage des pièces jointes
Get_List_Of_All_PJ(props.client_id);
}
@ -349,6 +263,7 @@ const AddParnerClient = (props) => {
Ceci est super crade, fair eun wait de pour attendre l'afficage avant de desacitcation si on a desactiver, mais bon ... on avance.
*/
await sleep(5);
inactive_active_menu_header("submenu_devis");
}
async function submenu_cmd() {
@ -365,6 +280,7 @@ const AddParnerClient = (props) => {
Ceci est super crade, fair eun wait de pour attendre l'afficage avant de desacitcation si on a desactiver, mais bon ... on avance.
*/
await sleep(5);
inactive_active_menu_header("submenu_factures");
}
@ -3555,10 +3471,35 @@ const AddParnerClient = (props) => {
<Button variant="outlined" onClick={submenu_activite} className="detail_submenu client_menu" id='submenu_activite' name='submenu_activite'>Activité</Button>
<Button variant="outlined" onClick={submenu_piece_jointe} className="detail_submenu client_menu" id='submenu_piece_jointe' name='submenu_piece_jointe'>Pièces Jointes</Button>
{/* <Button variant="outlined" onClick={submenu_devis} className="detail_submenu" id='submenu_devis' name='submenu_devis'>Devis</Button>
<Button variant="outlined" onClick={submenu_cmd} className="detail_submenu" id='submenu_cmd' name='submenu_cmd'>Commandes</Button>
<Button variant="outlined" onClick={submenu_factures} className="detail_submenu" id='submenu_factures' name='submenu_factures'>Factures</Button>
<Button variant="outlined" onClick={submenu_stagiaires} className="detail_submenu" id='submenu_stagiaires' name='submenu_stagiaires'>Stagiaires</Button>*/}
<Button variant="outlined" className="detail_submenu client_menu" id='submenu_factures' name='submenu_factures'
onClick={(event) => {
inactive_active_menu_header("submenu_factures");
if (props.client_id &&
String(props.client_id).length > 2) {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/factures_client/" + String(props.client_id),
'_blank'
);
}
}} > Factures &nbsp;
<FcOpenedFolder style={{ fontSize: "10px" }} />
</Button>
<Button variant="outlined" className="detail_submenu client_menu" id='submenu_devis' name='submenu_devis'
onClick={(event) => {
inactive_active_menu_header("submenu_devis");
if (props.client_id &&
String(props.client_id).length > 2) {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/mes_cmd/" + String(props.client_id),
'_blank'
);
}
}} > Devis & Cmd &nbsp;
<FcOpenedFolder style={{ fontSize: "10px" }} />
</Button>
</div>

View File

@ -14600,9 +14600,6 @@ const DisplayPartnerSession = (props) => {
{String(addOneSession) !== "1" && <div className="session_data" onChange={IssessionChanged}>
<br />
<div className="session_caract"> <b> Formation </b><br />
@ -14642,7 +14639,6 @@ const DisplayPartnerSession = (props) => {
</div>
</a>
</div>
<div className="session_caract"><b> Code Session </b><br />
<TextField

View File

@ -44,6 +44,8 @@ import { IoAddCircleOutline, IoCloseCircleOutline } from "react-icons/io5";
import { gridClasses } from '@mui/x-data-grid';
import Link from '@mui/material/Link';
import { PiDotsThree } from "react-icons/pi";
import Chip from "@mui/material/Chip";
const DisplayPartnerUnite_Enseignement = (props) => {
const history = useHistory();
@ -462,6 +464,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
let [ue_data_edit_mode, setue_data_edit_mode] = useState("0");
const [Dialog_1_message, setDialog_1_message] = React.useState(false);
const [Dialog_1_open, setDialog_1_open] = React.useState(false);
function Dialog_1_handle_change_participant_session(message) {
@ -653,12 +656,41 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setp_detail_titre("");
}
if (local_ue.detail_cours) {
setp_detail_detail_cours(local_ue.detail_cours);
if (local_ue.vh_cm) {
setp_detail_cours_cm(local_ue.vh_cm);
} else {
setp_detail_detail_cours({});
setp_detail_cours_cm("");
}
if (local_ue.vh_tp) {
setp_detail_cours_tp(local_ue.vh_tp);
} else {
setp_detail_cours_tp("");
}
if (local_ue.vh_tpg) {
setp_detail_cours_tpg(local_ue.vh_tpg);
} else {
setp_detail_cours_tpg("");
}
if (local_ue.vh_td) {
setp_detail_cours_td(local_ue.vh_td);
} else {
setp_detail_cours_td("");
}
if (local_ue.semestre) {
setp_detail_semestre(local_ue.semestre);
} else {
setp_detail_semestre("");
}
if (local_ue.support) {
setp_detail_support(local_ue.support);
} else {
@ -720,6 +752,29 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setfield_description("");
}
if (local_ue.niveau_competence) {
setp_detail_tab_competence(local_ue.niveau_competence);
var tab_tmp = String(local_ue.niveau_competence).split(",");
setVal(tab_tmp);
} else {
setp_detail_tab_competence([]);
setVal([]);
}
if (local_ue.ects) {
setp_detail_ects(local_ue.ects);
} else {
setp_detail_ects("");
}
if (local_ue.seuil_validation) {
setp_detail_seuil_validation(local_ue.seuil_validation);
} else {
setp_detail_seuil_validation("");
}
desable_detail_fields();
@ -741,7 +796,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
const [eu_changed, seteu_changed] = useState("");
function is_EU_changed() {
seteu_changed(true);
seteu_changed("1");
}
const New_duration_unit_list = [
@ -805,6 +860,14 @@ const DisplayPartnerUnite_Enseignement = (props) => {
}
}
if (document.getElementById('myRef')) {
var divh = document.getElementById('myRef').offsetTop;
window.scrollTo({
top: divh,
behavior: "smooth",
});
}
}
@ -868,6 +931,18 @@ const DisplayPartnerUnite_Enseignement = (props) => {
form.append("duration", p_detail_duration);
form.append("duration_unite", p_detail_duration_unite);
form.append("ects", p_detail_ects);
form.append("seuil_validation", p_detail_seuil_validation);
form.append("vh_cm", p_detail_cours_cm);
form.append("vh_tp", p_detail_cours_tp);
form.append("vh_tpg", p_detail_cours_tpg);
form.append("vh_td", p_detail_cours_td);
form.append("semestre", p_detail_semestre);
form.append("niveau_competence", val);
var description = "";
@ -967,6 +1042,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
setAdd_Update_UE_Data_api("true");
setAdd_Update_UE_Data_result(res.data.message);
Getall_Parter_Unite_Enseignement();
seteu_changed("");
setdisplay_ue("");
clean_fields();
alert(res.data.message);
@ -1012,7 +1088,13 @@ 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_cours_tp, setp_detail_cours_tp] = useState("");
const [p_detail_cours_cm, setp_detail_cours_cm] = useState("");
const [p_detail_cours_tpg, setp_detail_cours_tpg] = useState("");
const [p_detail_cours_td, setp_detail_cours_td] = useState("");
const [p_detail_semestre, setp_detail_semestre] = useState("");
const [p_detail_titre, setp_detail_titre] = useState("");
@ -1027,6 +1109,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
const [p_detail_ects, setp_detail_ects] = useState("");
const [p_detail_seuil_validation, setp_detail_seuil_validation] = useState("");
const [p_detail_tab_competence, setp_detail_tab_competence] = useState([]);
const editorRef_description = useRef(null);
@ -1086,16 +1169,13 @@ const DisplayPartnerUnite_Enseignement = (props) => {
clean_fields();
setue_data_edit_mode("");
setdisplay_ue("1");
seteu_changed("");
var invoice_id = line._id;
setselected_id(invoice_id);
Get_Given_Unite_Enseignement(line._id);
if (document.getElementById('myRef')) {
var divh = document.getElementById('myRef').offsetTop;
window.scrollTo({
@ -1562,12 +1642,24 @@ const DisplayPartnerUnite_Enseignement = (props) => {
const hiddenFileInput_session = React.useRef(null);
/**** fin gestion fichier csv a importer */
const nivau_competence = [
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
const fixedVal = [];
const [val, setVal] = useState([...fixedVal]);
const CustomChip = (chipVal, getTagProps) => {
return chipVal.map((item, index) => (
<Chip
label={String(item)} //adding options label
{...getTagProps({ index })}
disabled={fixedVal.indexOf(item) !== -1}
/>
));
};
return (
<div className="displayPartnerunite_enseignement">
{isLoading && <div className="loader-container">
@ -1631,6 +1723,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_planif_line_code}
onChange={(e) => {
setp_detail_planif_line_code(e.target.value);
seteu_changed("1");
}
}
@ -1651,6 +1744,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_planif_line_titre}
onChange={(e) => {
setp_detail_planif_line_titre(e.target.value);
seteu_changed("1");
}
}
@ -1672,6 +1766,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_planif_line_volume_horaire}
onChange={(e) => {
setp_detail_planif_line_volume_horaire(e.target.value);
seteu_changed("1");
}
}
@ -1694,6 +1789,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
onChange={(e) => {
setp_detail_planif_line_description(e.target.value);
seteu_changed("1");
}
}
multiline
@ -1716,8 +1812,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_planif_line_prerequis}
onChange={(e) => {
setp_detail_planif_line_prerequis(e.target.value);
seteu_changed("1");
}
}
multiline
@ -1740,8 +1836,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_planif_line_comment}
onChange={(e) => {
setp_detail_planif_line_comment(e.target.value);
seteu_changed("1");
}
}
multiline
@ -2273,6 +2369,52 @@ const DisplayPartnerUnite_Enseignement = (props) => {
/>
</div>
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div>
<div className="session_caract"> Semestre <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_semestre"
id="detail_semestre"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_semestre}
/>
</div>
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" && <div>
<div className="session_caract"> Semestre <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_semestre"
id="detail_semestre"
InputLabelProps={{
shrink: true,
}}
type='number'
//disabled={true}
className="disabled_style"
value={p_detail_semestre}
onChange={(e) => {
setp_detail_semestre(e.target.value);
seteu_changed("1");
}
}
/>
</div>
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" &&
New_Get_List_Domaines_result && New_Get_List_Domaines_result.length > 0 && <div className="training_caract">Domaine <br />
<Autocomplete
@ -2356,26 +2498,176 @@ const DisplayPartnerUnite_Enseignement = (props) => {
className="disabled_style"
value={p_detail_seuil_validation}
/>
</div>
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div>
<div className="session_caract"> CM <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_cm"
id="heure_cm"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_cm}
/>
</div>
<div className="session_caract"> TD <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_td"
id="heure_td"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_td}
/>
</div>
<div className="session_caract"> TP <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_tp"
id="heure_tp"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_tp}
/>
</div>
<div className="session_caract"> TPG <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_tpg"
id="heure_tpg"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_tpg}
/>
</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" && <div>
{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 className="session_caract"> CM <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_cm"
id="heure_cm"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_cm}
type="number"
onChange={(e) => {
setp_detail_cours_cm(e.target.value);
seteu_changed("1");
}
}
</div>}
</nav>
))}
/>
</div>
<div className="session_caract"> TD <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_td"
id="heure_td"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_td}
type="number"
onChange={(e) => {
setp_detail_cours_td(e.target.value);
seteu_changed("1");
}
}
/>
</div>
<div className="session_caract"> TP <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_tp"
id="heure_tp"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_tp}
type="number"
onChange={(e) => {
setp_detail_cours_tp(e.target.value);
seteu_changed("1");
}
}
/>
</div>
<div className="session_caract"> TPG <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="heure_tpg"
id="heure_tpg"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_cours_tpg}
type="number"
onChange={(e) => {
setp_detail_cours_tpg(e.target.value);
seteu_changed("1");
}
}
/>
</div>
</div>}
@ -2425,7 +2717,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
required
name="ects"
id="ects"
type="number"
InputLabelProps={{
shrink: true,
}}
@ -2434,6 +2726,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_ects}
onChange={(e) => {
setp_detail_ects(e.target.value);
seteu_changed("1");
}
}
@ -2449,7 +2742,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
required
name="seuil_validation"
id="seuil_validation"
type="number"
InputLabelProps={{
shrink: true,
}}
@ -2458,11 +2751,58 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_seuil_validation}
onChange={(e) => {
setp_detail_seuil_validation(e.target.value);
seteu_changed("1");
}
}
/>
</div>
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) === "1" && <div>
<div className="session_caract"> Compétence <br />
<Autocomplete
multiple
onChange={(event, newValue) => {
setVal([
...fixedVal,
...newValue.filter((i) => fixedVal.indexOf(i) === -1),
]);
console.log(" ### val == ", val);
}}
value={val}
options={nivau_competence}
renderInput={(params) => (
<TextField
{...params}
label=""
placeholder="Compétence"
/>
)}
renderTags={CustomChip}
/>
</div>
</div>}
{ue_data_edit_mode && String(ue_data_edit_mode) !== "1" && <div>
<div className="session_caract"> Compétence <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_competence"
id="detail_competence"
InputLabelProps={{
shrink: true,
}}
//disabled={true}
className="disabled_style"
value={p_detail_tab_competence}
/>
</div>
</div>}
@ -2484,6 +2824,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
type="number"
onChange={(e) => {
setp_detail_duration(e.target.value);
seteu_changed("1");
}
}
/>
@ -3117,6 +3458,7 @@ const DisplayPartnerUnite_Enseignement = (props) => {
value={p_detail_duration}
onChange={(e) => {
setp_detail_duration(e.target.value);
seteu_changed("1");
}
}
/>
@ -3367,6 +3709,8 @@ const DisplayPartnerUnite_Enseignement = (props) => {
</div>
<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>

View File

@ -1484,7 +1484,7 @@ const Module_Session_Planification = (props) => {
if (new_data2.length > 0) {
setGetall_Sequence_Of_Session_result_planning_view(new_data2);
// console.log(" ### new_data2 = ", new_data2);
// console.log(" ### new_data2 Getall_Sequence_Of_Session = ", new_data2);
}
@ -1635,6 +1635,7 @@ const Module_Session_Planification = (props) => {
var localid = (x)._id; // on donne volontairement a l'id la valeur de '_id'
var local_id = (x)._id;
var local_title = (x).sequence_title;
var local_start = new Date(moment((x).new_sequence_start, "DD/MM/YYYY hh:mm"))
var local_end = new Date(moment((x).new_sequence_end, "DD/MM/YYYY hh:mm"))
@ -3128,16 +3129,81 @@ const Module_Session_Planification = (props) => {
form.append("token", stored_cookie);
form.append("session_id", selected_session_id);
var json_str = JSON.stringify(new_planification_lines)
var new_planification_lines_normalized = [];
const new_data = new_planification_lines.map((x) => {
var _id = x._id;
var color = "";
if (x.color)
color = x.color;
var grp_code = "";
if (x.grp_code)
grp_code = x.grp_code
var id = x.id;
var local_agenda = x.local_agenda;
var local_comment = x.local_comment;
var local_grp_apprenant_id = "";
if (x.local_grp_apprenant_id)
local_grp_apprenant_id = x.local_grp_apprenant_id
var local_objectif = x.local_objectif;
var local_type = x.local_type;
var local_ue_id = "";
if( x.local_ue_id )
local_ue_id = x.local_ue_id
var local_ue_planif_line_id = "";
if (x.local_ue_planif_line_id)
local_ue_planif_line_id = x.local_ue_planif_line_id
var title = x.title;
var start = moment(x.start).format("DD/MM/YYYY HH:mm");
var end = moment(x.end).format("DD/MM/YYYY HH:mm");
//---
var node = {
"_id": _id,
"color": color,
"title": title,
"start": start,
"end": end,
"grp_code": grp_code,
"id": id,
"local_agenda": local_agenda,
"local_agenda": local_agenda,
"local_comment": local_comment,
"local_grp_apprenant_id": local_grp_apprenant_id,
"local_objectif": local_objectif,
"local_type": local_type,
"local_ue_id": local_ue_id,
"local_ue_planif_line_id": local_ue_planif_line_id,
}
new_planification_lines_normalized.push(node);
});
var json_str = JSON.stringify(new_planification_lines_normalized)
form.append("tab_sequence_modele", json_str);
//console.log(" form == ", form);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Apply_Planning_Model_To_Session/";
setLoading(true);
axios.post(myurl, form).then(res => {
//console.log(" In Apply_Planning_To_Session res.data.status = " + res.data.status);

View File

@ -22,7 +22,7 @@ import Header from "./Header";
import Facture from "./Facture";
import Abonnement from "./Abonnement";
import { useLocation } from "react-router-dom";
import { useParams } from 'react-router-dom'
import { useParams } from 'react-router-dom';
import CheckOut from "./CheckOut";
import { FaHandPointRight } from "react-icons/fa";

View File

@ -408,7 +408,6 @@ const Partner_Client = (props) => {
//menu_info();
Get_List_Partner_Clients();
if (props.object_key && String(props.object_key).length > 3) {
handleClick_edit_session_From_Props(props.object_key);

View File

@ -55,6 +55,10 @@ import { makeStyles } from "@material-ui/core/styles";
import CancelPresentationIcon from '@mui/icons-material/CancelPresentation';
import { IconButton } from '@material-ui/core';
import Checkbox from '@mui/material/Checkbox';
import { FcOpenedFolder } from "react-icons/fc";
import { useParams } from 'react-router-dom';
const useStyles = makeStyles((theme) => ({
@ -77,13 +81,17 @@ const useStyles = makeStyles((theme) => ({
}));
const Partner_Commande = (props) => {
const { action, orderid } = useParams();
const classes = useStyles();
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);
const [rowss_total_data, setRows_total_data] = useState([]);
const [selectionModel, setSelectionModel] = React.useState([]);
const [article_formation_ou_produit, setarticle_formation_ou_produit] = useState("formation");
@ -184,8 +192,6 @@ const Partner_Commande = (props) => {
{ field: 'order_header_date_cmd', headerName: 'Date', minWidth: 150, hide: false, editable: false, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{ field: 'order_header_date_expiration', headerName: 'Date Expiration', minWidth: 150, hide: false, editable: false },
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
@ -257,7 +263,38 @@ const Partner_Commande = (props) => {
{ field: 'order_line_formation', headerName: 'intenal_url', width: 0, hide: true, editable: false },
{ field: 'order_line_session_id', headerName: 'session_id', width: 0, hide: true, editable: false },
{ field: 'order_line_formation_title', headerName: 'Titre', minWidth: 200, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
{
field: 'order_line_formation_title', headerName: 'Titre', minWidth: 200, flex: 1,
renderCell: (cellValues) => {
return (
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
<nav>
<Tooltip className="tooltip_css" id="affiche_article_01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="affiche_article_01" data-tooltip-html="Détails Formation">
<FcOpenedFolder style={{ fontSize: "10px" }}
onClick={(event) => {
if (cellValues.row.order_line_formation && cellValues.row.order_line_formation_external_code &&
String(cellValues.row.order_line_formation).length > 2 && cellValues.row.order_line_type_article === "formation") {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/affichage/" + String(cellValues.row.order_line_formation_external_code) + "/" + String(cellValues.row.order_line_formation),
'_blank'
);
} else if (cellValues.row.order_line_formation && cellValues.row.order_line_formation_external_code &&
String(cellValues.row.order_line_formation).length > 2 && cellValues.row.order_line_type_article === "produit") {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/part_produit_service/" + String(cellValues.row.order_line_formation),
'_blank'
);
}
}
} />
</a> &nbsp; &nbsp; {cellValues.row.order_line_formation_title}
</nav>
</div>
);
}
},
{
field: 'order_line_session_code', headerName: 'Code Session', minwidth: 200, flex: 1, hideable: true, resizable: true,
renderCell: (cellValues) => {
@ -944,15 +981,27 @@ const Partner_Commande = (props) => {
Get_List_Partner_Clients();
Getall_Training_Employee_No_Filter();
Getall_Parter_Orders_No_Filter();
GetCurrentPartnerClass();
Get_Given_Partner_Config_Point_Taux_TVA();
Getall_Partner_Paiement_Condition();
Getall_TrainingSession();
Getall_Partner_Digital_Sign_Status();
Getall_Partner_Product_Service();
console.log(" ~### mes facture props action, orderid = ", action, orderid);
if (orderid && String(orderid).length > 3) {
/*
Dans le cas précis des produits et service, "props.class_external_code" est utilisé comme
l'_id du client*/
Getall_Parter_Orders_With_Filter_On_Client_Id(orderid);
console.log(" ~### 222 mes facture props action, orderid = ", action, orderid);
} else {
Getall_Parter_Orders_No_Filter();
}
if (document.getElementById('myRef_head')) {
var divh = document.getElementById('myRef_head').offsetTop;
window.scrollTo({
@ -961,6 +1010,7 @@ const Partner_Commande = (props) => {
});
}
Getall_Parter_Devis_Config_Points();
}, [])
@ -986,6 +1036,7 @@ const Partner_Commande = (props) => {
setGetall_Parter_Orders_No_Filter_api("true");
setGetall_Parter_Orders_No_Filter_result(res.data.message);
setRows(res.data.message);
setRows_total_data(JSON.parse(res.data.total_data));
}
else {
setGetall_Parter_Orders_No_Filter_api("false");
@ -1054,6 +1105,7 @@ const Partner_Commande = (props) => {
setGetall_Parter_Orders_With_Filter_api("true");
setGetall_Parter_Orders_With_Filter_result(res.data.message);
setRows(res.data.message);
setRows_total_data(JSON.parse(res.data.total_data));
}
else {
setGetall_Parter_Orders_With_Filter_api("false");
@ -1069,6 +1121,45 @@ const Partner_Commande = (props) => {
})
}
const [Getall_Parter_Orders_With_Filter_On_Client_Id_api, setGetall_Parter_Orders_With_Filter_On_Client_Id_api] = useState();
const [Getall_Parter_Orders_With_Filter_On_Client_Id_message, setGetall_Parter_Orders_With_Filter_On_Client_Id_message] = useState();
const [Getall_Parter_Orders_With_Filter_On_Client_Id_result, setGetall_Parter_Orders_With_Filter_On_Client_Id_result] = useState();
function Getall_Parter_Orders_With_Filter_On_Client_Id(local_client_id) {
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("order_header_client_id", local_client_id);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Order_with_filter/";
axios.post(myurl, form).then(res => {
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Parter_Orders_With_Filter_On_Client_Id res.data.status = " + res.data.status);
//console.log(" In Getall_Parter_Orders_With_Filter_On_Client_Id res.data.message r_class = " + res.data.message);
setGetall_Parter_Orders_With_Filter_On_Client_Id_api("true");
setGetall_Parter_Orders_With_Filter_On_Client_Id_result(res.data.message);
setRows(res.data.message);
setRows_total_data(JSON.parse(res.data.total_data));
}
else {
setGetall_Parter_Orders_With_Filter_On_Client_Id_api("false");
setGetall_Parter_Orders_With_Filter_On_Client_Id_message(res.data.message);
alert(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( Getall_Parter_Orders_With_Filter_On_Client_Id = ', error);
setGetall_Parter_Orders_With_Filter_On_Client_Id_api("false");
alert(" Impossible de recuperer la liste des commandes et devis");
//setmyApimyApiMessage("")
})
}
const [session_file_name, setsession_file_name] = useState();
const [liste_sessions_file_change_api, setliste_sessions_file_change_api] = useState();
@ -5961,6 +6052,8 @@ const Partner_Commande = (props) => {
<div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
<div className="session_data">
{rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => (<nav style={{ "textAlign": 'right', 'marginRight': '15px', "fontWeight": "600", "fontSize": "15px", "paddingTop": "2px" }}> {parseFloat(String(val.somme_order_ca_ht)).toLocaleString()} () / {val.nb_header_order} Commandes / Devis </nav>))}
<div style={{ "border": "None" }}>
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
@ -6053,6 +6146,7 @@ const Partner_Commande = (props) => {
onRowDoubleClick={(newSelectionModel) => {
setgridline_id(newSelectionModel.row.id);
setp_detail_header_client_nom_id(newSelectionModel.row.order_header_client_id);
handleClick_edit_order_From_Line(newSelectionModel.row.id);
}
}
@ -6474,7 +6568,7 @@ const Partner_Commande = (props) => {
{String(order_data_edit_mode) !== "1" && <div className="session_caract"> Nom Client<br />
{String(order_data_edit_mode) !== "1" && <div className="session_caract"> Nom Client aa <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
@ -6485,18 +6579,33 @@ const Partner_Commande = (props) => {
shrink: true,
}}
disabled={false}
className="disabled_style"
className="disabled_style disabled_style_left_text_with_visualiser_icone"
value={p_detail_header_client_nom}
onChange={(e) => {
setp_detail_header_client_nom(e.target.value);
setOrder_data_changed("1");
}
}
/>
<Tooltip className="tooltip_css" id="detail_01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="detail_01" data-tooltip-html="Voir les détails">
<div className="disabled_style disabled_style_right_bton_visualiser"
onClick={(event) => {
if (p_detail_header_client_nom_id && String(p_detail_header_client_nom_id).length > 2) {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/mes_clients/" + String(p_detail_header_client_nom_id),
'_blank'
);
}
}
}
>
<div className="disabled_style_with_visualiser_icone" >
<FcOpenedFolder />
</div>
</div>
</a>
</div>}
{String(order_data_edit_mode) === "1" && <div className="session_caract"> Nom Client<br />
{String(order_data_edit_mode) === "1" && <div className="session_caract"> Nom Client <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}

View File

@ -4,6 +4,7 @@ import MenuItem from '@mui/material/MenuItem';
import 'react-confirm-alert/src/react-confirm-alert.css'; // Import css
import Button from '@mui/material/Button';
import axios from "axios";
import { useParams } from 'react-router-dom';
import { getCookie, setCookie } from 'react-use-cookie';
import { useHistory } from "react-router-dom";
import CheckOut from "./CheckOut";
@ -57,10 +58,12 @@ import {
//import { utils, writeFileXLSX } from "xlsx";
import { ContextMenu, ContextMenuTrigger } from "react-contextmenu";
import zIndex from "@material-ui/core/styles/zIndex";
import { FcOpenedFolder } from "react-icons/fc";
const Partner_Facture = (props) => {
const { action, orderid } = useParams();
const csvOptions = { delimiter: ';' };
function CustomExportButton(props) {
return (
@ -113,6 +116,7 @@ const Partner_Facture = (props) => {
const history = useHistory();
const [submenu, setsubmenu] = useState("");
const [rowss, setRows] = useState([]);
const [rowss_total_data, setRows_total_data] = useState([]);
const [selectionModel, setSelectionModel] = React.useState([]);
const [rows_invoice_lines, setrows_invoice_lines] = useState([]);
@ -273,7 +277,38 @@ const Partner_Facture = (props) => {
{ field: '_id', headerName: '_id', hide: true, editable: false },
{ field: 'id', headerName: 'id', hide: true, editable: false },
{ field: 'order_line_formation', headerName: 'intenal_url', width: 0, hide: true, editable: false },
{ field: 'order_line_formation_title', headerName: 'Titre', width: 250, hide: false, editable: false, flex: 1 },
{
field: 'order_line_formation_title', headerName: 'Titre', width: 250, hide: false, editable: false, flex: 1,
renderCell: (cellValues) => {
return (
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
<nav>
<Tooltip className="tooltip_css" id="affiche_article_01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="affiche_article_01" data-tooltip-html="Détails Formation">
<FcOpenedFolder style={{ fontSize: "10px" }}
onClick={(event) => {
if (cellValues.row.order_line_formation && cellValues.row.order_line_formation_external_code &&
String(cellValues.row.order_line_formation).length > 2 && cellValues.row.order_line_type_article === "formation") {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/affichage/" + String(cellValues.row.order_line_formation_external_code) + "/" + String(cellValues.row.order_line_formation),
'_blank'
);
} else if (cellValues.row.order_line_formation && cellValues.row.order_line_formation_external_code &&
String(cellValues.row.order_line_formation).length > 2 && cellValues.row.order_line_type_article === "produit") {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/part_produit_service/" + String(cellValues.row.order_line_formation),
'_blank'
);
}
}
} />
</a> &nbsp; &nbsp; {cellValues.row.order_line_formation_title}
</nav>
</div>
);
}
},
{ field: 'order_line_formation_external_code', headerName: 'Code Formation', width: 150, hide: false, editable: false },
{ field: 'order_line_formation_duration', headerName: 'Durée', width: 80, hide: false, editable: false },
@ -285,6 +320,7 @@ const Partner_Facture = (props) => {
{ field: 'order_header_id', headerName: 'Id_Entete', hide: true, editable: false },
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false },
{ field: 'order_line_type', headerName: 'Type', width: 100, hide: false, editable: false },
{ field: 'order_line_type_article', headerName: 'Type Article', width: 100, hide: true, editable: false },
{
field: "Detail", headerName: 'Voir detail',
@ -951,9 +987,11 @@ const Partner_Facture = (props) => {
}
const [Getall_Parter_Invoice_No_Filter_api, setGetall_Parter_Invoice_No_Filter_api] = useState();
const [Getall_Parter_Invoice_No_Filter_message, setGetall_Parter_Invoice_No_Filter_message] = useState();
const [Getall_Parter_Invoice_No_Filter_result, setGetall_Parter_Invoice_No_Filter_result] = useState();
const [Getall_Parter_Invoice_No_Filter_result, setGetall_Parter_Invoice_No_Filter_result] = useState([]);
function Getall_Parter_Invoice_No_Filter(event) {
var form = new FormData();
@ -969,9 +1007,11 @@ const Partner_Facture = (props) => {
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Parter_Invoice_No_Filter res.data.status = " + res.data.status);
//console.log(" In Getall_Parter_Invoice_No_Filter res.data.message r_class = " + res.data.message);
console.log(" In Getall_Parter_Invoice_No_Filter res.data.total_data r_class = ", res.data.total_data);
setGetall_Parter_Invoice_No_Filter_api("true");
setGetall_Parter_Invoice_No_Filter_result(res.data.message);
setRows(res.data.message);
setRows_total_data(JSON.parse(res.data.total_data));
}
else {
setGetall_Parter_Invoice_No_Filter_api("false");
@ -987,13 +1027,67 @@ const Partner_Facture = (props) => {
})
}
const [Getall_Parter_Invoice_With_Filter_On_Client_Id_api, setGetall_Parter_Invoice_With_Filter_On_Client_Id_api] = useState();
const [Getall_Parter_Invoice_With_Filter_On_Client_Id_message, setGetall_Parter_Invoice_With_Filter_On_Client_Id_message] = useState();
const [Getall_Parter_Invoice_With_Filter_On_Client_Id_result, setGetall_Parter_Invoice_With_Filter_On_Client_Id_result] = useState();
function Getall_Parter_Invoice_With_Filter_On_Client_Id(local_client_id) {
setgridline_id("");
var form = new FormData();
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("order_header_client_id", local_client_id);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Get_List_Partner_Invoice_with_filter/";
axios.post(myurl, form).then(res => {
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Parter_Invoice_With_Filter_On_Client_Id res.data.status = " + res.data.status);
// console.log(" In Getall_Parter_Invoice_With_Filter_On_Client_Id res.data.message r_class = " + res.data.message);
setGetall_Parter_Invoice_With_Filter_On_Client_Id_api("true");
setGetall_Parter_Invoice_With_Filter_On_Client_Id_result(res.data.message);
setRows(res.data.message);
setRows_total_data(JSON.parse(res.data.total_data));
}
else {
setGetall_Parter_Invoice_With_Filter_On_Client_Id_api("false");
setGetall_Parter_Invoice_With_Filter_On_Client_Id_message(res.data.message);
alert(res.data.message);
}
}).catch((error) => {
console.warn('Not good man :( Getall_Parter_Invoice_With_Filter_On_Client_Id = ', error);
setGetall_Parter_Invoice_With_Filter_On_Client_Id_api("false");
alert(" Impossible de recuperer la liste des factures");
//setm yApimyApiMessage("")
})
}
const myRef = useRef(null);
useEffect(() => {
Get_List_Partner_Clients();
if (orderid && String(orderid).length > 3) {
/*
Dans le cas précis des produits et service, "props.class_external_code" est utilisé comme
l'_id du client*/
Getall_Parter_Invoice_With_Filter_On_Client_Id(orderid);
//console.log(" ~### mes facture props action, orderid = ", action, orderid);
} else {
Getall_Parter_Invoice_No_Filter();
}
if (document.getElementById('myRef_head')) {
var divh = document.getElementById('myRef_head').offsetTop;
@ -1564,6 +1658,7 @@ const Partner_Facture = (props) => {
setGetall_Parter_Invoice_With_Filter_api("true");
setGetall_Parter_Invoice_With_Filter_result(res.data.message);
setRows(res.data.message);
setRows_total_data(JSON.parse(res.data.total_data));
}
else {
setGetall_Parter_Invoice_With_Filter_api("false");
@ -2814,22 +2909,29 @@ 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}>
{/******** Menu Clique Droit test */}
<ContextMenu id="open_item_right_click" hideOnLeave={true} style={{ backgroundColor: '##abb2b9', zIndex: "99" }}>
<MenuItem onClick={(event) => {
if (p_detail_header_client_nom_id && String(p_detail_header_client_nom_id).length > 2) {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/affichage/" + String("selected_class_external_code") + "/" + String("selected_internal_url"),
'_blank'
);
}
}
}>
ContextMenu Item 1
</MenuItem>
<MenuItem onClick={handleClick_menu_droite_facture}>
<MenuItem onClick={"handleClick"}>
ContextMenu Item 2
</MenuItem>
<MenuItem divider />
<MenuItem onClick={handleClick_menu_droite_facture}>
<MenuItem onClick={"handleClick"}>
ContextMenu Item 3
</MenuItem>
</ContextMenu>
{/******* Fin Menu droire 'Client_Facturé' */}
{/******** FIN Menu Clique Droit test */}
<h3> Vos Factures </h3>
<div className="div_row">
@ -3104,6 +3206,9 @@ const Partner_Facture = (props) => {
<div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
<div className="session_data">
{rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => (<nav style={{ "textAlign": 'right', 'marginRight': '15px', "fontWeight":"600", "fontSize":"15px", "paddingTop":"2px" }}> {parseFloat(String(val.somme_header_ca_ht)).toLocaleString()} () / {val.nb_header_invoice} Factures </nav> ))}
<div style={{ "border": "None" }}>
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
&nbsp;
@ -3181,8 +3286,7 @@ const Partner_Facture = (props) => {
onRowDoubleClick={(newSelectionModel) => {
setgridline_id(newSelectionModel.row.id);
setp_detail_header_client_nom_id(newSelectionModel.row.order_header_client_id);
handleClick_edit_invoice_From_Line(newSelectionModel.row.id);
}
}
@ -3398,22 +3502,40 @@ const Partner_Facture = (props) => {
<div className="session_caract"> Nom Client aa<br />
<ContextMenuTrigger id="facture_menu_droite" style={{zIndex:'99'}}>
<div className="session_caract"> Nom Client <br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="detail_nom_clientzzz"
id="detail_nom_clientzzz"
name="detail_nom_client"
id="detail_nom_client"
InputLabelProps={{
shrink: true,
}}
disabled={false}
className="disabled_style"
className="disabled_style disabled_style_left_text_with_visualiser_icone"
value={p_detail_header_client_nom}
> </TextField>
</ContextMenuTrigger>
/>
<Tooltip className="tooltip_css" id="detail_01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="detail_01" data-tooltip-html="Voir les détails">
<div className="disabled_style disabled_style_right_bton_visualiser" onClick={(event) => {
if (p_detail_header_client_nom_id && String(p_detail_header_client_nom_id).length > 2) {
window.open(
process.env.REACT_APP_FRONT_URL + "Partner/mes_clients/" + String(p_detail_header_client_nom_id),
'_blank'
);
}
}
}
>
<div className="disabled_style_with_visualiser_icone" >
<FcOpenedFolder />
</div>
</div>
</a>
</div>
@ -4218,6 +4340,8 @@ const Partner_Facture = (props) => {
order_line_formation_external_code: JSON.parse(item).order_line_formation_external_code,
order_line_montant_hors_taxes: JSON.parse(item).order_line_montant_hors_taxes,
order_line_type_article: JSON.parse(item).order_line_type_article,
}
))}

View File

@ -427,10 +427,37 @@ const Partner_Product_Service = (props) => {
Getall_Partner_Product_Service();
if (props.class_external_code && String(props.class_external_code).length > 3) {
setadd_One_Product();
setdisplay_detail_produit("1");
setsubmenu("detail_produit");
/*
Dans le cas précis des produits et service, "props.class_external_code" est utilisé comme
l'_id du produit*/
//console.log(" ### Vos Produits & Services props.class_external_code = ", props.class_external_code);
setselected_id(props.class_external_code);
Display_Detail_Product_Data(props.class_external_code);
if (document.getElementById('myRef')) {
var divh = document.getElementById('myRef').offsetTop;
window.scrollTo({
top: divh,
behavior: "smooth",
});
}
} else {
window.scrollTo({
top: 0,
behavior: "smooth",
});
}
}, [])
@ -664,6 +691,7 @@ const Partner_Product_Service = (props) => {
}
const [product_data_changed, setproduct_data_changed] = useState();
const [display_detail_produit, setdisplay_detail_produit] = React.useState();
@ -693,7 +721,7 @@ const Partner_Product_Service = (props) => {
Get_Product_Data(local_product_id);
get_Product_Images(local_product_id);
console.log(" eeeeee local_product_id = ", local_product_id);
// console.log(" eeeeee local_product_id = ", local_product_id);
}

View File

@ -679,8 +679,9 @@ const TestUrl_New = (props) => {
setOpen1(false);
};
function handleClick(e) {
console.log(" CKILLLLL ");
function handleClick(e, data) {
console.log(" CKILLLLL e.target.attributes.valuess.value = ", e.target.attributes.valuess.value);
console.log(" CKILLLLL e.target.attributes.data = ", e.target.attributes.data);
}
return (
@ -834,15 +835,15 @@ const TestUrl_New = (props) => {
</ContextMenuTrigger>
<ContextMenu id="same_unique_identifier" hideOnLeave={true} style={{backgroundColor:'red'}}>
<MenuItem onClick={handleClick}>
<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 onClick={handleClick}>
<MenuItem data={{foo: 'bar'}} valuess="list02" onClick={handleClick}>
ContextMenu Item 2
</MenuItem>
<MenuItem divider />
<MenuItem onClick={handleClick}>
<MenuItem data={{foo: 'bar'}} valuess="list03" onClick={handleClick}>
ContextMenu Item 3
</MenuItem>
</ContextMenu>

View File

@ -883,6 +883,7 @@
width: 100%;
height: 2rem !important;
}
.bton_put_to_invoice {
background: #d5f38f;
color: black;
@ -1507,6 +1508,7 @@
width: 100%;
height: 2rem !important;
}
.bton_put_to_invoice {
background: #d5f38f;
color: black;
@ -2395,6 +2397,25 @@
// end media
.disabled_style_with_visualiser_icone {
float: left;
text-align: center;
width: 100%;
font-size: large;
padding-top: 10px;
}
.disabled_style_left_text_with_visualiser_icone {
width: 80% !important;
float: left;
}
.disabled_style_right_bton_visualiser {
width: 9% !important;
float: left;
cursor: pointer;
}
.css-md26zr-MuiInputBase-root-MuiOutlinedInput-root {
height: 3.5rem !important;

View File

@ -2316,6 +2316,26 @@
// end media
.disabled_style_with_visualiser_icone {
float: left;
text-align: center;
width: 100%;
font-size: large;
padding-top: 10px;
}
.disabled_style_left_text_with_visualiser_icone {
width: 80% !important;
float: left;
}
.disabled_style_right_bton_visualiser {
width: 9% !important;
float: left;
cursor: pointer;
}
.css-md26zr-MuiInputBase-root-MuiOutlinedInput-root {
height: 3.5rem !important;