Skip to content

Commit

Permalink
Merge branch main into Rory-KillPolicyList
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Nov 4, 2021
2 parents 1ca49d1 + 0c43cf7 commit 77dcea9
Show file tree
Hide file tree
Showing 35 changed files with 423 additions and 218 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001011204
versionName "1.1.12-4"
versionCode 1001011301
versionName "1.1.13-1"
}
splits {
abi {
Expand Down
File renamed without changes
Binary file added assets/images/example-check-image-es.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.12</string>
<string>1.1.13</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.12.4</string>
<string>1.1.13.1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.1.12</string>
<string>1.1.13</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.12.4</string>
<string>1.1.13.1</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.12-4",
"version": "1.1.13-1",
"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
1 change: 1 addition & 0 deletions src/ONYXKEYS.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default {
REPORT_USER_IS_TYPING: 'reportUserIsTyping_',
REPORT_IOUS: 'reportIOUs_',
POLICY: 'policy_',
REPORTS_WITH_DRAFT: 'reportWithDraft_',
},

// Indicates which locale should be used
Expand Down
1 change: 1 addition & 0 deletions src/ROUTES.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default {
REPORT_WITH_ID_DETAILS: 'r/:reportID/details',
getReportDetailsRoute: reportID => `r/${reportID}/details`,
LOGIN_WITH_SHORT_LIVED_TOKEN: 'transition',
VALIDATE_LOGIN: 'v/:accountID/:validateCode',

// This is a special validation URL that will take the user to /workspace/new after validation. This is used
// when linking users from e.com in order to share a session in this app.
Expand Down
6 changes: 5 additions & 1 deletion src/components/HeaderWithCloseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const propTypes = {
/** Whether we should show a inbox call button */
shouldShowInboxCallButton: PropTypes.bool,

/** Whether we should show the step counter */
shouldShowStepCounter: PropTypes.bool,

/** The task ID to associate with the call button, if we show it */
inboxCallTaskID: PropTypes.string,

Expand All @@ -57,6 +60,7 @@ const defaultProps = {
shouldShowBorderBottom: false,
shouldShowDownloadButton: false,
shouldShowInboxCallButton: false,
shouldShowStepCounter: true,
inboxCallTaskID: '',
stepCounter: null,
};
Expand Down Expand Up @@ -84,7 +88,7 @@ const HeaderWithCloseButton = props => (
)}
<Header
title={props.title}
subtitle={props.stepCounter ? props.translate('stepCounter', props.stepCounter) : ''}
subtitle={props.stepCounter && props.shouldShowStepCounter ? props.translate('stepCounter', props.stepCounter) : ''}
/>
<View style={[styles.reportOptions, styles.flexRow, styles.pr5]}>
{
Expand Down
14 changes: 12 additions & 2 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ export default {
setMyTimezoneAutomatically: 'Set my timezone automatically',
timezone: 'Timezone',
growlMessageOnSave: 'Your profile was successfully saved',
invalidFileMessage: 'Invalid file. Please try a different image.',
avatarUploadFailureMessage: 'An error occurred uploading the avatar, please try again.',
online: 'Online',
offline: 'Offline',
syncing: 'Syncing',
Expand Down Expand Up @@ -584,6 +586,14 @@ export default {
listOfRestrictedBusinesses: 'list of restricted businesses',
incorporationDatePlaceholder: 'Start date (yyyy-mm-dd)',
companyPhonePlaceholder: 'Phone Number (xxx)xxx-xxxx',
incorporationTypes: {
LLC: 'LLC',
CORPORATION: 'Corp',
PARTNERSHIP: 'Partnership',
COOPERATIVE: 'Cooperative',
SOLE_PROPRIETORSHIP: 'Sole Proprietorship',
OTHER: 'Other',
},
},
requestorStep: {
headerTitle: 'Personal information',
Expand All @@ -604,7 +614,7 @@ export default {
reviewingInfo: 'Thanks! We\'re reviewing your information, and will be in touch shortly. Please check your chat with Concierge ',
forNextSteps: ' for next steps to finish setting up your bank account.',
letsChatCTA: 'Yes, let\'s chat!',
letsChatText: 'Thanks for doing that! We have a couple more things to work out, but it’ll be easier over chat. Ready to chat?',
letsChatText: 'Thanks for doing that! We need your help verifying a few pieces of information, but we can work this out quickly over chat. Ready?',
letsChatTitle: 'Let\'s chat!',
},
beneficialOwnersStep: {
Expand Down Expand Up @@ -757,7 +767,7 @@ export default {
callMe: 'Call me',
growlMessageOnSave: 'Call requested.',
growlMessageEmptyName: 'Please provide both a first and last name so our guides know how to address you!',
growlMessageNoPersonalPolicy: 'I wasnt able to find a personal policy to associate this Guides call with, please check your connection and try again.',
growlMessageNoPersonalPolicy: 'I wasn\'t able to find a personal policy to associate this Guides call with, please check your connection and try again.',
callButton: 'Call',
callButtonTooltip: 'Get live help from our team',
},
Expand Down
12 changes: 11 additions & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ export default {
setMyTimezoneAutomatically: 'Configura mi zona horaria automáticamente',
timezone: 'Zona horaria',
growlMessageOnSave: 'Tu perfil se ha guardado correctamente',
invalidFileMessage: 'Archivo inválido. Pruebe con una imagen diferente.',
avatarUploadFailureMessage: 'No se pudo subir el avatar. Por favor, inténtalo de nuevo.',
online: 'En línea',
offline: 'Desconectado',
syncing: 'Sincronizando',
Expand Down Expand Up @@ -586,6 +588,14 @@ export default {
listOfRestrictedBusinesses: 'lista de negocios restringidos',
incorporationDatePlaceholder: 'Fecha de inicio (aaaa-mm-dd)',
companyPhonePlaceholder: '(prefijo) + (número)',
incorporationTypes: {
LLC: 'LLC',
CORPORATION: 'Corp',
PARTNERSHIP: 'Sociedad',
COOPERATIVE: 'Cooperativa',
SOLE_PROPRIETORSHIP: 'Propietario único',
OTHER: 'Otra',
},
},
requestorStep: {
headerTitle: 'Información personal',
Expand All @@ -606,7 +616,7 @@ export default {
reviewingInfo: '¡Gracias! Estamos revisando tu información y nos comunicaremos contigo en breve. Consulte su chat con Concierge ',
forNextSteps: ' para conocer los próximos pasos para terminar de configurar su cuenta bancaria.',
letsChatCTA: '¡Sí, vamos a chatear!',
letsChatText: '¡Gracias! Todavía tenemos que solucionar un par de cosas, pero será más fácil por chat. ¿Listo para charlar?',
letsChatText: '¡Gracias! Necesitamos tu ayuda para verificar la información, pero podemos hacerlo rápidamente a través del chat. ¿Estás listo?',
letsChatTitle: '¡Vamos a chatear!',
},
beneficialOwnersStep: {
Expand Down
39 changes: 30 additions & 9 deletions src/libs/Navigation/AppNavigator/AuthScreens.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Navigation from '../Navigation';
import * as User from '../../actions/User';
import {setModalVisibility} from '../../actions/Modal';
import NameValuePair from '../../actions/NameValuePair';
import {getPolicyList} from '../../actions/Policy';
import * as Policy from '../../actions/Policy';
import modalCardStyleInterpolator from './modalCardStyleInterpolator';
import createCustomModalStackNavigator from './createCustomModalStackNavigator';
import getOperatingSystem from '../../getOperatingSystem';
Expand Down Expand Up @@ -58,6 +58,7 @@ import {
import SCREENS from '../../../SCREENS';
import Timers from '../../Timers';
import LogInWithShortLivedTokenPage from '../../../pages/LogInWithShortLivedTokenPage';
import ValidateLoginPage from '../../../pages/ValidateLoginPage';
import defaultScreenOptions from './defaultScreenOptions';
import * as API from '../../API';
import {setLocale} from '../../actions/App';
Expand Down Expand Up @@ -167,15 +168,12 @@ class AuthScreens extends React.Component {
// Load policies, maybe creating a new policy first.
Linking.getInitialURL()
.then((url) => {
// url is null on mobile unless the app was opened via a deeplink
if (url) {
const path = new URL(url).pathname;
const exitTo = new URLSearchParams(url).get('exitTo');
const shouldCreateFreePolicy = Str.startsWith(path, Str.normalizeUrl(ROUTES.LOGIN_WITH_SHORT_LIVED_TOKEN)) && exitTo === ROUTES.WORKSPACE_NEW;
getPolicyList(shouldCreateFreePolicy);
} else {
getPolicyList(false);
if (this.shouldCreateFreePolicy(url)) {
Policy.createAndGetPolicyList();
return;
}

Policy.getPolicyList();
});

// Refresh the personal details, timezone and betas every 30 minutes
Expand Down Expand Up @@ -227,6 +225,21 @@ class AuthScreens extends React.Component {
this.interval = null;
}

/**
* @param {String} [url]
* @returns {Boolean}
*/
shouldCreateFreePolicy(url = '') {
if (!url) {
return false;
}

const path = new URL(url).pathname;
const exitTo = new URLSearchParams(url).get('exitTo');
return Str.startsWith(path, Str.normalizeUrl(ROUTES.LOGIN_WITH_SHORT_LIVED_TOKEN))
&& exitTo === ROUTES.WORKSPACE_NEW;
}

render() {
const commonModalScreenOptions = {
headerShown: false,
Expand Down Expand Up @@ -273,6 +286,14 @@ class AuthScreens extends React.Component {
}}
component={MainDrawerNavigator}
/>
<RootStack.Screen
name="ValidateLogin"
options={{
headerShown: false,
title: 'New Expensify',
}}
component={ValidateLoginPage}
/>
<RootStack.Screen
name={SCREENS.LOG_IN_WITH_SHORT_LIVED_TOKEN}
options={defaultScreenOptions}
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Navigation/AppNavigator/PublicScreens.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import {createStackNavigator} from '@react-navigation/stack';
import SignInPage from '../../../pages/signin/SignInPage';
import SetPasswordPage from '../../../pages/SetPasswordPage';
import ValidateLoginPage from '../../../pages/ValidateLoginPage';
import LogInWithShortLivedTokenPage from '../../../pages/LogInWithShortLivedTokenPage';
import SCREENS from '../../../SCREENS';
import defaultScreenOptions from './defaultScreenOptions';
Expand All @@ -20,6 +21,11 @@ const PublicScreens = () => (
options={defaultScreenOptions}
component={LogInWithShortLivedTokenPage}
/>
<RootStack.Screen
name="ValidateLogin"
options={defaultScreenOptions}
component={ValidateLoginPage}
/>
<RootStack.Screen
name="SetPassword"
options={defaultScreenOptions}
Expand Down
2 changes: 2 additions & 0 deletions src/libs/Navigation/Navigation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _ from 'underscore';
import React from 'react';
import {Keyboard} from 'react-native';
import {
StackActions,
DrawerActions,
Expand Down Expand Up @@ -44,6 +45,7 @@ function openDrawer() {
return;
}
navigationRef.current.dispatch(DrawerActions.openDrawer());
Keyboard.dismiss();
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/libs/Navigation/linkingConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default {

// Main Routes
SetPassword: ROUTES.SET_PASSWORD_WITH_VALIDATE_CODE,
ValidateLogin: ROUTES.VALIDATE_LOGIN,
[SCREENS.LOG_IN_WITH_SHORT_LIVED_TOKEN]: ROUTES.LOGIN_WITH_SHORT_LIVED_TOKEN,

// Modal Screens
Expand Down
Loading

0 comments on commit 77dcea9

Please sign in to comment.