From f2e56412a7b2119da415cf4aa64d8bff0f09d30d Mon Sep 17 00:00:00 2001 From: "alberto@expensify.com" Date: Mon, 11 Oct 2021 15:02:13 +0200 Subject: [PATCH] Change State field in Company Info to 'Incorporation state' --- src/components/StatePicker.js | 6 +++++- src/languages/en.js | 1 + src/languages/es.js | 1 + src/pages/ReimbursementAccount/CompanyStep.js | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/StatePicker.js b/src/components/StatePicker.js index 3e09243a37e..0d25f7ae969 100644 --- a/src/components/StatePicker.js +++ b/src/components/StatePicker.js @@ -11,6 +11,9 @@ const STATES = _.map(CONST.STATES, ({stateISO}) => ({ })); const propTypes = { + /** The label for the field */ + label: PropTypes.string, + /** A callback method that is called when the value changes and it received the selected value as an argument */ onChange: PropTypes.func.isRequired, @@ -21,6 +24,7 @@ const propTypes = { }; const defaultProps = { + label: '', value: '', }; @@ -30,7 +34,7 @@ const StatePicker = props => ( items={STATES} onChange={props.onChange} value={props.value} - label={props.translate('common.state')} + label={props.label || props.translate('common.state')} hasError={props.hasError} errorText={props.errorText} /> diff --git a/src/languages/en.js b/src/languages/en.js index 3cfaf952b2b..be6cdc0bf76 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -567,6 +567,7 @@ export default { taxIDNumberPlaceholder: '9 digits, no hyphens', companyType: 'Company type', incorporationDate: 'Incorporation date', + incorporationState: 'Incorporation state', industryClassificationCode: 'Industry classification code', confirmCompanyIsNot: 'I confirm that this company is not on the', listOfRestrictedBusinesses: 'list of restricted businesses', diff --git a/src/languages/es.js b/src/languages/es.js index 27f5c81cd3a..44514918e50 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -569,6 +569,7 @@ export default { taxIDNumberPlaceholder: '9 dígitos, sin guiones', companyType: 'Tipo de empresa', incorporationDate: 'Fecha de incorporación', + incorporationState: 'Estado de incorporación', industryClassificationCode: 'Código de clasificación industrial', confirmCompanyIsNot: 'Confirmo que esta empresa no está en el', listOfRestrictedBusinesses: 'lista de negocios restringidos', diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js index d1ba09725f9..4a1ea2e6f00 100644 --- a/src/pages/ReimbursementAccount/CompanyStep.js +++ b/src/pages/ReimbursementAccount/CompanyStep.js @@ -226,7 +226,7 @@ class CompanyStep extends React.Component { /> - + this.clearErrorAndSetValue('incorporationDate', value)} @@ -238,6 +238,7 @@ class CompanyStep extends React.Component { this.clearErrorAndSetValue('incorporationState', value)} value={this.state.incorporationState} hasError={this.getErrors().incorporationState}