Fixed BOD-63 breaking changes. Original functionality restored.
This commit is contained in:
@@ -71,7 +71,6 @@ export function InvoiceDetailEditContainer({ bodyshop }) {
|
||||
data
|
||||
? {
|
||||
...data.invoices_by_pk,
|
||||
// invoicelines: [],
|
||||
date: data.invoices_by_pk
|
||||
? moment(data.invoices_by_pk.date)
|
||||
: null,
|
||||
|
||||
@@ -115,28 +115,23 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
{
|
||||
//TODO Will need to refactor this to use proper form components in the search select above.
|
||||
getFieldsValue("invoicelines")[index] &&
|
||||
// getFieldsValue("invoicelines")[index].joblinename &&
|
||||
!getFieldsValue("invoicelines").invoicelines[index]
|
||||
.joblineid ? (
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.line_desc")}
|
||||
key={`${index}line_desc`}
|
||||
name={[field.name, "line_desc"]}
|
||||
rules={[
|
||||
{
|
||||
required: !getFieldsValue("invoicelines")[index]
|
||||
.joblineid,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
) : null
|
||||
}
|
||||
{!!getFieldsValue(["invoicelines"]).invoicelines[index] &&
|
||||
!getFieldsValue(["invoicelines"]).invoicelines[index]
|
||||
.joblineid ? (
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.line_desc")}
|
||||
key={`${index}line_desc`}
|
||||
name={[field.name, "line_desc"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
) : null}
|
||||
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.actual")}
|
||||
|
||||
Reference in New Issue
Block a user