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 && ( - - - + <> + + + + + + + )} + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + { // - // + // // // - // + // // } - + 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": {