From fa597145264fe53f995a17b38ad72064165dc5de Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Tue, 10 Aug 2021 12:00:36 -0700 Subject: [PATCH] Require restricted business checkbox on CompanyStep --- src/pages/ReimbursementAccount/CompanyStep.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js index f3891847715..5260a4ff130 100644 --- a/src/pages/ReimbursementAccount/CompanyStep.js +++ b/src/pages/ReimbursementAccount/CompanyStep.js @@ -119,8 +119,8 @@ class CompanyStep extends React.Component { render() { const shouldDisableCompanyName = Boolean(this.props.achData.bankAccountID && this.props.achData.companyName); const shouldDisableCompanyTaxID = Boolean(this.props.achData.bankAccountID && this.props.achData.companyTaxID); - const shouldDisableSubmitButton = this.requiredFields - .reduce((acc, curr) => acc || !this.state[curr].trim(), false); + const missingRequiredFields = this.requiredFields.reduce((acc, curr) => acc || !this.state[curr].trim(), false); + const shouldDisableSubmitButton = !this.state.hasNoConnectionToCannabis || missingRequiredFields; return ( <>