From 96f292f61ce4f874beadcc02df6c22235283a7bc Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 4 Oct 2021 07:57:14 -0700
Subject: [PATCH 1/6] JSR CHange
---
client/src/utils/RenderTemplate.js | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/client/src/utils/RenderTemplate.js b/client/src/utils/RenderTemplate.js
index d8fcc27d6..5b0122c91 100644
--- a/client/src/utils/RenderTemplate.js
+++ b/client/src/utils/RenderTemplate.js
@@ -209,17 +209,21 @@ const fetchContextData = async (templateObject) => {
`${server}/odata/assets?$filter=name eq '${templateObject.name}.query'`
);
- let templateQueryToExecute,
- useShopSpecificTemplate = false;
+ let templateQueryToExecute;
+ let useShopSpecificTemplate = false;
// let shopSpecificTemplate;
if (shopSpecificFolder) {
let shopSpecificTemplate = jsReportQueries.data.value.find(
(f) => f?.folder?.shortid === shopSpecificFolder.shortid
);
- useShopSpecificTemplate = true;
- templateQueryToExecute = atob(shopSpecificTemplate.content);
- } else {
+ if (shopSpecificTemplate) {
+ useShopSpecificTemplate = true;
+ templateQueryToExecute = atob(shopSpecificTemplate.content);
+ }
+ }
+
+ if (!templateQueryToExecute) {
const generalTemplate = jsReportQueries.data.value.find((f) => !f.folder);
useShopSpecificTemplate = false;
templateQueryToExecute = atob(generalTemplate.content);
From 4995e44e069f2deef9a9e950d4964f73ea37b9bf Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 4 Oct 2021 11:43:33 -0700
Subject: [PATCH 2/6] IO-1424 Add other referral source
---
bodyshop_translations.babel | 21 +++++++++
.../jobs-convert-button.component.jsx | 45 +++++++++++--------
.../jobs-create-jobs-info.component.jsx | 6 +++
.../jobs-detail-general.component.jsx | 6 +++
client/src/graphql/jobs.queries.js | 5 +++
client/src/translations/en_us/common.json | 1 +
client/src/translations/es/common.json | 1 +
client/src/translations/fr/common.json | 1 +
hasura/metadata/tables.yaml | 3 ++
.../down.sql | 4 ++
.../up.sql | 2 +
.../down.sql | 1 +
.../up.sql | 1 +
server/graphql-client/queries.js | 1 +
14 files changed, 80 insertions(+), 18 deletions(-)
create mode 100644 hasura/migrations/1633371928424_alter_table_public_jobs_add_column_referral_soure_other/down.sql
create mode 100644 hasura/migrations/1633371928424_alter_table_public_jobs_add_column_referral_soure_other/up.sql
create mode 100644 hasura/migrations/1633371952863_alter_table_public_jobs_alter_column_referral_soure_other/down.sql
create mode 100644 hasura/migrations/1633371952863_alter_table_public_jobs_alter_column_referral_soure_other/up.sql
diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel
index f5995934e..27e4063e0 100644
--- a/bodyshop_translations.babel
+++ b/bodyshop_translations.babel
@@ -22303,6 +22303,27 @@
+
+ referral_source_other
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
referralsource
false
diff --git a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx
index 2c42c7b58..b2c2b42e1 100644
--- a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx
+++ b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx
@@ -2,6 +2,7 @@ import { useMutation } from "@apollo/client";
import {
Button,
Form,
+ Input,
notification,
Popover,
Select,
@@ -112,24 +113,32 @@ export function JobsConvertButton({
)}
{bodyshop.enforce_referral && (
-
-
-
+ <>
+
+
+
+
+
+
+ >
)}
+
+
+
+
+
+
+
+ comments
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
cost
false
diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx
index e47221051..c9ce0c9a9 100644
--- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx
+++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx
@@ -27,6 +27,7 @@ import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter } from "../../utils/DateFormatter";
import { alphaSort } from "../../utils/sorters";
import { TemplateList } from "../../utils/TemplateConstants";
+import DataLabel from "../data-label/data-label.component";
import PartsOrderBackorderEta from "../parts-order-backorder-eta/parts-order-backorder-eta.component";
import PartsOrderLineBackorderButton from "../parts-order-line-backorder-button/parts-order-line-backorder-button.component";
import PartsReceiveModalContainer from "../parts-receive-modal/parts-receive-modal.container";
@@ -379,6 +380,9 @@ export function PartsOrderListTableComponent({
rowKey="id"
dataSource={record.parts_order_lines}
/>
+
+ {record.comments}
+
);
};
diff --git a/client/src/components/parts-order-modal/parts-order-modal.component.jsx b/client/src/components/parts-order-modal/parts-order-modal.component.jsx
index 5318220f2..4da7ade50 100644
--- a/client/src/components/parts-order-modal/parts-order-modal.component.jsx
+++ b/client/src/components/parts-order-modal/parts-order-modal.component.jsx
@@ -152,6 +152,9 @@ export default function PartsOrderModalComponent({
);
}}
+
+
+
setSendType(e.target.value)}
diff --git a/client/src/graphql/bills.queries.js b/client/src/graphql/bills.queries.js
index aa6948d6a..cb9aa755d 100644
--- a/client/src/graphql/bills.queries.js
+++ b/client/src/graphql/bills.queries.js
@@ -93,6 +93,7 @@ export const QUERY_BILLS_BY_JOBID = gql`
backordered_on
}
order_number
+ comments
user_email
}
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 10c9313b2..828fd848e 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -564,6 +564,7 @@ export const GET_JOB_BY_PK = gql`
parts_order {
id
order_number
+ comments
order_date
user_email
vendor {
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 5c3b7c97d..a2bda3884 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -1813,6 +1813,7 @@
"act_price": "Price",
"backordered_eta": "B.O. ETA",
"backordered_on": "B.O. On",
+ "comments": "Comments",
"cost": "Cost",
"db_price": "List Price",
"deliver_by": "Date",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index c22513b73..766b50960 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -1813,6 +1813,7 @@
"act_price": "",
"backordered_eta": "",
"backordered_on": "",
+ "comments": "",
"cost": "",
"db_price": "",
"deliver_by": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index c0d327234..ad1276a61 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -1813,6 +1813,7 @@
"act_price": "",
"backordered_eta": "",
"backordered_on": "",
+ "comments": "",
"cost": "",
"db_price": "",
"deliver_by": "",
diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml
index 0bc94cb5c..08edb71cb 100644
--- a/hasura/metadata/tables.yaml
+++ b/hasura/metadata/tables.yaml
@@ -3782,6 +3782,7 @@
- active:
_eq: true
columns:
+ - comments
- created_at
- deliver_by
- id
@@ -3799,6 +3800,7 @@
- role: user
permission:
columns:
+ - comments
- created_at
- deliver_by
- id
@@ -3826,6 +3828,7 @@
- role: user
permission:
columns:
+ - comments
- created_at
- deliver_by
- id
diff --git a/hasura/migrations/1633373374089_alter_table_public_parts_orders_add_column_comments/down.sql b/hasura/migrations/1633373374089_alter_table_public_parts_orders_add_column_comments/down.sql
new file mode 100644
index 000000000..390edb6b9
--- /dev/null
+++ b/hasura/migrations/1633373374089_alter_table_public_parts_orders_add_column_comments/down.sql
@@ -0,0 +1,4 @@
+-- Could not auto-generate a down migration.
+-- Please write an appropriate down migration for the SQL below:
+-- alter table "public"."parts_orders" add column "comments" text
+-- null;
diff --git a/hasura/migrations/1633373374089_alter_table_public_parts_orders_add_column_comments/up.sql b/hasura/migrations/1633373374089_alter_table_public_parts_orders_add_column_comments/up.sql
new file mode 100644
index 000000000..fe751d2c2
--- /dev/null
+++ b/hasura/migrations/1633373374089_alter_table_public_parts_orders_add_column_comments/up.sql
@@ -0,0 +1,2 @@
+alter table "public"."parts_orders" add column "comments" text
+ null;
From 70ef2748213bdd49771a4ec89e6a170048d9c9ff Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 4 Oct 2021 12:08:29 -0700
Subject: [PATCH 5/6] IO-1404 IO-1403 Remove negative value options for
---
.../jobs-detail-rates.component.jsx | 55 ++++++++++---------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.component.jsx
index 86c226794..1ea27d45f 100644
--- a/client/src/components/jobs-detail-rates/jobs-detail-rates.component.jsx
+++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.component.jsx
@@ -38,7 +38,7 @@ export function JobsDetailRates({ jobRO, form, job, bodyshop }) {
label={t("jobs.fields.depreciation_taxes")}
name="depreciation_taxes"
>
-
+
-
+
-
+
-
+
-
+
@@ -135,72 +136,72 @@ export function JobsDetailRates({ jobRO, form, job, bodyshop }) {
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
{
//
- //
+ //
//
//
- //
+ //
//
}
-
+
From 632549dd9d6b93d5af4988e30d6f95c97913f024 Mon Sep 17 00:00:00 2001
From: Patrick Fic <>
Date: Mon, 4 Oct 2021 12:08:47 -0700
Subject: [PATCH 6/6] IO-1406 Parts Order label update
---
client/src/translations/en_us/common.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index a2bda3884..e85376b2e 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -2024,7 +2024,7 @@
},
"subjects": {
"jobs": {
- "parts_order": "$t(printcenter.jobs.parts_order) PO: {{ro_number}}"
+ "parts_order": "Parts Order PO: {{ro_number}}"
}
},
"vendors": {