Finished job detail insurance component
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { Icon, Input } from "antd";
|
||||
import React, { forwardRef } from "react";
|
||||
function FormItemEmail(props, ref) {
|
||||
return (
|
||||
<Input
|
||||
{...props}
|
||||
addonAfter={
|
||||
<a href={`mailto:${props.email}`}>
|
||||
<Icon type='mail' />
|
||||
</a>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default forwardRef(FormItemEmail);
|
||||
@@ -2,7 +2,6 @@ import { Form, Input, Switch } 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 JobsDetailClaims({ job }) {
|
||||
const form = useContext(JobDetailFormContext);
|
||||
@@ -60,22 +59,6 @@ export default function JobsDetailClaims({ job }) {
|
||||
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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Form, Input, Button, Icon } from "antd";
|
||||
import { Divider, Form, Input } from "antd";
|
||||
import React, { useContext } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import JobDetailFormContext from "../../pages/jobs-detail/jobs-detail.page.context";
|
||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
||||
|
||||
export default function JobsDetailInsurance({ job }) {
|
||||
const form = useContext(JobDetailFormContext);
|
||||
const { getFieldDecorator } = form;
|
||||
const { getFieldDecorator, getFieldValue } = form;
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
@@ -79,9 +79,37 @@ export default function JobsDetailInsurance({ job }) {
|
||||
message: "This is not a valid email address."
|
||||
}
|
||||
]
|
||||
})(<Input name='ins_ea' />)}
|
||||
})(<FormItemEmail name='ins_ea' email={getFieldValue("ins_ea")} />)}
|
||||
</Form.Item>
|
||||
<Form.Item label='Estimator Email'>
|
||||
<Divider />
|
||||
Appraiser Info
|
||||
<Form.Item label={t("jobs.fields.est_co_nm")}>
|
||||
{getFieldDecorator("est_co_nm", {
|
||||
initialValue: job.est_co_nm
|
||||
})(<Input name='est_co_nm' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.est_ct_fn")}>
|
||||
{getFieldDecorator("est_ct_fn", {
|
||||
initialValue: job.est_ct_fn
|
||||
})(<Input name='est_ct_fn' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.est_ct_ln")}>
|
||||
{getFieldDecorator("est_ct_ln", {
|
||||
initialValue: job.est_ct_ln
|
||||
})(<Input name='est_ct_ln' />)}
|
||||
</Form.Item>
|
||||
TODO: Field is pay date but title is inspection date. Likely incorrect?
|
||||
<Form.Item label={t("jobs.fields.pay_date")}>
|
||||
{getFieldDecorator("pay_date", {
|
||||
initialValue: job.pay_date
|
||||
})(<Input name='pay_date' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.est_ph1")}>
|
||||
{getFieldDecorator("est_ph1", {
|
||||
initialValue: job.est_ph1
|
||||
})(<Input name='est_ph1' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.est_ea")}>
|
||||
{getFieldDecorator("est_ea", {
|
||||
initialValue: job.est_ea,
|
||||
rules: [
|
||||
@@ -90,12 +118,29 @@ export default function JobsDetailInsurance({ job }) {
|
||||
message: "This is not a valid email address."
|
||||
}
|
||||
]
|
||||
})(<Input name='est_ea' />)}
|
||||
})(<FormItemEmail name='est_ea' email={getFieldValue("est_ea")} />)}
|
||||
</Form.Item>
|
||||
<Button>
|
||||
<Icon type='mail' />
|
||||
</Button>
|
||||
|
||||
<Form.Item label={t("jobs.fields.selling_dealer")}>
|
||||
{getFieldDecorator("selling_dealer", {
|
||||
initialValue: job.selling_dealer
|
||||
})(<Input name='selling_dealer' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.servicing_dealer")}>
|
||||
{getFieldDecorator("servicing_dealer", {
|
||||
initialValue: job.servicing_dealer
|
||||
})(<Input name='servicing_dealer' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.selling_dealer_contact")}>
|
||||
{getFieldDecorator("selling_dealer_contact", {
|
||||
initialValue: job.selling_dealer_contact
|
||||
})(<Input name='selling_dealer_contact' />)}
|
||||
</Form.Item>
|
||||
<Form.Item label={t("jobs.fields.servicing_dealer_contact")}>
|
||||
{getFieldDecorator("servicing_dealer_contact", {
|
||||
initialValue: job.servicing_dealer_contact
|
||||
})(<Input name='servicing_dealer_contact' />)}
|
||||
</Form.Item>
|
||||
TODO: Adding servicing/selling dealer contact info?
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -120,50 +120,30 @@ export const GET_JOB_BY_PK = gql`
|
||||
v_make_desc
|
||||
v_color
|
||||
}
|
||||
ins_co_id
|
||||
policy_no
|
||||
loss_date
|
||||
area_of_damage
|
||||
ins_co_nm
|
||||
ins_addr1
|
||||
ins_city
|
||||
ins_ct_ln
|
||||
ins_ct_fn
|
||||
ins_ea
|
||||
ins_ph1
|
||||
|
||||
|
||||
actual_completion
|
||||
actual_delivery
|
||||
actual_in
|
||||
created_at
|
||||
|
||||
id
|
||||
local_tax_rate
|
||||
owner {
|
||||
id
|
||||
first_name
|
||||
last_name
|
||||
phone
|
||||
}
|
||||
ins_co_id
|
||||
policy_no
|
||||
loss_date
|
||||
area_of_damage
|
||||
ins_co_nm
|
||||
ins_addr1
|
||||
ins_city
|
||||
ins_ct_ln
|
||||
ins_ct_fn
|
||||
ins_ea
|
||||
ins_ph1
|
||||
est_co_nm
|
||||
est_ph1
|
||||
est_ea
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
pay_date
|
||||
est_ph1
|
||||
est_ea
|
||||
selling_dealer
|
||||
servicing_dealer
|
||||
selling_dealer_contact
|
||||
servicing_dealer_contact
|
||||
regie_number
|
||||
|
||||
scheduled_completion
|
||||
scheduled_in
|
||||
|
||||
job_status {
|
||||
id
|
||||
name
|
||||
}
|
||||
updated_at
|
||||
claim_total
|
||||
deductible
|
||||
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -70,7 +70,13 @@
|
||||
"date_open": "Open",
|
||||
"date_scheduled": "Scheduled",
|
||||
"deductible": "Deductible",
|
||||
"est_addr1": "Appraiser Address",
|
||||
"est_co_nm": "Appraiser",
|
||||
"est_ct_fn": "Appraiser First Name",
|
||||
"est_ct_ln": "Appraiser Last Name",
|
||||
"est_ea": "Appraiser Email",
|
||||
"est_number": "Estimate Number",
|
||||
"est_ph1": "Appraiser Phone #",
|
||||
"ins_addr1": "Insurance Co. Address",
|
||||
"ins_city": "Insurance City",
|
||||
"ins_co_id": "Insurance Co. ID",
|
||||
@@ -86,6 +92,7 @@
|
||||
"owner": "Owner",
|
||||
"owner_owing": "Cust. Owes",
|
||||
"ownr_ea": "Email",
|
||||
"pay_date": "Inspection Date",
|
||||
"phone1": "Phone 1",
|
||||
"phoneshort": "PH",
|
||||
"policy_no": "Policy #",
|
||||
@@ -97,7 +104,11 @@
|
||||
"scheduled_completion": "Scheduled Completion",
|
||||
"scheduled_delivery": "Scheduled Delivery",
|
||||
"scheduled_in": "Scheduled In",
|
||||
"selling_dealer": "Selling Dealer",
|
||||
"selling_dealer_contact": "Selling Dealer Contact",
|
||||
"servicecar": "Service Car",
|
||||
"servicing_dealer": "Servicing Dealer",
|
||||
"servicing_dealer_contact": "Servicing Dealer Contact",
|
||||
"specialcoveragepolicy": "Special Coverage Policy",
|
||||
"status": "Job Status",
|
||||
"unitnumber": "Unit #",
|
||||
|
||||
@@ -70,7 +70,13 @@
|
||||
"date_open": "Abierto",
|
||||
"date_scheduled": "Programado",
|
||||
"deductible": "Deducible",
|
||||
"est_addr1": "Dirección del tasador",
|
||||
"est_co_nm": "Tasador",
|
||||
"est_ct_fn": "Nombre del tasador",
|
||||
"est_ct_ln": "Apellido del tasador",
|
||||
"est_ea": "Correo electrónico del tasador",
|
||||
"est_number": "Numero Estimado",
|
||||
"est_ph1": "Número de teléfono del tasador",
|
||||
"ins_addr1": "Dirección de Insurance Co.",
|
||||
"ins_city": "Ciudad de seguros",
|
||||
"ins_co_id": "ID de la compañía de seguros",
|
||||
@@ -86,6 +92,7 @@
|
||||
"owner": "Propietario",
|
||||
"owner_owing": "Cust. Debe",
|
||||
"ownr_ea": "Email",
|
||||
"pay_date": "Fecha de inspección",
|
||||
"phone1": "Teléfono 1",
|
||||
"phoneshort": "PH",
|
||||
"policy_no": "Política #",
|
||||
@@ -97,7 +104,11 @@
|
||||
"scheduled_completion": "Finalización programada",
|
||||
"scheduled_delivery": "Entrega programada",
|
||||
"scheduled_in": "Programado en",
|
||||
"selling_dealer": "Distribuidor vendedor",
|
||||
"selling_dealer_contact": "Contacto con el vendedor",
|
||||
"servicecar": "Auto de servicio",
|
||||
"servicing_dealer": "Distribuidor de servicio",
|
||||
"servicing_dealer_contact": "Servicio Contacto con el concesionario",
|
||||
"specialcoveragepolicy": "Política de cobertura especial",
|
||||
"status": "Estado del trabajo",
|
||||
"unitnumber": "Unidad #",
|
||||
|
||||
@@ -70,7 +70,13 @@
|
||||
"date_open": "Ouvrir",
|
||||
"date_scheduled": "Prévu",
|
||||
"deductible": "Déductible",
|
||||
"est_addr1": "Adresse de l'évaluateur",
|
||||
"est_co_nm": "Expert",
|
||||
"est_ct_fn": "Prénom de l'évaluateur",
|
||||
"est_ct_ln": "Nom de l'évaluateur",
|
||||
"est_ea": "Courriel de l'évaluateur",
|
||||
"est_number": "Numéro d'estimation",
|
||||
"est_ph1": "Numéro de téléphone de l'évaluateur",
|
||||
"ins_addr1": "Adresse Insurance Co.",
|
||||
"ins_city": "Insurance City",
|
||||
"ins_co_id": "ID de la compagnie d'assurance",
|
||||
@@ -86,6 +92,7 @@
|
||||
"owner": "Propriétaire",
|
||||
"owner_owing": "Cust. Owes",
|
||||
"ownr_ea": "Email",
|
||||
"pay_date": "Date d'inspection",
|
||||
"phone1": "Téléphone 1",
|
||||
"phoneshort": "PH",
|
||||
"policy_no": "Politique #",
|
||||
@@ -97,7 +104,11 @@
|
||||
"scheduled_completion": "Achèvement planifié",
|
||||
"scheduled_delivery": "Livraison programmée",
|
||||
"scheduled_in": "Planifié dans",
|
||||
"selling_dealer": "Revendeur vendeur",
|
||||
"selling_dealer_contact": "Contacter le revendeur",
|
||||
"servicecar": "Voiture de service",
|
||||
"servicing_dealer": "Concessionnaire",
|
||||
"servicing_dealer_contact": "Contacter le concessionnaire",
|
||||
"specialcoveragepolicy": "Politique de couverture spéciale",
|
||||
"status": "Statut de l'emploi",
|
||||
"unitnumber": "Unité #",
|
||||
|
||||
Reference in New Issue
Block a user