BOD-11 BOD-12 BOD-10 WIP Guided manual estimate creation.
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
import { Form, Input, Checkbox, Switch } from "antd";
|
||||
import React, { useContext } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
||||
|
||||
export default function JobsCreateOwnerInfoNewComponent() {
|
||||
const [state, setState] = useContext(JobCreateContext);
|
||||
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<Checkbox
|
||||
defaultChecked={state.owner.new}
|
||||
checked={state.owner.new}
|
||||
onChange={() => {
|
||||
setState({
|
||||
...state,
|
||||
owner: {
|
||||
...state.owner,
|
||||
new: !state.owner.new,
|
||||
selectedid: null
|
||||
}
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t("jobs.labels.create.newowner")}
|
||||
</Checkbox>
|
||||
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_ln")}
|
||||
name={["owner", "data", "ownr_ln"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_fn")}
|
||||
name={["owner", "data", "ownr_fn"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.allow_text_message")}
|
||||
valuePropName="checked"
|
||||
name={["owner", "data", "allow_text_message"]}
|
||||
>
|
||||
<Switch disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_addr1")}
|
||||
name={["owner", "data", "ownr_addr1"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_addr2")}
|
||||
name={["owner", "data", "ownr_addr2"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_city")}
|
||||
name={["owner", "data", "ownr_city"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_ctry")}
|
||||
name={["owner", "data", "ownr_ctry"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_ea")}
|
||||
rules={[
|
||||
{
|
||||
type: "email",
|
||||
message: "This is not a valid email address."
|
||||
}
|
||||
]}
|
||||
name={["owner", "data", "ownr_ea"]}
|
||||
>
|
||||
<FormItemEmail
|
||||
//TODO Fix this email={getFieldValue("ownr_ea")}
|
||||
disabled={!state.owner.new}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_ph1")}
|
||||
name={["owner", "data", "ownr_ph1"]}
|
||||
>
|
||||
<FormItemPhone customInput={Input} disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_st")}
|
||||
name={["owner", "data", "ownr_st"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_zip")}
|
||||
name={["owner", "data", "ownr_zip"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.preferred_contact")}
|
||||
name={["owner", "data", "preferred_contact"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("owners.fields.ownr_title")}
|
||||
name={["owner", "data", "ownr_title"]}
|
||||
>
|
||||
<Input disabled={!state.owner.new} />
|
||||
</Form.Item>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user