repairtotal
false
diff --git a/client/src/components/jobs-detail-insurance/jobs-detail-insurance.component.jsx b/client/src/components/jobs-detail-insurance/jobs-detail-insurance.component.jsx
new file mode 100644
index 000000000..15d39bad5
--- /dev/null
+++ b/client/src/components/jobs-detail-insurance/jobs-detail-insurance.component.jsx
@@ -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 (
+
+
+ {getFieldDecorator("ins_co_id", {
+ initialValue: job.ins_co_id
+ })()}
+
+
+ {getFieldDecorator("policy_no", {
+ initialValue: job.policy_no
+ })()}
+
+
+ {getFieldDecorator("clm_no", {
+ initialValue: job.clm_no
+ })()}
+
+
+ {getFieldDecorator("regie_number", {
+ initialValue: job.regie_number
+ })()}
+
+ TODO: missing KOL field???
+
+ {getFieldDecorator("loss_date", {
+ initialValue: job.loss_date
+ })()}
+
+ DAMAGE {JSON.stringify(job.area_of_damage)}
+ CAA # seems not correct based on field mapping Class seems not correct
+ based on field mapping
+
+ {getFieldDecorator("ins_co_nm", {
+ initialValue: job.ins_co_nm
+ })()}
+
+
+ {getFieldDecorator("ins_addr1", {
+ initialValue: job.ins_addr1
+ })()}
+
+
+ {getFieldDecorator("ins_city", {
+ initialValue: job.ins_city
+ })()}
+
+
+ {getFieldDecorator("ins_ct_ln", {
+ initialValue: job.ins_ct_ln
+ })()}
+
+
+ {getFieldDecorator("ins_ct_fn", {
+ initialValue: job.ins_ct_fn
+ })()}
+
+
+ {getFieldDecorator("ins_ph1", {
+ initialValue: job.ins_ph1
+ })()}
+
+
+ {getFieldDecorator("ins_ea", {
+ initialValue: job.ins_ea,
+ rules: [
+ {
+ type: "email",
+ message: "This is not a valid email address."
+ }
+ ]
+ })()}
+
+
+ {getFieldDecorator("est_ea", {
+ initialValue: job.est_ea,
+ rules: [
+ {
+ type: "email",
+ message: "This is not a valid email address."
+ }
+ ]
+ })()}
+
+
+
+
+ );
+}
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 93c36d10c..2024332b7 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -98,12 +98,46 @@ export const SUBSCRIPTION_JOBS_IN_PRODUCTION = gql`
export const GET_JOB_BY_PK = gql`
query GET_JOB_BY_PK($id: uuid!) {
jobs_by_pk(id: $id) {
+ service_car
+ csr
+ loss_desc
+ kmin
+ kmout
+ referral_source
+ unit_number
+ po_number
+ special_coverage_policy
+ scheduled_delivery
converted
+ est_number
+ ro_number
+ vehicle {
+ id
+ plate_no
+ v_vin
+ v_model_yr
+ v_model_desc
+ 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
- est_number
+
id
local_tax_rate
owner {
@@ -118,19 +152,10 @@ export const GET_JOB_BY_PK = gql`
est_ct_fn
est_ct_ln
regie_number
- ro_number
+
scheduled_completion
scheduled_in
- service_car
- csr
- loss_desc
- kmin
- kmout
- referral_source
- unit_number
- po_number
- special_coverage_policy
- scheduled_delivery
+
job_status {
id
name
@@ -138,15 +163,7 @@ export const GET_JOB_BY_PK = gql`
updated_at
claim_total
deductible
- vehicle {
- id
- plate_no
- v_vin
- v_model_yr
- v_model_desc
- v_make_desc
- v_color
- }
+
}
}
`;
diff --git a/client/src/pages/jobs-detail/jobs-detail.page.component.jsx b/client/src/pages/jobs-detail/jobs-detail.page.component.jsx
index 9faa7bdcc..512f5b130 100644
--- a/client/src/pages/jobs-detail/jobs-detail.page.component.jsx
+++ b/client/src/pages/jobs-detail/jobs-detail.page.component.jsx
@@ -14,6 +14,7 @@ import JobsDocumentsContainer from "../../components/jobs-documents/jobs-documen
import JobNotesContainer from "../../components/jobs-notes/jobs-notes.container";
import JobsRatesContainer from "../../components/jobs-rates/jobs-rates.container";
import JobDetailFormContext from "./jobs-detail.page.context";
+import JobsDetailInsurance from "../../components/jobs-detail-insurance/jobs-detail-insurance.component";
export default function JobsDetailPage({
job,
@@ -79,7 +80,7 @@ export default function JobsDetailPage({
}
key='insurance'>
- Insurance
+