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