Skip to content

Commit

Permalink
Merge pull request #11016 from Expensify/OSBotify-cherry-pick-staging…
Browse files Browse the repository at this point in the history
…-10974

🍒 Cherry pick PR #10974 to staging 🍒
  • Loading branch information
OSBotify authored Sep 15, 2022
2 parents 6d643af + adb83a2 commit f4f6a28
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001020004
versionName "1.2.0-4"
versionCode 1001020005
versionName "1.2.0-5"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/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.2.0.4</string>
<string>1.2.0.5</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.2.0.4</string>
<string>1.2.0.5</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions 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.2.0-4",
"version": "1.2.0-5",
"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
8 changes: 4 additions & 4 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ function clearCustomUnitErrors(policyID, customUnitID, customUnitRateID) {
[customUnitID]: {
errors: null,
pendingAction: null,
onyxRates: {
rates: {
[customUnitRateID]: {
errors: null,
pendingAction: null,
Expand Down Expand Up @@ -626,7 +626,7 @@ function updateCustomUnitRate(policyID, currentCustomUnitRate, customUnitID, new
value: {
customUnits: {
[customUnitID]: {
onyxRates: {
rates: {
[newCustomUnitRate.customUnitRateID]: {
...newCustomUnitRate,
errors: null,
Expand All @@ -646,7 +646,7 @@ function updateCustomUnitRate(policyID, currentCustomUnitRate, customUnitID, new
value: {
customUnits: {
[customUnitID]: {
onyxRates: {
rates: {
[newCustomUnitRate.customUnitRateID]: {
pendingAction: null,
},
Expand All @@ -664,7 +664,7 @@ function updateCustomUnitRate(policyID, currentCustomUnitRate, customUnitID, new
value: {
customUnits: {
[customUnitID]: {
onyxRates: {
rates: {
[currentCustomUnitRate.customUnitRateID]: {
...currentCustomUnitRate,
errors: {
Expand Down
12 changes: 6 additions & 6 deletions src/pages/workspace/reimburse/WorkspaceReimburseView.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const propTypes = {
attributes: PropTypes.shape({
unit: PropTypes.string,
}),
onyxRates: PropTypes.objectOf(
rates: PropTypes.objectOf(
PropTypes.shape({
customUnitRateID: PropTypes.string,
name: PropTypes.string,
Expand All @@ -63,7 +63,7 @@ class WorkspaceReimburseView extends React.Component {
constructor(props) {
super(props);
const distanceCustomUnit = _.find(lodashGet(props, 'policy.customUnits', {}), unit => unit.name === 'Distance');
const customUnitRate = _.find(lodashGet(distanceCustomUnit, 'onyxRates', {}), rate => rate.name === 'Default Rate');
const customUnitRate = _.find(lodashGet(distanceCustomUnit, 'rates', {}), rate => rate.name === 'Default Rate');

this.state = {
unitID: lodashGet(distanceCustomUnit, 'customUnitID', ''),
Expand Down Expand Up @@ -99,7 +99,7 @@ class WorkspaceReimburseView extends React.Component {
.values()
.findWhere({name: CONST.CUSTOM_UNITS.NAME_DISTANCE})
.value();
const customUnitRate = _.find(lodashGet(distanceCustomUnit, 'onyxRates', {}), rate => rate.name === 'Default Rate');
const customUnitRate = _.find(lodashGet(distanceCustomUnit, 'rates', {}), rate => rate.name === 'Default Rate');
this.setState({
unitID: lodashGet(distanceCustomUnit, 'customUnitID', ''),
unitName: lodashGet(distanceCustomUnit, 'name', ''),
Expand Down Expand Up @@ -177,7 +177,7 @@ class WorkspaceReimburseView extends React.Component {
});

const distanceCustomUnit = _.find(lodashGet(this.props, 'policy.customUnits', {}), unit => unit.name === 'Distance');
const currentCustomUnitRate = lodashGet(distanceCustomUnit, ['onyxRates', this.state.unitRateID], {});
const currentCustomUnitRate = lodashGet(distanceCustomUnit, ['rates', this.state.unitRateID], {});
Policy.updateCustomUnitRate(this.props.policyID, currentCustomUnitRate, this.state.unitID, {
...currentCustomUnitRate,
rate: numValue.toFixed(3) * CONST.POLICY.CUSTOM_UNIT_RATE_BASE_OFFSET,
Expand Down Expand Up @@ -223,10 +223,10 @@ class WorkspaceReimburseView extends React.Component {
<OfflineWithFeedback
errors={{
...lodashGet(this.props, ['policy', 'customUnits', this.state.unitID, 'errors'], {}),
...lodashGet(this.props, ['policy', 'customUnits', this.state.unitID, 'onyxRates', this.state.unitRateID, 'errors'], {}),
...lodashGet(this.props, ['policy', 'customUnits', this.state.unitID, 'rates', this.state.unitRateID, 'errors'], {}),
}}
pendingAction={lodashGet(this.props, ['policy', 'customUnits', this.state.unitID, 'pendingAction'])
|| lodashGet(this.props, ['policy', 'customUnits', this.state.unitID, 'onyxRates', this.state.unitRateID, 'pendingAction'])}
|| lodashGet(this.props, ['policy', 'customUnits', this.state.unitID, 'rates', this.state.unitRateID, 'pendingAction'])}
onClose={() => Policy.clearCustomUnitErrors(this.props.policyID, this.state.unitID, this.state.unitRateID)}
>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.mv2]}>
Expand Down

0 comments on commit f4f6a28

Please sign in to comment.