IO-791 Bill Edit with Labor Adjustments confirmation

This commit is contained in:
Patrick Fic
2021-03-22 17:29:39 -07:00
parent af30651d7b
commit 43a266c463
9 changed files with 108 additions and 23 deletions

View File

@@ -248,19 +248,19 @@ export function BillEnterModalLinesComponent({
</Select>
</Form.Item>
<Form.Item
label={t("billlines.labels.deductfromlabor")}
key={`${index}deductfromlabor`}
label={t("billlines.labels.deductedfromlbr")}
key={`${index}deductedfromlbr`}
valuePropName="checked"
name={[field.name, "deductfromlabor"]}
name={[field.name, "deductedfromlbr"]}
>
<Switch disabled={disabled} />
</Form.Item>
<Form.Item
shouldUpdate={(prev, cur) =>
prev.billlines[index] &&
prev.billlines[index].deductfromlabor !==
prev.billlines[index].deductedfromlbr !==
cur.billlines[index] &&
cur.billlines[index].deductfromlabor
cur.billlines[index].deductedfromlbr
}
>
{() => {
@@ -268,7 +268,7 @@ export function BillEnterModalLinesComponent({
getFieldValue([
"billlines",
field.name,
"deductfromlabor",
"deductedfromlbr",
])
)
return (