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 #5770 to staging 🍒 #5834

Merged
merged 2 commits into from
Oct 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 1001010713
versionName "1.1.7-13"
versionCode 1001010714
versionName "1.1.7-14"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.7.13</string>
<string>1.1.7.14</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/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.1.7.13</string>
<string>1.1.7.14</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.1.7-13",
"version": "1.1.7-14",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
57 changes: 22 additions & 35 deletions src/pages/ReimbursementAccount/IdentityForm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import StatePicker from '../../components/StatePicker';
import ExpensiTextInput from '../../components/ExpensiTextInput';
import AddressSearch from '../../components/AddressSearch';
import styles from '../../styles/styles';
import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
import Text from '../../components/Text';
import CONST from '../../CONST';
import DatePicker from '../../components/DatePicker';

Expand Down Expand Up @@ -77,6 +76,23 @@ const IdentityForm = ({
const dobErrorText = (errors.dob ? translate('bankAccount.error.dob') : '')
|| (errors.dobAge ? translate('bankAccount.error.age') : '');

const getFormattedAddressValue = () => {
let addressString = '';
if (street) {
addressString += `${street}, `;
}
if (city) {
addressString += `${city}, `;
}
if (state) {
addressString += `${state}, `;
}
if (zipCode) {
addressString += `${zipCode}`;
}
return addressString;
};

return (
<View style={style}>
<View style={[styles.flexRow]}>
Expand Down Expand Up @@ -116,41 +132,12 @@ const IdentityForm = ({
errorText={errors.ssnLast4 ? translate('bankAccount.error.ssnLast4') : ''}
maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.SSN}
/>
<ExpensiTextInput
<AddressSearch
label={translate('common.personalAddress')}
containerStyles={[styles.mt4]}
value={street}
onChangeText={value => onFieldChange('street', value)}
errorText={errors.street ? translate('bankAccount.error.address') : ''}
/>
<Text style={[styles.mutedTextLabel, styles.mt1]}>{translate('common.noPO')}</Text>
<View style={[styles.flexRow, styles.mt4]}>
<View style={[styles.flex2, styles.mr2]}>
<ExpensiTextInput
label={translate('common.city')}
value={city}
onChangeText={value => onFieldChange('city', value)}
errorText={errors.city ? translate('bankAccount.error.addressCity') : ''}
translateX={-14}
/>
</View>
<View style={[styles.flex1]}>
<StatePicker
value={state}
onChange={value => onFieldChange('state', value)}
errorText={errors.state ? translate('bankAccount.error.addressState') : ''}
hasError={Boolean(errors.state)}
/>
</View>
</View>
<ExpensiTextInput
label={translate('common.zip')}
containerStyles={[styles.mt4]}
keyboardType={CONST.KEYBOARD_TYPE.NUMERIC}
value={zipCode}
onChangeText={value => onFieldChange('zipCode', value)}
errorText={errors.zipCode ? translate('bankAccount.error.zipCode') : ''}
maxLength={CONST.BANK_ACCOUNT.MAX_LENGTH.ZIP_CODE}
value={getFormattedAddressValue()}
onChangeText={(fieldName, value) => onFieldChange(fieldName, value)}
errorText={errors.street ? translate('bankAccount.error.addressStreet') : ''}
/>
</View>
);
Expand Down
4 changes: 4 additions & 0 deletions src/pages/ReimbursementAccount/RequestorStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class RequestorStep extends React.Component {
city: 'requestorAddressCity',
state: 'requestorAddressState',
zipCode: 'requestorAddressZipCode',
addressStreet: 'requestorAddressStreet',
addressCity: 'requestorAddressCity',
addressState: 'requestorAddressState',
addressZipCode: 'requestorAddressZipCode',
};
const renamedInputKey = lodashGet(renamedFields, inputKey, inputKey);
const newState = {[renamedInputKey]: value};
Expand Down