Most functionality is restored after antd upgrade. WIP on invoice enter screen.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Form, Input, InputNumber, Modal } from "antd";
|
||||
import { Form, Input, Modal } from "antd";
|
||||
import React, { useEffect } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import InputCurrency from "../form-items-formatted/currency-form-item.component";
|
||||
|
||||
export default function JobLinesUpsertModalComponent({
|
||||
visible,
|
||||
@@ -14,27 +15,35 @@ export default function JobLinesUpsertModalComponent({
|
||||
useEffect(() => {
|
||||
form.resetFields();
|
||||
}, [visible, form]);
|
||||
console.log("jobLine", jobLine);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={
|
||||
jobLine && jobLine.id
|
||||
? t("joblines.labels.edit")
|
||||
: t("joblines.labels.new")
|
||||
}
|
||||
visible={visible}
|
||||
okText={t("general.labels.save")}
|
||||
onOk={handleFinish}
|
||||
forceRender={true}
|
||||
onCancel={handleCancel}
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
initialValues={jobLine}
|
||||
autoComplete="off"
|
||||
form={form}
|
||||
>
|
||||
<Form
|
||||
onFinish={handleFinish}
|
||||
initialValues={jobLine}
|
||||
autoComplete={"off"}
|
||||
form={form}
|
||||
<Modal
|
||||
title={
|
||||
jobLine && jobLine.id
|
||||
? t("joblines.labels.edit")
|
||||
: t("joblines.labels.new")
|
||||
}
|
||||
visible={visible}
|
||||
okText={t("general.labels.save")}
|
||||
onOk={() => form.submit()}
|
||||
onCancel={handleCancel}
|
||||
>
|
||||
<Form.Item label={t("joblines.fields.line_desc")} name="line_desc">
|
||||
<Form.Item
|
||||
label={t("joblines.fields.line_desc")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name="line_desc"
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.oem_partno")} name="oem_partno">
|
||||
@@ -53,12 +62,12 @@ export default function JobLinesUpsertModalComponent({
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.mod_lb_hrs")} name="mod_lb_hrs">
|
||||
<InputNumber />
|
||||
<InputCurrency />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("joblines.fields.act_price")} name="act_price">
|
||||
<InputNumber />
|
||||
<InputCurrency />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
</Modal>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user