Skip to content

Commit 53619ca

Browse files
authored
Merge pull request #3409 from sumitdaga/issue-3396
feat: Don't disable Bussiness phone and Company is they are not defined. ref issue #3396
2 parents 6c948ff + 7d5cc91 commit 53619ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/routes/settings/routes/profile/components/ProfileSettingsForm.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class ProfileSettingsForm extends Component {
162162
render() {
163163
const { isCopilot, isCustomer, isManager } = this.props
164164

165-
const disablePhoneInput = isCopilot && !isManager
165+
const disablePhoneInput = this.props.values.settings.businessPhone && isCopilot && !isManager
166166
return (
167167
<Formsy.Form
168168
className="profile-settings-form"
@@ -200,7 +200,7 @@ class ProfileSettingsForm extends Component {
200200
showCheckMark
201201
listCountry={ISOCountries}
202202
forceCountry={!disablePhoneInput && this.state.countrySelected}
203-
value={this.props.values.settings.businessPhone}
203+
value={this.props.values.settings.businessPhone ? this.props.values.settings.businessPhone : ''}
204204
onChangeCountry={this.onBusinessPhoneCountryChange}
205205
onOutsideClick={this.hideBusinessPhoneAlert}
206206
disabled={disablePhoneInput}
@@ -211,7 +211,7 @@ class ProfileSettingsForm extends Component {
211211
}
212212
</div>
213213
</div>
214-
{this.getField('Company name', 'companyName', true, (isCustomer || isCopilot) && !isManager)}
214+
{this.getField('Company name', 'companyName', true, this.props.values.settings.companyName && (isCustomer || isCopilot) && !isManager)}
215215
<div className="field">
216216
<div className="label">
217217
<span styleName="fieldLabelText">Country</span>

0 commit comments

Comments
 (0)