From cabc60ff41152457964ef30eec08f3e9b6aae99b Mon Sep 17 00:00:00 2001 From: Conrad S Date: Tue, 2 May 2017 15:50:48 -0400 Subject: [PATCH 1/4] Add 'other' utility types for arbitrary bill upload --- src/components/UtilityAccount/index.js | 57 ++++++++++++++++++-------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/src/components/UtilityAccount/index.js b/src/components/UtilityAccount/index.js index ce71dc24..e34ace24 100644 --- a/src/components/UtilityAccount/index.js +++ b/src/components/UtilityAccount/index.js @@ -172,7 +172,9 @@ class UtilityAccount extends Component { } renderAddAccountBtn = () => { - let isDisabled = !(this.state.form.account_number); + let isDisabled = ( + !(this.state.form.account_number) && !this.state.form.utility.startsWith('other') + ); if (this.state.form.utility === 'national_grid_gas') { isDisabled = !( this.state.form.account_number && this.state.form.access_code @@ -229,15 +231,22 @@ class UtilityAccount extends Component { } - renderFetchBtn = () => ( - - ) + renderFetchBtn = () => { + if (this.state.form.utility.startsWith('other')) { + return ( + + ); + } + return ( + + ); + } renderDeleteAccountBtn = () => (