From 9413bc60cf653808d607ec1d9ff8f19ba481c62a Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 2 Jan 2023 13:56:35 -0800 Subject: [PATCH] IO-2134 Add CSR to conversion. --- bodyshop_translations.babel | 21 +++++++++ .../jobs-convert-button.component.jsx | 46 ++++++++++++++++++- .../shop-info/shop-info.general.component.jsx | 7 +++ client/src/graphql/bodyshop.queries.js | 2 + client/src/graphql/jobs.queries.js | 10 ++++ 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 | 2 + .../down.sql | 4 ++ .../up.sql | 2 + 11 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 hasura/migrations/1672695435314_alter_table_public_bodyshops_add_column_enforce_conversion_csr/down.sql create mode 100644 hasura/migrations/1672695435314_alter_table_public_bodyshops_add_column_enforce_conversion_csr/up.sql diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 4e36ac96e..1f8f8bb05 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -4509,6 +4509,27 @@ + + enforce_conversion_csr + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + enforce_referral 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 2f5e5b39a..1a7f85d75 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 @@ -83,7 +83,11 @@ export function JobsConvertButton({ layout="vertical" form={form} onFinish={handleConvert} - initialValues={{ driveable: true, towin: false }} + initialValues={{ + driveable: true, + towin: false, + employee_csr: job.employee_csr, + }} > )} + {bodyshop.enforce_conversion_csr && ( + + + + )} setVisible(true)} + onClick={() => { + setVisible(true); + form.resetFields(); + }} > {t("jobs.actions.convert")} diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index f6f2ba641..8d9a63706 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -466,6 +466,13 @@ export default function ShopInfoGeneral({ form }) { > + + +