Added fields to claim data page.
This commit is contained in:
@@ -1,44 +1,81 @@
|
||||
import { Form, Input, Switch } from "antd";
|
||||
import React, { useContext } from "react";
|
||||
import { Form, Input } from "antd";
|
||||
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import JobDetailFormContext from "../../pages/jobs-detail/jobs-detail.page.context";
|
||||
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
||||
|
||||
export default function JobsDetailClaims({ job }) {
|
||||
const form = useContext(JobDetailFormContext);
|
||||
const { getFieldDecorator, isFieldTouched } = form;
|
||||
const { getFieldDecorator } = form;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<Form.Item label='Estimator Last Name'>
|
||||
{isFieldTouched("est_ct_ln") ? "Yes" : "No"}
|
||||
{getFieldDecorator("est_ct_ln", {
|
||||
initialValue: job.est_ct_ln
|
||||
})(<Input name='est_ct_ln' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label='Estimator First Name'>
|
||||
{getFieldDecorator("est_ct_fn", {
|
||||
initialValue: job.est_ct_fn
|
||||
})(<Input name='est_ct_fn' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label='Estimator Phone #'>
|
||||
{getFieldDecorator("est_ph1", {
|
||||
initialValue: job.est_ph1
|
||||
})(<FormItemPhone customInput={Input} name='est_ph1' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label='Estimator Email'>
|
||||
{getFieldDecorator("est_ea", {
|
||||
initialValue: job.est_ea,
|
||||
|
||||
rules: [
|
||||
{
|
||||
type: "email",
|
||||
message: "This is not a valid email address."
|
||||
}
|
||||
]
|
||||
})(<Input name='est_ea' />)}
|
||||
</Form.Item>
|
||||
</div>
|
||||
<Form.Item label={t("jobs.fields.csr")}>
|
||||
{getFieldDecorator("csr", {
|
||||
initialValue: job.csr
|
||||
})(<Input name='csr' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.loss_desc")}>
|
||||
{getFieldDecorator("loss_desc", {
|
||||
initialValue: job.loss_desc
|
||||
})(<Input name='loss_desc' />)}
|
||||
</Form.Item>
|
||||
TODO: How to handle different taxes and marking them as exempt?
|
||||
{
|
||||
// <Form.Item label={t("jobs.fields.exempt")}>
|
||||
// {getFieldDecorator("exempt", {
|
||||
// initialValue: job.exempt
|
||||
// })(<Input name='exempt' />)}
|
||||
// </Form.Item>
|
||||
}
|
||||
<Form.Item label={t("jobs.fields.ponumber")}>
|
||||
{getFieldDecorator("po_number", {
|
||||
initialValue: job.po_number
|
||||
})(<Input name='po_number' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.unitnumber")}>
|
||||
{getFieldDecorator("unit_number", {
|
||||
initialValue: job.unit_number
|
||||
})(<Input name='unit_number' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.specialcoveragepolicy")}>
|
||||
{getFieldDecorator("special_coverage_policy", {
|
||||
initialValue: job.special_coverage_policy,
|
||||
valuePropName: "checked"
|
||||
})(<Switch name='special_coverage_policy' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.kmin")}>
|
||||
{getFieldDecorator("kmin", {
|
||||
initialValue: job.kmin
|
||||
})(<Input name='kmin' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.kmout")}>
|
||||
{getFieldDecorator("kmout", {
|
||||
initialValue: job.kmout
|
||||
})(<Input name='kmout' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.referralsource")}>
|
||||
{getFieldDecorator("referral_source", {
|
||||
initialValue: job.referral_source
|
||||
})(<Input name='referral_source' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label='Estimator Phone #'>
|
||||
{getFieldDecorator("est_ph1", {
|
||||
initialValue: job.est_ph1
|
||||
})(<FormItemPhone customInput={Input} name='est_ph1' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label='Estimator Email'>
|
||||
{getFieldDecorator("est_ea", {
|
||||
initialValue: job.est_ea,
|
||||
rules: [
|
||||
{
|
||||
type: "email",
|
||||
message: "This is not a valid email address."
|
||||
}
|
||||
]
|
||||
})(<Input name='est_ea' />)}
|
||||
</Form.Item>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user