-
-
- {isFieldTouched("est_ct_ln") ? "Yes" : "No"}
- {getFieldDecorator("est_ct_ln", {
- initialValue: job.est_ct_ln
- })()}
-
-
- {getFieldDecorator("est_ct_fn", {
- initialValue: job.est_ct_fn
- })()}
-
-
- {getFieldDecorator("est_ph1", {
- initialValue: job.est_ph1
- })()}
-
-
- {getFieldDecorator("est_ea", {
- initialValue: job.est_ea,
-
- rules: [
- {
- type: "email",
- message: "This is not a valid email address."
- }
- ]
- })()}
-
-
+
+ {getFieldDecorator("csr", {
+ initialValue: job.csr
+ })()}
+
+
+ {getFieldDecorator("loss_desc", {
+ initialValue: job.loss_desc
+ })()}
+
+ TODO: How to handle different taxes and marking them as exempt?
+ {
+ //
+ // {getFieldDecorator("exempt", {
+ // initialValue: job.exempt
+ // })()}
+ //
+ }
+
+ {getFieldDecorator("po_number", {
+ initialValue: job.po_number
+ })()}
+
+
+ {getFieldDecorator("unit_number", {
+ initialValue: job.unit_number
+ })()}
+
+
+ {getFieldDecorator("special_coverage_policy", {
+ initialValue: job.special_coverage_policy,
+ valuePropName: "checked"
+ })()}
+
+
+ {getFieldDecorator("kmin", {
+ initialValue: job.kmin
+ })()}
+
+
+ {getFieldDecorator("kmout", {
+ initialValue: job.kmout
+ })()}
+
+
+ {getFieldDecorator("referral_source", {
+ initialValue: job.referral_source
+ })()}
+
+
+ {getFieldDecorator("est_ph1", {
+ initialValue: job.est_ph1
+ })()}
+
+
+ {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 33f56e24b..93c36d10c 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -122,6 +122,13 @@ export const GET_JOB_BY_PK = gql`
scheduled_completion
scheduled_in
service_car
+ csr
+ loss_desc
+ kmin
+ kmout
+ referral_source
+ unit_number
+ po_number
special_coverage_policy
scheduled_delivery
job_status {
diff --git a/client/src/pages/jobs-detail/jobs-detail.page.container.jsx b/client/src/pages/jobs-detail/jobs-detail.page.container.jsx
index 7003ea7f0..e0c49840b 100644
--- a/client/src/pages/jobs-detail/jobs-detail.page.container.jsx
+++ b/client/src/pages/jobs-detail/jobs-detail.page.container.jsx
@@ -4,11 +4,7 @@ import { useMutation, useQuery } from "react-apollo";
import { useTranslation } from "react-i18next";
import AlertComponent from "../../components/alert/alert.component";
import SpinComponent from "../../components/loading-spinner/loading-spinner.component";
-import {
- CONVERT_JOB_TO_RO,
- GET_JOB_BY_PK,
- UPDATE_JOB
-} from "../../graphql/jobs.queries";
+import { CONVERT_JOB_TO_RO, GET_JOB_BY_PK, UPDATE_JOB } from "../../graphql/jobs.queries";
import JobsDetailPage from "./jobs-detail.page.component";
import JobDetailFormContext from "./jobs-detail.page.context";
@@ -24,12 +20,13 @@ function JobsDetailPageContainer({ match, form }) {
const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO);
useEffect(() => {
- document.title =
- loading && !error
- ? "..."
- : t("titles.jobsdetail", {
- ro_number: data.jobs_by_pk.ro_number
- });
+ document.title = loading
+ ? "..."
+ : error
+ ? t("titles.app")
+ : t("titles.jobsdetail", {
+ ro_number: data.jobs_by_pk.ro_number
+ });
}, [loading, data, t, error]);
const handleSubmit = e => {
@@ -58,6 +55,7 @@ function JobsDetailPageContainer({ match, form }) {
if (loading) return