IO-1718 Add part type to OEC.
This commit is contained in:
@@ -32127,6 +32127,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>part_type</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>quantity</name>
|
<name>quantity</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -207,6 +207,8 @@ export function BillDetailEditcontainer({
|
|||||||
cost: i.actual_cost,
|
cost: i.actual_cost,
|
||||||
quantity: i.quantity,
|
quantity: i.quantity,
|
||||||
joblineid: i.joblineid,
|
joblineid: i.joblineid,
|
||||||
|
oem_partno: i.jobline && i.jobline.oem_partno,
|
||||||
|
part_type: i.jobline && i.jobline.part_type,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
isReturn: true,
|
isReturn: true,
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ export function BillsListTableComponent({
|
|||||||
quantity: i.quantity,
|
quantity: i.quantity,
|
||||||
joblineid: i.joblineid,
|
joblineid: i.joblineid,
|
||||||
oem_partno: i.jobline && i.jobline.oem_partno,
|
oem_partno: i.jobline && i.jobline.oem_partno,
|
||||||
|
part_type: i.jobline && i.jobline.part_type,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
isReturn: true,
|
isReturn: true,
|
||||||
|
|||||||
@@ -319,6 +319,15 @@ export function PartsOrderListTableComponent({
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
{
|
||||||
|
title: t("parts_orders.fields.part_type"),
|
||||||
|
dataIndex: "part_type",
|
||||||
|
key: "part_type",
|
||||||
|
render: (text, record) =>
|
||||||
|
record.part_type
|
||||||
|
? t(`joblines.fields.part_types.${record.part_type}`)
|
||||||
|
: null,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("parts_orders.fields.oem_partno"),
|
title: t("parts_orders.fields.oem_partno"),
|
||||||
dataIndex: "oem_partno",
|
dataIndex: "oem_partno",
|
||||||
|
|||||||
@@ -1,6 +1,15 @@
|
|||||||
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
|
import {
|
||||||
|
Divider,
|
||||||
|
Form,
|
||||||
|
Input,
|
||||||
|
InputNumber,
|
||||||
|
Radio,
|
||||||
|
Space,
|
||||||
|
Tag,
|
||||||
|
Select,
|
||||||
|
} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -114,6 +123,45 @@ export function PartsOrderModalComponent({
|
|||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("parts_orders.fields.part_type")}
|
||||||
|
key={`${index}part_type`}
|
||||||
|
name={[field.name, "part_type"]}
|
||||||
|
>
|
||||||
|
<Select>
|
||||||
|
<Select.Option value="PAA">
|
||||||
|
{t("joblines.fields.part_types.PAA")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAC">
|
||||||
|
{t("joblines.fields.part_types.PAC")}
|
||||||
|
</Select.Option>
|
||||||
|
|
||||||
|
<Select.Option value="PAL">
|
||||||
|
{t("joblines.fields.part_types.PAL")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAG">
|
||||||
|
{t("joblines.fields.part_types.PAG")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAM">
|
||||||
|
{t("joblines.fields.part_types.PAM")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAP">
|
||||||
|
{t("joblines.fields.part_types.PAP")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAN">
|
||||||
|
{t("joblines.fields.part_types.PAN")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAO">
|
||||||
|
{t("joblines.fields.part_types.PAO")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAR">
|
||||||
|
{t("joblines.fields.part_types.PAR")}
|
||||||
|
</Select.Option>
|
||||||
|
<Select.Option value="PAS">
|
||||||
|
{t("joblines.fields.part_types.PAS")}
|
||||||
|
</Select.Option>
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("parts_orders.fields.oem_partno")}
|
label={t("parts_orders.fields.oem_partno")}
|
||||||
key={`${index}oem_partno`}
|
key={`${index}oem_partno`}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export function PartsOrderModalContainer({
|
|||||||
|
|
||||||
const { refetch } = actions;
|
const { refetch } = actions;
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const [saving, setSaving] = useState(false);
|
||||||
const sendTypeState = useState("e");
|
const sendTypeState = useState("e");
|
||||||
const sendType = sendTypeState[0];
|
const sendType = sendTypeState[0];
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ export function PartsOrderModalContainer({
|
|||||||
|
|
||||||
const handleFinish = async (values) => {
|
const handleFinish = async (values) => {
|
||||||
logImEXEvent("parts_order_insert");
|
logImEXEvent("parts_order_insert");
|
||||||
|
setSaving(true);
|
||||||
const insertResult = await insertPartOrder({
|
const insertResult = await insertPartOrder({
|
||||||
variables: {
|
variables: {
|
||||||
po: [
|
po: [
|
||||||
@@ -247,8 +247,6 @@ export function PartsOrderModalContainer({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(partsOrder.data.parts_orders_by_pk);
|
|
||||||
|
|
||||||
const oecResponse = await axios.post(
|
const oecResponse = await axios.post(
|
||||||
"http://localhost:1337/oec/",
|
"http://localhost:1337/oec/",
|
||||||
|
|
||||||
@@ -275,11 +273,11 @@ export function PartsOrderModalContainer({
|
|||||||
error: JSON.stringify(error.message),
|
error: JSON.stringify(error.message),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
setSaving(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setSaving(false);
|
||||||
toggleModalVisible();
|
toggleModalVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -301,6 +299,7 @@ export function PartsOrderModalContainer({
|
|||||||
cost: value.cost,
|
cost: value.cost,
|
||||||
quantity: value.part_qty,
|
quantity: value.part_qty,
|
||||||
job_line_id: isReturn ? value.joblineid : value.id,
|
job_line_id: isReturn ? value.joblineid : value.id,
|
||||||
|
part_type: value.part_type,
|
||||||
});
|
});
|
||||||
return acc;
|
return acc;
|
||||||
}, [])
|
}, [])
|
||||||
@@ -324,6 +323,8 @@ export function PartsOrderModalContainer({
|
|||||||
}
|
}
|
||||||
onCancel={() => toggleModalVisible()}
|
onCancel={() => toggleModalVisible()}
|
||||||
onOk={() => form.submit()}
|
onOk={() => form.submit()}
|
||||||
|
okButtonProps={{ loading: saving }}
|
||||||
|
cancelButtonProps={{ loading: saving }}
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
width="75%"
|
width="75%"
|
||||||
forceRender
|
forceRender
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export const QUERY_BILLS_BY_JOBID = gql`
|
|||||||
line_remarks
|
line_remarks
|
||||||
quantity
|
quantity
|
||||||
job_line_id
|
job_line_id
|
||||||
|
part_type
|
||||||
cost
|
cost
|
||||||
jobline {
|
jobline {
|
||||||
id
|
id
|
||||||
@@ -123,6 +124,10 @@ export const QUERY_BILLS_BY_JOBID = gql`
|
|||||||
applicable_taxes
|
applicable_taxes
|
||||||
deductedfromlbr
|
deductedfromlbr
|
||||||
lbr_adjustment
|
lbr_adjustment
|
||||||
|
jobline{
|
||||||
|
oem_partno
|
||||||
|
part_type
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,6 +164,10 @@ export const QUERY_BILL_BY_PK = gql`
|
|||||||
cost_center
|
cost_center
|
||||||
quantity
|
quantity
|
||||||
joblineid
|
joblineid
|
||||||
|
jobline{
|
||||||
|
oem_partno
|
||||||
|
part_type
|
||||||
|
}
|
||||||
applicable_taxes
|
applicable_taxes
|
||||||
deductedfromlbr
|
deductedfromlbr
|
||||||
lbr_adjustment
|
lbr_adjustment
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ export const QUERY_PARTS_ORDER_OEC = gql`
|
|||||||
db_price
|
db_price
|
||||||
line_desc
|
line_desc
|
||||||
quantity
|
quantity
|
||||||
|
part_type
|
||||||
}
|
}
|
||||||
job {
|
job {
|
||||||
bodyshop{
|
bodyshop{
|
||||||
|
|||||||
@@ -1906,6 +1906,7 @@
|
|||||||
"order_date": "Order Date",
|
"order_date": "Order Date",
|
||||||
"order_number": "Order Number",
|
"order_number": "Order Number",
|
||||||
"orderedby": "Ordered By",
|
"orderedby": "Ordered By",
|
||||||
|
"part_type": "Type",
|
||||||
"quantity": "Qty.",
|
"quantity": "Qty.",
|
||||||
"return": "Return",
|
"return": "Return",
|
||||||
"status": "Status"
|
"status": "Status"
|
||||||
|
|||||||
@@ -1906,6 +1906,7 @@
|
|||||||
"order_date": "",
|
"order_date": "",
|
||||||
"order_number": "",
|
"order_number": "",
|
||||||
"orderedby": "",
|
"orderedby": "",
|
||||||
|
"part_type": "",
|
||||||
"quantity": "",
|
"quantity": "",
|
||||||
"return": "",
|
"return": "",
|
||||||
"status": ""
|
"status": ""
|
||||||
|
|||||||
@@ -1906,6 +1906,7 @@
|
|||||||
"order_date": "",
|
"order_date": "",
|
||||||
"order_number": "",
|
"order_number": "",
|
||||||
"orderedby": "",
|
"orderedby": "",
|
||||||
|
"part_type": "",
|
||||||
"quantity": "",
|
"quantity": "",
|
||||||
"return": "",
|
"return": "",
|
||||||
"status": ""
|
"status": ""
|
||||||
|
|||||||
Reference in New Issue
Block a user