From f5003080db8df2e8d978c339ea8b2b9491a0caea Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Tue, 20 Jul 2021 16:37:19 -0700
Subject: [PATCH 1/3] Removed unnecessary import.
---
client/src/components/email-overlay/email-overlay.component.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/components/email-overlay/email-overlay.component.jsx b/client/src/components/email-overlay/email-overlay.component.jsx
index 756f7b45f..d22000152 100644
--- a/client/src/components/email-overlay/email-overlay.component.jsx
+++ b/client/src/components/email-overlay/email-overlay.component.jsx
@@ -1,5 +1,5 @@
import { UploadOutlined } from "@ant-design/icons";
-import { Divider, Form, Input, Select, Tabs, Typography, Upload } from "antd";
+import { Divider, Form, Input, Select, Tabs, Upload } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import EmailDocumentsComponent from "../email-documents/email-documents.component";
From 27d9322ced3ac0653ff999362446938d7d90f8dd Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Wed, 21 Jul 2021 08:50:29 -0700
Subject: [PATCH 2/3] IO-594 Include AH Requested changes
---
server/data/autohouse.js | 12 ++++++++----
server/graphql-client/queries.js | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/server/data/autohouse.js b/server/data/autohouse.js
index 64a7bf6cd..bed1e2a1f 100644
--- a/server/data/autohouse.js
+++ b/server/data/autohouse.js
@@ -125,9 +125,9 @@ const CreateRepairOrderTag = (job, errorCallback) => {
const ret = {
RepairOrderInformation: {
ShopInternalName: job.bodyshop.autohouseid,
- ID: job.id,
+ ID: parseInt(job.ro_number.match(/\d/g).join(""), 10),
RO: job.ro_number,
- Est: job.id, //We no longer use estimate id.
+ Est: parseInt(job.ro_number.match(/\d/g).join(""), 10), //We no longer use estimate id.
GUID: job.id,
TransType: StatusMapping(job.status, job.bodyshop.md_ro_statuses),
ShopName: job.bodyshop.shopname,
@@ -136,8 +136,12 @@ const CreateRepairOrderTag = (job, errorCallback) => {
ShopState: job.bodyshop.state,
ShopZip: job.bodyshop.zip_post,
ShopPhone: job.bodyshop.phone,
- EstimatorID: `${job.est_ct_fn || ""} ${job.est_ct_ln || ""}`,
- EstimatorName: `${job.est_ct_fn || ""} ${job.est_ct_ln || ""}`,
+ EstimatorID: `${job.est_ct_ln ? job.est_ct_ln : ""}${
+ job.est_ct_ln ? ", " : ""
+ }${job.est_ct_fn ? job.est_ct_fn : ""}`,
+ EstimatorName: `${job.est_ct_ln ? job.est_ct_ln : ""}${
+ job.est_ct_ln ? ", " : ""
+ }${job.est_ct_fn ? job.est_ct_fn : ""}`,
},
CustomerInformation: {
FirstName: job.ownr_fn,
diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js
index 62a7eb4d9..d9d66aeca 100644
--- a/server/graphql-client/queries.js
+++ b/server/graphql-client/queries.js
@@ -358,7 +358,7 @@ exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employee
}`;
exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshopid: uuid!) {
- jobs(where: {_and: [{updated_at: {_gt: $start}}, {shopid: {_eq: $bodyshopid}}]}) {
+ jobs(where: {_and: [{converted :{_eq: true}},{updated_at: {_gt: $start}}, {shopid: {_eq: $bodyshopid}}]}) {
id
ro_number
status
From ae4a86453307e972e20c9105ab679b838f2c3d61 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Wed, 21 Jul 2021 11:19:23 -0700
Subject: [PATCH 3/3] IO-1264 IO-1271 Report Center additions & format.
---
bodyshop_translations.babel | 126 ++++++++++++++++++
.../job-3rd-party-modal.component.jsx | 2 +-
.../report-center-modal.component.jsx | 25 +++-
.../report-center-modal.container.jsx | 2 +-
.../report-center-modal.styles.scss | 11 ++
client/src/translations/en_us/common.json | 8 +-
client/src/translations/es/common.json | 6 +
client/src/translations/fr/common.json | 6 +
client/src/utils/TemplateConstants.js | 73 ++++++++++
9 files changed, 249 insertions(+), 10 deletions(-)
create mode 100644 client/src/components/report-center-modal/report-center-modal.styles.scss
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index e407d53ed..2f1cf0bf6 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -29998,6 +29998,27 @@
+
+ refnumber
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
sendtype
false
@@ -32841,6 +32862,27 @@
+
+ hours_sold_detail_closed_csr
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
hours_sold_detail_closed_ins_co
false
@@ -32883,6 +32925,27 @@
+
+ hours_sold_detail_open_csr
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
hours_sold_detail_open_ins_co
false
@@ -32925,6 +32988,27 @@
+
+ hours_sold_summary_closed_csr
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
hours_sold_summary_closed_ins_co
false
@@ -32967,6 +33051,27 @@
+
+ hours_sold_summary_open_csr
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
hours_sold_summary_open_ins_co
false
@@ -32988,6 +33093,27 @@
+
+ job_costing_ro_csr
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
job_costing_ro_date_detail
false
diff --git a/client/src/components/job-3rd-party-modal/job-3rd-party-modal.component.jsx b/client/src/components/job-3rd-party-modal/job-3rd-party-modal.component.jsx
index f597d156e..2954bbe0d 100644
--- a/client/src/components/job-3rd-party-modal/job-3rd-party-modal.component.jsx
+++ b/client/src/components/job-3rd-party-modal/job-3rd-party-modal.component.jsx
@@ -161,7 +161,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId }) {
diff --git a/client/src/components/report-center-modal/report-center-modal.component.jsx b/client/src/components/report-center-modal/report-center-modal.component.jsx
index 51444f1e3..75cbf0454 100644
--- a/client/src/components/report-center-modal/report-center-modal.component.jsx
+++ b/client/src/components/report-center-modal/report-center-modal.component.jsx
@@ -1,5 +1,5 @@
import { useLazyQuery } from "@apollo/client";
-import { Button, DatePicker, Form, Radio } from "antd";
+import { Button, DatePicker, Form, Radio, Space } from "antd";
import moment from "moment";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -13,6 +13,7 @@ import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants";
import EmployeeSearchSelect from "../employee-search-select/employee-search-select.component";
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
+import "./report-center-modal.styles.scss";
const mapStateToProps = createStructuredSelector({
reportCenterModal: selectReportCenter,
@@ -86,6 +87,7 @@ export function ReportCenterModalComponent({ reportCenterModal }) {
-
- {Object.keys(Templates).map((key) => (
-
- {Templates[key].title}
-
- ))}
+
+
+ {Object.keys(Templates).map((key) => (
+
+ {Templates[key].title}
+
+ ))}
+
diff --git a/client/src/components/report-center-modal/report-center-modal.container.jsx b/client/src/components/report-center-modal/report-center-modal.container.jsx
index ea8167e7d..f0d361785 100644
--- a/client/src/components/report-center-modal/report-center-modal.container.jsx
+++ b/client/src/components/report-center-modal/report-center-modal.container.jsx
@@ -31,7 +31,7 @@ export function ReportCenterModalContainer({
onCancel={() => toggleModalVisible()}
cancelButtonProps={{ style: { display: "none" } }}
destroyOnClose
- width="60%"
+ width="80%"
>
diff --git a/client/src/components/report-center-modal/report-center-modal.styles.scss b/client/src/components/report-center-modal/report-center-modal.styles.scss
new file mode 100644
index 000000000..ccd2dcfee
--- /dev/null
+++ b/client/src/components/report-center-modal/report-center-modal.styles.scss
@@ -0,0 +1,11 @@
+.radio-group-columns {
+ .ant-radio-group {
+ // display: block;
+ }
+ .ant-radio-wrapper {
+ display: block;
+ span {
+ word-wrap: break-word;
+ }
+ }
+}
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 0a7420617..58a8bfd4c 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1809,6 +1809,7 @@
"depreciation": "Depreciation",
"other": "Other",
"ponumber": "PO Number",
+ "refnumber": "Reference Number",
"sendtype": "Send by",
"state": "Province/State",
"zip": "Postal Code/Zip"
@@ -1971,19 +1972,24 @@
"gsr_by_delivery_date": "Gross Sales by Delivery Date",
"gsr_by_estimator": "Gross Sales by Estimator",
"gsr_by_exported_date": "Gross Sales by Export Date",
- "gsr_by_ins_co": "Gross Sales by Insurance Company'",
+ "gsr_by_ins_co": "Gross Sales by Insurance Company",
"gsr_by_make": "Gross Sales by Vehicle Make",
"gsr_by_referral": "Gross Sales by Referral Source",
"gsr_by_ro": "Gross Sales by RO",
"gsr_labor_only": "Gross Sales - Labor Only",
"hours_sold_detail_closed": "Hours Sold Detail - Closed",
+ "hours_sold_detail_closed_csr": "Hours Sold Detail - Closed by CSR",
"hours_sold_detail_closed_ins_co": "Hours Sold Detail - Closed by Source",
"hours_sold_detail_open": "Hours Sold Detail - Open",
+ "hours_sold_detail_open_csr": "Hours Sold Detail - Open by CSR",
"hours_sold_detail_open_ins_co": "Hours Sold Detail - Open by Source",
"hours_sold_summary_closed": "Hours Sold Summary - Closed",
+ "hours_sold_summary_closed_csr": "Hours Sold Summary - Closed by CSR",
"hours_sold_summary_closed_ins_co": "Hours Sold Summary - Closed by Source",
"hours_sold_summary_open": "Hours Sold Summary - Open",
+ "hours_sold_summary_open_csr": "Hours Sold Summary - Open CSR",
"hours_sold_summary_open_ins_co": "Hours Sold Summary - Open by Source",
+ "job_costing_ro_csr": "Job Costing by CSR",
"job_costing_ro_date_detail": "Job Costing by RO - Detail",
"job_costing_ro_date_summary": "Job Costing by RO - Summary",
"job_costing_ro_estimator": "Job Costing by Estimator",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 99407b22c..8eeb24895 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1809,6 +1809,7 @@
"depreciation": "",
"other": "",
"ponumber": "",
+ "refnumber": "",
"sendtype": "",
"state": "",
"zip": ""
@@ -1977,13 +1978,18 @@
"gsr_by_ro": "",
"gsr_labor_only": "",
"hours_sold_detail_closed": "",
+ "hours_sold_detail_closed_csr": "",
"hours_sold_detail_closed_ins_co": "",
"hours_sold_detail_open": "",
+ "hours_sold_detail_open_csr": "",
"hours_sold_detail_open_ins_co": "",
"hours_sold_summary_closed": "",
+ "hours_sold_summary_closed_csr": "",
"hours_sold_summary_closed_ins_co": "",
"hours_sold_summary_open": "",
+ "hours_sold_summary_open_csr": "",
"hours_sold_summary_open_ins_co": "",
+ "job_costing_ro_csr": "",
"job_costing_ro_date_detail": "",
"job_costing_ro_date_summary": "",
"job_costing_ro_estimator": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index 003fb315f..33c8630d5 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1809,6 +1809,7 @@
"depreciation": "",
"other": "",
"ponumber": "",
+ "refnumber": "",
"sendtype": "",
"state": "",
"zip": ""
@@ -1977,13 +1978,18 @@
"gsr_by_ro": "",
"gsr_labor_only": "",
"hours_sold_detail_closed": "",
+ "hours_sold_detail_closed_csr": "",
"hours_sold_detail_closed_ins_co": "",
"hours_sold_detail_open": "",
+ "hours_sold_detail_open_csr": "",
"hours_sold_detail_open_ins_co": "",
"hours_sold_summary_closed": "",
+ "hours_sold_summary_closed_csr": "",
"hours_sold_summary_closed_ins_co": "",
"hours_sold_summary_open": "",
+ "hours_sold_summary_open_csr": "",
"hours_sold_summary_open_ins_co": "",
+ "job_costing_ro_csr": "",
"job_costing_ro_date_detail": "",
"job_costing_ro_date_summary": "",
"job_costing_ro_estimator": "",
diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js
index b6627b452..814ca715b 100644
--- a/client/src/utils/TemplateConstants.js
+++ b/client/src/utils/TemplateConstants.js
@@ -752,6 +752,67 @@ export const TemplateList = (type, context) => {
field: i18n.t("jobs.fields.date_open"),
},
},
+
+ hours_sold_detail_closed_csr: {
+ title: i18n.t(
+ "reportcenter.templates.hours_sold_detail_closed_csr"
+ ),
+ description: "",
+ subject: i18n.t(
+ "reportcenter.templates.hours_sold_detail_closed_csr"
+ ),
+ key: "hours_sold_detail_closed_csr",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.date_invoiced"),
+ },
+ },
+ hours_sold_detail_open_csr: {
+ title: i18n.t("reportcenter.templates.hours_sold_detail_open_csr"),
+ description: "",
+ subject: i18n.t(
+ "reportcenter.templates.hours_sold_detail_open_csr"
+ ),
+ key: "hours_sold_detail_open_csr",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.date_open"),
+ },
+ },
+ hours_sold_summary_closed_csr: {
+ title: i18n.t(
+ "reportcenter.templates.hours_sold_summary_closed_csr"
+ ),
+ description: "",
+ subject: i18n.t(
+ "reportcenter.templates.hours_sold_summary_closed_csr"
+ ),
+ key: "hours_sold_summary_closed_csr",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.date_invoiced"),
+ },
+ },
+ hours_sold_summary_open_csr: {
+ title: i18n.t("reportcenter.templates.hours_sold_summary_open_csr"),
+ description: "",
+ subject: i18n.t(
+ "reportcenter.templates.hours_sold_summary_open_csr"
+ ),
+ key: "hours_sold_summary_open_csr",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.date_invoiced"),
+ },
+ },
estimator_detail: {
title: i18n.t("reportcenter.templates.estimator_detail"),
description: "",
@@ -814,6 +875,18 @@ export const TemplateList = (type, context) => {
field: i18n.t("jobs.fields.date_invoiced"),
},
},
+ job_costing_ro_csr: {
+ title: i18n.t("reportcenter.templates.job_costing_ro_csr"),
+ description: "",
+ subject: i18n.t("reportcenter.templates.job_costing_ro_csr"),
+ key: "job_costing_ro_csr",
+ //idtype: "vendor",
+ disabled: false,
+ rangeFilter: {
+ object: i18n.t("reportcenter.labels.objects.jobs"),
+ field: i18n.t("jobs.fields.date_open"),
+ },
+ },
job_costing_ro_ins_co: {
title: i18n.t("reportcenter.templates.job_costing_ro_ins_co"),
description: "",