IO-70 Add basic functions of OEC.

This commit is contained in:
Patrick Fic
2021-11-29 15:04:34 -08:00
parent 53be0bbc1a
commit 5db43dd065
9 changed files with 87 additions and 11 deletions

View File

@@ -228,7 +228,6 @@ export function PartsOrderModalContainer({
id: insertResult.data.insert_parts_orders.returning[0].id,
},
});
console.log("🚀 ~ file: parts-order-modal.container.jsx ~ line 231 ~ handleFinish ~ partsOrder", partsOrder)
const oecResponse = await axios.post(
"http://localhost:1337/oec/",
@@ -240,11 +239,17 @@ export function PartsOrderModalContainer({
},
}
);
console.log(
"🚀 ~ file: parts-order-modal.container.jsx ~ line 232 ~ handleFinish ~ oecResponse",
oecResponse
);
return;
if (oecResponse.data && oecResponse.data.success === false) {
notification.open({
type: "error",
message: t("parts_orders.errors.oec", {
error: oecResponse.data.error,
}),
});
}
} catch (error) {
console.log("Error OEC.", error);
notification["error"]({

View File

@@ -16,6 +16,7 @@ export const QUERY_PARTS_ORDER_OEC = gql`
parts_orders_by_pk(id: $id) {
parts_order_lines {
jobline {
tran_code
act_price
db_ref
db_price
@@ -70,6 +71,10 @@ export const QUERY_PARTS_ORDER_OEC = gql`
quantity
}
job {
bodyshop{
shopname
bill_tax_rates
}
ro_number
clm_no
asgn_no

View File

@@ -1833,7 +1833,8 @@
"errors": {
"associatedbills": "This parts order cannot",
"backordering": "Error backordering part {{message}}.",
"creating": "Error encountered when creating parts order. "
"creating": "Error encountered when creating parts order. ",
"oec": "Error creating EMS files for OEC. {{error}}"
},
"fields": {
"act_price": "Price",
@@ -1861,6 +1862,7 @@
"email": "Send by Email",
"inthisorder": "Parts in this Order",
"newpartsorder": "New Parts Order",
"oec": "Order via OEC",
"orderhistory": "Order History",
"parts_orders": "Parts Orders",
"print": "Show Printed Form",

View File

@@ -1833,7 +1833,8 @@
"errors": {
"associatedbills": "",
"backordering": "",
"creating": "Se encontró un error al crear el pedido de piezas."
"creating": "Se encontró un error al crear el pedido de piezas.",
"oec": ""
},
"fields": {
"act_price": "",
@@ -1861,6 +1862,7 @@
"email": "Enviar por correo electrónico",
"inthisorder": "Partes en este pedido",
"newpartsorder": "",
"oec": "",
"orderhistory": "Historial de pedidos",
"parts_orders": "",
"print": "Mostrar formulario impreso",

View File

@@ -1833,7 +1833,8 @@
"errors": {
"associatedbills": "",
"backordering": "",
"creating": "Erreur rencontrée lors de la création de la commande de pièces."
"creating": "Erreur rencontrée lors de la création de la commande de pièces.",
"oec": ""
},
"fields": {
"act_price": "",
@@ -1861,6 +1862,7 @@
"email": "Envoyé par email",
"inthisorder": "Pièces dans cette commande",
"newpartsorder": "",
"oec": "",
"orderhistory": "Historique des commandes",
"parts_orders": "",
"print": "Afficher le formulaire imprimé",