From a8b555b7732372333b29a4b8176d3f612eba589c Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 4 Jun 2021 08:21:40 -0700 Subject: [PATCH 1/2] IO-1140 Crisp will only set email for valid emails & release notes styles updates. --- client/src/App/App.styles.scss | 6 ++++++ client/src/redux/user/user.sagas.js | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/src/App/App.styles.scss b/client/src/App/App.styles.scss index e9c7200ca..7ee64f7f1 100644 --- a/client/src/App/App.styles.scss +++ b/client/src/App/App.styles.scss @@ -118,3 +118,9 @@ .production-list-min-height { min-height: 19px; } + +#noticeable-widget { + iframe { + z-index: 2 !important; + } +} diff --git a/client/src/redux/user/user.sagas.js b/client/src/redux/user/user.sagas.js index 8fad8ea09..9a969bee0 100644 --- a/client/src/redux/user/user.sagas.js +++ b/client/src/redux/user/user.sagas.js @@ -165,7 +165,7 @@ export function* onSignInSuccess() { export function* signInSuccessSaga({ payload }) { LogRocket.identify(payload.email); try { - window.$crisp.push(["set", "user:email", [payload.email]]); + // window.$crisp.push(["set", "user:email", [payload.email]]); window.$crisp.push([ "set", "user:nickname", @@ -236,6 +236,10 @@ export function* SetAuthLevelFromShopDetails({ payload }) { (a) => a.useremail === userEmail ); + if (authRecord[0] && authRecord[0].user.validemail) { + window.$crisp.push(["set", "user:email", [authRecord[0].user.email]]); + } + yield put(setAuthlevel(authRecord[0] ? authRecord[0].authlevel : 0)); yield put( updateUserDetailsSuccess( From fb5a146dee4dc32479fdf328790444dea5b8963e Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 4 Jun 2021 09:26:15 -0700 Subject: [PATCH 2/2] IO-1182 Restrict manual posting to in house vendor. --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../bill-form/bill-form.component.jsx | 12 +++++++++++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 5 files changed, 36 insertions(+) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 2e39fa216..d987d9ac9 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -2527,6 +2527,27 @@ validation + + manualinhouse + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + unique_invoice_number false diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index b5cfb9322..e8d8e4387 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -106,6 +106,18 @@ export function BillFormComponent({ required: true, //message: t("general.validation.required"), }, + ({ getFieldValue }) => ({ + validator(rule, value) { + if ( + value && + !getFieldValue(["isinhouse"]) && + value === bodyshop.inhousevendorid + ) { + return Promise.reject(t("bills.validation.manualinhouse")); + } + return Promise.resolve(); + }, + }), ]} >