Added bulk assignment. Added partial parts order line remarks capability.
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { AutoComplete, DatePicker, Icon, Input, List, Radio } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { AutoComplete, Icon, DatePicker, Radio } from "antd";
|
||||
import { useTranslation } from "react-i18next";
|
||||
export default function PartsOrderModalComponent({
|
||||
vendorList,
|
||||
state,
|
||||
sendTypeState
|
||||
sendTypeState,
|
||||
orderLinesState
|
||||
}) {
|
||||
const [partsOrder, setPartsOrder] = state;
|
||||
const [sendType, setSendType] = sendTypeState;
|
||||
const orderLines = orderLinesState[0];
|
||||
const [vendorComplete, setVendorComplete] = useState(vendorList);
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -22,8 +24,6 @@ export default function PartsOrderModalComponent({
|
||||
};
|
||||
|
||||
const handleSelect = (value, option) => {
|
||||
console.log("value", value);
|
||||
console.log("option", option);
|
||||
setPartsOrder({ ...partsOrder, vendorid: option.key });
|
||||
};
|
||||
|
||||
@@ -52,6 +52,33 @@ export default function PartsOrderModalComponent({
|
||||
}}
|
||||
/>
|
||||
|
||||
{t("parts_orders.labels.inthisorder")}
|
||||
|
||||
<List
|
||||
itemLayout='horizontal'
|
||||
dataSource={orderLines}
|
||||
renderItem={item => (
|
||||
<List.Item
|
||||
actions={[
|
||||
<Input placeholder={t("parts_orders.fields.lineremarks")} />
|
||||
//TODO Editable table/adding line remarks to the order.
|
||||
]}>
|
||||
{
|
||||
// <List.Item.Meta
|
||||
// avatar={
|
||||
// <Avatar src='https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png' />
|
||||
// }
|
||||
// title={<a href='https://ant.design'>{item.name.last}</a>}
|
||||
// description='Ant Design, a design language for background applications, is refined by Ant UED Team'
|
||||
// />
|
||||
}
|
||||
<div>{`${item.line_desc}${
|
||||
item.oem_partno ? " | " + item.oem_partno : ""
|
||||
}`}</div>
|
||||
</List.Item>
|
||||
)}
|
||||
/>
|
||||
|
||||
<Radio.Group
|
||||
defaultValue={sendType}
|
||||
onChange={e => setSendType(e.target.value)}>
|
||||
|
||||
Reference in New Issue
Block a user