From e46307e7156136f78b94f86b704b1af173608582 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Thu, 9 Sep 2021 13:09:05 -0700
Subject: [PATCH 1/6] IO-1350 Audatex import issues.
---
bodyshop_translations.babel | 21 +++++
...p-info.responsibilitycenters.component.jsx | 78 +++++++++++++++++++
client/src/translations/en_us/common.json | 1 +
client/src/translations/es/common.json | 1 +
client/src/translations/fr/common.json | 1 +
server/job/job-totals.js | 12 ++-
6 files changed, 113 insertions(+), 1 deletion(-)
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 4bb07a045..9d91b0a8c 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -6344,6 +6344,27 @@
+
+ pasl
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
refund
false
diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx
index c50b7b9b0..0da65dd3d 100644
--- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx
+++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx
@@ -871,6 +871,27 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
))}
+
+
+
+
+
+
+
+
+
+
+
+
0 ? 1 : -1)
+ )
),
},
};
@@ -306,6 +315,7 @@ function CalculatePartsTotals(jobLines) {
},
sublets: {
subtotal: Dinero({ amount: 0 }),
+
total: Dinero({ amount: 0 }),
},
}
From 4059aa987582b851524d96e9c650ea2e47ec025f Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Thu, 9 Sep 2021 15:35:24 -0700
Subject: [PATCH 2/6] IO-43 Updated related ROs approach.
---
.../jobs-detail-header.component.jsx | 9 +-
.../jobs-related-ros.component.jsx | 117 ++----------------
client/src/graphql/jobs.queries.js | 6 +
3 files changed, 22 insertions(+), 110 deletions(-)
diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx
index 8f59adfb1..83ade9d5c 100644
--- a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx
+++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx
@@ -81,11 +81,7 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
/
{job.owner_owing}
- {job.converted && (
-
-
-
- )}
+
{job.alt_transport}
@@ -183,6 +179,9 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
{`${job.v_vin || t("general.labels.na")}`}
+
+
+
diff --git a/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx b/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx
index a94d1a650..dce3f0393 100644
--- a/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx
+++ b/client/src/components/jobs-related-ros/jobs-related-ros.component.jsx
@@ -1,112 +1,19 @@
-import React, { useState } from "react";
-import { useQuery, useMutation } from "@apollo/client";
-import { Tag, Space, Button, Popover, Card, Form } from "antd";
-import {
- DELETE_RELATED_RO,
- INSERT_RELATED_ROS,
- QUERY_RELATED_ROS,
-} from "../../graphql/jobs.queries";
-import LoadingSpinner from "../loading-spinner/loading-spinner.component";
-import AlertComponent from "../alert/alert.component";
-import { PlusCircleOutlined } from "@ant-design/icons";
-import JobSearchSelectComponent from "../job-search-select/job-search-select.component";
-import { useTranslation } from "react-i18next";
+import { Space, Tag } from "antd";
+import React from "react";
import { Link } from "react-router-dom";
-export default function JobsRelatedRos({ jobid }) {
- const [roSearchVisible, setRoSearchVisible] = useState(false);
- const [saveLoading, setSaveLoading] = useState(false);
- const [insertRelationship] = useMutation(INSERT_RELATED_ROS);
- const [deleteRelationship] = useMutation(DELETE_RELATED_RO);
- const { loading, error, data } = useQuery(QUERY_RELATED_ROS, {
- variables: { jobid },
- skip: !jobid,
- });
- const { t } = useTranslation();
- if (loading) return ;
- if (error) return ;
-
- const relatedJobs = data.relatedjobs.map((r) => {
- if (r.parentjob === jobid) {
- return { relationshipid: r.id, ...r.childjob_rel };
- }
- return { relationshipid: r.id, ...r.parentjob_rel };
- });
-
- const handleAddRo = async ({ relatedjobid }) => {
- setSaveLoading(true);
-
- await insertRelationship({
- variables: { relationship: { parentjob: jobid, childjob: relatedjobid } },
- update(cache, { data }) {
- cache.modify({
- fields: {
- relatedjobs(rj, { readField }) {
- return [rj, data.insert_relatedjobs_one];
- },
- },
- });
- },
- });
- setSaveLoading(false);
- setRoSearchVisible(false);
- };
- const handleDelete = async (id) => {
- setSaveLoading(true);
-
- await deleteRelationship({
- variables: {
- relationshipid: id,
- },
-
- update(cache, { data }) {
- cache.modify({
- fields: {
- relatedjobs(rj, { readField }) {
- return rj.filter((r) => r.id !== id);
- },
- },
- });
- },
- });
- setSaveLoading(false);
- setRoSearchVisible(false);
- };
-
- const popContent = (
-
-
-
-
-
-
-
-
-
-
- );
-
+export default function JobsRelatedRos({ jobid, job }) {
return (
- {relatedJobs.map((r) => (
- handleDelete(r.relationshipid)}>
- {r.ro_number}
-
- ))}
-
-
-
+ {job.vehicle.jobs
+ .filter((j) => j.id !== job.id)
+ .map((j) => (
+
+ {`${j.ro_number || "N/A"}${
+ j.clm_no ? ` | ${j.clm_no}` : ""
+ }${j.status ? ` | ${j.status}` : ""}`}
+
+ ))}
);
}
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 4f957d051..d0e9a3daf 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -384,6 +384,12 @@ export const GET_JOB_BY_PK = gql`
v_model_desc
v_make_desc
v_color
+ jobs {
+ id
+ ro_number
+ status
+ clm_no
+ }
}
available_jobs {
id
From ef6cdf07d8ba36db495eb97601f7496fb53098a6 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Fri, 10 Sep 2021 13:09:21 -0700
Subject: [PATCH 3/6] IO-1352 Remove positive hrs check on receivables export.
---
server/accounting/qbxml/qbxml-receivables.js | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/server/accounting/qbxml/qbxml-receivables.js b/server/accounting/qbxml/qbxml-receivables.js
index dd49732f8..77f310cc2 100644
--- a/server/accounting/qbxml/qbxml-receivables.js
+++ b/server/accounting/qbxml/qbxml-receivables.js
@@ -294,11 +294,7 @@ const generateInvoiceQbxml = (
}
}
// Labor Lines
- if (
- jobline.profitcenter_labor &&
- jobline.mod_lb_hrs &&
- jobline.mod_lb_hrs > 0
- ) {
+ if (jobline.profitcenter_labor && jobline.mod_lb_hrs) {
const DineroAmount = Dinero({
amount: Math.round(
jobs_by_pk[`rate_${jobline.mod_lbr_ty.toLowerCase()}`] * 100
From 8dc2197677fe63bfa27de583ef42070858f15ffe Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Fri, 10 Sep 2021 15:12:00 -0700
Subject: [PATCH 4/6] IO-1353 Add missing default resp. centers.
---
...p-info.responsibilitycenters.component.jsx | 312 ++++++++++++++++++
1 file changed, 312 insertions(+)
diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx
index 0da65dd3d..96c3f056a 100644
--- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx
+++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx
@@ -682,6 +682,90 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
))}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Date: Mon, 13 Sep 2021 08:08:43 -0700
Subject: [PATCH 5/6] Resolve missing query.
---
client/src/graphql/jobs.queries.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index d0e9a3daf..497022cd9 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -706,6 +706,11 @@ export const QUERY_JOB_CARD_DETAILS = gql`
v_model_desc
v_color
plate_no
+ jobs {
+ id
+ clm_no
+ ro_number
+ }
}
actual_completion
actual_delivery
From eb120a264eb4643d3ea1a17e1dce7ece34358580 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 13 Sep 2021 09:49:38 -0700
Subject: [PATCH 6/6] Add missing translations.
---
bodyshop_translations.babel | 721 +++++++++++++++++++++-
client/src/translations/en_us/common.json | 38 +-
client/src/translations/es/common.json | 38 +-
client/src/translations/fr/common.json | 38 +-
4 files changed, 831 insertions(+), 4 deletions(-)
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index 9d91b0a8c..60f3c25de 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -1,4 +1,4 @@
-
+