IO-1914 Add split tracking for inventory.
This commit is contained in:
@@ -19,6 +19,7 @@ import CiecaSelect from "../../utils/Ciecaselect";
|
|||||||
import BillLineSearchSelect from "../bill-line-search-select/bill-line-search-select.component";
|
import BillLineSearchSelect from "../bill-line-search-select/bill-line-search-select.component";
|
||||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||||
import BilllineAddInventory from "../billline-add-inventory/billline-add-inventory.component";
|
import BilllineAddInventory from "../billline-add-inventory/billline-add-inventory.component";
|
||||||
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -40,7 +41,11 @@ export function BillEnterModalLinesComponent({
|
|||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { setFieldsValue, getFieldsValue, getFieldValue } = form;
|
const { setFieldsValue, getFieldsValue, getFieldValue } = form;
|
||||||
|
const { Simple_Inventory } = useTreatments(
|
||||||
|
["Simple_Inventory"],
|
||||||
|
{},
|
||||||
|
bodyshop && bodyshop.imexshopid
|
||||||
|
);
|
||||||
const columns = (remove) => {
|
const columns = (remove) => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -485,13 +490,15 @@ export function BillEnterModalLinesComponent({
|
|||||||
<DeleteFilled />
|
<DeleteFilled />
|
||||||
</Button>
|
</Button>
|
||||||
<Form.Item shouldUpdate noStyle>
|
<Form.Item shouldUpdate noStyle>
|
||||||
{() => (
|
{() =>
|
||||||
<BilllineAddInventory
|
Simple_Inventory.treatment === "on" && (
|
||||||
disabled={!billEdit || form.isFieldsTouched()}
|
<BilllineAddInventory
|
||||||
billline={getFieldValue("billlines")[record.fieldKey]}
|
disabled={!billEdit || form.isFieldsTouched()}
|
||||||
jobid={getFieldValue("jobid")}
|
billline={getFieldValue("billlines")[record.fieldKey]}
|
||||||
/>
|
jobid={getFieldValue("jobid")}
|
||||||
)}
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user