08/09/2023 - 18h30

recette2
cherif 2023-09-08 18:38:48 +02:00
parent 31e1e6e2e6
commit eb9fe82b2f
4 changed files with 552 additions and 61 deletions

View File

@ -48,6 +48,9 @@ const Employes = (props) => {
const [rows_affectations, setrows_affectations] = useState([]);
const [selectionModel_affectations, setSelectionModel_affectations] = React.useState([]);
var date_today_90j = new Date();
date_today_90j.setDate(date_today_90j.getDate() +90);
const [p_filtre1, setp_filtre1] = useState();
const [p_filtre1_value, setp_filtre1_value] = useState();
@ -1897,7 +1900,7 @@ const Employes = (props) => {
const [display_affectation, setdisplay_affectation] = useState();
const [p_affect_poste, setp_affect_poste] = useState();
const [p_affect_date_du, setp_affect_date_du] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_affect_date_au, setp_affect_date_au] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_affect_date_au, setp_affect_date_au] = useState(date_today_90j.toLocaleDateString('fr-FR'));
const [p_affect_cible, setp_affect_cible] = useState();
const [p_affect_cible_label, setp_affect_cible_label] = useState();
@ -1914,7 +1917,7 @@ const Employes = (props) => {
function clean_affectation_fields() {
setp_affect_poste();
setp_affect_date_du(new Date().toLocaleDateString('fr-FR'));
setp_affect_date_au(new Date().toLocaleDateString('fr-FR'));
setp_affect_date_au(date_today_90j.toLocaleDateString('fr-FR'));
setp_affect_cible();
setp_affect_cible_label();
setp_affect_cible_nom();
@ -1945,7 +1948,7 @@ const Employes = (props) => {
const [p_one_affect_poste, setp_one_affect_poste] = useState();
const [p_one_affect_date_du, setp_one_affect_date_du] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_one_affect_date_au, setp_one_affect_date_au] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_one_affect_date_au, setp_one_affect_date_au] = useState(date_today_90j.toLocaleDateString('fr-FR'));
const [p_one_affect_cible, setp_one_affect_cible] = useState();
const [p_one_affect_cible_nom, setp_one_affect_cible_nom] = useState();
const [p_one_affect_comment, setp_one_affect_comment] = useState();
@ -1953,7 +1956,7 @@ const Employes = (props) => {
function clean_nouvelle_affectation_fields() {
setp_one_affect_poste();
setp_one_affect_date_du(new Date().toLocaleDateString('fr-FR'));
setp_one_affect_date_au(new Date().toLocaleDateString('fr-FR'));
setp_one_affect_date_au(date_today_90j.toLocaleDateString('fr-FR'));
setp_one_affect_cible();
setp_one_affect_cible_nom();

View File

@ -49,6 +49,9 @@ const Materiels = (props) => {
const [selectionModel_affectations, setSelectionModel_affectations] = React.useState([]);
var date_today_90j = new Date();
date_today_90j.setDate(date_today_90j.getDate() +90);
const [p_filtre1, setp_filtre1] = useState();
const [p_filtre1_value, setp_filtre1_value] = useState();
@ -294,7 +297,7 @@ const Materiels = (props) => {
function clean_nouvelle_affectation_fields() {
setp_one_affect_poste();
setp_one_affect_date_du(new Date().toLocaleDateString('fr-FR'));
setp_one_affect_date_au(new Date().toLocaleDateString('fr-FR'));
setp_one_affect_date_au(date_today_90j.toLocaleDateString('fr-FR'));
setp_one_affect_cible();
setp_one_affect_cible_nom();
@ -1342,6 +1345,8 @@ const Materiels = (props) => {
// ------------
const [p_one_detail_ref_interne, setp_one_detail_ref_interne] = useState();
const [p_one_detail_nom, setp_one_detail_nom] = useState();
const [p_one_detail_description, setp_one_detail_description] = useState();
@ -1355,7 +1360,7 @@ const Materiels = (props) => {
const [p_one_affect_poste, setp_one_affect_poste] = useState();
const [p_one_affect_date_du, setp_one_affect_date_du] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_one_affect_date_au, setp_one_affect_date_au] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_one_affect_date_au, setp_one_affect_date_au] = useState(date_today_90j.toLocaleDateString('fr-FR'));
const [p_one_affect_cible, setp_one_affect_cible] = useState();
const [p_one_affect_cible_nom, setp_one_affect_cible_nom] = useState();
const [p_one_affect_comment, setp_one_affect_comment] = useState();
@ -1363,7 +1368,7 @@ const Materiels = (props) => {
const [p_affect_poste, setp_affect_poste] = useState();
const [p_affect_date_du, setp_affect_date_du] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_affect_date_au, setp_affect_date_au] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_affect_date_au, setp_affect_date_au] = useState(date_today_90j.toLocaleDateString('fr-FR'));
const [p_affect_cible, setp_affect_cible] = useState();
const [p_affect_cible_label, setp_affect_cible_label] = useState();

View File

@ -50,6 +50,8 @@ const Partner_Commande = (props) => {
const [rows_order_lines, setrows_order_lines] = useState([]);
const [selectionModel_order_lines, setselectionModel_order_lines] = React.useState([]);
var date_today_90j = new Date();
date_today_90j.setDate(date_today_90j.getDate() +90);
const [p_filtre1, setp_filtre1] = useState();
const [p_filtre1_value, setp_filtre1_value] = useState();
@ -176,14 +178,17 @@ const Partner_Commande = (props) => {
const columns_order_lines = [
{ field: '_id', headerName: '_id', hide: true },
{ field: 'id', headerName: 'id', hide: true },
{ field: 'order_line_formation', headerName: 'Reference', width: 150, hide: false, editable: true },
{ field: 'order_line_qty', headerName: 'Qte', width: 150, hide: false, editable: true },
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 150, hide: false, editable: true },
{ field: 'order_header_id', headerName: 'Id_Entete', width: 150, hideable: false, },
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', width: 150, hideable: false, },
{ field: 'order_line_type', headerName: 'Type', width: 150, hide: false, editable: true },
{ 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: 150, hide: false, editable: false },
{ field: 'order_line_formation_duration', headerName: 'Durée', width: 150, hide: false, editable: false },
{ field: 'order_line_qty', headerName: 'Qte', width: 150, hide: false, editable: false },
{ field: 'order_line_prix_unitaire', headerName: 'Prix Unit.', width: 150, hide: false, editable: false },
{ field: 'order_header_id', headerName: 'Id_Entete', width: 150, hideable: false, editable: false },
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', width: 150, hideable: false, editable: false },
{ field: 'order_line_type', headerName: 'Type', width: 150, hide: false, editable: false },
{
field: 'order_line_status', headerName: 'Statut', width: 150, hide: false, editable: true,
valueFormatter: (params) => {
@ -202,6 +207,24 @@ const Partner_Commande = (props) => {
},
},
{
field: "Detail", headerName: 'Voir detail',
renderCell: (cellValues) => {
return (
<Button
onClick={(event) => {
Display_Detail_Order_Line(event, cellValues);
}}
>
<FcViewDetails />
</Button>
);
}
},
{
field: "delete", headerName: 'Supprimer',
renderCell: (cellValues) => {
@ -262,24 +285,8 @@ const Partner_Commande = (props) => {
);
}
},
{
field: "Detail", headerName: 'Voir detail',
renderCell: (cellValues) => {
return (
{ field: 'order_line_comment', headerName: 'Commentaire', width: 150, hide: true, editable: false, },
<Button
onClick={(event) => {
Display_Detail_Order_Line(event, cellValues);
}}
>
<FcViewDetails />
</Button>
);
}
},
]
@ -290,9 +297,17 @@ const Partner_Commande = (props) => {
var order_line_formation = String(cellValues.row.order_line_formation);
var order_line_qty = String(cellValues.row.order_line_qty);
var order_line_prix_unitaire = String(cellValues.row.order_line_prix_unitaire);
setselected_order_line_id(order_line_id);
setp_add_line_item(order_line_formation);
setp_add_line_item_qty(order_line_qty);
setp_add_line_item_price(order_line_prix_unitaire);
setp_add_line_item_status(String(cellValues.row.order_line_status));
setp_add_line_item_type(String(cellValues.row.order_line_type));
setp_add_line_item_comment(String(cellValues.row.order_line_comment));
setDialog_Detail_Article_open(true);
//alert(" afficher le detail de la ligne " + String(order_line_id));
@ -539,6 +554,8 @@ const Partner_Commande = (props) => {
const myRef_head = useRef(null);
const [selected_id, setselected_id] = useState("");
const [selected_order_line_id, setselected_order_line_id] = useState("");
const [order_internal_ref, setorder_internal_ref] = useState("");
function handleClick_edit_order_From_Line(selected_row_id) {
@ -794,9 +811,8 @@ const Partner_Commande = (props) => {
const [add_One_Order, setadd_One_Order] = useState();
function submenu_add_one_order() {
setdisplay_detail_order();
setadd_One_Order("1");
setsubmenu("detail_order");
setDialog_Detail_Commande_open(true);
}
@ -829,7 +845,7 @@ const Partner_Commande = (props) => {
const [p_detail_header_statut_label, setp_detail_header_statut_label] = useState();
const [p_detail_header_date_cmd_val, setp_detail_header_date_cmd_val] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_detail_header_date_expiration_val, setp_detail_header_date_expiration_val] = useState((new Date()).toLocaleDateString('fr-FR') + 30);
const [p_detail_header_date_expiration_val, setp_detail_header_date_expiration_val] = useState(date_today_90j.toLocaleDateString('fr-FR'));
function Enable_Order_Header_DetailFields() {
@ -1092,14 +1108,97 @@ const Partner_Commande = (props) => {
const [test_comment_dialog, settest_comment_dialog] = useState();
const [Dialog_Detail_Article_open, setDialog_Detail_Article_open] = React.useState(false);
const Close_Dialog_Detail_Article_open = () => {
setDialog_Detail_Article_open(false);
};
const [Add_Update_One_Order_Line_Data_api, setAdd_Update_One_Order_Line_Data_api] = useState();
const [Add_Update_One_Order_Line_Data_message, setAdd_Update_One_Order_Line_Data_message] = useState();
const [Add_Update_One_Order_Line_Data_result, setAdd_Update_One_Order_Line_Data_result] = useState();
function Add_Update_One_Order_Line_Data() {
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("order_line_formation", p_add_line_item_internal_url);
form.append("order_line_qty", p_add_line_item_qty);
form.append("order_line_prix_unitaire", p_add_line_item_price);
form.append("order_line_id", selected_order_line_id);
form.append("order_header_ref_interne", order_internal_ref);
form.append("order_header_id", selected_id);
form.append("order_line_status", p_add_line_item_status);
form.append("order_line_type", p_add_line_item_type);
form.append("order_line_comment", p_add_line_item_comment);
//onsole.log("### form = ", form);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Update_Partner_Order_Line/";
axios.post(myurl, form).then(res => {
//console.log(" In Add_Update_One_Order_Line_Data res.data.status = " + res.data.status);
//console.log(" In Add_Update_One_Order_Line_Data res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setAdd_Update_One_Order_Line_Data_api("true");
setAdd_Update_One_Order_Line_Data_result(res.data.message);
clean_article_detail_fields();
Display_Detail_Order_data(selected_id);
alert(" La mise à jour été correctement faite.");
myRef_head.current.scrollIntoView({ behavior: "smooth" });
}
else {
setAdd_Update_One_Order_Line_Data_api("false");
setAdd_Update_One_Order_Line_Data_message(res.data.message);
alert(res.data.message);
}
}).catch((error) => {
console.warn('UpdateStagiaireData : Not good man :( Add_Update_One_Order_Line_Data = ' + error);
setAdd_Update_One_Order_Line_Data_api("false");
alert(" Impossible d'ajouter / mettre à jour la ligne");
})
}
const Update_Dialog_Detail_Article_open = () => {
Add_Update_One_Order_Line_Data();
setDialog_Detail_Article_open(false);
};
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();
const [p_add_line_item_qty, setp_add_line_item_qty] = useState();
const [p_add_line_item_price, setp_add_line_item_price] = useState();
const [p_add_line_item_comment, setp_add_line_item_comment] = useState();
const [p_add_line_item_status, setp_add_line_item_status] = useState();
const [p_add_line_item_type, setp_add_line_item_type] = useState();
function clean_article_detail_fields() {
setp_add_line_item();
setp_add_line_item_internal_url();
setp_add_line_item_title();
setp_add_line_item_qty();
setp_add_line_item_price();
setp_add_line_item_comment();
setp_add_line_item_status();
setp_add_line_item_type();
}
function Ajouter_une_ligne_article() {
@ -1107,10 +1206,140 @@ const Partner_Commande = (props) => {
setp_add_line_item_qty("");
setp_add_line_item_price("");
setp_add_line_item_comment("");
setp_add_line_item_status(p_detail_header_statut);
setp_add_line_item_type(p_detail_header_type);
setDialog_Detail_Article_open(true);
}
const [Dialog_Detail_Commande_open, setDialog_Detail_Commande_open] = useState(false);
function Dialog_cmd_handleClose() {
}
const Dialog_cmd_handleClose_buton = () => {
setDialog_Detail_Commande_open(false);
};
const Close_Dialog_Detail_Order_open = () => {
clean_order_detail_fields();
setDialog_Detail_Commande_open(false);
};
const [Add_Dialog_Detail_Order_api, setAdd_Dialog_Detail_Order_api] = useState();
const [Add_Dialog_Detail_Order_message, setAdd_Dialog_Detail_Order_message] = useState();
const [Add_Dialog_Detail_Order_result, setAdd_Dialog_Detail_Order_result] = useState();
function Add_Dialog_Detail_Order() {
var form = new FormData();
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
const stored_cookie = getCookie('tokenmysypart');
form.append("token", stored_cookie);
form.append("order_header_client_id", p_add_cmd_header_client_id);
form.append("order_header_description", p_add_cmd_header_description);
form.append("order_header_comment", p_add_cmd_header_comment);
form.append("order_header_date_cmd", p_add_cmd_header_date_cmd);
form.append("order_header_date_expiration", p_add_cmd_header_date_expiration_cmd);
form.append("order_header_condition_paiement", p_add_cmd_header_condition_paiement);
form.append("order_header_ref_client", p_add_cmd_header_ref_client);
form.append("order_header_vendeur_id", p_add_cmd_header_vendeur_id);
form.append("order_header_type", p_add_cmd_header_order_type);
console.log("### form = ", form);
var myurl = ""
if (String(p_add_cmd_header_order_type) === "devis") {
myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Quotation/";
} else if (String(p_add_cmd_header_order_type) === "commande") {
myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Order/";
} else {
alert(" Type de commande inconnu");
return;
}
axios.post(myurl, form).then(res => {
//console.log(" In Add_Update_One_Order_Line_Data res.data.status = " + res.data.status);
//console.log(" In Add_Update_One_Order_Line_Data res.data.message r_class = " + res.data.message);
if (String(res.data.status) === String("true")) {
setAdd_Dialog_Detail_Order_api("true");
setAdd_Dialog_Detail_Order_result(res.data.message);
clean_order_detail_fields();
setDialog_Detail_Commande_open(false);
Getall_Parter_Orders_No_Filter();
if (String(p_add_cmd_header_order_type) === "devis") {
alert(" La devis à jour été correctement ajouté.");
} else if (String(p_add_cmd_header_order_type) === "commande") {
alert(" La commande à jour été correctement ajoutée.");
}
myRef_head.current.scrollIntoView({ behavior: "smooth" });
}
else {
setAdd_Dialog_Detail_Order_api("false");
setAdd_Dialog_Detail_Order_message(res.data.message);
alert(res.data.message);
}
}).catch((error) => {
console.warn('Add_Dialog_Detail_Order : Not good man :( Add_Dialog_Detail_Order = ' + error);
setAdd_Dialog_Detail_Order_api("false");
if (String(p_add_cmd_header_order_type) === "devis") {
alert(" Impossible d'ajouter le devis");
} else if (String(p_add_cmd_header_order_type) === "commande") {
alert(" La commande d'ajouter la commande.");
}
})
}
const Dialog_Order_handleClose = () => {
//alert(" Utiliser le bouton 'fermer' ");
//setOpen(false);
};
const [p_add_cmd_header_client_id, setp_add_cmd_header_client_id] = useState("");
const [p_add_cmd_header_description, setp_add_cmd_header_description] = useState("");
const [p_add_cmd_header_comment, setp_add_cmd_header_comment] = useState("");
const [p_add_cmd_header_vendeur_id, setp_add_cmd_header_vendeur_id] = useState("");
const [p_add_cmd_header_date_cmd, setp_add_cmd_header_date_cmd] = useState(new Date().toLocaleDateString('fr-FR'));
const [p_add_cmd_header_date_expiration_cmd, setp_add_cmd_header_date_expiration_cmd] = useState(date_today_90j.toLocaleDateString('fr-FR'));
const [p_add_cmd_header_order_type, setp_add_cmd_header_order_type] = useState("");
const [p_add_cmd_header_order_location_type, setp_add_cmd_header_order_location_type] = useState("");
const [p_add_cmd_header_ref_client, setp_add_cmd_header_ref_client] = useState("");
const [p_add_cmd_header_condition_paiement, setp_add_cmd_header_condition_paiement] = useState("");
function clean_order_detail_fields() {
setp_add_cmd_header_client_id();
setp_add_cmd_header_description();
setp_add_cmd_header_comment();
setp_add_cmd_header_vendeur_id();
setp_add_cmd_header_date_cmd(new Date().toLocaleDateString('fr-FR'));
setp_add_cmd_header_date_expiration_cmd(date_today_90j.toLocaleDateString('fr-FR'));
setp_add_cmd_header_order_type();
setp_add_cmd_header_order_location_type();
setp_add_cmd_header_ref_client();
setp_add_cmd_header_condition_paiement();
}
return (
<div className="partner_commande">
@ -1149,46 +1378,40 @@ const Partner_Commande = (props) => {
Edition d'un ligne de commande / devis
</DialogContentText>
<TextField
autoFocus
margin="dense"
id="ref_article"
label="Article"
type="text"
fullWidth
variant="standard"
value={p_add_line_item}
onChange={(e) => {
setp_add_line_item(e.target.value);
}
}
/>
<TextField
autoFocus
margin="dense"
id="ref_article_1"
label="Article"
select
fullWidth
variant="standard"
value={p_add_line_item}
onChange={(e) => {
setp_add_line_item(e.target.value);
setp_add_line_item_internal_url(e.target.value);
const div1 = document.getElementById("mysy_item_class");
const mysy_item_class_title = div1.getAttribute('mysy_item_class_title');
setp_add_line_item_title(mysy_item_class_title);
//console.log(" Selected title = ", mysy_item_class_title);
}
}
>
{GetCurrentPartnerClass_result &&
GetCurrentPartnerClass_result.map((myclass) => (
<MenuItem key={JSON.parse(myclass).internal_url} value={JSON.parse(myclass).internal_url} style={{ "paddingLeft": "5px", "textAlign": "left", }}>
<MenuItem key={JSON.parse(myclass).internal_url} value={JSON.parse(myclass).internal_url} style={{ "paddingLeft": "5px", "textAlign": "left", }}
id="mysy_item_class"
mysy_item_class_title={JSON.parse(myclass).title}>
{JSON.parse(myclass).title}
</MenuItem>
))}
</TextField>
<TextField
autoFocus
margin="dense"
@ -1223,7 +1446,7 @@ const Partner_Commande = (props) => {
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required
name="ref_article_comment"
id="ref_article_comment"
autoFocus
@ -1247,7 +1470,7 @@ const Partner_Commande = (props) => {
<div className="div_row">
<div className="div_row_gauche">
<Button onClick={Close_Dialog_Detail_Article_open} className="bton_enreg">Ajouter</Button>
<Button onClick={Update_Dialog_Detail_Article_open} className="bton_enreg">Mettre à jour</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Close_Dialog_Detail_Article_open} className="bton_annule" >Annuler</Button>
@ -1259,6 +1482,260 @@ const Partner_Commande = (props) => {
</Dialog>
<Dialog
open={Dialog_Detail_Commande_open}
onClose={Dialog_Order_handleClose}
className="partner_commande"
>
<DialogTitle>Nouvelle Commande</DialogTitle>
<DialogContent>
<DialogContentText>
Ajout d'une commande / devis
</DialogContentText>
<TextField
autoFocus
margin="dense"
id="ref_client"
label="Client"
select
fullWidth
variant="standard"
value={p_add_cmd_header_client_id}
onChange={(e) => {
setp_add_cmd_header_client_id(e.target.value);
/*setp_add_line_item_internal_url(e.target.value);
const div1 = document.getElementById("mysy_item_class");
const mysy_item_class_title = div1.getAttribute('mysy_item_class_title');
setp_add_line_item_title(mysy_item_class_title);
//console.log(" Selected title = ", mysy_item_class_title); */
}
}
>
{Get_List_Partner_Clients_result &&
Get_List_Partner_Clients_result.map((myclient) => (
<MenuItem key={JSON.parse(myclient).nom} value={JSON.parse(myclient)._id}
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>
{JSON.parse(myclient).nom}&nbsp;&nbsp;
</MenuItem>
))}
</TextField>
{/*p_add_cmd_header_client_id && <div className="div_row">
<div className="div_row"> Adresse client
</div>
<div className="div_row"> Adresse Facturation
</div>
</div>*/}
<div style={{ "textAlign": "left" }}>Date cmd <br />
<DatePicker
name="date_order"
id="date_order"
selected={new Date(moment(p_add_cmd_header_date_cmd, "DD/MM/YYYY HH:mm:ss"))}
onChange={(date) => {
setp_add_cmd_header_date_cmd(format(date, 'dd/MM/yyyy'));
}
}
showTimeSelect={false}
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
fullWidth
/>
</div>
<div style={{ "textAlign": "left" }}>Date expiration <br />
<DatePicker
name="date_order_exp"
id="date_order_exp"
label="expidate"
selected={new Date(moment(p_add_cmd_header_date_expiration_cmd, "DD/MM/YYYY HH:mm:ss"))}
onChange={(date) => {
setp_add_cmd_header_date_expiration_cmd(format(date, 'dd/MM/yyyy'));
}
}
showTimeSelect={false}
//filterTime={filterPassedTime_start}
dateFormat="dd/MM/yyyy"
className="disabled_style enable_style"
locale='fr-FR'
fullWidth
/>
</div>
<TextField
autoFocus
margin="dense"
id="order_description"
label="Description"
type="text"
fullWidth
variant="standard"
value={p_add_cmd_header_description}
onChange={(e) => {
setp_add_cmd_header_description(e.target.value);
}
}
/>
<TextField
autoFocus
margin="dense"
id="order_ref_client"
label="Ref. externe"
type="text"
fullWidth
variant="standard"
value={p_add_cmd_header_ref_client}
onChange={(e) => {
setp_add_cmd_header_ref_client(e.target.value);
}
}
/>
<TextField
autoFocus
margin="dense"
id="ref_vendeur"
label="Vendeur"
select
fullWidth
variant="standard"
value={p_add_cmd_header_vendeur_id}
onChange={(e) => {
setp_add_cmd_header_vendeur_id(e.target.value);
}
}
>
{Getall_Training_Employee_No_Filter_result &&
Getall_Training_Employee_No_Filter_result.map((myclient) => (
<MenuItem key={JSON.parse(myclient)._id} value={JSON.parse(myclient)._id}
style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }}>
{JSON.parse(myclient).nom}&nbsp; {JSON.parse(myclient).prenom}
</MenuItem>
))}
</TextField>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="order_paiement_condition"
id="order_paiement_condition"
autoFocus
fullWidth
value={p_add_cmd_header_condition_paiement}
onChange={(e) => {
setp_add_cmd_header_condition_paiement(e.target.value);
}
}
label="Conditions Paiement"
variant="standard"
/>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="order_type"
id="order_type"
autoFocus
fullWidth
value={p_add_cmd_header_order_type}
onChange={(e) => {
setp_add_cmd_header_order_type(e.target.value);
}
}
label="Type"
variant="standard"
select
>
<MenuItem value="devis" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Devis &nbsp;</MenuItem>
<MenuItem value="commande" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Commande &nbsp;</MenuItem>
</TextField>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="order_header_location_type"
id="order_header_location_type"
autoFocus
fullWidth
value={p_add_cmd_header_order_location_type}
onChange={(e) => {
setp_add_cmd_header_order_location_type(e.target.value);
}
}
label="Emplacement"
variant="standard"
select
>
<MenuItem value="inter" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Inter &nbsp;</MenuItem>
<MenuItem value="intra" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Intra &nbsp;</MenuItem>
<MenuItem value="" style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%" }} >Autre &nbsp;</MenuItem>
</TextField>
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
name="order_commentaire"
id="order_commentaire"
autoFocus
fullWidth
value={p_add_cmd_header_comment}
onChange={(e) => {
setp_add_cmd_header_comment(e.target.value);
}
}
label="Commentaire"
variant="standard"
/>
<div className="div_row"> &nbsp;</div>
</DialogContent>
<DialogActions>
<div className="div_row">
<div className="div_row_gauche">
<Button onClick={Add_Dialog_Detail_Order} className="bton_enreg">Ajouter</Button>
</div>
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
<Button onClick={Close_Dialog_Detail_Order_open} className="bton_annule" >Annuler</Button>
</div>
</div>
</DialogActions>
</Dialog>
<h3> Vos Commandes et Devis </h3>
<div className="div_row">
@ -1710,7 +2187,8 @@ const Partner_Commande = (props) => {
<h3> Affichage detaillé d'une commande / devis </h3>
<div>
<div className="session_data" >
Entete de commande
<div> Entete de commande </div>
<div className="session_caract"> Type<br />
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
@ -2104,7 +2582,7 @@ const Partner_Commande = (props) => {
</div>
<div className="session_data" >
Lignes de commande
<div> Lignes de commande </div>
<div style={{ "border": "None" }}>
<nav onClick={Ajouter_une_ligne_article} style={{ "cursor": 'pointer' }}> Ajouter une ligne </nav>
<div style={{ height: 550, width: '100%', paddingRight: '1px' }}>
@ -2176,13 +2654,14 @@ const Partner_Commande = (props) => {
_id: JSON.parse(item)._id,
order_line_formation: JSON.parse(item).order_line_formation,
order_line_qty: JSON.parse(item).order_line_qty,
order_header_status: JSON.parse(item).order_header_status,
order_line_status: JSON.parse(item).order_line_status,
order_line_prix_unitaire: JSON.parse(item).order_line_prix_unitaire,
order_header_id: JSON.parse(item).order_header_id,
order_header_ref_interne: JSON.parse(item).order_header_ref_interne,
order_line_type: JSON.parse(item).order_line_type,
order_header_date_cmd: JSON.parse(item).order_header_date_cmd,
order_line_status: JSON.parse(item).order_line_status,
order_line_formation_title: JSON.parse(item).title,
order_line_formation_duration: JSON.parse(item).duration_concat,
order_line_comment: JSON.parse(item).order_line_comment,
}
))}

View File

@ -2114,6 +2114,10 @@
text-align: center;
}
.css-l4u8b9-MuiInputBase-root-MuiInput-root{
text-align: left !important;
}
}
// end media