Fields for insurance tab on claim detail.
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
import { Form, Input, Button, Icon } from "antd";
|
||||
import React, { useContext } from "react";
|
||||
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 JobsDetailInsurance({ job }) {
|
||||
const form = useContext(JobDetailFormContext);
|
||||
const { getFieldDecorator } = form;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Form.Item label={t("jobs.fields.ins_co_id")}>
|
||||
{getFieldDecorator("ins_co_id", {
|
||||
initialValue: job.ins_co_id
|
||||
})(<Input name='ins_co_id' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.policy_no")}>
|
||||
{getFieldDecorator("policy_no", {
|
||||
initialValue: job.policy_no
|
||||
})(<Input name='policy_no' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.clm_no")}>
|
||||
{getFieldDecorator("clm_no", {
|
||||
initialValue: job.clm_no
|
||||
})(<Input name='clm_no' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.regie_number")}>
|
||||
{getFieldDecorator("regie_number", {
|
||||
initialValue: job.regie_number
|
||||
})(<Input name='regie_number' />)}
|
||||
</Form.Item>
|
||||
TODO: missing KOL field???
|
||||
<Form.Item label={t("jobs.fields.loss_date")}>
|
||||
{getFieldDecorator("loss_date", {
|
||||
initialValue: job.loss_date
|
||||
})(<Input name='loss_date' />)}
|
||||
</Form.Item>
|
||||
DAMAGE {JSON.stringify(job.area_of_damage)}
|
||||
CAA # seems not correct based on field mapping Class seems not correct
|
||||
based on field mapping
|
||||
<Form.Item label={t("jobs.fields.ins_co_nm")}>
|
||||
{getFieldDecorator("ins_co_nm", {
|
||||
initialValue: job.ins_co_nm
|
||||
})(<Input name='ins_co_nm' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_addr1")}>
|
||||
{getFieldDecorator("ins_addr1", {
|
||||
initialValue: job.ins_addr1
|
||||
})(<Input name='ins_addr1' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_city")}>
|
||||
{getFieldDecorator("ins_city", {
|
||||
initialValue: job.ins_city
|
||||
})(<Input name='ins_city' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_ct_ln")}>
|
||||
{getFieldDecorator("ins_ct_ln", {
|
||||
initialValue: job.ins_ct_ln
|
||||
})(<Input name='ins_ct_ln' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_ct_fn")}>
|
||||
{getFieldDecorator("ins_ct_fn", {
|
||||
initialValue: job.ins_ct_fn
|
||||
})(<Input name='ins_ct_fn' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_ph1")}>
|
||||
{getFieldDecorator("ins_ph1", {
|
||||
initialValue: job.ins_ph1
|
||||
})(<FormItemPhone customInput={Input} name='ins_ph1' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.ins_ea")}>
|
||||
{getFieldDecorator("ins_ea", {
|
||||
initialValue: job.ins_ea,
|
||||
rules: [
|
||||
{
|
||||
type: "email",
|
||||
message: "This is not a valid email address."
|
||||
}
|
||||
]
|
||||
})(<Input name='ins_ea' />)}
|
||||
</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>
|
||||
<Button>
|
||||
<Icon type='mail' />
|
||||
</Button>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user