qsdqsd
parent
23140c3c94
commit
19a86a86db
|
@ -112,6 +112,8 @@ import Notes_Evaluation from "./Notes_Evaluation";
|
|||
import ScoreboardIcon from '@mui/icons-material/Scoreboard';
|
||||
import Groupe_Apprenant from "./Groupe_Apprenant";
|
||||
import Groups2Icon from '@mui/icons-material/Groups2';
|
||||
import { LiaProductHunt } from "react-icons/lia";
|
||||
import Partner_Product_Service from "./Partner_Product_Service";
|
||||
|
||||
const Partner = (props) => {
|
||||
const { commingmenu, commingpack } = useParams();
|
||||
|
@ -421,7 +423,7 @@ const Partner = (props) => {
|
|||
"config_champ_specific", "module_agenda", "config_session_steps", "config_jours_heures", "dashbord_formation",
|
||||
"dashbord_session", "mon_tableau_de_bord", "prix_achat", "mes_apprenants", "dashbord_ressources_humaines",
|
||||
"dashbord_inscriptions", "mes_salles", "mes_opportunites", "config_formulaires", "dashbord_factures", "mes_ue",
|
||||
"domaine_categorie_metier", "config_formation_initiale", "note_evaluation", "groupe_apprenant"]
|
||||
"domaine_categorie_metier", "config_formation_initiale", "note_evaluation", "groupe_apprenant", "part_produit_service"]
|
||||
|
||||
|
||||
if (action && list_menu.includes(action)) {
|
||||
|
@ -456,7 +458,7 @@ const Partner = (props) => {
|
|||
function inactive_active_menu_header(current_menu_header) {
|
||||
const list_menu_header_names = ['my_account', 'my_class', 'my_session', 'my_apprenant', 'my_ressource', 'my_planning',
|
||||
'my_partners', 'my_invoices', 'my_prix_achat', 'my_e_learning', 'my_configuration', 'my_tbd', 'my_ue', 'domaine_categorie_metier',
|
||||
'config_formation_initiale', 'note_evaluation', 'groupe_apprenant']
|
||||
'config_formation_initiale', 'note_evaluation', 'groupe_apprenant', 'part_produit_service']
|
||||
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].style.fontWeight = "400";
|
||||
|
@ -472,7 +474,7 @@ const Partner = (props) => {
|
|||
function inactive_active_menu_header_from_url_action(url_action) {
|
||||
const list_menu_header_names = ['my_account', 'my_class', 'my_session', 'my_apprenant', 'my_ressource', 'my_planning',
|
||||
'my_partners', 'my_invoices', 'my_prix_achat', 'my_e_learning', 'my_configuration', 'my_tbd', 'my_ue', 'domaine_categorie_metier',
|
||||
'config_formation_initiale', 'note_evaluation', 'groupe_apprenant']
|
||||
'config_formation_initiale', 'note_evaluation', 'groupe_apprenant', 'part_produit_service']
|
||||
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].style.fontWeight = "400";
|
||||
|
@ -817,6 +819,22 @@ const Partner = (props) => {
|
|||
}
|
||||
|
||||
|
||||
function DiplayPartner_Produits_Services(event) {
|
||||
var security_retval = check_user_acces_right("formation", "read");
|
||||
|
||||
if (security_retval === 1) {
|
||||
setmenu("part_produit_service");
|
||||
setapiexcelimportmessage();
|
||||
setformation_file_name();
|
||||
history.push("/Partner/part_produit_service");
|
||||
document.body.style.backgroundColor = "#ffffff";
|
||||
|
||||
inactive_active_menu_header("part_produit_service");
|
||||
} else {
|
||||
Dialog_1_handle_acces_insuffisant("Vos droits ne sont pas suffisants pour acceder à la gestion des sessions");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function DiplaySessionList(event) {
|
||||
var security_retval = check_user_acces_right("session", "read");
|
||||
|
@ -1553,6 +1571,9 @@ const Partner = (props) => {
|
|||
{String(menu) !== "domaine_categorie_metier" && <MenuItem onClick={DiplayPartner_Domaine_Categorie_Metier} className="sousmenu" icon={<FcEngineering className="icone_menu" />}> CARACTERISTIQUES </MenuItem>}
|
||||
{String(menu) === "domaine_categorie_metier" && <MenuItem onClick={DiplayPartner_Domaine_Categorie_Metier} className="sousmenu_selected" icon={<FcEngineering className="icone_menu" />}> CARACTERISTIQUES </MenuItem>}
|
||||
|
||||
{String(menu) !== "part_produit_service" && <MenuItem onClick={DiplayPartner_Produits_Services} className="sousmenu" icon={<LiaProductHunt className="icone_menu" />}> PRODUITS & SERVICES </MenuItem>}
|
||||
{String(menu) === "part_produit_service" && <MenuItem onClick={DiplayPartner_Produits_Services} className="sousmenu_selected" icon={<LiaProductHunt className="icone_menu" />}> PRODUITS & SERVICES </MenuItem>}
|
||||
|
||||
</SubMenu>
|
||||
|
||||
|
||||
|
@ -1852,6 +1873,14 @@ const Partner = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
{String(menu) === "part_produit_service" &&
|
||||
<div className="div_droite">
|
||||
|
||||
<Partner_Product_Service ispending={partnerstatus} currentpack={partnerPackService} conntected_employee_id={conntected_employee_id}
|
||||
class_external_code={orderid} class_internal_url={packs} formation_initiale={formation_initiale} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{String(menu) === "config_formation_initiale" &&
|
||||
<div className="div_droite">
|
||||
|
@ -2314,6 +2343,13 @@ const Partner = (props) => {
|
|||
</a>
|
||||
<hr className="my_hr" />
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_821" />
|
||||
<a data-tooltip-id="tooltip_id_821" data-tooltip-html="PRODUITS & SERVICES">
|
||||
{String(menu) !== "part_produit_service" && <div className="sousmenu" onClick={DiplayPartner_Produits_Services} > <LiaProductHunt className="icone_menu" /> </div>}
|
||||
{String(menu) === "part_produit_service" && <div className="sousmenu_selected" onClick={DiplayPartner_Produits_Services} ><LiaProductHunt className="icone_menu" /> </div>}
|
||||
</a>
|
||||
<hr className="my_hr" />
|
||||
|
||||
|
||||
|
||||
<Tooltip className="tooltip_css" id="tooltip_id_9" />
|
||||
|
@ -2514,6 +2550,15 @@ const Partner = (props) => {
|
|||
</div>
|
||||
}
|
||||
|
||||
{String(menu) === "part_produit_service" &&
|
||||
<div className="div_droite div_droite_ralonge">
|
||||
<Partner_Product_Service ispending={partnerstatus} currentpack={partnerPackService} conntected_employee_id={conntected_employee_id}
|
||||
class_external_code={orderid} class_internal_url={packs} formation_initiale={formation_initiale} />
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
{String(menu) === "config_formation_initiale" &&
|
||||
<div className="div_droite div_droite_ralonge">
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import ToggleSwitch_v2_mysy from "./ToggleSwitch_v2_mysy";
|
|||
import { FcInfo } from "react-icons/fc";
|
||||
|
||||
import Link from '@mui/material/Link';
|
||||
import { PiDotsThree } from "react-icons/pi";
|
||||
import { PiDotsThree, PiHeartStraightBreakLight } from "react-icons/pi";
|
||||
|
||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
||||
|
@ -58,6 +58,8 @@ const Partner_Commande = (props) => {
|
|||
const [rowss, setRows] = useState([]);
|
||||
const [selectionModel, setSelectionModel] = React.useState([]);
|
||||
|
||||
const [article_formation_ou_produit, setarticle_formation_ou_produit] = useState("formation");
|
||||
|
||||
const [rows_order_lines, setrows_order_lines] = useState([]);
|
||||
const [selectionModel_order_lines, setselectionModel_order_lines] = React.useState([]);
|
||||
|
||||
|
@ -242,18 +244,16 @@ const Partner_Commande = (props) => {
|
|||
{ field: 'id', headerName: 'id', hide: true, editable: false },
|
||||
{ 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', width: 250, hide: false, editable: false, flex: 1 },
|
||||
{ field: 'order_line_session_code', headerName: 'Code Session', width: 250, hide: false, editable: false, flex: 1 },
|
||||
|
||||
{ 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 },
|
||||
|
||||
{ field: 'order_line_qty', headerName: 'Qte', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 100, hide: false, editable: false },
|
||||
{ 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: false, editable: false },
|
||||
{
|
||||
field: 'order_line_status', headerName: 'Statut', width: 150, hide: false, editable: false,
|
||||
valueFormatter: (params) => {
|
||||
|
@ -449,10 +449,10 @@ const Partner_Commande = (props) => {
|
|||
setp_add_line_session_id(String(cellValues.row.order_line_session_id));
|
||||
setp_add_line_session_code(String(cellValues.row.order_line_session_code));
|
||||
|
||||
setp_add_line_order_line_type_article(String(cellValues.row.order_line_type_article));
|
||||
|
||||
Get_Given_Line_Of_Partner_Order_Line_Data(order_line_id, order_internal_ref);
|
||||
|
||||
|
||||
|
||||
setDialog_Detail_Article_open(true);
|
||||
//alert(" afficher le detail de la ligne " + String(order_line_id));
|
||||
|
||||
|
@ -642,6 +642,93 @@ const Partner_Commande = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const [New_Getall_Partner_Product_Service_result, setNew_Getall_Partner_Product_Service_result] = useState([]);
|
||||
|
||||
const [Getall_Partner_Product_Service_api, setGetall_Partner_Product_Service_api] = useState();
|
||||
const [Getall_Partner_Product_Service_message, setGetall_Partner_Product_Service_message] = useState();
|
||||
const [Getall_Partner_Product_Service_result, setGetall_Partner_Product_Service_result] = useState([]);
|
||||
function Getall_Partner_Product_Service(event) {
|
||||
|
||||
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_Partner_Produit_Service/";
|
||||
|
||||
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_Partner_Product_Service res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_Partner_Product_Service res.data.message r_class = " + res.data.message);
|
||||
setGetall_Partner_Product_Service_api("true");
|
||||
setGetall_Partner_Product_Service_result(res.data.message);
|
||||
|
||||
var new_data2 = [];
|
||||
const new_data = res.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_type = JSON.parse(x).type;
|
||||
var local_code_taxe = JSON.parse(x).code_taxe;
|
||||
var local_prix_vente = JSON.parse(x).prix_vente;
|
||||
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": local_id,
|
||||
"id": localid,
|
||||
"label": local_code + "-" + local_nom,
|
||||
"code": local_code,
|
||||
"nom": local_nom,
|
||||
"type": local_type,
|
||||
"code_taxe": local_code_taxe,
|
||||
"prix_vente": local_prix_vente,
|
||||
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
});
|
||||
|
||||
//---
|
||||
var node = {
|
||||
"_id": "",
|
||||
"id": "",
|
||||
"label": "",
|
||||
"code": "",
|
||||
"nom": "",
|
||||
"type": "",
|
||||
"code_taxe": "",
|
||||
"prix_vente": "",
|
||||
|
||||
};
|
||||
new_data2.push(node);
|
||||
|
||||
|
||||
if (new_data2.length > 0)
|
||||
setNew_Getall_Partner_Product_Service_result(new_data2);
|
||||
|
||||
}
|
||||
else {
|
||||
setGetall_Partner_Product_Service_api("false");
|
||||
setGetall_Partner_Product_Service_message(res.data.message);
|
||||
alert(res.data.message);
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
console.warn('Not good man :( Getall_Partner_Product_Service = ', error);
|
||||
setGetall_Partner_Product_Service_api("false");
|
||||
alert(" Impossible de recuperer la liste des produits et services");
|
||||
//setmyApimyApiMessage("")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
const [partner_digital_signature_status, setpartner_digital_signature_status] = useState("0");
|
||||
const [local_partner_digital_signature_status, setlocal_partner_digital_signature_status] = useState(false);
|
||||
|
@ -754,6 +841,8 @@ const Partner_Commande = (props) => {
|
|||
Getall_TrainingSession();
|
||||
Getall_Partner_Digital_Sign_Status();
|
||||
|
||||
Getall_Partner_Product_Service();
|
||||
|
||||
if (document.getElementById('myRef_head')) {
|
||||
var divh = document.getElementById('myRef_head').offsetTop;
|
||||
window.scrollTo({
|
||||
|
@ -1711,6 +1800,12 @@ const Partner_Commande = (props) => {
|
|||
setp_add_line_session_code("");
|
||||
}
|
||||
|
||||
if (mylocal_order.order_line_type_article) {
|
||||
setp_add_line_order_line_type_article(mylocal_order.order_line_type_article);
|
||||
} else {
|
||||
setp_add_line_order_line_type_article("");
|
||||
}
|
||||
|
||||
|
||||
if (mylocal_order.order_line_qty) {
|
||||
setp_add_line_item_qty(mylocal_order.order_line_qty);
|
||||
|
@ -2587,6 +2682,8 @@ const Partner_Commande = (props) => {
|
|||
form.append("order_line_type", p_add_line_item_type);
|
||||
form.append("order_line_comment", p_add_line_item_comment);
|
||||
|
||||
form.append("order_line_type_article", article_formation_ou_produit);
|
||||
|
||||
form.append("order_line_type_reduction", p_add_line_item_type_reduction);
|
||||
form.append("order_line_type_valeur", p_add_line_item_reduction_value);
|
||||
form.append("order_line_montant_reduction", p_add_line_item_reduction_total_amount);
|
||||
|
@ -2681,6 +2778,8 @@ const Partner_Commande = (props) => {
|
|||
const [p_add_line_session_id, setp_add_line_session_id] = useState("");
|
||||
const [p_add_line_session_code, setp_add_line_session_code] = useState("");
|
||||
|
||||
const [p_add_line_order_line_type_article, setp_add_line_order_line_type_article] = useState("");
|
||||
|
||||
const [p_add_line_item, setp_add_line_item] = useState("");
|
||||
const [p_add_line_item_internal_url, setp_add_line_item_internal_url] = useState("");
|
||||
const [p_add_line_item_title, setp_add_line_item_title] = useState();
|
||||
|
@ -2706,6 +2805,7 @@ const Partner_Commande = (props) => {
|
|||
|
||||
function Ajouter_une_ligne_article() {
|
||||
|
||||
setarticle_formation_ou_produit("formation");
|
||||
// Recuperation des session de formation
|
||||
Getall_TrainingSession();
|
||||
|
||||
|
@ -2743,8 +2843,6 @@ const Partner_Commande = (props) => {
|
|||
};
|
||||
|
||||
|
||||
|
||||
|
||||
const Close_Dialog_Detail_Order_open = () => {
|
||||
clean_order_detail_fields();
|
||||
setDialog_Detail_Commande_open(false);
|
||||
|
@ -3921,6 +4019,13 @@ const Partner_Commande = (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
const New_Option_formation_produit = [
|
||||
{ "id": "formation", "label": "Formation", "value": "formation" },
|
||||
{ "id": "produit", "label": "Produit & Service", "value": "produit" },
|
||||
{ "id": "", "label": "", "value": "" },
|
||||
]
|
||||
|
||||
|
||||
|
||||
return (
|
||||
|
||||
|
@ -3939,7 +4044,7 @@ const Partner_Commande = (props) => {
|
|||
>
|
||||
|
||||
<DialogTitle> Cloture devis <font style={{ fontWeight: "700" }}> {String(p_detail_header_ref_interne)} </font> </DialogTitle>
|
||||
<DialogContent style={{ "minHeight": "20rem", "width":"30rem" }}>
|
||||
<DialogContent style={{ "minHeight": "20rem", "width": "30rem" }}>
|
||||
|
||||
|
||||
<div className="session_caract_Dialog" > Raison Cloture
|
||||
|
@ -4140,7 +4245,7 @@ const Partner_Commande = (props) => {
|
|||
</Dialog>
|
||||
|
||||
|
||||
{/****** Dialog pour la gestion d'un article */}
|
||||
{/****** Dialog pour la gestion d'un article (formation) */}
|
||||
<Dialog
|
||||
open={Dialog_Detail_Article_open}
|
||||
onClose={Dialog_1_handleClose}
|
||||
|
@ -4150,204 +4255,409 @@ const Partner_Commande = (props) => {
|
|||
<DialogTitle>Edition Détail ligne <font style={{ fontWeight: "700" }}> {String(p_detail_header_type).toLocaleUpperCase()} </font> </DialogTitle>
|
||||
<DialogContent>
|
||||
|
||||
{/*p_add_line_item = {p_add_line_item} <br/>*/}
|
||||
{/*p_add_line_item = {p_add_line_item} <br/> */}
|
||||
{selected_order_line_id && String(selected_order_line_id).length > 3 && <div>
|
||||
deja choisi
|
||||
</div>}
|
||||
|
||||
{New_GetCurrentPartnerClass_result && New_GetCurrentPartnerClass_result.length > 0 &&
|
||||
(p_add_line_item || String(p_add_line_item) === "") && String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Formation
|
||||
|
||||
{(!selected_order_line_id || String(selected_order_line_id).length < 3) &&
|
||||
<div className="session_caract_Dialog" > Type Article
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="ref_article"
|
||||
id="ref_article"
|
||||
fullWidth
|
||||
options={New_GetCurrentPartnerClass_result}
|
||||
value={New_GetCurrentPartnerClass_result.filter((data) => (data).internal_url === String(p_add_line_item))[0].label}
|
||||
name="detail_formation_produit"
|
||||
id="detail_formation_produit"
|
||||
|
||||
//className="disabled_style enable_style"
|
||||
options={New_Option_formation_produit}
|
||||
value={New_Option_formation_produit.filter((data) => (data).id === String(article_formation_ou_produit))[0].label}
|
||||
fullWidth
|
||||
onChange={(event, value) => {
|
||||
// setp_champ_table(value.nom_champ_technique);
|
||||
if (value && value.internal_url) {
|
||||
setp_add_line_item(value.internal_url);
|
||||
setp_add_line_item_internal_url(value.internal_url);
|
||||
Get_Class_Data(value.internal_url);
|
||||
setp_add_line_item_title(value.title);
|
||||
} else {
|
||||
if (value && value.id) {
|
||||
setarticle_formation_ou_produit(value.id);
|
||||
setp_add_line_item("");
|
||||
setp_add_line_item_internal_url("");
|
||||
setp_add_line_item_title("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une formation"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{(p_add_line_item || String(p_add_line_item) === "") && String(p_detail_header_statut_label).toLowerCase() !== "facturé"
|
||||
&& New_Getall_TrainingSession_result && New_Getall_TrainingSession_result.length > 0 && <div className="session_caract_Dialog" > Session
|
||||
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="ref_session"
|
||||
id="ref_session"
|
||||
fullWidth
|
||||
options={New_Getall_TrainingSession_result.filter((data) => (data).class_internal_url === String(p_add_line_item))
|
||||
}
|
||||
|
||||
value={New_Getall_TrainingSession_result.filter((data) => (data)._id === String(p_add_line_session_id))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value._id) {
|
||||
setp_add_line_session_id(value._id);
|
||||
setp_add_line_session_code(value.code_session);
|
||||
} else {
|
||||
setp_add_line_item_qty("");
|
||||
setp_add_line_item_price("");
|
||||
setp_add_line_session_id("");
|
||||
setp_add_line_session_code("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une session"
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
|
||||
{/*** Si c'est pour une formation */}
|
||||
{article_formation_ou_produit && String(article_formation_ou_produit) === "formation" &&
|
||||
<div>
|
||||
{New_GetCurrentPartnerClass_result && New_GetCurrentPartnerClass_result.length > 0 &&
|
||||
(p_add_line_item || String(p_add_line_item) === "") && String(p_detail_header_statut_label).toLowerCase() !== "facturé" &&
|
||||
<div className="session_caract_Dialog" > Formation
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="ref_article"
|
||||
id="ref_article"
|
||||
fullWidth
|
||||
options={New_GetCurrentPartnerClass_result}
|
||||
value={New_GetCurrentPartnerClass_result.filter((data) => (data).internal_url === String(p_add_line_item))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
// setp_champ_table(value.nom_champ_technique);
|
||||
if (value && value.internal_url) {
|
||||
setp_add_line_item(value.internal_url);
|
||||
setp_add_line_item_internal_url(value.internal_url);
|
||||
Get_Class_Data(value.internal_url);
|
||||
setp_add_line_item_title(value.title);
|
||||
} else {
|
||||
setp_add_line_item("");
|
||||
setp_add_line_item_internal_url("");
|
||||
setp_add_line_item_title("");
|
||||
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une formation"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{(p_add_line_item || String(p_add_line_item) === "") && String(p_detail_header_statut_label).toLowerCase() !== "facturé"
|
||||
&& New_Getall_TrainingSession_result && New_Getall_TrainingSession_result.length > 0 && <div className="session_caract_Dialog" > Session
|
||||
|
||||
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="ref_session"
|
||||
id="ref_session"
|
||||
fullWidth
|
||||
options={New_Getall_TrainingSession_result.filter((data) => (data).class_internal_url === String(p_add_line_item))
|
||||
}
|
||||
|
||||
value={New_Getall_TrainingSession_result.filter((data) => (data)._id === String(p_add_line_session_id))[0].label}
|
||||
|
||||
onChange={(event, value) => {
|
||||
|
||||
if (value._id) {
|
||||
setp_add_line_session_id(value._id);
|
||||
setp_add_line_session_code(value.code_session);
|
||||
} else {
|
||||
setp_add_line_session_id("");
|
||||
setp_add_line_session_code("");
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une session"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Article
|
||||
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="ref_article"
|
||||
//label="Article"
|
||||
disabled
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item}
|
||||
|
||||
/>
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Quantité
|
||||
|
||||
<TextField
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_qty"
|
||||
//label="Quantité"
|
||||
//type="number"
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_qty}
|
||||
|
||||
disabled
|
||||
type="text"
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Quantité
|
||||
|
||||
<TextField
|
||||
required
|
||||
margin="dense"
|
||||
id="ref_article_qty"
|
||||
//label="Quantité"
|
||||
//type="number"
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_qty}
|
||||
onChange={(e) => {
|
||||
setp_add_line_item_qty(e.target.value);
|
||||
Recalcul_Item_Amounts();
|
||||
}
|
||||
}
|
||||
type="number"
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Prix Unitaire
|
||||
<TextField
|
||||
required
|
||||
margin="dense"
|
||||
id="ref_article_unit_price"
|
||||
name="ref_article_unit_price"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_price}
|
||||
onChange={(e) => {
|
||||
setp_add_line_item_price(e.target.value);
|
||||
Recalcul_Item_Amounts();
|
||||
}
|
||||
}
|
||||
|
||||
type="number"
|
||||
|
||||
/>
|
||||
</div>}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Prix Unitaire
|
||||
<TextField
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_unit_price"
|
||||
name="ref_article_unit_price"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_price}
|
||||
disabled
|
||||
type="text"
|
||||
/>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Taux TVA
|
||||
<TextField
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_taux_tva"
|
||||
name="ref_article_taux_tva"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={partner_taux_tva}
|
||||
|
||||
onChange={(e) => {
|
||||
setpartner_taux_tva(e.target.value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Article
|
||||
{/*** Si c'est pour un produit ou service */}
|
||||
{article_formation_ou_produit && String(article_formation_ou_produit) === "produit" &&
|
||||
<div>
|
||||
{New_Getall_Partner_Product_Service_result && New_Getall_Partner_Product_Service_result.length > 0 &&
|
||||
(p_add_line_item || String(p_add_line_item) === "") && String(p_detail_header_statut_label).toLowerCase() !== "facturé" &&
|
||||
<div className="session_caract_Dialog" > Produit & Service
|
||||
<Autocomplete
|
||||
disablePortal
|
||||
name="ref_article"
|
||||
id="ref_article"
|
||||
fullWidth
|
||||
options={New_Getall_Partner_Product_Service_result}
|
||||
value={New_Getall_Partner_Product_Service_result.filter((data) => (data)._id === String(p_add_line_item))[0].label}
|
||||
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="ref_article"
|
||||
//label="Article"
|
||||
disabled
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item}
|
||||
onChange={(event, value) => {
|
||||
// setp_champ_table(value.nom_champ_technique);
|
||||
if (value && value._id) {
|
||||
setp_add_line_item(value._id);
|
||||
setp_add_line_item_internal_url(value._id);
|
||||
setp_add_line_item_price(value.prix_vente);
|
||||
setpartner_taux_tva(value.code_taxe);
|
||||
//Get_Class_Data(value.internal_url);
|
||||
setp_add_line_item_title(value.code);
|
||||
} else {
|
||||
setp_add_line_item("");
|
||||
setp_add_line_item_internal_url("");
|
||||
setp_add_line_item_title("");
|
||||
|
||||
/>
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
</div>}
|
||||
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une formation"
|
||||
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Quantité
|
||||
|
||||
<TextField
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_qty"
|
||||
//label="Quantité"
|
||||
//type="number"
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_qty}
|
||||
|
||||
disabled
|
||||
type="text"
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Quantité
|
||||
|
||||
<TextField
|
||||
required
|
||||
margin="dense"
|
||||
id="ref_article_qty"
|
||||
//label="Quantité"
|
||||
//type="number"
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_qty}
|
||||
onChange={(e) => {
|
||||
setp_add_line_item_qty(e.target.value);
|
||||
Recalcul_Item_Amounts();
|
||||
}
|
||||
}
|
||||
type="number"
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Prix Unitaire
|
||||
<TextField
|
||||
required
|
||||
margin="dense"
|
||||
id="ref_article_unit_price"
|
||||
name="ref_article_unit_price"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_price}
|
||||
onChange={(e) => {
|
||||
setp_add_line_item_price(e.target.value);
|
||||
Recalcul_Item_Amounts();
|
||||
}
|
||||
}
|
||||
|
||||
type="number"
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Article
|
||||
|
||||
/>
|
||||
</div>}
|
||||
<TextField
|
||||
autoFocus
|
||||
margin="dense"
|
||||
id="ref_article"
|
||||
//label="Article"
|
||||
disabled
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Prix Unitaire
|
||||
<TextField
|
||||
/>
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_unit_price"
|
||||
name="ref_article_unit_price"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_price}
|
||||
disabled
|
||||
type="text"
|
||||
/>
|
||||
</div>}
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Taux TVA
|
||||
<TextField
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Quantité
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_taux_tva"
|
||||
name="ref_article_taux_tva"
|
||||
//label="Prix Unitaire"
|
||||
<TextField
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={partner_taux_tva}
|
||||
margin="dense"
|
||||
id="ref_article_qty"
|
||||
//label="Quantité"
|
||||
//type="number"
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_qty}
|
||||
|
||||
onChange={(e) => {
|
||||
setpartner_taux_tva(e.target.value);
|
||||
disabled
|
||||
type="text"
|
||||
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Quantité
|
||||
|
||||
<TextField
|
||||
required
|
||||
margin="dense"
|
||||
id="ref_article_qty"
|
||||
//label="Quantité"
|
||||
//type="number"
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_qty}
|
||||
onChange={(e) => {
|
||||
setp_add_line_item_qty(e.target.value);
|
||||
Recalcul_Item_Amounts();
|
||||
}
|
||||
}
|
||||
type="number"
|
||||
|
||||
/>
|
||||
|
||||
</div>}
|
||||
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Prix Unitaire
|
||||
<TextField
|
||||
required
|
||||
margin="dense"
|
||||
id="ref_article_unit_price"
|
||||
name="ref_article_unit_price"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_price}
|
||||
onChange={(e) => {
|
||||
setp_add_line_item_price(e.target.value);
|
||||
Recalcul_Item_Amounts();
|
||||
}
|
||||
}
|
||||
|
||||
type="number"
|
||||
|
||||
/>
|
||||
</div>}
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Prix Unitaire
|
||||
<TextField
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_unit_price"
|
||||
name="ref_article_unit_price"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={p_add_line_item_price}
|
||||
disabled
|
||||
type="text"
|
||||
/>
|
||||
</div>}
|
||||
|
||||
<div className="session_caract_Dialog" > Taux TVA
|
||||
<TextField
|
||||
|
||||
margin="dense"
|
||||
id="ref_article_taux_tva"
|
||||
name="ref_article_taux_tva"
|
||||
//label="Prix Unitaire"
|
||||
|
||||
fullWidth
|
||||
//variant="standard"
|
||||
value={partner_taux_tva}
|
||||
|
||||
onChange={(e) => {
|
||||
setpartner_taux_tva(e.target.value);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Type reduction
|
||||
<TextField
|
||||
|
@ -4540,8 +4850,7 @@ const Partner_Commande = (props) => {
|
|||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
|
||||
{/****** FIN Dialog pour la gestion d'un article */}
|
||||
{/****** FIN Dialog pour la gestion d'un article (formation) */}
|
||||
|
||||
|
||||
|
||||
|
@ -6606,7 +6915,12 @@ const Partner_Commande = (props) => {
|
|||
|
||||
<div style={{ "border": "None" }}>
|
||||
<nav onClick={Ajouter_une_ligne_article} style={{ "fontSize": "18px", "fontWeight": '600', "marginLeft": "10px", "marginTop": "10px", "cursor": "pointer" }}
|
||||
className="bton_add_line"> <Button> Ajouter une ligne
|
||||
className="bton_add_line"> <Button> Ajouter une formation
|
||||
<FcAddDatabase style={{ "fontSize": "medium" }} />
|
||||
</Button>
|
||||
</nav>
|
||||
<nav onClick={Ajouter_une_ligne_article} style={{ "fontSize": "18px", "fontWeight": '600', "marginLeft": "10px", "marginTop": "10px", "cursor": "pointer" }}
|
||||
className="bton_add_line"> <Button> Ajouter 1 Produit/Service
|
||||
<FcAddDatabase style={{ "fontSize": "medium" }} />
|
||||
</Button>
|
||||
</nav>
|
||||
|
@ -6691,7 +7005,7 @@ const Partner_Commande = (props) => {
|
|||
order_line_formation_duration: JSON.parse(item).duration_concat,
|
||||
order_line_comment: JSON.parse(item).order_line_comment,
|
||||
order_line_formation_external_code: JSON.parse(item).order_line_formation_external_code,
|
||||
|
||||
order_line_type_article: JSON.parse(item).order_line_type_article,
|
||||
}
|
||||
))}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -117,3 +117,4 @@
|
|||
@import "./components/groupe_apprenant";
|
||||
@import "./components/moduleselectionapprenants";
|
||||
@import "./components/emarge_qr_code";
|
||||
@import "./components/partner_product_service";
|
Loading…
Reference in New Issue