Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🍒 Cherry pick PR #4633 to staging 🍒 #4652

Merged
merged 2 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001008505
versionName "1.0.85-5"
versionCode 1001008506
versionName "1.0.85-6"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCash/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0.85.5</string>
<string>1.0.85.6</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCashTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.85.5</string>
<string>1.0.85.6</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.0.85-5",
"version": "1.0.85-6",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
24 changes: 14 additions & 10 deletions src/components/StatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,40 @@ import _ from 'underscore';
import React from 'react';
import PropTypes from 'prop-types';
import {CONST} from 'expensify-common/lib/CONST';
import Picker from './Picker';
import ExpensiPicker from './ExpensiPicker';
import withLocalize, {withLocalizePropTypes} from './withLocalize';

const STATES = _.map(CONST.STATES, ({stateISO}) => ({
value: stateISO,
label: stateISO,
}));


// Add a blank state so users are sure to actively choose a state instead accidentally going with the default choice
STATES.unshift({
value: '',
label: '-',
});

const propTypes = {
/** A callback method that is called when the value changes and it received the selected value as an argument */
onChange: PropTypes.func.isRequired,

/** The value that needs to be selected */
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),

...withLocalizePropTypes,
};

const defaultProps = {
value: '',
};

const StatePicker = props => <Picker items={STATES} onChange={props.onChange} value={props.value} />;
const StatePicker = props => (
<ExpensiPicker
placeholder={{value: '', label: '-'}}
items={STATES}
onChange={props.onChange}
value={props.value}
label={props.translate('common.state')}
/>
);

StatePicker.propTypes = propTypes;
StatePicker.defaultProps = defaultProps;
StatePicker.displayName = 'StatePicker';

export default StatePicker;
export default withLocalize(StatePicker);
5 changes: 2 additions & 3 deletions src/pages/ReimbursementAccount/CompanyStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class CompanyStep extends React.Component {
'companyTaxID',
'incorporationDate',
'incorporationState',
'incorporationType',
'industryCode',
'password',
];
Expand Down Expand Up @@ -155,7 +156,6 @@ class CompanyStep extends React.Component {
/>
</View>
<View style={[styles.flex1]}>
<Text style={[styles.formLabel]}>{this.props.translate('common.state')}</Text>
<StatePicker
onChange={addressState => this.setState({addressState})}
value={this.state.addressState}
Expand Down Expand Up @@ -196,7 +196,7 @@ class CompanyStep extends React.Component {
items={_.map(CONST.INCORPORATION_TYPES, (label, value) => ({value, label}))}
onChange={incorporationType => this.setState({incorporationType})}
value={this.state.incorporationType}
placeholder={{value: '', label: 'Type'}}
placeholder={{value: '', label: '-'}}
/>
</View>
<View style={[styles.flexRow, styles.mt4]}>
Expand All @@ -210,7 +210,6 @@ class CompanyStep extends React.Component {
/>
</View>
<View style={[styles.flex1]}>
<Text style={[styles.formLabel]}>{this.props.translate('common.state')}</Text>
<StatePicker
onChange={incorporationState => this.setState({incorporationState})}
value={this.state.incorporationState}
Expand Down
2 changes: 0 additions & 2 deletions src/pages/ReimbursementAccount/IdentityForm.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import Text from '../../components/Text';
import StatePicker from '../../components/StatePicker';
import ExpensiTextInput from '../../components/ExpensiTextInput';
import styles from '../../styles/styles';
Expand Down Expand Up @@ -110,7 +109,6 @@ const IdentityForm = ({
/>
</View>
<View style={[styles.flex1]}>
<Text style={[styles.formLabel]}>{translate('common.state')}</Text>
<StatePicker
value={state}
onChange={val => onFieldChange('state', val)}
Expand Down