diff --git a/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts b/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts
index ecf242f00cc2..08519c40413b 100644
--- a/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts
+++ b/.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts
@@ -21,7 +21,27 @@ async function run() {
status: 'completed',
event: isProductionDeploy ? 'release' : 'push',
})
- ).data.workflow_runs;
+ ).data.workflow_runs
+ // Note: we filter out cancelled runs instead of looking only for success runs
+ // because if a build fails on even one platform, then it will have the status 'failure'
+ .filter((workflowRun) => workflowRun.conclusion !== 'cancelled');
+
+ // Find the most recent deploy workflow for which at least one of the build jobs finished successfully.
+ let lastSuccessfulDeploy = completedDeploys.shift();
+ while (
+ lastSuccessfulDeploy &&
+ !(
+ await GithubUtils.octokit.actions.listJobsForWorkflowRun({
+ owner: github.context.repo.owner,
+ repo: github.context.repo.repo,
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ run_id: lastSuccessfulDeploy.id,
+ filter: 'latest',
+ })
+ ).data.jobs.some((job) => job.name.startsWith('Build and deploy') && job.conclusion === 'success')
+ ) {
+ lastSuccessfulDeploy = completedDeploys.shift();
+ }
const priorTag = completedDeploys[0].head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js
index 6b956f17be25..cfe512076ecd 100644
--- a/.github/actions/javascript/getDeployPullRequestList/index.js
+++ b/.github/actions/javascript/getDeployPullRequestList/index.js
@@ -11515,7 +11515,22 @@ async function run() {
workflow_id: 'platformDeploy.yml',
status: 'completed',
event: isProductionDeploy ? 'release' : 'push',
- })).data.workflow_runs;
+ })).data.workflow_runs
+ // Note: we filter out cancelled runs instead of looking only for success runs
+ // because if a build fails on even one platform, then it will have the status 'failure'
+ .filter((workflowRun) => workflowRun.conclusion !== 'cancelled');
+ // Find the most recent deploy workflow for which at least one of the build jobs finished successfully.
+ let lastSuccessfulDeploy = completedDeploys.shift();
+ while (lastSuccessfulDeploy &&
+ !(await GithubUtils_1.default.octokit.actions.listJobsForWorkflowRun({
+ owner: github.context.repo.owner,
+ repo: github.context.repo.repo,
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ run_id: lastSuccessfulDeploy.id,
+ filter: 'latest',
+ })).data.jobs.some((job) => job.name.startsWith('Build and deploy') && job.conclusion === 'success')) {
+ lastSuccessfulDeploy = completedDeploys.shift();
+ }
const priorTag = completedDeploys[0].head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils_1.default.getPullRequestsMergedBetween(priorTag ?? '', inputTag);
diff --git a/.github/workflows/e2ePerformanceTests.yml b/.github/workflows/e2ePerformanceTests.yml
index 7e7d55ac5d2e..ffce73644263 100644
--- a/.github/workflows/e2ePerformanceTests.yml
+++ b/.github/workflows/e2ePerformanceTests.yml
@@ -184,6 +184,9 @@ jobs:
- name: Copy e2e code into zip folder
run: cp tests/e2e/dist/index.js zip/testRunner.ts
+
+ - name: Copy profiler binaries into zip folder
+ run: cp -r node_modules/@perf-profiler/android/cpp-profiler/bin zip/bin
- name: Zip everything in the zip directory up
run: zip -qr App.zip ./zip
diff --git a/.prettierrc.js b/.prettierrc.js
index 3118dc378694..d981112fffae 100644
--- a/.prettierrc.js
+++ b/.prettierrc.js
@@ -6,6 +6,7 @@ module.exports = {
arrowParens: 'always',
printWidth: 190,
singleAttributePerLine: true,
+ plugins: [require.resolve('@trivago/prettier-plugin-sort-imports')],
/** `importOrder` should be defined in an alphabetical order. */
importOrder: [
'@assets/(.*)$',
diff --git a/Gemfile.lock b/Gemfile.lock
index 3780235053ad..64f4d81c9e76 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -10,8 +10,8 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
- addressable (2.8.6)
- public_suffix (>= 2.0.2, < 6.0)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
@@ -20,17 +20,17 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
- aws-partitions (1.944.0)
- aws-sdk-core (3.197.0)
+ aws-partitions (1.948.0)
+ aws-sdk-core (3.199.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
- aws-sdk-kms (1.85.0)
- aws-sdk-core (~> 3, >= 3.197.0)
+ aws-sdk-kms (1.87.0)
+ aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.152.3)
- aws-sdk-core (~> 3, >= 3.197.0)
+ aws-sdk-s3 (1.154.0)
+ aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
@@ -119,7 +119,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.1)
- fastlane (2.221.0)
+ fastlane (2.221.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
diff --git a/android/app/build.gradle b/android/app/build.gradle
index fac54600f021..192537f08e3d 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -107,8 +107,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
- versionCode 1009000200
- versionName "9.0.2-0"
+ versionCode 1009000306
+ versionName "9.0.3-6"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
diff --git a/assets/images/computer.svg b/assets/images/computer.svg
new file mode 100644
index 000000000000..9c2628245eb1
--- /dev/null
+++ b/assets/images/computer.svg
@@ -0,0 +1,216 @@
+
+
\ No newline at end of file
diff --git a/assets/images/integrationicons/sage-intacct-icon-square.svg b/assets/images/integrationicons/sage-intacct-icon-square.svg
new file mode 100644
index 000000000000..33d86259a2d1
--- /dev/null
+++ b/assets/images/integrationicons/sage-intacct-icon-square.svg
@@ -0,0 +1,23 @@
+
+
\ No newline at end of file
diff --git a/config/electronBuilder.config.js b/config/electronBuilder.config.js
index 5a995fb5de91..ad3a23407b89 100644
--- a/config/electronBuilder.config.js
+++ b/config/electronBuilder.config.js
@@ -47,7 +47,7 @@ module.exports = {
},
target: [
{
- target: 'dmg',
+ target: 'default',
arch: ['universal'],
},
],
diff --git a/docs/_data/_routes.yml b/docs/_data/_routes.yml
index 5fd65532c021..7f416951b58c 100644
--- a/docs/_data/_routes.yml
+++ b/docs/_data/_routes.yml
@@ -114,8 +114,8 @@ platforms:
icon: /assets/images/shield.svg
description: Configure rules, settings, and limits for your company’s spending.
- - href: expenses
- title: Expenses
+ - href: expenses-&-payments
+ title: Expenses & Payments
icon: /assets/images/money-into-wallet.svg
description: Learn more about expense tracking and submission.
diff --git a/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md b/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md
index 6bc3b0896912..155512866a8f 100644
--- a/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md
+++ b/docs/articles/new-expensify/connections/Set-up-QuickBooks-Online-connection.md
@@ -46,6 +46,12 @@ Log in to QuickBooks Online and ensure all of your employees are setup as either
Enter your Intuit login details to import your settings from QuickBooks Online to Expensify.
+![The toggle location to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-QBO-1.png){:width="100%"}
+
+![How to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-QBO-2.png){:width="100%"}
+
+![The QuickBooks Online Connect button]({{site.url}}/assets/images/ExpensifyHelp-QBO-3.png){:width="100%"}
+
# Step 3: Configure import settings
The following steps help you determine how data will be imported from QuickBooks Online to Expensify.
diff --git a/docs/articles/new-expensify/connections/Set-up-Xero-connection.md b/docs/articles/new-expensify/connections/Set-up-Xero-connection.md
index 73bff6ad5862..47917f2dffc3 100644
--- a/docs/articles/new-expensify/connections/Set-up-Xero-connection.md
+++ b/docs/articles/new-expensify/connections/Set-up-Xero-connection.md
@@ -23,6 +23,12 @@ To set up your Xero connection, complete the 4 steps below.
Enter your Xero login details to import your settings from Xero to Expensify.
+![The toggle location to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-Xero-1.png){:width="100%"}
+
+![How to enable accounting integrations like QuickBooks Online]({{site.url}}/assets/images/ExpensifyHelp-Xero-2.png){:width="100%"}
+
+![The QuickBooks Online Connect button]({{site.url}}/assets/images/ExpensifyHelp-Xero-3.png){:width="100%"}
+
# Step 2: Configure import settings
The following steps help you determine how data will be imported from Xero to Expensify.
diff --git a/docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md b/docs/articles/new-expensify/expenses-&-payments/Approve-and-pay-expenses.md
similarity index 93%
rename from docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md
rename to docs/articles/new-expensify/expenses-&-payments/Approve-and-pay-expenses.md
index 0cf642c76e4c..c037e8fe9cd3 100644
--- a/docs/articles/new-expensify/expenses/Approve-and-pay-expenses.md
+++ b/docs/articles/new-expensify/expenses-&-payments/Approve-and-pay-expenses.md
@@ -29,7 +29,11 @@ To approve an expense,
{% include info.html %}
Admins can modify an expense, if needed.
{% include end-info.html %}
-
+
+![The approve button in an expense]({{site.url}}/assets/images/ExpensifyHelp_ApproveExpense_1.png){:width="100%"}
+
+![The approve button when you click into the expense]({{site.url}}/assets/images/ExpensifyHelp_ApproveExpense_2.png){:width="100%"}
+
You’re now ready to pay the expense.
# Hold an expense
diff --git a/docs/articles/new-expensify/expenses/Connect-a-Business-Bank-Account.md b/docs/articles/new-expensify/expenses-&-payments/Connect-a-Business-Bank-Account.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Connect-a-Business-Bank-Account.md
rename to docs/articles/new-expensify/expenses-&-payments/Connect-a-Business-Bank-Account.md
diff --git a/docs/articles/new-expensify/expenses/Create-an-expense.md b/docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Create-an-expense.md
rename to docs/articles/new-expensify/expenses-&-payments/Create-an-expense.md
diff --git a/docs/articles/new-expensify/expenses/Distance-Requests.md b/docs/articles/new-expensify/expenses-&-payments/Distance-Requests.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Distance-Requests.md
rename to docs/articles/new-expensify/expenses-&-payments/Distance-Requests.md
diff --git a/docs/articles/new-expensify/expenses/Resolve-Errors-Adding-a-Bank-Account.md b/docs/articles/new-expensify/expenses-&-payments/Resolve-Errors-Adding-a-Bank-Account.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Resolve-Errors-Adding-a-Bank-Account.md
rename to docs/articles/new-expensify/expenses-&-payments/Resolve-Errors-Adding-a-Bank-Account.md
diff --git a/docs/articles/new-expensify/expenses/Send-an-invoice.md b/docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Send-an-invoice.md
rename to docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md
diff --git a/docs/articles/new-expensify/expenses/Set-up-your-wallet.md b/docs/articles/new-expensify/expenses-&-payments/Set-up-your-wallet.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Set-up-your-wallet.md
rename to docs/articles/new-expensify/expenses-&-payments/Set-up-your-wallet.md
diff --git a/docs/articles/new-expensify/expenses/Split-an-expense.md b/docs/articles/new-expensify/expenses-&-payments/Split-an-expense.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Split-an-expense.md
rename to docs/articles/new-expensify/expenses-&-payments/Split-an-expense.md
diff --git a/docs/articles/new-expensify/expenses/Track-expenses.md b/docs/articles/new-expensify/expenses-&-payments/Track-expenses.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Track-expenses.md
rename to docs/articles/new-expensify/expenses-&-payments/Track-expenses.md
diff --git a/docs/articles/new-expensify/expenses/Unlock-a-Business-Bank-Account.md b/docs/articles/new-expensify/expenses-&-payments/Unlock-a-Business-Bank-Account.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Unlock-a-Business-Bank-Account.md
rename to docs/articles/new-expensify/expenses-&-payments/Unlock-a-Business-Bank-Account.md
diff --git a/docs/articles/new-expensify/expenses/Validate-a-Business-Bank-Account.md b/docs/articles/new-expensify/expenses-&-payments/Validate-a-Business-Bank-Account.md
similarity index 100%
rename from docs/articles/new-expensify/expenses/Validate-a-Business-Bank-Account.md
rename to docs/articles/new-expensify/expenses-&-payments/Validate-a-Business-Bank-Account.md
diff --git a/docs/articles/new-expensify/expensify-card/Enable-Expensify-Card-notifications.md b/docs/articles/new-expensify/expensify-card/Enable-Expensify-Card-notifications.md
new file mode 100644
index 000000000000..4bb56b1cc54c
--- /dev/null
+++ b/docs/articles/new-expensify/expensify-card/Enable-Expensify-Card-notifications.md
@@ -0,0 +1,57 @@
+---
+title: Enable Expensify Card notifications
+description: Allow notifications from Expensify
+---
+
+
+The Expensify mobile app sends you real-time notifications for spending activity on your Expensify Visa® Commercial Card, including
+- Purchase notifications, including declined payments
+- Fraudulent activity alerts
+- Requests for purchases that require a SmartScanned receipt
+
+There are two steps to enable Expensify Card notifications. You’ll first enable alerts on your workspace, then you’ll enable notifications on your device.
+
+# Step 1: Enable alerts on your workspace
+
+{% include selector.html values="desktop, mobile" %}
+
+{% include option.html value="desktop" %}
+1. From your Expensify Chat inbox, click the dropdown on the logo or avatar that is in the top left corner.
+2. Select the workspace you want to update the notification settings for.
+3. Click the workspace chat in your inbox (it will be the chat that has your workspace’s name as the chat title).
+4. Click the header at the top of the chat.
+5. Click **Settings**.
+6. Click **Notify me about new messages** and select **Immediately**.
+{% include end-option.html %}
+
+{% include option.html value="mobile" %}
+1. From your Expensify Chat inbox, tap the dropdown on the logo or avatar that is in the top left corner.
+2. Select the workspace you want to update the notification settings for.
+3. Tap the workspace chat in your inbox (it will be the chat that has your workspace’s name as the chat title).
+4. Tap the header at the top of the chat.
+5. Tap **Settings**.
+6. Tap **Notify me about new messages** and select **Immediately**.
+{% include end-option.html %}
+
+{% include end-selector.html %}
+
+# Step 2: Enable notifications on your device
+
+**iPhone**
+
+1. Go to your device settings.
+2. Find and tap **New Expensify**.
+3. Tap **Notifications** and enable notifications.
+4. Customize your alerts. Depending on your phone model, you may have extra options to customize the types of notifications you receive.
+
+**Android**
+
+1. Go to your device settings.
+2. Tap **Notifications** and select **Apps notifications**.
+3. Find and tap **New Expensify**.
+4. Enable notifications.
+5. Customize your alerts. Depending on your phone model, you may have extra options to customize the types of notifications you receive.
+
+You will now receive real-time spend notifications to your mobile device.
+
+
diff --git a/docs/assets/images/ExpensifyHelp-Invoice-1.png b/docs/assets/images/ExpensifyHelp-Invoice-1.png
new file mode 100644
index 000000000000..e4a042afef82
Binary files /dev/null and b/docs/assets/images/ExpensifyHelp-Invoice-1.png differ
diff --git a/docs/assets/images/ExpensifyHelp-QBO-1.png b/docs/assets/images/ExpensifyHelp-QBO-1.png
index 7a8af4c9859e..2aa80e954f1b 100644
Binary files a/docs/assets/images/ExpensifyHelp-QBO-1.png and b/docs/assets/images/ExpensifyHelp-QBO-1.png differ
diff --git a/docs/assets/images/ExpensifyHelp-QBO-2.png b/docs/assets/images/ExpensifyHelp-QBO-2.png
index f7679d00582d..23419b86b6aa 100644
Binary files a/docs/assets/images/ExpensifyHelp-QBO-2.png and b/docs/assets/images/ExpensifyHelp-QBO-2.png differ
diff --git a/docs/assets/images/ExpensifyHelp-QBO-3.png b/docs/assets/images/ExpensifyHelp-QBO-3.png
index 0277c7e21ecb..c612cb760d58 100644
Binary files a/docs/assets/images/ExpensifyHelp-QBO-3.png and b/docs/assets/images/ExpensifyHelp-QBO-3.png differ
diff --git a/docs/assets/images/ExpensifyHelp-QBO-4.png b/docs/assets/images/ExpensifyHelp-QBO-4.png
new file mode 100644
index 000000000000..7fbc99503f2e
Binary files /dev/null and b/docs/assets/images/ExpensifyHelp-QBO-4.png differ
diff --git a/docs/assets/images/ExpensifyHelp-QBO-5.png b/docs/assets/images/ExpensifyHelp-QBO-5.png
new file mode 100644
index 000000000000..600a5903c05f
Binary files /dev/null and b/docs/assets/images/ExpensifyHelp-QBO-5.png differ
diff --git a/docs/new-expensify/hubs/expenses/index.html b/docs/new-expensify/hubs/expenses-&-payments/index.html
similarity index 100%
rename from docs/new-expensify/hubs/expenses/index.html
rename to docs/new-expensify/hubs/expenses-&-payments/index.html
diff --git a/docs/redirects.csv b/docs/redirects.csv
index 1c849e0aabdc..f2d9a797415b 100644
--- a/docs/redirects.csv
+++ b/docs/redirects.csv
@@ -203,3 +203,14 @@ https://help.expensify.com/articles/new-expensify/chat/Expensify-Chat-For-Admins
https://help.expensify.com/articles/new-expensify/bank-accounts-and-payments/Connect-a-Bank-Account.html,https://help.expensify.com/articles/new-expensify/expenses/Connect-a-Business-Bank-Account
https://help.expensify.com/articles/expensify-classic/travel/Coming-Soon,https://help.expensify.com/expensify-classic/hubs/travel/
https://help.expensify.com/articles/new-expensify/expenses/Manually-submit-reports-for-approval,https://help.expensify.com/new-expensify/hubs/expenses/
+https://help.expensify.com/articles/new-expensify/expenses/Approve-and-pay-expenses,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Approve-and-pay-expenses
+https://help.expensify.com/articles/new-expensify/expenses/Connect-a-Business-Bank-Account,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Connect-a-Business-Bank-Account
+https://help.expensify.com/articles/new-expensify/expenses/Create-an-expense,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Create-an-expense
+https://help.expensify.com/articles/new-expensify/expenses/Distance-Requests,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Distance-Requests
+https://help.expensify.com/articles/new-expensify/expenses/Resolve-Errors-Adding-a-Bank-Account,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Resolve-Errors-Adding-a-Bank-Account
+https://help.expensify.com/articles/new-expensify/expenses/Send-an-invoice,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Send-an-invoice
+https://help.expensify.com/articles/new-expensify/expenses/Set-up-your-wallet,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Set-up-your-wallet
+https://help.expensify.com/articles/new-expensify/expenses/Split-an-expense,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Split-an-expense
+https://help.expensify.com/articles/new-expensify/expenses/Track-expenses,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Track-expenses
+https://help.expensify.com/articles/new-expensify/expenses/Unlock-a-Business-Bank-Account,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Unlock-a-Business-Bank-Account
+https://help.expensify.com/articles/new-expensify/expenses/Validate-a-Business-Bank-Account,https://help.expensify.com/articles/new-expensify/expenses-&-payments/Validate-a-Business-Bank-Account
\ No newline at end of file
diff --git a/fastlane/Fastfile b/fastlane/Fastfile
index b7d3334c902f..af9e798d2343 100644
--- a/fastlane/Fastfile
+++ b/fastlane/Fastfile
@@ -239,35 +239,27 @@ platform :ios do
}
)
- begin
- upload_to_testflight(
- api_key_path: "./ios/ios-fastlane-json-key.json",
- distribute_external: true,
- notify_external_testers: true,
- changelog: "Thank you for beta testing New Expensify, this version includes bug fixes and improvements.",
- groups: ["Beta"],
- demo_account_required: true,
- beta_app_review_info: {
- contact_email: ENV["APPLE_CONTACT_EMAIL"],
- contact_first_name: "Andrew",
- contact_last_name: "Gable",
- contact_phone: ENV["APPLE_CONTACT_PHONE"],
- demo_account_name: ENV["APPLE_DEMO_EMAIL"],
- demo_account_password: ENV["APPLE_DEMO_PASSWORD"],
- notes: "1. In the Expensify app, enter the email 'appletest.expensify@proton.me'. This will trigger a sign-in link to be sent to 'appletest.expensify@proton.me'
- 2. Navigate to https://account.proton.me/login, log into Proton Mail using 'appletest.expensify@proton.me' as email and the password associated with 'appletest.expensify@proton.me', provided above
- 3. Once logged into Proton Mail, navigate to your inbox and locate the email triggered in step 1. The email subject should be 'Your magic sign-in link for Expensify'
- 4. Open the email and copy the 6-digit sign-in code provided within
- 5. Return to the Expensify app and enter the copied 6-digit code in the designated login field"
- }
- )
- rescue Exception => e
- if e.message.include? "Another build is in review"
- UI.important("Another build is already in external beta review. Skipping external beta review submission")
- else
- raise
- end
- end
+ upload_to_testflight(
+ api_key_path: "./ios/ios-fastlane-json-key.json",
+ distribute_external: true,
+ notify_external_testers: true,
+ changelog: "Thank you for beta testing New Expensify, this version includes bug fixes and improvements.",
+ groups: ["Beta"],
+ demo_account_required: true,
+ beta_app_review_info: {
+ contact_email: ENV["APPLE_CONTACT_EMAIL"],
+ contact_first_name: "Andrew",
+ contact_last_name: "Gable",
+ contact_phone: ENV["APPLE_CONTACT_PHONE"],
+ demo_account_name: ENV["APPLE_DEMO_EMAIL"],
+ demo_account_password: ENV["APPLE_DEMO_PASSWORD"],
+ notes: "1. In the Expensify app, enter the email 'appletest.expensify@proton.me'. This will trigger a sign-in link to be sent to 'appletest.expensify@proton.me'
+ 2. Navigate to https://account.proton.me/login, log into Proton Mail using 'appletest.expensify@proton.me' as email and the password associated with 'appletest.expensify@proton.me', provided above
+ 3. Once logged into Proton Mail, navigate to your inbox and locate the email triggered in step 1. The email subject should be 'Your magic sign-in link for Expensify'
+ 4. Open the email and copy the 6-digit sign-in code provided within
+ 5. Return to the Expensify app and enter the copied 6-digit code in the designated login field"
+ }
+ )
upload_symbols_to_crashlytics(
app_id: "1:921154746561:ios:216bd10ccc947659027c40",
diff --git a/ios/NewApp_AdHoc.mobileprovision.gpg b/ios/NewApp_AdHoc.mobileprovision.gpg
index 29d379151525..32ed6ba30059 100644
Binary files a/ios/NewApp_AdHoc.mobileprovision.gpg and b/ios/NewApp_AdHoc.mobileprovision.gpg differ
diff --git a/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg b/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg
index cf14d27d7d87..5712b0d86b19 100644
Binary files a/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg and b/ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg differ
diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist
index a2e274eafc4d..17eaae3cc3fc 100644
--- a/ios/NewExpensify/Info.plist
+++ b/ios/NewExpensify/Info.plist
@@ -19,7 +19,7 @@
CFBundlePackageTypeAPPLCFBundleShortVersionString
- 9.0.2
+ 9.0.3CFBundleSignature????CFBundleURLTypes
@@ -40,7 +40,7 @@
CFBundleVersion
- 9.0.2.0
+ 9.0.3.6FullStoryOrgId
diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist
index e1f9960caa92..618d394349ed 100644
--- a/ios/NewExpensifyTests/Info.plist
+++ b/ios/NewExpensifyTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageTypeBNDLCFBundleShortVersionString
- 9.0.2
+ 9.0.3CFBundleSignature????CFBundleVersion
- 9.0.2.0
+ 9.0.3.6
diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist
index 7d83d9f3d273..d5e50828e3c7 100644
--- a/ios/NotificationServiceExtension/Info.plist
+++ b/ios/NotificationServiceExtension/Info.plist
@@ -11,9 +11,9 @@
CFBundleName$(PRODUCT_NAME)CFBundleShortVersionString
- 9.0.2
+ 9.0.3CFBundleVersion
- 9.0.2.0
+ 9.0.3.6NSExtensionNSExtensionPointIdentifier
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 35dccc2de393..a5ffdcb4b63c 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1243,7 +1243,13 @@ PODS:
- react-native-config (1.5.0):
- react-native-config/App (= 1.5.0)
- react-native-config/App (1.5.0):
- - React-Core
+ - RCT-Folly
+ - RCTRequired
+ - RCTTypeSafety
+ - React
+ - React-Codegen
+ - React-RCTFabric
+ - ReactCommon/turbomodule/core
- react-native-document-picker (9.1.1):
- RCT-Folly
- RCTRequired
@@ -1974,7 +1980,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- - RNScreens (3.30.1):
+ - RNScreens (3.32.0):
- glog
- hermes-engine
- RCT-Folly (= 2022.05.16.00)
@@ -1988,13 +1994,14 @@ PODS:
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
+ - React-RCTImage
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- - RNScreens/common (= 3.30.1)
+ - RNScreens/common (= 3.32.0)
- Yoga
- - RNScreens/common (3.30.1):
+ - RNScreens/common (3.32.0):
- glog
- hermes-engine
- RCT-Folly (= 2022.05.16.00)
@@ -2008,6 +2015,7 @@ PODS:
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
+ - React-RCTImage
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
@@ -2552,7 +2560,7 @@ SPEC CHECKSUMS:
react-native-airship: 38e2596999242b68c933959d6145512e77937ac0
react-native-blob-util: 1ddace5234c62e3e6e4e154d305ad07ef686599b
react-native-cameraroll: f373bebbe9f6b7c3fd2a6f97c5171cda574cf957
- react-native-config: 5330c8258265c1e5fdb8c009d2cabd6badd96727
+ react-native-config: 5ce986133b07fc258828b20b9506de0e683efc1c
react-native-document-picker: 8532b8af7c2c930f9e202aac484ac785b0f4f809
react-native-geolocation: f9e92eb774cb30ac1e099f34b3a94f03b4db7eb3
react-native-image-picker: f8a13ff106bcc7eb00c71ce11fdc36aac2a44440
@@ -2612,7 +2620,7 @@ SPEC CHECKSUMS:
RNPermissions: 0b61d30d21acbeafe25baaa47d9bae40a0c65216
RNReactNativeHapticFeedback: 616c35bdec7d20d4c524a7949ca9829c09e35f37
RNReanimated: 323436b1a5364dca3b5f8b1a13458455e0de9efe
- RNScreens: 9ec969a95987a6caae170ef09313138abf3331e1
+ RNScreens: abd354e98519ed267600b7ee64fdcb8e060b1218
RNShare: 2a4cdfc0626ad56b0ef583d424f2038f772afe58
RNSound: 6c156f925295bdc83e8e422e7d8b38d33bc71852
RNSVG: 18f1381e046be2f1c30b4724db8d0c966238089f
diff --git a/package-lock.json b/package-lock.json
index fb15d51d1389..9f63be958d1a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "new.expensify",
- "version": "9.0.2-0",
+ "version": "9.0.3-6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "new.expensify",
- "version": "9.0.2-0",
+ "version": "9.0.3-6",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -102,7 +102,7 @@
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
- "react-native-onyx": "2.0.53",
+ "react-native-onyx": "2.0.54",
"react-native-pager-view": "6.2.3",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
@@ -115,7 +115,7 @@
"react-native-release-profiler": "^0.1.6",
"react-native-render-html": "6.3.1",
"react-native-safe-area-context": "4.8.2",
- "react-native-screens": "3.30.1",
+ "react-native-screens": "3.32.0",
"react-native-share": "^10.0.2",
"react-native-sound": "^0.11.2",
"react-native-svg": "14.1.0",
@@ -155,6 +155,9 @@
"@octokit/core": "4.0.4",
"@octokit/plugin-paginate-rest": "3.1.0",
"@octokit/plugin-throttling": "4.1.0",
+ "@perf-profiler/profiler": "^0.10.10",
+ "@perf-profiler/reporter": "^0.9.0",
+ "@perf-profiler/types": "^0.8.0",
"@react-native-community/eslint-config": "3.2.0",
"@react-native/babel-preset": "^0.73.21",
"@react-native/metro-config": "^0.73.5",
@@ -183,6 +186,7 @@
"@types/react-beautiful-dnd": "^13.1.4",
"@types/react-collapse": "^5.0.1",
"@types/react-dom": "^18.2.4",
+ "@types/react-is": "^18.3.0",
"@types/react-test-renderer": "^18.0.0",
"@types/semver": "^7.5.4",
"@types/setimmediate": "^1.0.2",
@@ -232,6 +236,7 @@
"portfinder": "^1.0.28",
"prettier": "^2.8.8",
"pusher-js-mock": "^0.3.3",
+ "react-is": "^18.3.1",
"react-native-clean-project": "^4.0.0-alpha4.0",
"react-test-renderer": "18.2.0",
"reassure": "^0.10.1",
@@ -7873,6 +7878,116 @@
"react-native": ">=0.70.0 <1.0.x"
}
},
+ "node_modules/@perf-profiler/android": {
+ "version": "0.12.1",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/android/-/android-0.12.1.tgz",
+ "integrity": "sha512-t4E2tfj9UdJw5JjhFPLMzrsu3NkKSyiZyeIyd70HX9d3anWqNK47XuQV+qkDPMjWaoU+CTlj1SuNnIOqEkCpSA==",
+ "dev": true,
+ "dependencies": {
+ "@perf-profiler/logger": "^0.3.3",
+ "@perf-profiler/profiler": "^0.10.10",
+ "@perf-profiler/types": "^0.8.0",
+ "commander": "^12.0.0",
+ "lodash": "^4.17.21"
+ },
+ "bin": {
+ "perf-profiler-commands": "dist/src/commands.js"
+ }
+ },
+ "node_modules/@perf-profiler/android/node_modules/commander": {
+ "version": "12.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
+ "dev": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@perf-profiler/ios": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/ios/-/ios-0.3.2.tgz",
+ "integrity": "sha512-2jYyHXFO3xe5BdvU1Ttt+Uw2nAf10B3/mcx4FauJwSdJ+nlOAKIvxmZDvMcipCZZ63uc+HWsYndhziJZVQ7VUw==",
+ "dev": true,
+ "dependencies": {
+ "@perf-profiler/ios-instruments": "^0.3.2",
+ "@perf-profiler/logger": "^0.3.3",
+ "@perf-profiler/types": "^0.8.0"
+ }
+ },
+ "node_modules/@perf-profiler/ios-instruments": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/ios-instruments/-/ios-instruments-0.3.2.tgz",
+ "integrity": "sha512-uox5arQscpRuGWfzBrTpsn6eJq0ErdjPlU0FMbN4Cv5akQC11ejKWmgV6y4FR/0YIET9uiiXMtnwyEBgUunYGQ==",
+ "dev": true,
+ "dependencies": {
+ "@perf-profiler/logger": "^0.3.3",
+ "@perf-profiler/profiler": "^0.10.10",
+ "@perf-profiler/types": "^0.8.0",
+ "commander": "^12.0.0",
+ "fast-xml-parser": "^4.2.7"
+ },
+ "bin": {
+ "flashlight-ios-poc": "dist/launchIOS.js"
+ }
+ },
+ "node_modules/@perf-profiler/ios-instruments/node_modules/commander": {
+ "version": "12.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
+ "dev": true,
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@perf-profiler/logger": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/logger/-/logger-0.3.3.tgz",
+ "integrity": "sha512-iAJJ5gWhJ3zEpdMT7M2+HX0Q0UjSuCOZiEs5g8UKKPFYQjmPWwC6otHoZz6ZzRRddjiA065iD2PTytVFkpFTeQ==",
+ "dev": true,
+ "dependencies": {
+ "kleur": "^4.1.5",
+ "luxon": "^3.4.4"
+ },
+ "bin": {
+ "perf-profiler-logger": "dist/bin.js"
+ }
+ },
+ "node_modules/@perf-profiler/logger/node_modules/kleur": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/@perf-profiler/profiler": {
+ "version": "0.10.10",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/profiler/-/profiler-0.10.10.tgz",
+ "integrity": "sha512-kvVC6VQ7pBdthcWEcLTua+iDj0ZkcmYYL9gXHa9Dl7jYkZI4cOeslJZ1vuGfIcC168JwAVrB8UYhgoSgss/MWQ==",
+ "dev": true,
+ "dependencies": {
+ "@perf-profiler/android": "^0.12.1",
+ "@perf-profiler/ios": "^0.3.2",
+ "@perf-profiler/types": "^0.8.0"
+ }
+ },
+ "node_modules/@perf-profiler/reporter": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/reporter/-/reporter-0.9.0.tgz",
+ "integrity": "sha512-wJt6ZRVM/cL+8rv9gFYgl8ZIra0uKdesfcfvsvhmrPXtxgC0O4ZdHF9hJDMtcCiHuHb8ptVq/BmEEW84CnvRIw==",
+ "dev": true,
+ "dependencies": {
+ "@perf-profiler/types": "^0.8.0",
+ "lodash": "^4.17.21"
+ }
+ },
+ "node_modules/@perf-profiler/types": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@perf-profiler/types/-/types-0.8.0.tgz",
+ "integrity": "sha512-TFiktv00SzLjjPp1hFYYjT9O36iGIUaF6yPLd7x/UT4CuLd0YYDUj+gvX0fbXtVtV7141tTvWbXFL5HiXGx0kw==",
+ "dev": true
+ },
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"dev": true,
@@ -9850,6 +9965,11 @@
"react": "*"
}
},
+ "node_modules/@react-navigation/core/node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ },
"node_modules/@react-navigation/devtools": {
"version": "6.0.10",
"dev": true,
@@ -17888,6 +18008,15 @@
"@types/react": "*"
}
},
+ "node_modules/@types/react-is": {
+ "version": "18.3.0",
+ "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-18.3.0.tgz",
+ "integrity": "sha512-KZJpHUkAdzyKj/kUHJDc6N7KyidftICufJfOFpiG6haL/BDQNQt5i4n1XDUL/nDZAtGLHDSWRYpLzKTAKSvX6w==",
+ "dev": true,
+ "dependencies": {
+ "@types/react": "*"
+ }
+ },
"node_modules/@types/react-native": {
"version": "0.73.0",
"deprecated": "This is a stub types definition. react-native provides its own type definitions, so you do not need this installed.",
@@ -20335,6 +20464,12 @@
"node": ">= 6"
}
},
+ "node_modules/babel-plugin-react-compiler/node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
+ },
"node_modules/babel-plugin-react-compiler/node_modules/source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
@@ -27852,6 +27987,11 @@
"react-is": "^16.7.0"
}
},
+ "node_modules/hoist-non-react-statics/node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ },
"node_modules/hosted-git-info": {
"version": "4.1.0",
"dev": true,
@@ -33116,6 +33256,15 @@
"node": ">=10"
}
},
+ "node_modules/luxon": {
+ "version": "3.4.4",
+ "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.4.tgz",
+ "integrity": "sha512-zobTr7akeGHnv7eBOXcRgMeCP6+uyYsczwmeRCauvpvaAltgNyTbLH/+VaEAPUeWBT+1GuNmz4wC/6jtQzbbVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/magic-string": {
"version": "0.30.9",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz",
@@ -36034,10 +36183,6 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
- "node_modules/pretty-format/node_modules/react-is": {
- "version": "18.2.0",
- "license": "MIT"
- },
"node_modules/pretty-hrtime": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
@@ -36116,6 +36261,11 @@
"react-is": "^16.13.1"
}
},
+ "node_modules/prop-types/node_modules/react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+ },
"node_modules/propagate": {
"version": "2.0.1",
"license": "MIT",
@@ -36773,8 +36923,9 @@
}
},
"node_modules/react-is": {
- "version": "16.13.1",
- "license": "MIT"
+ "version": "18.3.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
+ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="
},
"node_modules/react-map-gl": {
"version": "7.1.3",
@@ -37126,9 +37277,9 @@
}
},
"node_modules/react-native-onyx": {
- "version": "2.0.53",
- "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-2.0.53.tgz",
- "integrity": "sha512-ObNk5MhLOAVkLgE0NCI04CEO3qaP5ZG+NY1Kn3UnxcHlhyLlDQb10EOiDWSLwNR2s4K3kK+ge7Xmo6N0VdMyyA==",
+ "version": "2.0.54",
+ "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-2.0.54.tgz",
+ "integrity": "sha512-cANbs0KuiwHAIUC0HY7DGNXbFMHH4ZWbTci+qhHhuNNf4aNIP0/ncJ4W8a3VCgFVtfobIFAX5ouT40dEcgBOIQ==",
"dependencies": {
"ascii-table": "0.0.9",
"fast-equals": "^4.0.3",
@@ -37355,9 +37506,9 @@
}
},
"node_modules/react-native-screens": {
- "version": "3.30.1",
- "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.30.1.tgz",
- "integrity": "sha512-/muEvjocCtFb+j5J3YmLvB25+f4rIU8hnnxgGTkXcAf2omPBY8uhPjJaaFUlvj64VEoEzJcRpugbXWsjfPPIFg==",
+ "version": "3.32.0",
+ "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.32.0.tgz",
+ "integrity": "sha512-wybqZAHX7v8ipOXhh90CqGLkBHw5JYqKNRBX7R/b0c2WQisTOgu0M0yGwBMM6LyXRBT+4k3NTGHdDbpJVpq0yQ==",
"dependencies": {
"react-freeze": "^1.0.0",
"warn-once": "^0.1.0"
diff --git a/package.json b/package.json
index d4be691e2fc2..c61316e22030 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
- "version": "9.0.2-0",
+ "version": "9.0.3-6",
"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.",
@@ -36,7 +36,7 @@
"android-build-e2edelta": "bundle exec fastlane android build_e2edelta",
"test": "TZ=utc NODE_OPTIONS=--experimental-vm-modules jest",
"typecheck": "tsc",
- "lint": "eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/eslint",
+ "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=0 --cache --cache-location=node_modules/.cache/eslint",
"lint-changed": "eslint --fix $(git diff --diff-filter=AM --name-only main -- \"*.js\" \"*.ts\" \"*.tsx\")",
"lint-watch": "npx eslint-watch --watch --changed",
"shellcheck": "./scripts/shellCheck.sh",
@@ -155,7 +155,7 @@
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
- "react-native-onyx": "2.0.53",
+ "react-native-onyx": "2.0.54",
"react-native-pager-view": "6.2.3",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
@@ -168,7 +168,7 @@
"react-native-release-profiler": "^0.1.6",
"react-native-render-html": "6.3.1",
"react-native-safe-area-context": "4.8.2",
- "react-native-screens": "3.30.1",
+ "react-native-screens": "3.32.0",
"react-native-share": "^10.0.2",
"react-native-sound": "^0.11.2",
"react-native-svg": "14.1.0",
@@ -208,6 +208,9 @@
"@octokit/core": "4.0.4",
"@octokit/plugin-paginate-rest": "3.1.0",
"@octokit/plugin-throttling": "4.1.0",
+ "@perf-profiler/profiler": "^0.10.10",
+ "@perf-profiler/reporter": "^0.9.0",
+ "@perf-profiler/types": "^0.8.0",
"@react-native-community/eslint-config": "3.2.0",
"@react-native/babel-preset": "^0.73.21",
"@react-native/metro-config": "^0.73.5",
@@ -236,6 +239,7 @@
"@types/react-beautiful-dnd": "^13.1.4",
"@types/react-collapse": "^5.0.1",
"@types/react-dom": "^18.2.4",
+ "@types/react-is": "^18.3.0",
"@types/react-test-renderer": "^18.0.0",
"@types/semver": "^7.5.4",
"@types/setimmediate": "^1.0.2",
@@ -285,6 +289,7 @@
"portfinder": "^1.0.28",
"prettier": "^2.8.8",
"pusher-js-mock": "^0.3.3",
+ "react-is": "^18.3.1",
"react-native-clean-project": "^4.0.0-alpha4.0",
"react-test-renderer": "18.2.0",
"reassure": "^0.10.1",
diff --git a/patches/@perf-profiler+android+0.12.1.patch b/patches/@perf-profiler+android+0.12.1.patch
new file mode 100644
index 000000000000..e6e4a90d6ab4
--- /dev/null
+++ b/patches/@perf-profiler+android+0.12.1.patch
@@ -0,0 +1,26 @@
+diff --git a/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js b/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js
+index 59aeed9..ee1d8a6 100644
+--- a/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js
++++ b/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js
+@@ -28,7 +28,7 @@ exports.CppProfilerName = `BAMPerfProfiler`;
+ // into the Flipper plugin directory
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-expect-error
+-const binaryFolder = global.Flipper
++const binaryFolder = (global.Flipper || process.env.AWS)
+ ? `${__dirname}/bin`
+ : `${__dirname}/../../..${__dirname.includes("dist") ? "/.." : ""}/cpp-profiler/bin`;
+ class UnixProfiler {
+diff --git a/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts b/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts
+index ccacf09..1eea659 100644
+--- a/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts
++++ b/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts
+@@ -26,7 +26,7 @@ export const CppProfilerName = `BAMPerfProfiler`;
+ // into the Flipper plugin directory
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-expect-error
+-const binaryFolder = global.Flipper
++const binaryFolder = (global.Flipper || process.env.AWS)
+ ? `${__dirname}/bin`
+ : `${__dirname}/../../..${__dirname.includes("dist") ? "/.." : ""}/cpp-profiler/bin`;
+
diff --git a/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch b/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
index e36d2dd365c0..ccc208062d10 100644
--- a/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
+++ b/patches/react-native-reanimated+3.8.1+003+fix-strict-mode.patch
@@ -1,3 +1,16 @@
+diff --git a/node_modules/react-native-reanimated/Common/cpp/Fabric/ReanimatedCommitMarker.cpp b/node_modules/react-native-reanimated/Common/cpp/Fabric/ReanimatedCommitMarker.cpp
+index 3404e89..b545cb6 100644
+--- a/node_modules/react-native-reanimated/Common/cpp/Fabric/ReanimatedCommitMarker.cpp
++++ b/node_modules/react-native-reanimated/Common/cpp/Fabric/ReanimatedCommitMarker.cpp
+@@ -9,7 +9,7 @@ namespace reanimated {
+ thread_local bool ReanimatedCommitMarker::reanimatedCommitFlag_{false};
+
+ ReanimatedCommitMarker::ReanimatedCommitMarker() {
+- react_native_assert(reanimatedCommitFlag_ != true);
++ // react_native_assert(reanimatedCommitFlag_ != true);
+ reanimatedCommitFlag_ = true;
+ }
+
diff --git a/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js b/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js
index e69c581..78b7034 100644
--- a/node_modules/react-native-reanimated/lib/module/reanimated2/UpdateProps.js
diff --git a/patches/react-native-screens+3.30.1+001+fix-screen-type.patch b/patches/react-native-screens+3.30.1+001+fix-screen-type.patch
deleted file mode 100644
index f282ec58b07b..000000000000
--- a/patches/react-native-screens+3.30.1+001+fix-screen-type.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/node_modules/react-native-screens/src/components/Screen.tsx b/node_modules/react-native-screens/src/components/Screen.tsx
-index 3f9a1cb..45767f7 100644
---- a/node_modules/react-native-screens/src/components/Screen.tsx
-+++ b/node_modules/react-native-screens/src/components/Screen.tsx
-@@ -79,6 +79,7 @@ export class InnerScreen extends React.Component {
- // Due to how Yoga resolves layout, we need to have different components for modal nad non-modal screens
- const AnimatedScreen =
- Platform.OS === 'android' ||
-+ stackPresentation === undefined ||
- stackPresentation === 'push' ||
- stackPresentation === 'containedModal' ||
- stackPresentation === 'containedTransparentModal'
diff --git a/src/CONST.ts b/src/CONST.ts
index e71ad55a452c..46782be36b62 100755
--- a/src/CONST.ts
+++ b/src/CONST.ts
@@ -364,6 +364,8 @@ const CONST = {
NETSUITE_ON_NEW_EXPENSIFY: 'netsuiteOnNewExpensify',
REPORT_FIELDS_FEATURE: 'reportFieldsFeature',
WORKSPACE_FEEDS: 'workspaceFeeds',
+ NETSUITE_USA_TAX: 'netsuiteUsaTax',
+ INTACCT_ON_NEW_EXPENSIFY: 'intacctOnNewExpensify',
},
BUTTON_STATES: {
DEFAULT: 'default',
@@ -601,6 +603,10 @@ const CONST = {
ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/',
LIST_OF_RESTRICTED_BUSINESSES: 'https://community.expensify.com/discussion/6191/list-of-restricted-businesses',
TRAVEL_TERMS_URL: `${USE_EXPENSIFY_URL}/travelterms`,
+ EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT: 'https://www.expensify.com/tools/integrations/downloadPackage',
+ EXPENSIFY_PACKAGE_FOR_SAGE_INTACCT_FILE_NAME: 'ExpensifyPackageForSageIntacct',
+ HOW_TO_CONNECT_TO_SAGE_INTACCT: 'https://help.expensify.com/articles/expensify-classic/integrations/accounting-integrations/Sage-Intacct#how-to-connect-to-sage-intacct',
+ PRICING: `https://www.expensify.com/pricing`,
// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
@@ -670,12 +676,12 @@ const CONST = {
CLOSED: 'CLOSED',
CREATED: 'CREATED',
DELEGATE_SUBMIT: 'DELEGATESUBMIT', // OldDot Action
- DELETED_ACCOUNT: 'DELETEDACCOUNT', // OldDot Action
+ DELETED_ACCOUNT: 'DELETEDACCOUNT', // Deprecated OldDot Action
DISMISSED_VIOLATION: 'DISMISSEDVIOLATION',
- DONATION: 'DONATION', // OldDot Action
+ DONATION: 'DONATION', // Deprecated OldDot Action
EXPORTED_TO_CSV: 'EXPORTCSV', // OldDot Action
EXPORTED_TO_INTEGRATION: 'EXPORTINTEGRATION', // OldDot Action
- EXPORTED_TO_QUICK_BOOKS: 'EXPORTED', // OldDot Action
+ EXPORTED_TO_QUICK_BOOKS: 'EXPORTED', // Deprecated OldDot Action
FORWARDED: 'FORWARDED', // OldDot Action
HOLD: 'HOLD',
HOLD_COMMENT: 'HOLDCOMMENT',
@@ -695,9 +701,9 @@ const CONST = {
REIMBURSEMENT_DELAYED: 'REIMBURSEMENTDELAYED', // OldDot Action
REIMBURSEMENT_QUEUED: 'REIMBURSEMENTQUEUED',
REIMBURSEMENT_DEQUEUED: 'REIMBURSEMENTDEQUEUED',
- REIMBURSEMENT_REQUESTED: 'REIMBURSEMENTREQUESTED', // OldDot Action
- REIMBURSEMENT_SETUP: 'REIMBURSEMENTSETUP', // OldDot Action
- REIMBURSEMENT_SETUP_REQUESTED: 'REIMBURSEMENTSETUPREQUESTED', // OldDot Action
+ REIMBURSEMENT_REQUESTED: 'REIMBURSEMENTREQUESTED', // Deprecated OldDot Action
+ REIMBURSEMENT_SETUP: 'REIMBURSEMENTSETUP', // Deprecated OldDot Action
+ REIMBURSEMENT_SETUP_REQUESTED: 'REIMBURSEMENTSETUPREQUESTED', // Deprecated OldDot Action
RENAMED: 'RENAMED',
REPORT_PREVIEW: 'REPORTPREVIEW',
SELECTED_FOR_RANDOM_AUDIT: 'SELECTEDFORRANDOMAUDIT', // OldDot Action
@@ -1283,6 +1289,7 @@ const CONST = {
REPORT_FIELD: 'REPORT_FIELD',
NOT_IMPORTED: 'NOT_IMPORTED',
IMPORTED: 'IMPORTED',
+ NETSUITE_DEFAULT: 'NETSUITE_DEFAULT',
},
QUICKBOOKS_ONLINE: 'quickbooksOnline',
@@ -1333,10 +1340,6 @@ const CONST = {
},
},
- NETSUITE_CONFIG: {
- SUBSIDIARY: 'subsidiary',
- },
-
QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE: {
VENDOR_BILL: 'bill',
CHECK: 'check',
@@ -1349,6 +1352,135 @@ const CONST = {
REPORT_SUBMITTED: 'REPORT_SUBMITTED',
},
+ NETSUITE_CONFIG: {
+ SUBSIDIARY: 'subsidiary',
+ EXPORTER: 'exporter',
+ EXPORT_DATE: 'exportDate',
+ REIMBURSABLE_EXPENSES_EXPORT_DESTINATION: 'reimbursableExpensesExportDestination',
+ NON_REIMBURSABLE_EXPENSES_EXPORT_DESTINATION: 'nonreimbursableExpensesExportDestination',
+ DEFAULT_VENDOR: 'defaultVendor',
+ REIMBURSABLE_PAYABLE_ACCOUNT: 'reimbursablePayableAccount',
+ PAYABLE_ACCT: 'payableAcct',
+ JOURNAL_POSTING_PREFERENCE: 'journalPostingPreference',
+ RECEIVABLE_ACCOUNT: 'receivableAccount',
+ INVOICE_ITEM_PREFERENCE: 'invoiceItemPreference',
+ INVOICE_ITEM: 'invoiceItem',
+ TAX_POSTING_ACCOUNT: 'taxPostingAccount',
+ PROVINCIAL_TAX_POSTING_ACCOUNT: 'provincialTaxPostingAccount',
+ ALLOW_FOREIGN_CURRENCY: 'allowForeignCurrency',
+ EXPORT_TO_NEXT_OPEN_PERIOD: 'exportToNextOpenPeriod',
+ IMPORT_FIELDS: ['departments', 'classes', 'locations', 'customers', 'jobs'],
+ IMPORT_CUSTOM_FIELDS: ['customSegments', 'customLists'],
+ SYNC_OPTIONS: {
+ SYNC_TAX: 'syncTax',
+ },
+ },
+
+ NETSUITE_EXPORT_DATE: {
+ LAST_EXPENSE: 'LAST_EXPENSE',
+ EXPORTED: 'EXPORTED',
+ SUBMITTED: 'SUBMITTED',
+ },
+
+ NETSUITE_EXPORT_DESTINATION: {
+ EXPENSE_REPORT: 'EXPENSE_REPORT',
+ VENDOR_BILL: 'VENDOR_BILL',
+ JOURNAL_ENTRY: 'JOURNAL_ENTRY',
+ },
+
+ NETSUITE_INVOICE_ITEM_PREFERENCE: {
+ CREATE: 'create',
+ SELECT: 'select',
+ },
+
+ NETSUITE_JOURNAL_POSTING_PREFERENCE: {
+ JOURNALS_POSTING_INDIVIDUAL_LINE: 'JOURNALS_POSTING_INDIVIDUAL_LINE',
+ JOURNALS_POSTING_TOTAL_LINE: 'JOURNALS_POSTING_TOTAL_LINE',
+ },
+
+ NETSUITE_EXPENSE_TYPE: {
+ REIMBURSABLE: 'reimbursable',
+ NON_REIMBURSABLE: 'nonreimbursable',
+ },
+
+ /**
+ * Countries where tax setting is permitted (Strings are in the format of Netsuite's Country type/enum)
+ *
+ * Should mirror the list on the OldDot.
+ */
+ NETSUITE_TAX_COUNTRIES: [
+ '_canada',
+ '_unitedKingdomGB',
+ '_unitedKingdom',
+ '_australia',
+ '_southAfrica',
+ '_india',
+ '_france',
+ '_netherlands',
+ '_germany',
+ '_singapore',
+ '_spain',
+ '_ireland',
+ '_denmark',
+ '_brazil',
+ '_japan',
+ '_philippines',
+ '_china',
+ '_argentina',
+ '_newZealand',
+ '_switzerland',
+ '_sweden',
+ '_portugal',
+ '_mexico',
+ '_israel',
+ '_thailand',
+ '_czechRepublic',
+ '_egypt',
+ '_ghana',
+ '_indonesia',
+ '_iranIslamicRepublicOf',
+ '_jordan',
+ '_kenya',
+ '_kuwait',
+ '_lebanon',
+ '_malaysia',
+ '_morocco',
+ '_myanmar',
+ '_nigeria',
+ '_pakistan',
+ '_saudiArabia',
+ '_sriLanka',
+ '_unitedArabEmirates',
+ '_vietnam',
+ '_austria',
+ '_bulgaria',
+ '_greece',
+ '_cyprus',
+ '_norway',
+ '_romania',
+ '_poland',
+ '_hongKong',
+ '_luxembourg',
+ '_lithuania',
+ '_malta',
+ '_finland',
+ '_koreaRepublicOf',
+ '_italy',
+ '_georgia',
+ '_hungary',
+ '_latvia',
+ '_estonia',
+ '_slovenia',
+ '_serbia',
+ '_croatiaHrvatska',
+ '_belgium',
+ '_turkey',
+ '_taiwan',
+ '_azerbaijan',
+ '_slovakRepublic',
+ '_costaRica',
+ ] as string[],
+
QUICKBOOKS_EXPORT_DATE: {
LAST_EXPENSE: 'LAST_EXPENSE',
REPORT_EXPORTED: 'REPORT_EXPORTED',
@@ -1724,6 +1856,7 @@ const CONST = {
ARE_WORKFLOWS_ENABLED: 'areWorkflowsEnabled',
ARE_REPORT_FIELDS_ENABLED: 'areReportFieldsEnabled',
ARE_CONNECTIONS_ENABLED: 'areConnectionsEnabled',
+ ARE_EXPENSIFY_CARDS_ENABLED: 'areExpensifyCardsEnabled',
ARE_TAXES_ENABLED: 'tax',
},
CATEGORIES_BULK_ACTION_TYPES: {
@@ -1792,6 +1925,13 @@ const CONST = {
QBO: 'quickbooksOnline',
XERO: 'xero',
NETSUITE: 'netsuite',
+ SAGE_INTACCT: 'intacct',
+ },
+ NAME_USER_FRIENDLY: {
+ netsuite: 'NetSuite',
+ quickbooksOnline: 'Quickbooks Online',
+ xero: 'Xero',
+ intacct: 'Sage Intacct',
},
SYNC_STAGE_NAME: {
STARTING_IMPORT_QBO: 'startingImportQBO',
@@ -1839,6 +1979,12 @@ const CONST = {
NETSUITE_SYNC_UPDATE_DATA: 'netSuiteSyncUpdateConnectionData',
NETSUITE_SYNC_NETSUITE_REIMBURSED_REPORTS: 'netSuiteSyncNetSuiteReimbursedReports',
NETSUITE_SYNC_EXPENSIFY_REIMBURSED_REPORTS: 'netSuiteSyncExpensifyReimbursedReports',
+ SAGE_INTACCT_SYNC_CHECK_CONNECTION: 'intacctCheckConnection',
+ SAGE_INTACCT_SYNC_IMPORT_TITLE: 'intacctImportTitle',
+ SAGE_INTACCT_SYNC_IMPORT_DATA: 'intacctImportData',
+ SAGE_INTACCT_SYNC_IMPORT_EMPLOYEES: 'intacctImportEmployees',
+ SAGE_INTACCT_SYNC_IMPORT_DIMENSIONS: 'intacctImportDimensions',
+ SAGE_INTACCT_SYNC_IMPORT_SYNC_REIMBURSED_REPORTS: 'intacctImportSyncBillPayments',
},
SYNC_STAGE_TIMEOUT_MINUTES: 20,
},
@@ -1915,6 +2061,15 @@ const CONST = {
MONTHLY: 'monthly',
FIXED: 'fixed',
},
+ STEP_NAMES: ['1', '2', '3', '4', '5', '6'],
+ STEP: {
+ ASSIGNEE: 'Assignee',
+ CARD_TYPE: 'CardType',
+ LIMIT_TYPE: 'LimitType',
+ LIMIT: 'Limit',
+ CARD_NAME: 'CardName',
+ CONFIRMATION: 'Confirmation',
+ },
},
AVATAR_ROW_SIZE: {
DEFAULT: 4,
@@ -2032,6 +2187,7 @@ const CONST = {
WORKSPACE_INVOICES: 'WorkspaceSendInvoices',
WORKSPACE_TRAVEL: 'WorkspaceBookTravel',
WORKSPACE_MEMBERS: 'WorkspaceManageMembers',
+ WORKSPACE_EXPENSIFY_CARD: 'WorkspaceExpensifyCard',
WORKSPACE_WORKFLOWS: 'WorkspaceWorkflows',
WORKSPACE_BANK_ACCOUNT: 'WorkspaceBankAccount',
WORKSPACE_SETTINGS: 'WorkspaceSettings',
@@ -4873,6 +5029,14 @@ const CONST = {
ACTION: 'action',
TAX_AMOUNT: 'taxAmount',
},
+ BULK_ACTION_TYPES: {
+ DELETE: 'delete',
+ HOLD: 'hold',
+ UNHOLD: 'unhold',
+ SUBMIT: 'submit',
+ APPROVE: 'approve',
+ PAY: 'pay',
+ },
},
REFERRER: {
@@ -4889,10 +5053,6 @@ const CONST = {
},
SUBSCRIPTION_PRICE_FACTOR: 2,
- SUBSCRIPTION_POSSIBLE_COST_SAVINGS: {
- COLLECT_PLAN: 10,
- CONTROL_PLAN: 18,
- },
FEEDBACK_SURVEY_OPTIONS: {
TOO_LIMITED: {
ID: 'tooLimited',
@@ -4912,6 +5072,12 @@ const CONST = {
},
},
+ WORKSPACE_CARDS_LIST_LABEL_TYPE: {
+ CURRENT_BALANCE: 'currentBalance',
+ REMAINING_LIMIT: 'remainingLimit',
+ CASH_BACK: 'cashBack',
+ },
+
EXCLUDE_FROM_LAST_VISITED_PATH: [SCREENS.NOT_FOUND, SCREENS.SAML_SIGN_IN, SCREENS.VALIDATE_LOGIN] as string[],
} as const;
diff --git a/src/Expensify.tsx b/src/Expensify.tsx
index 458f1e3c5d24..bfe4db13d9c4 100644
--- a/src/Expensify.tsx
+++ b/src/Expensify.tsx
@@ -1,7 +1,7 @@
import {Audio} from 'expo-av';
import React, {useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react';
import type {NativeEventSubscription} from 'react-native';
-import {AppState, Linking} from 'react-native';
+import {AppState, Linking, NativeModules} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import Onyx, {withOnyx} from 'react-native-onyx';
import ConfirmModal from './components/ConfirmModal';
@@ -77,9 +77,12 @@ type ExpensifyOnyxProps = {
type ExpensifyProps = ExpensifyOnyxProps;
-type SplashScreenHiddenContextType = {isSplashHidden?: boolean};
+// HybridApp needs access to SetStateAction in order to properly hide SplashScreen when React Native was booted before.
+type SplashScreenHiddenContextType = {isSplashHidden?: boolean; setIsSplashHidden: React.Dispatch>};
-const SplashScreenHiddenContext = React.createContext({});
+const SplashScreenHiddenContext = React.createContext({
+ setIsSplashHidden: () => {},
+});
function Expensify({
isCheckingPublicRoom = true,
@@ -109,16 +112,6 @@ function Expensify({
const isAuthenticated = useMemo(() => !!(session?.authToken ?? null), [session]);
const autoAuthState = useMemo(() => session?.autoAuthState ?? '', [session]);
- const isAuthenticatedRef = useRef(false);
- isAuthenticatedRef.current = isAuthenticated;
-
- const contextValue = useMemo(
- () => ({
- isSplashHidden,
- }),
- [isSplashHidden],
- );
-
const shouldInit = isNavigationReady && hasAttemptedToOpenPublicRoom;
const shouldHideSplash = shouldInit && !isSplashHidden;
@@ -142,6 +135,14 @@ function Expensify({
Performance.markEnd(CONST.TIMING.SIDEBAR_LOADED);
}, []);
+ const contextValue = useMemo(
+ () => ({
+ isSplashHidden,
+ setIsSplashHidden,
+ }),
+ [isSplashHidden, setIsSplashHidden],
+ );
+
useLayoutEffect(() => {
// Initialize this client as being an active client
ActiveClientManager.init();
@@ -198,8 +199,7 @@ function Expensify({
// Open chat report from a deep link (only mobile native)
Linking.addEventListener('url', (state) => {
- // We need to pass 'isAuthenticated' to avoid loading a non-existing profile page twice
- Report.openReportFromDeepLink(state.url, !isAuthenticatedRef.current);
+ Report.openReportFromDeepLink(state.url);
});
return () => {
@@ -263,8 +263,8 @@ function Expensify({
/>
)}
-
- {shouldHideSplash && }
+ {/* HybridApp has own middleware to hide SplashScreen */}
+ {!NativeModules.HybridAppModule && shouldHideSplash && }
);
}
diff --git a/src/NAVIGATORS.ts b/src/NAVIGATORS.ts
index eea357322075..0b4a86c99247 100644
--- a/src/NAVIGATORS.ts
+++ b/src/NAVIGATORS.ts
@@ -10,5 +10,6 @@ export default {
ONBOARDING_MODAL_NAVIGATOR: 'OnboardingModalNavigator',
FEATURE_TRANING_MODAL_NAVIGATOR: 'FeatureTrainingModalNavigator',
WELCOME_VIDEO_MODAL_NAVIGATOR: 'WelcomeVideoModalNavigator',
+ EXPLANATION_MODAL_NAVIGATOR: 'ExplanationModalNavigator',
FULL_SCREEN_NAVIGATOR: 'FullScreenNavigator',
} as const;
diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts
index 46d8be0f7e82..5088c1d3158f 100755
--- a/src/ONYXKEYS.ts
+++ b/src/ONYXKEYS.ts
@@ -115,6 +115,9 @@ const ONYXKEYS = {
/** This NVP contains information about whether the onboarding flow was completed or not */
NVP_ONBOARDING: 'nvp_onboarding',
+ /** This NVP contains data associated with HybridApp */
+ NVP_TRYNEWDOT: 'nvp_tryNewDot',
+
/** Contains the user preference for the LHN priority mode */
NVP_PRIORITY_MODE: 'nvp_priorityMode',
@@ -154,9 +157,20 @@ const ONYXKEYS = {
/** Whether the user has dismissed the hold educational interstitial */
NVP_DISMISSED_HOLD_USE_EXPLANATION: 'nvp_dismissedHoldUseExplanation',
+ /** Whether the user has seen HybridApp explanation modal */
+ NVP_SEEN_NEW_USER_MODAL: 'nvp_seen_new_user_modal',
/** Store the state of the subscription */
NVP_PRIVATE_SUBSCRIPTION: 'nvp_private_subscription',
+ /** Store the stripe id status */
+ NVP_PRIVATE_STRIPE_CUSTOMER_ID: 'nvp_private_stripeCustomerID',
+
+ /** Store the billing dispute status */
+ NVP_PRIVATE_BILLING_DISPUTE_PENDING: 'nvp_private_billingDisputePending',
+
+ /** Store the billing status */
+ NVP_PRIVATE_BILLING_STATUS: 'nvp_private_billingStatus',
+
/** Store preferred skintone for emoji */
PREFERRED_EMOJI_SKIN_TONE: 'nvp_expensify_preferredEmojiSkinTone',
@@ -182,7 +196,7 @@ const ONYXKEYS = {
NVP_BILLING_FUND_ID: 'nvp_expensify_billingFundID',
/** The amount owed by the workspace’s owner. */
- NVP_PRIVATE_AMOUNT_OWNED: 'nvp_private_amountOwed',
+ NVP_PRIVATE_AMOUNT_OWED: 'nvp_private_amountOwed',
/** The end date (epoch timestamp) of the workspace owner’s grace period after the free trial ends. */
NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END: 'nvp_private_billingGracePeriodEnd',
@@ -339,12 +353,24 @@ const ONYXKEYS = {
// Paths of PDF file that has been cached during one session
CACHED_PDF_PATHS: 'cachedPDFPaths',
+ /** Stores iframe link to verify 3DS flow for subscription */
+ VERIFY_3DS_SUBSCRIPTION: 'verify3dsSubscription',
+
/** Holds the checks used while transferring the ownership of the workspace */
POLICY_OWNERSHIP_CHANGE_CHECKS: 'policyOwnershipChangeChecks',
+ /** Indicates whether ClearOutstandingBalance failed */
+ SUBSCRIPTION_RETRY_BILLING_STATUS_FAILED: 'subscriptionRetryBillingStatusFailed',
+
+ /** Indicates whether ClearOutstandingBalance was successful */
+ SUBSCRIPTION_RETRY_BILLING_STATUS_SUCCESSFUL: 'subscriptionRetryBillingStatusSuccessful',
+
/** Stores info during review duplicates flow */
REVIEW_DUPLICATES: 'reviewDuplicates',
+ /** Stores the information about the state of issuing a new card */
+ ISSUE_NEW_EXPENSIFY_CARD: 'issueNewExpensifyCard',
+
/** Collection Keys */
COLLECTION: {
DOWNLOAD: 'download_',
@@ -401,12 +427,21 @@ const ONYXKEYS = {
// Shared NVPs
/** Collection of objects where each object represents the owner of the workspace that is past due billing AND the user is a member of. */
SHARED_NVP_PRIVATE_USER_BILLING_GRACE_PERIOD_END: 'sharedNVP_private_billingGracePeriodEnd_',
+
+ /** Expensify cards settings */
+ SHARED_NVP_PRIVATE_EXPENSIFY_CARD_SETTINGS: 'sharedNVP_private_expensifyCardSettings_',
+
+ /**
+ * Stores the card list for a given fundID and feed in the format: card__
+ * So for example: card_12345_Expensify Card
+ */
+ WORKSPACE_CARDS_LIST: 'card_',
},
/** List of Form ids */
FORMS: {
- ADD_DEBIT_CARD_FORM: 'addDebitCardForm',
- ADD_DEBIT_CARD_FORM_DRAFT: 'addDebitCardFormDraft',
+ ADD_PAYMENT_CARD_FORM: 'addPaymentCardForm',
+ ADD_PAYMENT_CARD_FORM_DRAFT: 'addPaymentCardFormDraft',
WORKSPACE_SETTINGS_FORM: 'workspaceSettingsForm',
WORKSPACE_CATEGORY_FORM: 'workspaceCategoryForm',
WORKSPACE_CATEGORY_FORM_DRAFT: 'workspaceCategoryFormDraft',
@@ -475,6 +510,8 @@ const ONYXKEYS = {
SETTINGS_STATUS_SET_CLEAR_AFTER_FORM_DRAFT: 'settingsStatusSetClearAfterFormDraft',
SETTINGS_STATUS_CLEAR_DATE_FORM: 'settingsStatusClearDateForm',
SETTINGS_STATUS_CLEAR_DATE_FORM_DRAFT: 'settingsStatusClearDateFormDraft',
+ CHANGE_BILLING_CURRENCY_FORM: 'changeBillingCurrencyForm',
+ CHANGE_BILLING_CURRENCY_FORM_DRAFT: 'changeBillingCurrencyFormDraft',
PRIVATE_NOTES_FORM: 'privateNotesForm',
PRIVATE_NOTES_FORM_DRAFT: 'privateNotesFormDraft',
I_KNOW_A_TEACHER_FORM: 'iKnowTeacherForm',
@@ -511,13 +548,17 @@ const ONYXKEYS = {
NEW_CHAT_NAME_FORM_DRAFT: 'newChatNameFormDraft',
SUBSCRIPTION_SIZE_FORM: 'subscriptionSizeForm',
SUBSCRIPTION_SIZE_FORM_DRAFT: 'subscriptionSizeFormDraft',
+ ISSUE_NEW_EXPENSIFY_CARD_FORM: 'issueNewExpensifyCardForm',
+ ISSUE_NEW_EXPENSIFY_CARD_FORM_DRAFT: 'issueNewExpensifyCardFormDraft',
+ SAGE_INTACCT_CREDENTIALS_FORM: 'sageIntacctCredentialsForm',
+ SAGE_INTACCT_CREDENTIALS_FORM_DRAFT: 'sageIntacctCredentialsFormDraft',
},
} as const;
type AllOnyxKeys = DeepValueOf;
type OnyxFormValuesMapping = {
- [ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM]: FormTypes.AddDebitCardForm;
+ [ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM]: FormTypes.AddPaymentCardForm;
[ONYXKEYS.FORMS.WORKSPACE_SETTINGS_FORM]: FormTypes.WorkspaceSettingsForm;
[ONYXKEYS.FORMS.WORKSPACE_CATEGORY_FORM]: FormTypes.WorkspaceCategoryForm;
[ONYXKEYS.FORMS.WORKSPACE_TAG_FORM]: FormTypes.WorkspaceTagForm;
@@ -549,6 +590,7 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.WAYPOINT_FORM]: FormTypes.WaypointForm;
[ONYXKEYS.FORMS.SETTINGS_STATUS_SET_FORM]: FormTypes.SettingsStatusSetForm;
[ONYXKEYS.FORMS.SETTINGS_STATUS_CLEAR_DATE_FORM]: FormTypes.SettingsStatusClearDateForm;
+ [ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM]: FormTypes.ChangeBillingCurrencyForm;
[ONYXKEYS.FORMS.SETTINGS_STATUS_SET_CLEAR_AFTER_FORM]: FormTypes.SettingsStatusSetClearAfterForm;
[ONYXKEYS.FORMS.PRIVATE_NOTES_FORM]: FormTypes.PrivateNotesForm;
[ONYXKEYS.FORMS.I_KNOW_A_TEACHER_FORM]: FormTypes.IKnowTeacherForm;
@@ -570,6 +612,8 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.WORKSPACE_TAX_VALUE_FORM]: FormTypes.WorkspaceTaxValueForm;
[ONYXKEYS.FORMS.NEW_CHAT_NAME_FORM]: FormTypes.NewChatNameForm;
[ONYXKEYS.FORMS.SUBSCRIPTION_SIZE_FORM]: FormTypes.SubscriptionSizeForm;
+ [ONYXKEYS.FORMS.ISSUE_NEW_EXPENSIFY_CARD_FORM]: FormTypes.IssueNewExpensifyCardForm;
+ [ONYXKEYS.FORMS.SAGE_INTACCT_CREDENTIALS_FORM]: FormTypes.SageIntactCredentialsForm;
};
type OnyxFormDraftValuesMapping = {
@@ -615,6 +659,8 @@ type OnyxCollectionValuesMapping = {
[ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS]: OnyxTypes.PolicyConnectionSyncProgress;
[ONYXKEYS.COLLECTION.SNAPSHOT]: OnyxTypes.SearchResults;
[ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_USER_BILLING_GRACE_PERIOD_END]: OnyxTypes.BillingGraceEndPeriod;
+ [ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_EXPENSIFY_CARD_SETTINGS]: OnyxTypes.ExpensifyCardSettings;
+ [ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST]: OnyxTypes.WorkspaceCardsList;
};
type OnyxValuesMapping = {
@@ -625,6 +671,9 @@ type OnyxValuesMapping = {
// NVP_ONBOARDING is an array for old users.
[ONYXKEYS.NVP_ONBOARDING]: Onboarding | [];
+ // ONYXKEYS.NVP_TRYNEWDOT is HybridApp onboarding data
+ [ONYXKEYS.NVP_TRYNEWDOT]: OnyxTypes.TryNewDot;
+
[ONYXKEYS.ACTIVE_CLIENTS]: string[];
[ONYXKEYS.DEVICE_ID]: string;
[ONYXKEYS.IS_SIDEBAR_LOADED]: boolean;
@@ -667,6 +716,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.NVP_RECENT_WAYPOINTS]: OnyxTypes.RecentWaypoint[];
[ONYXKEYS.NVP_INTRO_SELECTED]: OnyxTypes.IntroSelected;
[ONYXKEYS.NVP_LAST_SELECTED_DISTANCE_RATES]: OnyxTypes.LastSelectedDistanceRates;
+ [ONYXKEYS.NVP_SEEN_NEW_USER_MODAL]: boolean;
[ONYXKEYS.PUSH_NOTIFICATIONS_ENABLED]: boolean;
[ONYXKEYS.PLAID_DATA]: OnyxTypes.PlaidData;
[ONYXKEYS.IS_PLAID_DISABLED]: boolean;
@@ -678,6 +728,9 @@ type OnyxValuesMapping = {
[ONYXKEYS.NVP_DISMISSED_REFERRAL_BANNERS]: OnyxTypes.DismissedReferralBanners;
[ONYXKEYS.NVP_HAS_SEEN_TRACK_TRAINING]: boolean;
[ONYXKEYS.NVP_PRIVATE_SUBSCRIPTION]: OnyxTypes.PrivateSubscription;
+ [ONYXKEYS.NVP_PRIVATE_STRIPE_CUSTOMER_ID]: OnyxTypes.StripeCustomerID;
+ [ONYXKEYS.NVP_PRIVATE_BILLING_DISPUTE_PENDING]: number;
+ [ONYXKEYS.NVP_PRIVATE_BILLING_STATUS]: OnyxTypes.BillingStatus;
[ONYXKEYS.USER_WALLET]: OnyxTypes.UserWallet;
[ONYXKEYS.WALLET_ONFIDO]: OnyxTypes.WalletOnfido;
[ONYXKEYS.WALLET_ADDITIONAL_DETAILS]: OnyxTypes.WalletAdditionalDetails;
@@ -704,6 +757,7 @@ type OnyxValuesMapping = {
[ONYXKEYS.IS_CHECKING_PUBLIC_ROOM]: boolean;
[ONYXKEYS.MY_DOMAIN_SECURITY_GROUPS]: Record;
[ONYXKEYS.LAST_OPENED_PUBLIC_ROOM_ID]: string;
+ [ONYXKEYS.VERIFY_3DS_SUBSCRIPTION]: string;
[ONYXKEYS.PREFERRED_THEME]: ValueOf;
[ONYXKEYS.MAPBOX_ACCESS_TOKEN]: OnyxTypes.MapboxAccessToken;
[ONYXKEYS.ONYX_UPDATES_FROM_SERVER]: OnyxTypes.OnyxUpdatesFromServer;
@@ -725,12 +779,15 @@ type OnyxValuesMapping = {
[ONYXKEYS.CACHED_PDF_PATHS]: Record;
[ONYXKEYS.POLICY_OWNERSHIP_CHANGE_CHECKS]: Record;
[ONYXKEYS.NVP_QUICK_ACTION_GLOBAL_CREATE]: OnyxTypes.QuickAction;
+ [ONYXKEYS.SUBSCRIPTION_RETRY_BILLING_STATUS_FAILED]: boolean;
+ [ONYXKEYS.SUBSCRIPTION_RETRY_BILLING_STATUS_SUCCESSFUL]: boolean;
[ONYXKEYS.NVP_TRAVEL_SETTINGS]: OnyxTypes.TravelSettings;
[ONYXKEYS.REVIEW_DUPLICATES]: OnyxTypes.ReviewDuplicates;
+ [ONYXKEYS.ISSUE_NEW_EXPENSIFY_CARD]: OnyxTypes.IssueNewCard;
[ONYXKEYS.NVP_FIRST_DAY_FREE_TRIAL]: string;
[ONYXKEYS.NVP_LAST_DAY_FREE_TRIAL]: string;
[ONYXKEYS.NVP_BILLING_FUND_ID]: number;
- [ONYXKEYS.NVP_PRIVATE_AMOUNT_OWNED]: number;
+ [ONYXKEYS.NVP_PRIVATE_AMOUNT_OWED]: number;
[ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END]: number;
};
diff --git a/src/ROUTES.ts b/src/ROUTES.ts
index c38ec192127e..45c56abc71d5 100644
--- a/src/ROUTES.ts
+++ b/src/ROUTES.ts
@@ -95,6 +95,7 @@ const ROUTES = {
WORKSPACE_SWITCHER: 'workspace-switcher',
SETTINGS: 'settings',
SETTINGS_PROFILE: 'settings/profile',
+ SETTINGS_CHANGE_CURRENCY: 'settings/add-payment-card/change-currency',
SETTINGS_SHARE_CODE: 'settings/shareCode',
SETTINGS_DISPLAY_NAME: 'settings/profile/display-name',
SETTINGS_TIMEZONE: 'settings/profile/timezone',
@@ -107,6 +108,8 @@ const ROUTES = {
getRoute: (canChangeSize: 0 | 1) => `settings/subscription/subscription-size?canChangeSize=${canChangeSize}` as const,
},
SETTINGS_SUBSCRIPTION_ADD_PAYMENT_CARD: 'settings/subscription/add-payment-card',
+ SETTINGS_SUBSCRIPTION_CHANGE_BILLING_CURRENCY: 'settings/subscription/change-billing-currency',
+ SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY: 'settings/subscription/add-payment-card/change-payment-currency',
SETTINGS_SUBSCRIPTION_DISABLE_AUTO_RENEW_SURVEY: 'settings/subscription/disable-auto-renew-survey',
SETTINGS_PRIORITY_MODE: 'settings/preferences/priority-mode',
SETTINGS_LANGUAGE: 'settings/preferences/language',
@@ -780,6 +783,17 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/reportFields',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/reportFields` as const,
},
+ WORKSPACE_EXPENSIFY_CARD: {
+ route: 'settings/workspaces/:policyID/expensify-card',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/expensify-card` as const,
+ },
+ // TODO: uncomment after development is done
+ // WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW: {
+ // route: 'settings/workspaces/:policyID/expensify-card/issues-new',
+ // getRoute: (policyID: string) => `settings/workspaces/${policyID}/expensify-card/issue-new` as const,
+ // },
+ // TODO: remove after development is done - this one is for testing purposes
+ WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW: 'settings/workspaces/expensify-card/issue-new',
WORKSPACE_DISTANCE_RATES: {
route: 'settings/workspaces/:policyID/distance-rates',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/distance-rates` as const,
@@ -822,6 +836,7 @@ const ROUTES = {
ONBOARDING_WORK: 'onboarding/work',
ONBOARDING_PURPOSE: 'onboarding/purpose',
WELCOME_VIDEO_ROOT: 'onboarding/welcome-video',
+ EXPLANATION_MODAL_ROOT: 'onboarding/explanation',
TRANSACTION_RECEIPT: {
route: 'r/:reportID/transaction/:transactionID/receipt',
@@ -917,14 +932,87 @@ const ROUTES = {
route: 'settings/workspaces/:policyID/accounting/quickbooks-online/import/taxes',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/quickbooks-online/import/taxes` as const,
},
- POLICY_ACCOUNTING_NETSUITE_SUBSIDIARY_SELECTOR: {
- route: 'settings/workspaces/:policyID/accounting/net-suite/subsidiary-selector',
- getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/net-suite/subsidiary-selector` as const,
- },
RESTRICTED_ACTION: {
route: 'restricted-action/workspace/:policyID',
getRoute: (policyID: string) => `restricted-action/workspace/${policyID}` as const,
},
+ POLICY_ACCOUNTING_NETSUITE_SUBSIDIARY_SELECTOR: {
+ route: 'settings/workspaces/:policyID/accounting/netsuite/subsidiary-selector',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/netsuite/subsidiary-selector` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_IMPORT: {
+ route: 'settings/workspaces/:policyID/accounting/netsuite/import',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/netsuite/import` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_EXPORT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_PREFERRED_EXPORTER_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/preferred-exporter/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/preferred-exporter/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_DATE_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/date/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/date/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/expenses/:expenseType',
+ getRoute: (policyID: string, expenseType: ValueOf) =>
+ `settings/workspaces/${policyID}/connections/netsuite/export/expenses/${expenseType}` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/expenses/:expenseType/destination/select',
+ getRoute: (policyID: string, expenseType: ValueOf) =>
+ `settings/workspaces/${policyID}/connections/netsuite/export/expenses/${expenseType}/destination/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/expenses/:expenseType/vendor/select',
+ getRoute: (policyID: string, expenseType: ValueOf) =>
+ `settings/workspaces/${policyID}/connections/netsuite/export/expenses/${expenseType}/vendor/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/expenses/:expenseType/payable-account/select',
+ getRoute: (policyID: string, expenseType: ValueOf) =>
+ `settings/workspaces/${policyID}/connections/netsuite/export/expenses/${expenseType}/payable-account/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/expenses/:expenseType/journal-posting-preference/select',
+ getRoute: (policyID: string, expenseType: ValueOf) =>
+ `settings/workspaces/${policyID}/connections/netsuite/export/expenses/${expenseType}/journal-posting-preference/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_RECEIVABLE_ACCOUNT_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/receivable-account/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/receivable-account/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/invoice-item-preference/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/invoice-item-preference/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_INVOICE_ITEM_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/invoice-item-preference/invoice-item/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/invoice-item-preference/invoice-item/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_TAX_POSTING_ACCOUNT_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/tax-posting-account/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/tax-posting-account/select` as const,
+ },
+ POLICY_ACCOUNTING_NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT: {
+ route: 'settings/workspaces/:policyID/connections/netsuite/export/provincial-tax-posting-account/select',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/connections/netsuite/export/provincial-tax-posting-account/select` as const,
+ },
+ POLICY_ACCOUNTING_SAGE_INTACCT_PREREQUISITES: {
+ route: 'settings/workspaces/:policyID/accounting/sage-intacct/prerequisites',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/prerequisites` as const,
+ },
+ POLICY_ACCOUNTING_SAGE_INTACCT_ENTER_CREDENTIALS: {
+ route: 'settings/workspaces/:policyID/accounting/sage-intacct/enter-credentials',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/enter-credentials` as const,
+ },
+ POLICY_ACCOUNTING_SAGE_INTACCT_EXISTING_CONNECTIONS: {
+ route: 'settings/workspaces/:policyID/accounting/sage-intacct/existing-connections',
+ getRoute: (policyID: string) => `settings/workspaces/${policyID}/accounting/sage-intacct/existing-connections` as const,
+ },
} as const;
/**
diff --git a/src/SCREENS.ts b/src/SCREENS.ts
index 6e3d1f3276e9..8214c04cef75 100644
--- a/src/SCREENS.ts
+++ b/src/SCREENS.ts
@@ -41,6 +41,7 @@ const SCREENS = {
SAVE_THE_WORLD: 'Settings_TeachersUnite',
APP_DOWNLOAD_LINKS: 'Settings_App_Download_Links',
ADD_DEBIT_CARD: 'Settings_Add_Debit_Card',
+ ADD_PAYMENT_CARD_CHANGE_CURRENCY: 'Settings_Add_Payment_Card_Change_Currency',
ADD_BANK_ACCOUNT: 'Settings_Add_Bank_Account',
CLOSE: 'Settings_Close',
TWO_FACTOR_AUTH: 'Settings_TwoFactorAuth',
@@ -104,6 +105,8 @@ const SCREENS = {
SIZE: 'Settings_Subscription_Size',
ADD_PAYMENT_CARD: 'Settings_Subscription_Add_Payment_Card',
DISABLE_AUTO_RENEW_SURVEY: 'Settings_Subscription_DisableAutoRenewSurvey',
+ CHANGE_BILLING_CURRENCY: 'Settings_Subscription_Change_Billing_Currency',
+ CHANGE_PAYMENT_CURRENCY: 'Settings_Subscription_Change_Payment_Currency',
},
},
SAVE_THE_WORLD: {
@@ -269,7 +272,24 @@ const SCREENS = {
XERO_EXPORT_PREFERRED_EXPORTER_SELECT: 'Workspace_Accounting_Xero_Export_Preferred_Exporter_Select',
XERO_BILL_PAYMENT_ACCOUNT_SELECTOR: 'Policy_Accounting_Xero_Bill_Payment_Account_Selector',
XERO_EXPORT_BANK_ACCOUNT_SELECT: 'Policy_Accounting_Xero_Export_Bank_Account_Select',
- NETSUITE_SUBSIDIARY_SELECTOR: 'Policy_Accounting_Net_Suite_Subsidiary_Selector',
+ NETSUITE_SUBSIDIARY_SELECTOR: 'Policy_Accounting_NetSuite_Subsidiary_Selector',
+ NETSUITE_IMPORT: 'Policy_Accounting_NetSuite_Import',
+ NETSUITE_EXPORT: 'Policy_Accounting_NetSuite_Export',
+ NETSUITE_PREFERRED_EXPORTER_SELECT: 'Policy_Accounting_NetSuite_Preferred_Exporter_Select',
+ NETSUITE_DATE_SELECT: 'Policy_Accounting_NetSuite_Date_Select',
+ NETSUITE_EXPORT_EXPENSES: 'Policy_Accounting_NetSuite_Export_Expenses',
+ NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT: 'Policy_Accounting_NetSuite_Export_Expenses_Destination_Select',
+ NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT: 'Policy_Accounting_NetSuite_Export_Expenses_Vendor_Select',
+ NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT: 'Policy_Accounting_NetSuite_Export_Expenses_Payable_Account_Select',
+ NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT: 'Policy_Accounting_NetSuite_Export_Expenses_Journal_Posting_Preference_Select',
+ NETSUITE_RECEIVABLE_ACCOUNT_SELECT: 'Policy_Accounting_NetSuite_Receivable_Account_Select',
+ NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT: 'Policy_Accounting_NetSuite_Invoice_Item_Preference_Select',
+ NETSUITE_INVOICE_ITEM_SELECT: 'Policy_Accounting_NetSuite_Invoice_Item_Select',
+ NETSUITE_TAX_POSTING_ACCOUNT_SELECT: 'Policy_Accounting_NetSuite_Tax_Posting_Account_Select',
+ NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT: 'Policy_Accounting_NetSuite_Provincial_Tax_Posting_Account_Select',
+ SAGE_INTACCT_PREREQUISITES: 'Policy_Accounting_Sage_Intacct_Prerequisites',
+ ENTER_SAGE_INTACCT_CREDENTIALS: 'Policy_Enter_Sage_Intacct_Credentials',
+ EXISTING_SAGE_INTACCT_CONNECTIONS: 'Policy_Existing_Sage_Intacct_Connections',
},
INITIAL: 'Workspace_Initial',
PROFILE: 'Workspace_Profile',
@@ -278,6 +298,8 @@ const SCREENS = {
RATE_AND_UNIT: 'Workspace_RateAndUnit',
RATE_AND_UNIT_RATE: 'Workspace_RateAndUnit_Rate',
RATE_AND_UNIT_UNIT: 'Workspace_RateAndUnit_Unit',
+ EXPENSIFY_CARD: 'Workspace_ExpensifyCard',
+ EXPENSIFY_CARD_ISSUE_NEW: 'Workspace_ExpensifyCard_New',
BILLS: 'Workspace_Bills',
INVOICES: 'Workspace_Invoices',
TRAVEL: 'Workspace_Travel',
@@ -359,6 +381,10 @@ const SCREENS = {
ROOT: 'Welcome_Video_Root',
},
+ EXPLANATION_MODAL: {
+ ROOT: 'Explanation_Modal_Root',
+ },
+
I_KNOW_A_TEACHER: 'I_Know_A_Teacher',
INTRO_SCHOOL_PRINCIPAL: 'Intro_School_Principal',
I_AM_A_TEACHER: 'I_Am_A_Teacher',
diff --git a/src/components/AccountingConnectionConfirmationModal.tsx b/src/components/AccountingConnectionConfirmationModal.tsx
new file mode 100644
index 000000000000..c472f215b6df
--- /dev/null
+++ b/src/components/AccountingConnectionConfirmationModal.tsx
@@ -0,0 +1,30 @@
+import React from 'react';
+import useLocalize from '@hooks/useLocalize';
+import type {ConnectionName} from '@src/types/onyx/Policy';
+import ConfirmModal from './ConfirmModal';
+
+type AccountingConnectionConfirmationModalProps = {
+ integrationToConnect: ConnectionName;
+ onConfirm: () => void;
+ onCancel: () => void;
+};
+
+function AccountingConnectionConfirmationModal({integrationToConnect, onCancel, onConfirm}: AccountingConnectionConfirmationModalProps) {
+ const {translate} = useLocalize();
+
+ return (
+
+ );
+}
+
+AccountingConnectionConfirmationModal.displayName = 'AccountingConnectionConfirmationModal';
+export default AccountingConnectionConfirmationModal;
diff --git a/src/components/AddPaymentCard/PaymentCardChangeCurrencyForm.tsx b/src/components/AddPaymentCard/PaymentCardChangeCurrencyForm.tsx
new file mode 100644
index 000000000000..f967272ac63c
--- /dev/null
+++ b/src/components/AddPaymentCard/PaymentCardChangeCurrencyForm.tsx
@@ -0,0 +1,142 @@
+import React, {useCallback, useMemo, useState} from 'react';
+import {View} from 'react-native';
+import type {ValueOf} from 'type-fest';
+import FormProvider from '@components/Form/FormProvider';
+import InputWrapper from '@components/Form/InputWrapper';
+import type {FormInputErrors, FormOnyxValues} from '@components/Form/types';
+import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
+import SelectionList from '@components/SelectionList';
+import RadioListItem from '@components/SelectionList/RadioListItem';
+import TextInput from '@components/TextInput';
+import useLocalize from '@hooks/useLocalize';
+import useThemeStyles from '@hooks/useThemeStyles';
+import * as ValidationUtils from '@libs/ValidationUtils';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import INPUT_IDS from '@src/types/form/ChangeBillingCurrencyForm';
+import PaymentCardCurrencyHeader from './PaymentCardCurrencyHeader';
+import PaymentCardCurrencyModal from './PaymentCardCurrencyModal';
+
+type PaymentCardFormProps = {
+ initialCurrency?: ValueOf;
+ isSecurityCodeRequired?: boolean;
+ changeBillingCurrency: (currency?: ValueOf, values?: FormOnyxValues) => void;
+};
+
+const REQUIRED_FIELDS = [INPUT_IDS.SECURITY_CODE];
+
+function PaymentCardChangeCurrencyForm({changeBillingCurrency, isSecurityCodeRequired, initialCurrency}: PaymentCardFormProps) {
+ const styles = useThemeStyles();
+ const {translate} = useLocalize();
+
+ const [isCurrencyModalVisible, setIsCurrencyModalVisible] = useState(false);
+ const [currency, setCurrency] = useState>(initialCurrency ?? CONST.PAYMENT_CARD_CURRENCY.USD);
+
+ const validate = (values: FormOnyxValues): FormInputErrors => {
+ const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS);
+
+ if (values.securityCode && !ValidationUtils.isValidSecurityCode(values.securityCode)) {
+ errors.securityCode = translate('addPaymentCardPage.error.securityCode');
+ }
+
+ return errors;
+ };
+
+ const {sections} = useMemo(
+ () => ({
+ sections: [
+ {
+ data: (Object.keys(CONST.PAYMENT_CARD_CURRENCY) as Array>).map((currencyItem) => ({
+ text: currencyItem,
+ value: currencyItem,
+ keyForList: currencyItem,
+ isSelected: currencyItem === currency,
+ })),
+ },
+ ],
+ }),
+ [currency],
+ );
+
+ const showCurrenciesModal = useCallback(() => {
+ setIsCurrencyModalVisible(true);
+ }, []);
+
+ const changeCurrency = useCallback((selectedCurrency: ValueOf) => {
+ setCurrency(selectedCurrency);
+ setIsCurrencyModalVisible(false);
+ }, []);
+
+ const selectCurrency = useCallback(
+ (selectedCurrency: ValueOf) => {
+ setCurrency(selectedCurrency);
+ changeBillingCurrency(selectedCurrency);
+ },
+ [changeBillingCurrency],
+ );
+
+ if (isSecurityCodeRequired) {
+ return (
+ changeBillingCurrency(currency, values)}
+ submitButtonText={translate('common.save')}
+ scrollContextEnabled
+ style={[styles.mh5, styles.flexGrow1]}
+ >
+
+ <>
+
+
+
+
+ >
+ >}
+ currentCurrency={currency}
+ onCurrencyChange={changeCurrency}
+ onClose={() => setIsCurrencyModalVisible(false)}
+ />
+
+ );
+ }
+
+ return (
+
+ }
+ initiallyFocusedOptionKey={currency}
+ containerStyle={[styles.mhn5]}
+ sections={sections}
+ onSelectRow={(option) => {
+ selectCurrency(option.value);
+ }}
+ showScrollIndicator
+ shouldStopPropagation
+ shouldUseDynamicMaxToRenderPerBatch
+ ListItem={RadioListItem}
+ />
+
+ );
+}
+
+PaymentCardChangeCurrencyForm.displayName = 'PaymentCardChangeCurrencyForm';
+
+export default PaymentCardChangeCurrencyForm;
diff --git a/src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx b/src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx
new file mode 100644
index 000000000000..e5142aec8efc
--- /dev/null
+++ b/src/components/AddPaymentCard/PaymentCardCurrencyHeader.tsx
@@ -0,0 +1,28 @@
+import React from 'react';
+import {View} from 'react-native';
+import Text from '@components/Text';
+import TextLink from '@components/TextLink';
+import useLocalize from '@hooks/useLocalize';
+import useThemeStyles from '@hooks/useThemeStyles';
+import CONST from '@src/CONST';
+
+function PaymentCardCurrencyHeader({isSectionList}: {isSectionList?: boolean}) {
+ const styles = useThemeStyles();
+ const {translate} = useLocalize();
+ return (
+
+
+ {`${translate('billingCurrency.note')}`}{' '}
+ {`${translate('billingCurrency.noteLink')}`}{' '}
+ {`${translate('billingCurrency.noteDetails')}`}
+
+
+ );
+}
+
+PaymentCardCurrencyHeader.displayName = 'PaymentCardCurrencyHeader';
+
+export default PaymentCardCurrencyHeader;
diff --git a/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx b/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx
index 60fa838b0577..c3c38c4aec72 100644
--- a/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx
+++ b/src/components/AddPaymentCard/PaymentCardCurrencyModal.tsx
@@ -1,4 +1,5 @@
import React, {useMemo} from 'react';
+import type {ValueOf} from 'type-fest';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import Modal from '@components/Modal';
import ScreenWrapper from '@components/ScreenWrapper';
@@ -13,20 +14,20 @@ type PaymentCardCurrencyModalProps = {
/** Whether the modal is visible */
isVisible: boolean;
- /** The list of years to render */
- currencies: Array;
+ /** The list of currencies to render */
+ currencies: Array>;
- /** Currently selected year */
- currentCurrency: keyof typeof CONST.CURRENCY;
+ /** Currently selected currency */
+ currentCurrency: ValueOf;
- /** Function to call when the user selects a year */
- onCurrencyChange?: (currency: keyof typeof CONST.CURRENCY) => void;
+ /** Function to call when the user selects a currency */
+ onCurrencyChange?: (currency: ValueOf) => void;
- /** Function to call when the user closes the year picker */
+ /** Function to call when the user closes the currency picker */
onClose?: () => void;
};
-function PaymentCardCurrencyModal({isVisible, currencies, currentCurrency = CONST.CURRENCY.USD, onCurrencyChange, onClose}: PaymentCardCurrencyModalProps) {
+function PaymentCardCurrencyModal({isVisible, currencies, currentCurrency = CONST.PAYMENT_CARD_CURRENCY.USD, onCurrencyChange, onClose}: PaymentCardCurrencyModalProps) {
const {isSmallScreenWidth} = useWindowDimensions();
const styles = useThemeStyles();
const {translate} = useLocalize();
@@ -57,7 +58,7 @@ function PaymentCardCurrencyModal({isVisible, currencies, currentCurrency = CONS
useNativeDriver
>
, currency?: ValueOf) => void;
+ addPaymentCard: (values: FormOnyxValues, currency?: ValueOf) => void;
submitButtonText: string;
/** Custom content to display in the footer after card form */
footerContent?: ReactNode;
/** Custom content to display in the header before card form */
headerContent?: ReactNode;
+ /** object to get currency route details from */
+ currencySelectorRoute?: typeof ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY;
};
function IAcceptTheLabel() {
@@ -61,6 +62,7 @@ const REQUIRED_FIELDS = [
INPUT_IDS.SECURITY_CODE,
INPUT_IDS.ADDRESS_ZIP_CODE,
INPUT_IDS.ADDRESS_STATE,
+ INPUT_IDS.CURRENCY,
];
const CARD_TYPES = {
@@ -127,42 +129,44 @@ function PaymentCardForm({
showStateSelector,
footerContent,
headerContent,
+ currencySelectorRoute,
}: PaymentCardFormProps) {
const styles = useThemeStyles();
+ const [data] = useOnyx(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM);
+
const {translate} = useLocalize();
const route = useRoute();
const label = CARD_LABELS[isDebitCard ? CARD_TYPES.DEBIT_CARD : CARD_TYPES.PAYMENT_CARD];
const cardNumberRef = useRef(null);
- const [isCurrencyModalVisible, setIsCurrencyModalVisible] = useState(false);
- const [currency, setCurrency] = useState(CONST.CURRENCY.USD);
+ const [cardNumber, setCardNumber] = useState('');
- const validate = (values: FormOnyxValues): FormInputErrors => {
+ const validate = (values: FormOnyxValues): FormInputErrors => {
const errors = ValidationUtils.getFieldRequiredErrors(values, REQUIRED_FIELDS);
if (values.nameOnCard && !ValidationUtils.isValidLegalName(values.nameOnCard)) {
- errors.nameOnCard = translate('addDebitCardPage.error.invalidName');
+ errors.nameOnCard = translate(label.error.nameOnCard);
}
if (values.cardNumber && !ValidationUtils.isValidDebitCard(values.cardNumber.replace(/ /g, ''))) {
- errors.cardNumber = translate('addDebitCardPage.error.debitCardNumber');
+ errors.cardNumber = translate(label.error.cardNumber);
}
if (values.expirationDate && !ValidationUtils.isValidExpirationDate(values.expirationDate)) {
- errors.expirationDate = translate('addDebitCardPage.error.expirationDate');
+ errors.expirationDate = translate(label.error.expirationDate);
}
if (values.securityCode && !ValidationUtils.isValidSecurityCode(values.securityCode)) {
- errors.securityCode = translate('addDebitCardPage.error.securityCode');
+ errors.securityCode = translate(label.error.securityCode);
}
if (values.addressStreet && !ValidationUtils.isValidAddress(values.addressStreet)) {
- errors.addressStreet = translate('addDebitCardPage.error.addressStreet');
+ errors.addressStreet = translate(label.error.addressStreet);
}
if (values.addressZipCode && !ValidationUtils.isValidZipCode(values.addressZipCode)) {
- errors.addressZipCode = translate('addDebitCardPage.error.addressZipCode');
+ errors.addressZipCode = translate(label.error.addressZipCode);
}
if (!values.acceptTerms) {
@@ -172,13 +176,21 @@ function PaymentCardForm({
return errors;
};
- const showCurrenciesModal = useCallback(() => {
- setIsCurrencyModalVisible(true);
- }, []);
+ const onChangeCardNumber = useCallback((newValue: string) => {
+ // replace all characters that are not spaces or digits
+ let validCardNumber = newValue.replace(/[^\d ]/g, '');
+
+ // gets only the first 16 digits if the inputted number have more digits than that
+ validCardNumber = validCardNumber.match(/(?:\d *){1,16}/)?.[0] ?? '';
- const changeCurrency = useCallback((newCurrency: keyof typeof CONST.CURRENCY) => {
- setCurrency(newCurrency);
- setIsCurrencyModalVisible(false);
+ // add the spacing between every 4 digits
+ validCardNumber =
+ validCardNumber
+ .replace(/ /g, '')
+ .match(/.{1,4}/g)
+ ?.join(' ') ?? '';
+
+ setCardNumber(validCardNumber);
}, []);
if (!shouldShowPaymentCardForm) {
@@ -189,9 +201,9 @@ function PaymentCardForm({
<>
{headerContent}
addPaymentCard(formData, currency)}
+ onSubmit={addPaymentCard}
submitButtonText={submitButtonText}
scrollContextEnabled
style={[styles.mh5, styles.flexGrow1]}
@@ -199,15 +211,19 @@ function PaymentCardForm({
)}
{!!showCurrencyField && (
-
- {(isHovered) => (
-
- )}
-
+
+
+
)}
{!!showAcceptTerms && (
@@ -298,19 +309,11 @@ function PaymentCardForm({
'common.privacyPolicy',
)}`}
inputID={INPUT_IDS.ACCEPT_TERMS}
- defaultValue={false}
+ defaultValue={!!data?.acceptTerms}
LabelComponent={IAcceptTheLabel}
/>
)}
-
- }
- currentCurrency={currency}
- onCurrencyChange={changeCurrency}
- onClose={() => setIsCurrencyModalVisible(false)}
- />
{footerContent}
>
diff --git a/src/components/ButtonWithDropdownMenu/types.ts b/src/components/ButtonWithDropdownMenu/types.ts
index 1ad2ccb0d717..702f0380ceef 100644
--- a/src/components/ButtonWithDropdownMenu/types.ts
+++ b/src/components/ButtonWithDropdownMenu/types.ts
@@ -23,6 +23,10 @@ type DropdownOption = {
iconDescription?: string;
onSelected?: () => void;
disabled?: boolean;
+ iconFill?: string;
+ interactive?: boolean;
+ numberOfLinesTitle?: number;
+ titleStyle?: ViewStyle;
};
type ButtonWithDropdownMenuProps = {
diff --git a/src/components/Composer/index.tsx b/src/components/Composer/index.tsx
index 3a8a4e724948..f4a5174c2602 100755
--- a/src/components/Composer/index.tsx
+++ b/src/components/Composer/index.tsx
@@ -5,7 +5,7 @@ import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {flushSync} from 'react-dom';
// eslint-disable-next-line no-restricted-imports
import type {DimensionValue, NativeSyntheticEvent, Text as RNText, TextInput, TextInputKeyPressEventData, TextInputSelectionChangeEventData, TextStyle} from 'react-native';
-import {StyleSheet, View} from 'react-native';
+import {DeviceEventEmitter, StyleSheet, View} from 'react-native';
import type {AnimatedMarkdownTextInputRef} from '@components/RNMarkdownTextInput';
import RNMarkdownTextInput from '@components/RNMarkdownTextInput';
import Text from '@components/Text';
@@ -74,7 +74,7 @@ function Composer(
},
isReportActionCompose = false,
isComposerFullSize = false,
- shouldContainScroll = false,
+ shouldContainScroll = true,
isGroupPolicyReport = false,
...props
}: ComposerProps,
@@ -105,6 +105,7 @@ function Composer(
const [isRendered, setIsRendered] = useState(false);
const isScrollBarVisible = useIsScrollBarVisible(textInput, value ?? '');
const [prevScroll, setPrevScroll] = useState();
+ const isReportFlatListScrolling = useRef(false);
useEffect(() => {
if (!shouldClear) {
@@ -249,6 +250,29 @@ function Composer(
};
}, []);
+ useEffect(() => {
+ const scrollingListener = DeviceEventEmitter.addListener(CONST.EVENTS.SCROLLING, (scrolling) => {
+ isReportFlatListScrolling.current = scrolling;
+ });
+
+ return () => scrollingListener.remove();
+ }, []);
+
+ useEffect(() => {
+ const handleWheel = (e: MouseEvent) => {
+ if (isReportFlatListScrolling.current) {
+ e.preventDefault();
+ return;
+ }
+ e.stopPropagation();
+ };
+ textInput.current?.addEventListener('wheel', handleWheel, {passive: false});
+
+ return () => {
+ textInput.current?.removeEventListener('wheel', handleWheel);
+ };
+ }, []);
+
useEffect(() => {
if (!textInput.current || prevScroll === undefined) {
return;
diff --git a/src/components/ConnectToNetSuiteButton/index.tsx b/src/components/ConnectToNetSuiteButton/index.tsx
new file mode 100644
index 000000000000..fc948503a127
--- /dev/null
+++ b/src/components/ConnectToNetSuiteButton/index.tsx
@@ -0,0 +1,54 @@
+import React, {useState} from 'react';
+import AccountingConnectionConfirmationModal from '@components/AccountingConnectionConfirmationModal';
+import Button from '@components/Button';
+import useLocalize from '@hooks/useLocalize';
+import useNetwork from '@hooks/useNetwork';
+import useThemeStyles from '@hooks/useThemeStyles';
+import {removePolicyConnection} from '@libs/actions/connections';
+import Navigation from '@libs/Navigation/Navigation';
+import CONST from '@src/CONST';
+import ROUTES from '@src/ROUTES';
+import type {ConnectToNetSuiteButtonProps} from './types';
+
+function ConnectToNetSuiteButton({policyID, shouldDisconnectIntegrationBeforeConnecting, integrationToDisconnect}: ConnectToNetSuiteButtonProps) {
+ const styles = useThemeStyles();
+ const {translate} = useLocalize();
+ const {isOffline} = useNetwork();
+
+ const [isDisconnectModalOpen, setIsDisconnectModalOpen] = useState(false);
+
+ return (
+ <>
+
diff --git a/src/components/SettlementButton.tsx b/src/components/SettlementButton.tsx
index d3916220ca88..7a7e4e584363 100644
--- a/src/components/SettlementButton.tsx
+++ b/src/components/SettlementButton.tsx
@@ -4,8 +4,10 @@ import type {OnyxEntry} from 'react-native-onyx';
import {useOnyx, withOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
+import Navigation from '@libs/Navigation/Navigation';
import * as ReportUtils from '@libs/ReportUtils';
import playSound, {SOUNDS} from '@libs/Sound';
+import * as SubscriptionUtils from '@libs/SubscriptionUtils';
import * as BankAccounts from '@userActions/BankAccounts';
import * as IOU from '@userActions/IOU';
import CONST from '@src/CONST';
@@ -227,6 +229,11 @@ function SettlementButton({
}, [currency, formattedAmount, iouReport, policyID, translate, shouldHidePaymentOptions, shouldShowApproveButton, shouldDisableApproveButton]);
const selectPaymentType = (event: KYCFlowEvent, iouPaymentType: PaymentMethodType, triggerKYCFlow: TriggerKYCFlow) => {
+ if (policy && SubscriptionUtils.shouldRestrictUserBillableActions(policy.id)) {
+ Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(policy.id));
+ return;
+ }
+
if (iouPaymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY || iouPaymentType === CONST.IOU.PAYMENT_TYPE.VBBA) {
triggerKYCFlow(event, iouPaymentType);
BankAccounts.setPersonalBankAccountContinueKYCOnSuccess(ROUTES.ENABLE_PAYMENTS);
diff --git a/src/components/SingleChoiceQuestion.tsx b/src/components/SingleChoiceQuestion.tsx
index c2dc72438e43..e52007850475 100644
--- a/src/components/SingleChoiceQuestion.tsx
+++ b/src/components/SingleChoiceQuestion.tsx
@@ -22,7 +22,7 @@ function SingleChoiceQuestion({prompt, errorText, possibleAnswers, currentQuesti
<>
{prompt}
diff --git a/src/components/Switch.tsx b/src/components/Switch.tsx
index 2e29008cd9ec..1ddc65bbd0fc 100644
--- a/src/components/Switch.tsx
+++ b/src/components/Switch.tsx
@@ -23,6 +23,9 @@ type SwitchProps = {
/** Whether to show the lock icon even if the switch is enabled */
showLockIcon?: boolean;
+
+ /** Callback to fire when the switch is toggled in disabled state */
+ disabledAction?: () => void;
};
const OFFSET_X = {
@@ -30,13 +33,17 @@ const OFFSET_X = {
ON: 20,
};
-function Switch({isOn, onToggle, accessibilityLabel, disabled, showLockIcon}: SwitchProps) {
+function Switch({isOn, onToggle, accessibilityLabel, disabled, showLockIcon, disabledAction}: SwitchProps) {
const styles = useThemeStyles();
const offsetX = useRef(new Animated.Value(isOn ? OFFSET_X.ON : OFFSET_X.OFF));
const theme = useTheme();
const handleSwitchPress = () => {
InteractionManager.runAfterInteractions(() => {
+ if (disabled) {
+ disabledAction?.();
+ return;
+ }
onToggle(!isOn);
});
};
@@ -51,7 +58,7 @@ function Switch({isOn, onToggle, accessibilityLabel, disabled, showLockIcon}: Sw
return (
(
- WrappedComponent: ComponentType>,
-): (props: TProps & React.RefAttributes) => React.ReactElement | null {
- function WithPrepareCentralPaneScreen(props: TProps, ref: ForwardedRef) {
- return (
-
-
-
- );
- }
-
- WithPrepareCentralPaneScreen.displayName = `WithPrepareCentralPaneScreen(${getComponentDisplayName(WrappedComponent)})`;
- return React.forwardRef(WithPrepareCentralPaneScreen);
+export default function withPrepareCentralPaneScreen(lazyComponent: () => React.ComponentType) {
+ return freezeScreenWithLazyLoading(lazyComponent);
}
diff --git a/src/components/withPrepareCentralPaneScreen/index.tsx b/src/components/withPrepareCentralPaneScreen/index.tsx
index fe31b9fa7ecc..f53368188b3d 100644
--- a/src/components/withPrepareCentralPaneScreen/index.tsx
+++ b/src/components/withPrepareCentralPaneScreen/index.tsx
@@ -1,9 +1,9 @@
-import type {ComponentType} from 'react';
+import type React from 'react';
/**
- * This HOC is dependent on the platform. On native platforms, screens that aren't already displayed in the navigation stack should be frozen to prevent unnecessary rendering.
+ * This higher-order function is dependent on the platform. On native platforms, screens that aren't already displayed in the navigation stack should be frozen to prevent unnecessary rendering.
* It's handled this way only on mobile platforms because on the web, more than one screen is displayed in a wide layout, so these screens shouldn't be frozen.
*/
-export default function withPrepareCentralPaneScreen(WrappedComponent: ComponentType) {
- return WrappedComponent;
+export default function withPrepareCentralPaneScreen(lazyComponent: () => React.ComponentType) {
+ return lazyComponent;
}
diff --git a/src/hooks/useHybridAppMiddleware.ts b/src/hooks/useHybridAppMiddleware.ts
new file mode 100644
index 000000000000..18ebd9730630
--- /dev/null
+++ b/src/hooks/useHybridAppMiddleware.ts
@@ -0,0 +1,11 @@
+import {useContext} from 'react';
+import {HybridAppMiddlewareContext} from '@components/HybridAppMiddleware';
+
+type SplashScreenHiddenContextType = {isSplashHidden: boolean};
+
+export default function useHybridAppMiddleware() {
+ const {navigateToExitUrl, showSplashScreenOnNextStart} = useContext(HybridAppMiddlewareContext);
+ return {navigateToExitUrl, showSplashScreenOnNextStart};
+}
+
+export type {SplashScreenHiddenContextType};
diff --git a/src/hooks/useIsSplashHidden.ts b/src/hooks/useIsSplashHidden.ts
deleted file mode 100644
index 7563d388416c..000000000000
--- a/src/hooks/useIsSplashHidden.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import {useContext} from 'react';
-import {SplashScreenHiddenContext} from '@src/Expensify';
-
-type SplashScreenHiddenContextType = {isSplashHidden: boolean};
-
-export default function useIsSplashHidden() {
- const {isSplashHidden} = useContext(SplashScreenHiddenContext) as SplashScreenHiddenContextType;
- return isSplashHidden;
-}
-
-export type {SplashScreenHiddenContextType};
diff --git a/src/hooks/useLastAccessedReportID.ts b/src/hooks/useLastAccessedReportID.ts
new file mode 100644
index 000000000000..16a4a6bc2a31
--- /dev/null
+++ b/src/hooks/useLastAccessedReportID.ts
@@ -0,0 +1,148 @@
+import {useCallback, useSyncExternalStore} from 'react';
+import type {OnyxCollection} from 'react-native-onyx';
+import Onyx from 'react-native-onyx';
+import {getPolicyEmployeeListByIdWithoutCurrentUser} from '@libs/PolicyUtils';
+import * as ReportUtils from '@libs/ReportUtils';
+import ONYXKEYS from '@src/ONYXKEYS';
+import type {Policy, Report, ReportMetadata} from '@src/types/onyx';
+import useActiveWorkspace from './useActiveWorkspace';
+import usePermissions from './usePermissions';
+
+/*
+ * This hook is used to get the lastAccessedReportID.
+ * This is a piece of data that's derived from a lot of frequently-changing Onyx values: (reports, reportMetadata, policies, etc...)
+ * We don't want any component that needs access to the lastAccessedReportID to have to re-render any time any of those values change, just when the lastAccessedReportID changes.
+ * So we have a custom implementation in this file that leverages useSyncExternalStore to connect to a "store" of multiple Onyx values, and re-render only when the one derived value changes.
+ */
+
+const subscribers: Array<() => void> = [];
+
+let reports: OnyxCollection = {};
+let reportMetadata: OnyxCollection = {};
+let policies: OnyxCollection = {};
+let accountID: number | undefined;
+let isFirstTimeNewExpensifyUser = false;
+
+let reportsConnection: number;
+let reportMetadataConnection: number;
+let policiesConnection: number;
+let accountIDConnection: number;
+let isFirstTimeNewExpensifyUserConnection: number;
+
+function notifySubscribers() {
+ subscribers.forEach((subscriber) => subscriber());
+}
+
+function subscribeToOnyxData() {
+ // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs
+ reportsConnection = Onyx.connect({
+ key: ONYXKEYS.COLLECTION.REPORT,
+ waitForCollectionCallback: true,
+ callback: (value) => {
+ reports = value;
+ notifySubscribers();
+ },
+ });
+ // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs
+ reportMetadataConnection = Onyx.connect({
+ key: ONYXKEYS.COLLECTION.REPORT_METADATA,
+ waitForCollectionCallback: true,
+ callback: (value) => {
+ reportMetadata = value;
+ notifySubscribers();
+ },
+ });
+ // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs
+ policiesConnection = Onyx.connect({
+ key: ONYXKEYS.COLLECTION.POLICY,
+ waitForCollectionCallback: true,
+ callback: (value) => {
+ policies = value;
+ notifySubscribers();
+ },
+ });
+ // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs
+ accountIDConnection = Onyx.connect({
+ key: ONYXKEYS.SESSION,
+ callback: (value) => {
+ accountID = value?.accountID;
+ notifySubscribers();
+ },
+ });
+ // eslint-disable-next-line rulesdir/prefer-onyx-connect-in-libs
+ isFirstTimeNewExpensifyUserConnection = Onyx.connect({
+ key: ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER,
+ callback: (value) => {
+ isFirstTimeNewExpensifyUser = !!value;
+ notifySubscribers();
+ },
+ });
+}
+
+function unsubscribeFromOnyxData() {
+ if (reportsConnection) {
+ Onyx.disconnect(reportsConnection);
+ reportsConnection = 0;
+ }
+ if (reportMetadataConnection) {
+ Onyx.disconnect(reportMetadataConnection);
+ reportMetadataConnection = 0;
+ }
+ if (policiesConnection) {
+ Onyx.disconnect(policiesConnection);
+ policiesConnection = 0;
+ }
+ if (accountIDConnection) {
+ Onyx.disconnect(accountIDConnection);
+ accountIDConnection = 0;
+ }
+ if (isFirstTimeNewExpensifyUserConnection) {
+ Onyx.disconnect(isFirstTimeNewExpensifyUserConnection);
+ isFirstTimeNewExpensifyUserConnection = 0;
+ }
+}
+
+function removeSubscriber(subscriber: () => void) {
+ const subscriberIndex = subscribers.indexOf(subscriber);
+ if (subscriberIndex < 0) {
+ return;
+ }
+ subscribers.splice(subscriberIndex, 1);
+ if (subscribers.length === 0) {
+ unsubscribeFromOnyxData();
+ }
+}
+
+function addSubscriber(subscriber: () => void) {
+ subscribers.push(subscriber);
+ if (!reportsConnection) {
+ subscribeToOnyxData();
+ }
+ return () => removeSubscriber(subscriber);
+}
+
+/**
+ * Get the last accessed reportID.
+ */
+export default function useLastAccessedReportID(shouldOpenOnAdminRoom: boolean) {
+ const {canUseDefaultRooms} = usePermissions();
+ const {activeWorkspaceID} = useActiveWorkspace();
+
+ const getSnapshot = useCallback(() => {
+ const policyMemberAccountIDs = getPolicyEmployeeListByIdWithoutCurrentUser(policies, activeWorkspaceID, accountID);
+ return ReportUtils.findLastAccessedReport(
+ reports,
+ !canUseDefaultRooms,
+ policies,
+ isFirstTimeNewExpensifyUser,
+ shouldOpenOnAdminRoom,
+ reportMetadata,
+ activeWorkspaceID,
+ policyMemberAccountIDs,
+ )?.reportID;
+ }, [activeWorkspaceID, canUseDefaultRooms, shouldOpenOnAdminRoom]);
+
+ // We need access to all the data from these Onyx.connect calls, but we don't want to re-render the consuming component
+ // unless the derived value (lastAccessedReportID) changes. To address these, we'll wrap everything with useSyncExternalStore
+ return useSyncExternalStore(addSubscriber, getSnapshot);
+}
diff --git a/src/hooks/useSplashScreen.ts b/src/hooks/useSplashScreen.ts
new file mode 100644
index 000000000000..8838ac1289c7
--- /dev/null
+++ b/src/hooks/useSplashScreen.ts
@@ -0,0 +1,11 @@
+import {useContext} from 'react';
+import {SplashScreenHiddenContext} from '@src/Expensify';
+
+type SplashScreenHiddenContextType = {isSplashHidden: boolean; setIsSplashHidden: React.Dispatch>};
+
+export default function useSplashScreen() {
+ const {isSplashHidden, setIsSplashHidden} = useContext(SplashScreenHiddenContext) as SplashScreenHiddenContextType;
+ return {isSplashHidden, setIsSplashHidden};
+}
+
+export type {SplashScreenHiddenContextType};
diff --git a/src/hooks/useSubscriptionPossibleCostSavings.ts b/src/hooks/useSubscriptionPossibleCostSavings.ts
new file mode 100644
index 000000000000..ef92009549fe
--- /dev/null
+++ b/src/hooks/useSubscriptionPossibleCostSavings.ts
@@ -0,0 +1,38 @@
+import {useOnyx} from 'react-native-onyx';
+import CONST from '@src/CONST';
+import ONYXKEYS from '@src/ONYXKEYS';
+import usePreferredCurrency from './usePreferredCurrency';
+import useSubscriptionPlan from './useSubscriptionPlan';
+
+const POSSIBLE_COST_SAVINGS = {
+ [CONST.PAYMENT_CARD_CURRENCY.USD]: {
+ [CONST.POLICY.TYPE.TEAM]: 1000,
+ [CONST.POLICY.TYPE.CORPORATE]: 1800,
+ },
+ [CONST.PAYMENT_CARD_CURRENCY.AUD]: {
+ [CONST.POLICY.TYPE.TEAM]: 1400,
+ [CONST.POLICY.TYPE.CORPORATE]: 3000,
+ },
+ [CONST.PAYMENT_CARD_CURRENCY.GBP]: {
+ [CONST.POLICY.TYPE.TEAM]: 800,
+ [CONST.POLICY.TYPE.CORPORATE]: 1400,
+ },
+ [CONST.PAYMENT_CARD_CURRENCY.NZD]: {
+ [CONST.POLICY.TYPE.TEAM]: 1600,
+ [CONST.POLICY.TYPE.CORPORATE]: 3200,
+ },
+} as const;
+
+function useSubscriptionPossibleCostSavings(): number {
+ const preferredCurrency = usePreferredCurrency();
+ const subscriptionPlan = useSubscriptionPlan();
+ const [privateSubscription] = useOnyx(ONYXKEYS.NVP_PRIVATE_SUBSCRIPTION);
+
+ if (!subscriptionPlan || !privateSubscription?.type) {
+ return 0;
+ }
+
+ return POSSIBLE_COST_SAVINGS[preferredCurrency][subscriptionPlan];
+}
+
+export default useSubscriptionPossibleCostSavings;
diff --git a/src/languages/en.ts b/src/languages/en.ts
index 2a5b32be5038..936941003073 100755
--- a/src/languages/en.ts
+++ b/src/languages/en.ts
@@ -12,10 +12,14 @@ import type {
BeginningOfChatHistoryAnnounceRoomPartTwo,
BeginningOfChatHistoryDomainRoomPartOneParams,
CanceledRequestParams,
+ ChangeFieldParams,
+ ChangePolicyParams,
+ ChangeTypeParams,
CharacterLimitParams,
ConfirmThatParams,
DateShouldBeAfterParams,
DateShouldBeBeforeParams,
+ DelegateSubmitParams,
DeleteActionParams,
DeleteConfirmationParams,
DidSplitAmountMessageParams,
@@ -23,7 +27,9 @@ import type {
EditActionParams,
ElectronicFundsParams,
EnterMagicCodeParams,
+ ExportedToIntegrationParams,
FormattedMaxLengthParams,
+ ForwardedParams,
GoBackMessageParams,
GoToRoomParams,
InstantSummaryParams,
@@ -32,6 +38,8 @@ import type {
LogSizeParams,
ManagerApprovedAmountParams,
ManagerApprovedParams,
+ MarkedReimbursedParams,
+ MarkReimbursedFromIntegrationParams,
NoLongerHaveAccessParams,
NotAllowedExtensionParams,
NotYouParams,
@@ -49,6 +57,7 @@ import type {
PaySomeoneParams,
ReimbursementRateParams,
RemovedTheRequestParams,
+ RemoveMembersWarningPrompt,
RenamedRoomActionParams,
ReportArchiveReasonsClosedParams,
ReportArchiveReasonsMergedParams,
@@ -64,10 +73,12 @@ import type {
SetTheRequestParams,
SettledAfterAddedBankAccountParams,
SettleExpensifyCardParams,
+ ShareParams,
SignUpNewFaceCodeParams,
SizeExceededParams,
SplitAmountParams,
StepCounterParams,
+ StripePaidParams,
TaskCreatedActionParams,
TermsParams,
ThreadRequestReportNameParams,
@@ -75,6 +86,8 @@ import type {
ToValidateLoginParams,
TransferParams,
TranslationBase,
+ UnapprovedParams,
+ UnshareParams,
UntilTimeParams,
UpdatedTheDistanceParams,
UpdatedTheRequestParams,
@@ -273,7 +286,7 @@ export default {
your: 'your',
conciergeHelp: 'Please reach out to Concierge for help.',
youAppearToBeOffline: 'You appear to be offline.',
- thisFeatureRequiresInternet: 'This feature requires an active internet connection to be used.',
+ thisFeatureRequiresInternet: 'This feature requires an active internet connection.',
attachementWillBeAvailableOnceBackOnline: 'Attachment will become available once back online.',
areYouSure: 'Are you sure?',
verify: 'Verify',
@@ -339,44 +352,46 @@ export default {
shared: 'Shared',
drafts: 'Drafts',
finished: 'Finished',
+ companyID: 'Company ID',
+ userID: 'User ID',
disable: 'Disable',
},
location: {
useCurrent: 'Use current location',
- notFound: 'We were unable to find your location, please try again or enter an address manually.',
- permissionDenied: 'It looks like you have denied permission to your location.',
+ notFound: 'We were unable to find your location. Please try again or enter an address manually.',
+ permissionDenied: "It looks like you've denied access to your location.",
please: 'Please',
- allowPermission: 'allow location permission in settings',
- tryAgain: 'and then try again.',
+ allowPermission: 'allow location access in settings',
+ tryAgain: 'and try again.',
},
anonymousReportFooter: {
logoTagline: 'Join the discussion.',
},
attachmentPicker: {
cameraPermissionRequired: 'Camera access',
- expensifyDoesntHaveAccessToCamera: "Expensify can't take photos without access to your camera. Tap Settings to update permissions.",
+ expensifyDoesntHaveAccessToCamera: "Expensify can't take photos without access to your camera. Tap settings to update permissions.",
attachmentError: 'Attachment error',
- errorWhileSelectingAttachment: 'An error occurred while selecting an attachment, please try again.',
- errorWhileSelectingCorruptedAttachment: 'An error occurred while selecting a corrupted attachment, please try another file.',
+ errorWhileSelectingAttachment: 'An error occurred while selecting an attachment. Please try again.',
+ errorWhileSelectingCorruptedAttachment: 'An error occurred while selecting a corrupted attachment. Please try another file.',
takePhoto: 'Take photo',
chooseFromGallery: 'Choose from gallery',
chooseDocument: 'Choose file',
- attachmentTooLarge: 'Attachment too large',
- sizeExceeded: 'Attachment size is larger than 24 MB limit.',
- attachmentTooSmall: 'Attachment too small',
- sizeNotMet: 'Attachment size must be greater than 240 bytes.',
+ attachmentTooLarge: 'Attachment is too large',
+ sizeExceeded: 'Attachment size is larger than 24 MB limit',
+ attachmentTooSmall: 'Attachment is too small',
+ sizeNotMet: 'Attachment size must be greater than 240 bytes',
wrongFileType: 'Invalid file type',
- notAllowedExtension: 'This file type is not allowed',
- folderNotAllowedMessage: 'Uploading a folder is not allowed. Try a different file.',
+ notAllowedExtension: 'This file type is not allowed. Please try a different file type.',
+ folderNotAllowedMessage: 'Uploading a folder is not allowed. Please try a different file.',
protectedPDFNotSupported: 'Password-protected PDF is not supported',
},
connectionComplete: {
- title: 'Connection Complete',
+ title: 'Connection complete',
supportingText: 'You can close this window and head back to the Expensify app.',
},
avatarCropModal: {
title: 'Edit photo',
- description: 'Drag, zoom, and rotate your image to your preferred specifications',
+ description: 'Drag, zoom, and rotate your image however you like.',
},
composer: {
noExtensionFoundForMimeType: 'No extension found for mime type',
@@ -385,7 +400,7 @@ export default {
},
baseUpdateAppModal: {
updateApp: 'Update app',
- updatePrompt: 'A new version of this app is available.\nUpdate now or restart the app at a later time to download the latest changes.',
+ updatePrompt: 'A new version of this app is available.\nUpdate now or restart the app later to download the latest changes.',
},
deeplinkWrapper: {
launching: 'Launching Expensify',
@@ -401,17 +416,17 @@ export default {
continueInWeb: 'continue to the web app',
},
validateCodeModal: {
- successfulSignInTitle: 'Abracadabra,\nyou are signed in!',
+ successfulSignInTitle: "Abracadabra,\nyou're signed in!",
successfulSignInDescription: 'Head back to your original tab to continue.',
- title: 'Here is your magic code',
- description: 'Please enter the code using the device\nwhere it was originally requested',
+ title: "Here's your magic code",
+ description: 'Please enter the code from the device\nwhere it was originally requested',
or: ', or',
signInHere: 'just sign in here',
expiredCodeTitle: 'Magic code expired',
expiredCodeDescription: 'Go back to the original device and request a new code.',
successfulNewCodeRequest: 'Code requested. Please check your device.',
tfaRequiredTitle: 'Two-factor authentication\nrequired',
- tfaRequiredDescription: 'Please enter the two-factor authentication code\nwhere you are trying to sign in.',
+ tfaRequiredDescription: "Please enter the two-factor authentication code\nwhere you're trying to sign in.",
},
moneyRequestConfirmationList: {
paidBy: 'Paid by',
@@ -429,7 +444,7 @@ export default {
welcomeText: {
getStarted: 'Get started below.',
anotherLoginPageIsOpen: 'Another login page is open.',
- anotherLoginPageIsOpenExplanation: "You've opened the login page in a separate tab, please login from that specific tab.",
+ anotherLoginPageIsOpenExplanation: "You've opened the login page in a separate tab. Please log in from that tab.",
welcome: 'Welcome!',
welcomeWithoutExclamation: 'Welcome',
phrase2: "Money talks. And now that chat and payments are in one place, it's also easy.",
@@ -445,7 +460,7 @@ export default {
},
},
thirdPartySignIn: {
- alreadySignedIn: ({email}: AlreadySignedInParams) => `You are already signed in as ${email}.`,
+ alreadySignedIn: ({email}: AlreadySignedInParams) => `You're already signed in as ${email}.`,
goBackMessage: ({provider}: GoBackMessageParams) => `Don't want to sign in with ${provider}?`,
continueWithMyCurrentSession: 'Continue with my current session',
redirectToDesktopMessage: "We'll redirect you to the desktop app once you finish signing in.",
@@ -455,7 +470,7 @@ export default {
},
samlSignIn: {
welcomeSAMLEnabled: 'Continue logging in with single sign-on:',
- orContinueWithMagicCode: 'Or optionally, your company allows signing in with a magic code',
+ orContinueWithMagicCode: 'You can also sign in with a magic code',
useSingleSignOn: 'Use single sign-on',
useMagicCode: 'Use magic code',
launching: 'Launching...',
@@ -546,7 +561,7 @@ export default {
hereAlternateText: 'Notify everyone in this conversation',
},
newMessages: 'New messages',
- youHaveBeenBanned: 'Note: You have been banned from communicating in this channel',
+ youHaveBeenBanned: "Note: You've been banned from chatting in this channel.",
reportTypingIndicator: {
isTyping: 'is typing...',
areTyping: 'are typing...',
@@ -601,8 +616,8 @@ export default {
chooseFile: 'Choose file',
takePhoto: 'Take a photo',
cameraAccess: 'Camera access is required to take pictures of receipts.',
- cameraErrorTitle: 'Camera Error',
- cameraErrorMessage: 'An error occurred while taking a photo, please try again.',
+ cameraErrorTitle: 'Camera error',
+ cameraErrorMessage: 'An error occurred while taking a photo. Please try again.',
dropTitle: 'Let it go',
dropMessage: 'Drop your file here',
flash: 'flash',
@@ -658,12 +673,12 @@ export default {
canceled: 'Canceled',
posted: 'Posted',
deleteReceipt: 'Delete receipt',
- pendingMatchWithCreditCard: 'Receipt pending match with credit card.',
- pendingMatchWithCreditCardDescription: 'Receipt pending match with credit card. Mark as cash to ignore and request payment.',
+ pendingMatchWithCreditCard: 'Receipt pending match with card transaction',
+ pendingMatchWithCreditCardDescription: 'Receipt pending match with card transaction. Mark as cash to cancel.',
markAsCash: 'Mark as cash',
routePending: 'Route pending...',
receiptScanning: 'Receipt scanning...',
- receiptScanInProgress: 'Receipt scan in progress.',
+ receiptScanInProgress: 'Receipt scan in progress',
receiptScanInProgressDescription: 'Receipt scan in progress. Check back later or enter the details now.',
receiptIssuesFound: (count: number) => `${count === 1 ? 'Issue' : 'Issues'} found`,
fieldPending: 'Pending...',
@@ -673,8 +688,8 @@ export default {
missingMerchant: 'Missing merchant',
receiptStatusTitle: 'Scanning…',
receiptStatusText: "Only you can see this receipt when it's scanning. Check back later or enter the details now.",
- receiptScanningFailed: 'Receipt scanning failed. Enter the details manually.',
- transactionPendingDescription: 'Transaction pending. It can take a few days from the date the card was used for the transaction to post.',
+ receiptScanningFailed: 'Receipt scanning failed. Please enter the details manually.',
+ transactionPendingDescription: 'Transaction pending. It may take a few days to post.',
expenseCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) =>
`${count} ${Str.pluralize('expense', 'expenses', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} scanning` : ''}${
pendingReceipts > 0 ? `, ${pendingReceipts} pending` : ''
@@ -689,7 +704,7 @@ export default {
settlePayment: ({formattedAmount}: SettleExpensifyCardParams) => `Pay ${formattedAmount}`,
settleBusiness: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} as a business` : `Pay as a business`),
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pay ${formattedAmount} elsewhere` : `Pay elsewhere`),
- nextStep: 'Next Steps',
+ nextStep: 'Next steps',
finished: 'Finished',
sendInvoice: ({amount}: RequestAmountParams) => `Send ${amount} invoice`,
submitAmount: ({amount}: RequestAmountParams) => `submit ${amount}`,
@@ -731,24 +746,24 @@ export default {
tagSelection: 'Select a tag to better organize your spend.',
categorySelection: 'Select a category to better organize your spend.',
error: {
- invalidCategoryLength: 'The length of the category chosen exceeds the maximum allowed (255). Please choose a different or shorten the category name first.',
+ invalidCategoryLength: 'The category name exceeds 255 characters. Please shorten it or choose a different category.',
invalidAmount: 'Please enter a valid amount before continuing.',
invalidTaxAmount: ({amount}: RequestAmountParams) => `Maximum tax amount is ${amount}`,
invalidSplit: 'The sum of splits must equal the total amount.',
- invalidSplitParticipants: 'Enter an amount greater than zero for at least two participants.',
- other: 'Unexpected error, please try again later.',
+ invalidSplitParticipants: 'Please enter an amount greater than zero for at least two participants.',
+ other: 'Unexpected error. Please try again later.',
genericCreateFailureMessage: 'Unexpected error submitting this expense. Please try again later.',
- genericCreateInvoiceFailureMessage: 'Unexpected error sending invoice, please try again later.',
- genericHoldExpenseFailureMessage: 'Unexpected error while holding the expense. Please try again later.',
- genericUnholdExpenseFailureMessage: 'Unexpected error while taking the expense off hold. Please try again later.',
+ genericCreateInvoiceFailureMessage: 'Unexpected error sending this invoice. Please try again later.',
+ genericHoldExpenseFailureMessage: 'Unexpected error holding this expense. Please try again later.',
+ genericUnholdExpenseFailureMessage: 'Unexpected error taking this expense off hold. Please try again later.',
receiptDeleteFailureError: 'Unexpected error deleting this receipt. Please try again later.',
// eslint-disable-next-line rulesdir/use-periods-for-error-messages
receiptFailureMessage: "The receipt didn't upload. ",
// eslint-disable-next-line rulesdir/use-periods-for-error-messages
saveFileMessage: 'Download the file ',
loseFileMessage: 'or dismiss this error and lose it.',
- genericDeleteFailureMessage: 'Unexpected error deleting this expense, please try again later.',
- genericEditFailureMessage: 'Unexpected error editing this expense, please try again later.',
+ genericDeleteFailureMessage: 'Unexpected error deleting this expense. Please try again later.',
+ genericEditFailureMessage: 'Unexpected error editing this expense. Please try again later.',
genericSmartscanFailureMessage: 'Transaction is missing fields.',
duplicateWaypointsErrorMessage: 'Please remove duplicate waypoints.',
atLeastTwoDifferentWaypoints: 'Please enter at least two different addresses.',
@@ -756,7 +771,7 @@ export default {
invalidMerchant: 'Please enter a correct merchant.',
},
waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `started settling up. Payment is on hold until ${submitterDisplayName} enables their wallet.`,
- enableWallet: 'Enable Wallet',
+ enableWallet: 'Enable wallet',
hold: 'Hold',
unhold: 'Unhold',
holdExpense: 'Hold expense',
@@ -766,9 +781,9 @@ export default {
explainHold: "Explain why you're holding this expense.",
reason: 'Reason',
holdReasonRequired: 'A reason is required when holding.',
- expenseOnHold: 'This expense was put on hold. Review the comments for next steps.',
- expensesOnHold: 'All expenses were put on hold. Review the comments for next steps.',
- expenseDuplicate: 'This expense has the same details as another one. Review the duplicates to remove the hold.',
+ expenseOnHold: 'This expense was put on hold. Please review the comments for next steps.',
+ expensesOnHold: 'All expenses were put on hold. Please review the comments for next steps.',
+ expenseDuplicate: 'This expense has the same details as another one. Please review the duplicates to remove the hold.',
reviewDuplicates: 'Review duplicates',
keepAll: 'Keep all',
confirmApprove: 'Confirm approval amount',
@@ -781,9 +796,9 @@ export default {
whatIsHoldTitle: 'What is hold?',
whatIsHoldExplain: 'Hold is our way of streamlining financial collaboration. "Reject" is so harsh!',
holdIsTemporaryTitle: 'Hold is usually temporary',
- holdIsTemporaryExplain: "Because hold is used to clear up confusion or clarify an important detail before payment, it's not permanent.",
+ holdIsTemporaryExplain: "Hold is used to clear up confusion or clarify an important detail before payment. Don't worry, it's not permanent!",
deleteHoldTitle: "Delete whatever won't be paid",
- deleteHoldExplain: "In the rare case where something is put on hold and won't be paid, it's on the person requesting payment to delete it.",
+ deleteHoldExplain: "In the rare case where something's put on hold and won't be paid, it's on the person requesting payment to delete it.",
set: 'set',
changed: 'changed',
removed: 'removed',
@@ -801,8 +816,8 @@ export default {
},
},
loginField: {
- numberHasNotBeenValidated: 'The number has not yet been validated. Click the button to resend the validation link via text.',
- emailHasNotBeenValidated: 'The email has not yet been validated. Click the button to resend the validation link via text.',
+ numberHasNotBeenValidated: "The number hasn't been validated. Click the button to resend the validation link via text.",
+ emailHasNotBeenValidated: "The email hasn't been validated. Click the button to resend the validation link via text.",
},
avatarWithImagePicker: {
uploadPhoto: 'Upload photo',
@@ -810,7 +825,7 @@ export default {
editImage: 'Edit photo',
viewPhoto: 'View photo',
imageUploadFailed: 'Image upload failed',
- deleteWorkspaceError: 'Sorry, there was an unexpected problem deleting your workspace avatar.',
+ deleteWorkspaceError: 'Sorry, there was an unexpected problem deleting your workspace avatar',
sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `The selected image exceeds the maximum upload size of ${maxUploadSizeInMB}MB.`,
resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) =>
`Please upload an image larger than ${minHeightInPx}x${minWidthInPx} pixels and smaller than ${maxHeightInPx}x${maxWidthInPx} pixels.`,
@@ -825,18 +840,18 @@ export default {
setMyTimezoneAutomatically: 'Set my timezone automatically',
timezone: 'Timezone',
invalidFileMessage: 'Invalid file. Please try a different image.',
- avatarUploadFailureMessage: 'An error occurred uploading the avatar, please try again.',
+ avatarUploadFailureMessage: 'An error occurred uploading the avatar. Please try again.',
online: 'Online',
offline: 'Offline',
syncing: 'Syncing',
profileAvatar: 'Profile avatar',
publicSection: {
title: 'Public',
- subtitle: 'These details are displayed on your public profile, available for people to see.',
+ subtitle: 'These details are displayed on your public profile. Anyone can see them.',
},
privateSection: {
title: 'Private',
- subtitle: 'These details are used for travel and payments. They are never shown on your public profile.',
+ subtitle: "These details are used for travel and payments. They're never shown on your public profile.",
},
},
securityPage: {
@@ -861,10 +876,9 @@ export default {
getInTouch: "Whenever we need to get in touch with you, we'll use this contact method.",
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod}`,
setAsDefault: 'Set as default',
- yourDefaultContactMethod:
- 'This is your current default contact method. You will not be able to delete this contact method until you set an alternative default by selecting another contact method and pressing “Set as default”.',
+ yourDefaultContactMethod: "This is your current default contact method. Before you can delete it, you'll need to choose another contact method and click “Set as default”.",
removeContactMethod: 'Remove contact method',
- removeAreYouSure: 'Are you sure you want to remove this contact method? This action cannot be undone.',
+ removeAreYouSure: "Are you sure you want to remove this contact method? This action can't be undone.",
failedNewContact: 'Failed to add this contact method.',
genericFailureMessages: {
requestContactMethodValidateCode: 'Failed to send a new magic code. Please wait a bit and try again.',
@@ -872,7 +886,7 @@ export default {
deleteContactMethod: 'Failed to delete contact method. Please reach out to Concierge for help.',
setDefaultContactMethod: 'Failed to set a new default contact method. Please reach out to Concierge for help.',
addContactMethod: 'Failed to add this contact method. Please reach out to Concierge for help.',
- enteredMethodIsAlreadySubmited: 'The Entered Contact Method already exists.',
+ enteredMethodIsAlreadySubmited: 'This contact method already exists.',
passwordRequired: 'password required.',
contactMethodRequired: 'Contact method is required.',
invalidContactMethod: 'Invalid contact method',
@@ -918,7 +932,7 @@ export default {
initialSettingsPage: {
about: 'About',
aboutPage: {
- description: 'The New Expensify App is built by a community of open source developers from around the world. Help us build the future of Expensify.',
+ description: 'The New Expensify App is built by a community of open-source developers from around the world. Help us build the future of Expensify.',
appDownloadLinks: 'App download links',
viewKeyboardShortcuts: 'View keyboard shortcuts',
viewTheCode: 'View the code',
@@ -972,7 +986,7 @@ export default {
security: 'Security',
signOut: 'Sign out',
restoreStashed: 'Restore stashed login',
- signOutConfirmationText: "You'll lose any offline changes if you sign-out.",
+ signOutConfirmationText: "You'll lose any offline changes if you sign out.",
versionLetter: 'v',
readTheTermsAndPrivacy: {
phrase1: 'Read the',
@@ -992,7 +1006,7 @@ export default {
enterMessageHere: 'Enter message here',
closeAccountWarning: 'Closing your account cannot be undone.',
closeAccountPermanentlyDeleteData: 'Are you sure you want to delete your account? This will permanently delete any outstanding expenses.',
- enterDefaultContactToConfirm: 'Please type your default contact method to confirm you wish to close your account. Your default contact method is:',
+ enterDefaultContactToConfirm: 'Please enter your default contact method to confirm you wish to close your account. Your default contact method is:',
enterDefaultContact: 'Enter your default contact method',
defaultContact: 'Default contact method:',
enterYourDefaultContactMethod: 'Please enter your default contact method to close your account.',
@@ -1002,7 +1016,7 @@ export default {
changingYourPasswordPrompt: 'Changing your password will update your password for both your Expensify.com and New Expensify accounts.',
currentPassword: 'Current password',
newPassword: 'New password',
- newPasswordPrompt: 'New password must be different than your old password, have at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.',
+ newPasswordPrompt: 'Your new password must be different from your old password and contain at least 8 characters, 1 capital letter, 1 lowercase letter, and 1 number.',
},
twoFactorAuth: {
headerTitle: 'Two-factor authentication',
@@ -1015,13 +1029,13 @@ export default {
stepCodes: 'Recovery codes',
keepCodesSafe: 'Keep these recovery codes safe!',
codesLoseAccess:
- 'If you lose access to your authenticator app and don’t have these codes, you will lose access to your account. \n\nNote: Setting up two-factor authentication will log you out of all other active sessions.',
+ "If you lose access to your authenticator app and don’t have these codes, you'll lose access to your account. \n\nNote: Setting up two-factor authentication will log you out of all other active sessions.",
errorStepCodes: 'Please copy or download codes before continuing.',
stepVerify: 'Verify',
scanCode: 'Scan the QR code using your',
authenticatorApp: 'authenticator app',
addKey: 'Or add this secret key to your authenticator app:',
- enterCode: 'Then enter the six digit code generated from your authenticator app.',
+ enterCode: 'Then enter the six-digit code generated from your authenticator app.',
stepSuccess: 'Finished',
enabled: 'Two-factor authentication is now enabled!',
congrats: 'Congrats, now you’ve got that extra security.',
@@ -1056,6 +1070,18 @@ export default {
genericFailureMessage: "Private notes couldn't be saved.",
},
},
+ billingCurrency: {
+ error: {
+ securityCode: 'Please enter a valid security code.',
+ },
+ securityCode: 'Security code',
+ changeBillingCurrency: 'Change billing currency',
+ changePaymentCurrency: 'Change payment currency',
+ paymentCurrency: 'Payment currency',
+ note: 'Note: Changing your payment currency can impact how much you’ll pay for Expensify. Refer to our',
+ noteLink: 'pricing page',
+ noteDetails: 'for full details.',
+ },
addDebitCardPage: {
addADebitCard: 'Add a debit card',
nameOnCard: 'Name on card',
@@ -1072,10 +1098,10 @@ export default {
debitCardNumber: 'Please enter a valid debit card number.',
expirationDate: 'Please select a valid expiration date.',
securityCode: 'Please enter a valid security code.',
- addressStreet: 'Please enter a valid billing address that is not a PO Box.',
+ addressStreet: "Please enter a valid billing address that's not a PO box.",
addressState: 'Please select a state.',
addressCity: 'Please enter a city.',
- genericFailureMessage: 'An error occurred while adding your card, please try again.',
+ genericFailureMessage: 'An error occurred while adding your card. Please try again.',
password: 'Please enter your Expensify password.',
},
},
@@ -1095,10 +1121,10 @@ export default {
paymentCardNumber: 'Please enter a valid card number.',
expirationDate: 'Please select a valid expiration date.',
securityCode: 'Please enter a valid security code.',
- addressStreet: 'Please enter a valid billing address that is not a PO Box.',
+ addressStreet: "Please enter a valid billing address that's not a PO box.",
addressState: 'Please select a state.',
addressCity: 'Please enter a city.',
- genericFailureMessage: 'An error occurred while adding your card, please try again.',
+ genericFailureMessage: 'An error occurred while adding your card. Please try again.',
password: 'Please enter your Expensify password.',
},
},
@@ -1107,7 +1133,7 @@ export default {
setDefaultConfirmation: 'Make default payment method',
setDefaultSuccess: 'Default payment method set!',
deleteAccount: 'Delete account',
- deleteConfirmation: 'Are you sure that you want to delete this account?',
+ deleteConfirmation: 'Are you sure you want to delete this account?',
error: {
notOwnerOfBankAccount: 'There was an error setting this bank account as your default payment method.',
invalidBankAccount: 'This bank account is temporarily suspended.',
@@ -1130,13 +1156,13 @@ export default {
assignedCards: 'Assigned cards',
assignedCardsDescription: 'These are cards assigned by a workspace admin to manage company spend.',
expensifyCard: 'Expensify Card',
- walletActivationPending: "We're reviewing your information, please check back in a few minutes!",
- walletActivationFailed: 'Unfortunately your wallet cannot be enabled at this time. Please chat with Concierge for further assistance.',
- addYourBankAccount: 'Add your bank account.',
+ walletActivationPending: "We're reviewing your information. Please check back in a few minutes!",
+ walletActivationFailed: "Unfortunately, your wallet can't be enabled at this time. Please chat with Concierge for further assistance.",
+ addYourBankAccount: 'Add your bank account',
addBankAccountBody: "Let's connect your bank account to Expensify so it’s easier than ever to send and receive payments directly in the app.",
- chooseYourBankAccount: 'Choose your bank account.',
+ chooseYourBankAccount: 'Choose your bank account',
chooseAccountBody: 'Make sure that you select the right one.',
- confirmYourBankAccount: 'Confirm your bank account.',
+ confirmYourBankAccount: 'Confirm your bank account',
},
cardPage: {
expensifyCard: 'Expensify Card',
@@ -1159,7 +1185,7 @@ export default {
reportFraud: 'Report virtual card fraud',
reviewTransaction: 'Review transaction',
suspiciousBannerTitle: 'Suspicious transaction',
- suspiciousBannerDescription: 'We noticed suspicious transaction on your card. Tap below to review.',
+ suspiciousBannerDescription: 'We noticed suspicious transactions on your card. Tap below to review.',
cardLocked: "Your card is temporarily locked while our team reviews your company's account.",
cardDetails: {
cardNumber: 'Virtual card number',
@@ -1206,12 +1232,12 @@ export default {
},
},
workflowsDelayedSubmissionPage: {
- autoReportingErrorMessage: 'The delayed submission parameter could not be changed. Please try again or contact support.',
- autoReportingFrequencyErrorMessage: 'The submission frequency could not be changed. Please try again or contact support.',
- monthlyOffsetErrorMessage: 'The monthly frequency could not be changed. Please try again or contact support.',
+ autoReportingErrorMessage: "Delayed submission couldn't be changed. Please try again or contact support.",
+ autoReportingFrequencyErrorMessage: "Submission frequency couldn't be changed. Please try again or contact support.",
+ monthlyOffsetErrorMessage: "Monthly frequency couldn't be changed. Please try again or contact support.",
},
workflowsApprovalPage: {
- genericErrorMessage: 'The approver could not be changed. Please try again or contact support.',
+ genericErrorMessage: "The approver couldn't be changed. Please try again or contact support.",
},
workflowsPayerPage: {
title: 'Authorized payer',
@@ -1296,7 +1322,7 @@ export default {
},
priorityModePage: {
priorityMode: 'Priority mode',
- explainerText: 'Choose whether to show all chats by default sorted with most recent with pinned items at the top, or #focus on unread pinned items, sorted alphabetically.',
+ explainerText: 'Choose whether to #focus on unread and pinned chats only, or show everything with the most recent and pinned chats at the top.',
priorityModes: {
default: {
label: 'Most recent',
@@ -1397,11 +1423,17 @@ export default {
error: {
invalidFormatEmailLogin: 'The email entered is invalid. Please fix the format and try again.',
},
- cannotGetAccountDetails: "Couldn't retrieve account details, please try to sign in again.",
+ cannotGetAccountDetails: "Couldn't retrieve account details. Please try to sign in again.",
loginForm: 'Login form',
notYou: ({user}: NotYouParams) => `Not ${user}?`,
},
onboarding: {
+ welcome: 'Welcome!',
+ explanationModal: {
+ title: 'Welcome to Expensify',
+ description: 'Request and send money is just as easy as sending a message. The new era of expensing is upon us.',
+ secondaryDescription: 'To switch back to Expensify Classic, just tap your profile picture > Go to Expensify Classic.',
+ },
welcomeVideo: {
title: 'Welcome to Expensify',
description: 'One app to handle all your business and personal spend in a chat. Built for your business, your team, and your friends.',
@@ -1430,6 +1462,7 @@ export default {
error: {
containsReservedWord: 'Name cannot contain the words Expensify or Concierge.',
hasInvalidCharacter: 'Name cannot contain a comma or semicolon.',
+ requiredFirstName: 'First name cannot be empty.',
},
},
privatePersonalDetails: {
@@ -1622,7 +1655,7 @@ export default {
},
},
messages: {
- errorMessageInvalidPhone: `Please enter a valid phone number without brackets or dashes. If you're outside the US please include your country code (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
+ errorMessageInvalidPhone: `Please enter a valid phone number without brackets or dashes. If you're outside the US, please include your country code (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
errorMessageInvalidEmail: 'Invalid email',
userIsAlreadyMember: ({login, name}: UserIsAlreadyMemberParams) => `${login} is already a member of ${name}`,
},
@@ -1641,24 +1674,24 @@ export default {
originalDocumentNeeded: 'Please upload an original image of your ID rather than a screenshot or scanned image.',
documentNeedsBetterQuality: 'Your ID appears to be damaged or has missing security features. Please upload an original image of an undamaged ID that is entirely visible.',
imageNeedsBetterQuality: "There's an issue with the image quality of your ID. Please upload a new image where your entire ID can be seen clearly.",
- selfieIssue: "There's an issue with your selfie/video. Please upload a new selfie/video in real time.",
+ selfieIssue: "There's an issue with your selfie/video. Please upload a live selfie/video.",
selfieNotMatching: "Your selfie/video doesn't match your ID. Please upload a new selfie/video where your face can be clearly seen.",
selfieNotLive: "Your selfie/video doesn't appear to be a live photo/video. Please upload a live selfie/video.",
},
additionalDetailsStep: {
headerTitle: 'Additional details',
- helpText: 'We need to confirm the following information before you can send and receive money from your Wallet.',
- helpTextIdologyQuestions: 'We need to ask you just a few more questions to finish validating your identity.',
+ helpText: 'We need to confirm the following information before you can send and receive money with your wallet.',
+ helpTextIdologyQuestions: 'Just a few more questions to finish verifying your identity.',
helpLink: 'Learn more about why we need this.',
legalFirstNameLabel: 'Legal first name',
legalMiddleNameLabel: 'Legal middle name',
legalLastNameLabel: 'Legal last name',
selectAnswer: 'You need to select a response to proceed.',
- ssnFull9Error: 'Please enter a valid 9 digit SSN.',
+ ssnFull9Error: 'Please enter a valid 9-digit SSN.',
needSSNFull9: "We're having trouble verifying your SSN. Please enter the full 9 digits of your SSN.",
weCouldNotVerify: 'We could not verify',
pleaseFixIt: 'Please fix this information before continuing.',
- failedKYCTextBefore: "We weren't able to successfully verify your identity. Please try again later and reach out to ",
+ failedKYCTextBefore: "We weren't able to verify your identity. Please try again later or reach out to ",
failedKYCTextAfter: ' if you have any questions.',
},
termsStep: {
@@ -1692,7 +1725,7 @@ export default {
weChargeOneFee: 'We charge one type of fee.',
fdicInsurance: 'Your funds are eligible for FDIC insurance.',
generalInfo: 'For general information about prepaid accounts, visit',
- conditionsDetails: 'Find details and conditions for all fees and services by visiting',
+ conditionsDetails: 'For details and conditions for all fees and services, visit',
conditionsPhone: 'or calling +1 833-400-0904.',
instant: '(instant)',
electronicFundsInstantFeeMin: ({amount}: TermsParams) => `(min ${amount})`,
@@ -1703,19 +1736,19 @@ export default {
feeAmountHeader: 'Fee amount',
moreDetailsHeader: 'More details',
openingAccountTitle: 'Opening an account',
- openingAccountDetails: 'There is no fee to open an account.',
- monthlyFeeDetails: 'There is no monthly fee.',
+ openingAccountDetails: "There's no fee to open an account.",
+ monthlyFeeDetails: "There's no monthly fee.",
customerServiceTitle: 'Customer service',
customerServiceDetails: 'There are no customer service fees.',
- inactivityDetails: 'There is no inactivity fee.',
+ inactivityDetails: "There's no inactivity fee.",
sendingFundsTitle: 'Sending funds to another account holder',
- sendingFundsDetails: 'There is no fee to send funds to another account holder using your balance, bank account, or debit card.',
+ sendingFundsDetails: "There's no fee to send funds to another account holder using your balance, bank account, or debit card.",
electronicFundsStandardDetails:
- 'There is no fee to transfer funds from your Expensify Wallet ' +
+ "There's no fee to transfer funds from your Expensify Wallet " +
'to your bank account using the standard option. This transfer usually completes within 1-3 business' +
' days.',
electronicFundsInstantDetails: ({percentage, amount}: ElectronicFundsParams) =>
- 'There is a fee to transfer funds from your Expensify Wallet to ' +
+ "There's a fee to transfer funds from your Expensify Wallet to " +
'your linked debit card using the instant transfer option. This transfer usually completes within ' +
`several minutes. The fee is ${percentage}% of the transfer amount (with a minimum fee of ${amount}).`,
fdicInsuranceBancorp: ({amount}: TermsParams) =>
@@ -1729,7 +1762,7 @@ export default {
generalInformation2: 'If you have a complaint about a prepaid account, call the Consumer Financial Protection Bureau at 1-855-411-2372 or visit',
printerFriendlyView: 'View printer-friendly version',
automated: 'Automated',
- liveAgent: 'Live Agent',
+ liveAgent: 'Live agent',
instant: 'Instant',
electronicFundsInstantFeeMin: ({amount}: TermsParams) => `Min ${amount}`,
},
@@ -1773,18 +1806,18 @@ export default {
},
personalInfoStep: {
personalInfo: 'Personal info',
- enterYourLegalFirstAndLast: 'Enter your legal first and last name.',
+ enterYourLegalFirstAndLast: "What's your legal name?",
legalFirstName: 'Legal first name',
legalLastName: 'Legal last name',
legalName: 'Legal name',
- enterYourDateOfBirth: 'Enter your date of birth.',
- enterTheLast4: 'Enter the last 4 of your SSN.',
+ enterYourDateOfBirth: "What's your date of birth?",
+ enterTheLast4: 'What are the last four digits of your Social Security Number?',
dontWorry: "Don't worry, we don't do any personal credit checks!",
- last4SSN: 'Last 4 Social Security Number',
- enterYourAddress: 'Enter your address.',
+ last4SSN: 'Last 4 of SSN',
+ enterYourAddress: "What's your address?",
address: 'Address',
letsDoubleCheck: "Let's double check that everything looks right.",
- byAddingThisBankAccount: 'By adding this bank account, you confirm that you have read, understand and accept',
+ byAddingThisBankAccount: "By adding this bank account, you confirm that you've read, understand, and accept",
whatsYourLegalName: 'What’s your legal name?',
whatsYourDOB: 'What’s your date of birth?',
whatsYourAddress: 'What’s your address?',
@@ -1795,17 +1828,17 @@ export default {
weNeedThisToVerify: 'We need this to verify your wallet.',
},
businessInfoStep: {
- businessInfo: 'Business info',
- enterTheNameOfYourBusiness: 'Enter the name of your business.',
- businessName: 'Legal business name',
- enterYourCompanysTaxIdNumber: 'Enter your company’s Tax ID number.',
+ businessInfo: 'Company info',
+ enterTheNameOfYourBusiness: "What's the name of your company?",
+ businessName: 'Legal company name',
+ enterYourCompanysTaxIdNumber: "What's your company’s Tax ID number?",
taxIDNumber: 'Tax ID number',
taxIDNumberPlaceholder: '9 digits',
- enterYourCompanysWebsite: 'Enter your company’s website.',
+ enterYourCompanysWebsite: "What's your company’s website?",
companyWebsite: 'Company website',
- enterYourCompanysPhoneNumber: 'Enter your company’s phone number.',
- enterYourCompanysAddress: 'Enter your company’s address.',
- selectYourCompanysType: 'Select your company’s type.',
+ enterYourCompanysPhoneNumber: "What's your company’s phone number?",
+ enterYourCompanysAddress: "What's your company’s address?",
+ selectYourCompanysType: 'What type of company is it?',
companyType: 'Company type',
incorporationType: {
LLC: 'LLC',
@@ -1815,11 +1848,11 @@ export default {
SOLE_PROPRIETORSHIP: 'Sole proprietorship',
OTHER: 'Other',
},
- selectYourCompanysIncorporationDate: 'Select your company’s incorporation date.',
+ selectYourCompanysIncorporationDate: "What's your company’s incorporation date?",
incorporationDate: 'Incorporation date',
incorporationDatePlaceholder: 'Start date (yyyy-mm-dd)',
incorporationState: 'Incorporation state',
- pleaseSelectTheStateYourCompanyWasIncorporatedIn: 'Please select the state your company was incorporated in.',
+ pleaseSelectTheStateYourCompanyWasIncorporatedIn: 'Which state was your company incorporated in?',
letsDoubleCheck: "Let's double check that everything looks right.",
companyAddress: 'Company address',
listOfRestrictedBusinesses: 'list of restricted businesses',
@@ -1829,36 +1862,35 @@ export default {
doYouOwn25percent: 'Do you own 25% or more of',
doAnyIndividualOwn25percent: 'Do any individuals own 25% or more of',
areThereMoreIndividualsWhoOwn25percent: 'Are there more individuals who own 25% or more of',
- regulationRequiresUsToVerifyTheIdentity: 'Regulation requires us to verify the identity of any individual that owns more than 25% of the company.',
+ regulationRequiresUsToVerifyTheIdentity: 'Regulation requires us to verify the identity of any individual who owns more than 25% of the company.',
companyOwner: 'Company owner',
- enterLegalFirstAndLastName: 'Enter the legal first and last name of the owner.',
+ enterLegalFirstAndLastName: "What's the owner's legal name?",
legalFirstName: 'Legal first name',
legalLastName: 'Legal last name',
- enterTheDateOfBirthOfTheOwner: 'Enter the date of birth of the owner.',
- enterTheLast4: 'Enter the last 4 of the owner’s SSN.',
- last4SSN: 'Last 4 Social Security Number',
+ enterTheDateOfBirthOfTheOwner: "What's the owner's date of birth?",
+ enterTheLast4: 'What are the last 4 digits of the owner’s Social Security Number?',
+ last4SSN: 'Last 4 of SSN',
dontWorry: "Don't worry, we don't do any personal credit checks!",
- enterTheOwnersAddress: 'Enter the owner’s address.',
+ enterTheOwnersAddress: "What's the owner's address?",
letsDoubleCheck: 'Let’s double check that everything looks right.',
legalName: 'Legal name',
address: 'Address',
- byAddingThisBankAccount: 'By adding this bank account, you confirm that you have read, understand and accept',
+ byAddingThisBankAccount: "By adding this bank account, you confirm that you've read, understand, and accept",
owners: 'Owners',
},
validationStep: {
- headerTitle: 'Validate Bank Account',
+ headerTitle: 'Validate bank account',
buttonText: 'Finish setup',
maxAttemptsReached: 'Validation for this bank account has been disabled due to too many incorrect attempts.',
- description: 'A day or two after you add your account to Expensify we send three (3) transactions to your account. They have a merchant line like "Expensify, Inc. Validation".',
+ description: `Within 1-2 business days, we'll send three (3) small transactions to your bank account from a name like "Expensify, Inc. Validation".`,
descriptionCTA: 'Please enter each transaction amount in the fields below. Example: 1.51.',
reviewingInfo: "Thanks! We're reviewing your information, and will be in touch shortly. Please check your chat with Concierge ",
forNextStep: ' for next steps to finish setting up your bank account.',
letsChatCTA: "Yes, let's 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?',
+ letsChatText: 'Almost there! We need your help verifying a few last bits of information over chat. Ready?',
letsChatTitle: "Let's chat!",
- enable2FATitle: 'Prevent fraud, enable two-factor authentication!',
- enable2FAText:
- 'We take your security seriously, so please set up two-factor authentication for your account now. That will allow us to dispute Expensify Card digital transactions, and will reduce your risk for fraud.',
+ enable2FATitle: 'Prevent fraud, enable two-factor authentication (2FA)',
+ enable2FAText: 'We take your security seriously. Please set up 2FA now to add an extra layer of protection to your account.',
secureYourAccount: 'Secure your account',
},
beneficialOwnersStep: {
@@ -1880,7 +1912,7 @@ export default {
completeVerification: 'Complete verification',
confirmAgreements: 'Please confirm the agreements below.',
certifyTrueAndAccurate: 'I certify that the information provided is true and accurate',
- certifyTrueAndAccurateError: 'Must certify information is true and accurate',
+ certifyTrueAndAccurateError: 'Please certify that the information is true and accurate',
isAuthorizedToUseBankAccount: 'I am authorized to use my company bank account for business spend',
isAuthorizedToUseBankAccountError: 'You must be a controlling officer with authorization to operate the business bank account.',
termsAndConditions: 'terms and conditions',
@@ -1892,21 +1924,20 @@ export default {
validateButtonText: 'Validate',
validationInputLabel: 'Transaction',
maxAttemptsReached: 'Validation for this bank account has been disabled due to too many incorrect attempts.',
- description: 'A day or two after you add your account to Expensify we send three (3) transactions to your account. They have a merchant line like "Expensify, Inc. Validation".',
+ description: `Within 1-2 business days, we'll send three (3) small transactions to your bank account from a name like "Expensify, Inc. Validation".`,
descriptionCTA: 'Please enter each transaction amount in the fields below. Example: 1.51.',
- reviewingInfo: "Thanks! We're reviewing your information, and will be in touch shortly. Please check your chat with Concierge ",
+ 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 need your help verifying a few pieces of information, but we can work this out quickly over chat. Ready?',
+ letsChatText: 'Almost there! We need your help verifying a few last bits of information over chat. Ready?',
letsChatTitle: "Let's chat!",
- enable2FATitle: 'Prevent fraud, enable two-factor authentication!',
- enable2FAText:
- 'We take your security seriously, so please set up two-factor authentication for your account now. That will allow us to dispute Expensify Card digital transactions, and will reduce your risk for fraud.',
+ enable2FATitle: 'Prevent fraud, enable two-factor authentication (2FA)',
+ enable2FAText: 'We take your security seriously. Please set up 2FA now to add an extra layer of protection to your account.',
secureYourAccount: 'Secure your account',
},
reimbursementAccountLoadingAnimation: {
oneMoment: 'One moment',
- explanationLine: 'We’re taking a look at your information. You will be able to continue with next steps shortly.',
+ explanationLine: "We’re taking a look at your information. You'll be able to continue with next steps shortly.",
},
session: {
offlineMessageRetry: "Looks like you're offline. Please check your connection and try again.",
@@ -1945,6 +1976,7 @@ export default {
workspace: {
common: {
card: 'Cards',
+ expensifyCard: 'Expensify Card',
workflows: 'Workflows',
workspace: 'Workspace',
edit: 'Edit workspace',
@@ -1974,14 +2006,14 @@ export default {
settlementFrequency: 'Settlement frequency',
deleteConfirmation: 'Are you sure you want to delete this workspace?',
unavailable: 'Unavailable workspace',
- memberNotFound: 'Member not found. To invite a new member to the workspace, please use the Invite button above.',
- notAuthorized: `You do not have access to this page. Are you trying to join the workspace? Please reach out to the owner of this workspace so they can add you as a member! Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`,
+ memberNotFound: 'Member not found. To invite a new member to the workspace, please use the invite button above.',
+ notAuthorized: `You don't have access to this page. If you're trying to join this workspace, just ask the workspace owner to add you as a member. Something else? Reach out to ${CONST.EMAIL.CONCIERGE}.`,
goToRoom: ({roomName}: GoToRoomParams) => `Go to ${roomName} room`,
workspaceName: 'Workspace name',
workspaceOwner: 'Owner',
workspaceType: 'Workspace type',
workspaceAvatar: 'Workspace avatar',
- mustBeOnlineToViewMembers: 'You must be online in order to view members of this workspace.',
+ mustBeOnlineToViewMembers: 'You need to be online in order to view members of this workspace.',
moreFeatures: 'More features',
requested: 'Requested',
distanceRates: 'Distance rates',
@@ -2006,10 +2038,7 @@ export default {
outOfPocketLocationEnabledDescription:
'QuickBooks Online doesn’t support locations on vendor bills or checks. As you have locations enabled on your workspace, these export options are unavailable.',
taxesJournalEntrySwitchNote: "QuickBooks Online doesn't support taxes on journal entries. Please change your export option to vendor bill or check.",
- export: 'Export',
- exportAs: 'Export as',
exportDescription: 'Configure how Expensify data exports to QuickBooks Online.',
- preferredExporter: 'Preferred exporter',
date: 'Export date',
exportExpenses: 'Export out-of-pocket expenses as',
exportInvoices: 'Export invoices to',
@@ -2037,26 +2066,22 @@ export default {
},
receivable: 'Accounts receivable', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
archive: 'Accounts receivable archive', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
- exportInvoicesDescription: 'Invoices will export to this account in QuickBooks Online.',
+ exportInvoicesDescription: 'Use this account when exporting invoices to QuickBooks Online.',
exportCompanyCardsDescription: 'Set how company card purchases export to QuickBooks Online.',
vendor: 'Vendor',
- defaultVendor: 'Default vendor',
defaultVendorDescription: 'Set a default vendor that will apply to all credit card transactions upon export.',
- exportPreferredExporterNote:
- 'The preferred exporter can be any workspace admin, but must also be a Domain Admin if you set different export accounts for individual company cards in Domain Settings.',
- exportPreferredExporterSubNote: 'Once set, the preferred exporter will see reports for export in their account.',
exportOutOfPocketExpensesDescription: 'Set how out-of-pocket expenses export to QuickBooks Online.',
exportCheckDescription: "We'll create an itemized check for each Expensify report and send it from the bank account below.",
exportJournalEntryDescription: "We'll create an itemized journal entry for each Expensify report and post it to the account below.",
exportVendorBillDescription:
"We'll create an itemized vendor bill for each Expensify report and add it to the account below. If this period is closed, we'll post to the 1st of the next open period.",
account: 'Account',
- accountDescription: 'Choose where to post journal entry offsets.',
+ accountDescription: 'Choose where to post journal entries.',
accountsPayable: 'Accounts payable',
accountsPayableDescription: 'Choose where to create vendor bills.',
bankAccount: 'Bank account',
bankAccountDescription: 'Choose where to send checks from.',
- optionBelow: 'Choose an option below:',
+ creditCardAccount: 'Credit card account',
companyCardsLocationEnabledDescription:
"QuickBooks Online doesn't support locations on vendor bill exports. As you have locations enabled on your workspace, this export option is unavailable.",
outOfPocketTaxEnabledDescription:
@@ -2066,7 +2091,7 @@ export default {
advancedConfig: {
advanced: 'Advanced',
autoSync: 'Auto-sync',
- autoSyncDescription: 'Sync QuickBooks Online and Expensify automatically, every day.',
+ autoSyncDescription: 'Expensify will automatically sync with QuickBooks Online every day.',
inviteEmployees: 'Invite employees',
inviteEmployeesDescription: 'Import Quickbooks Online employee records and invite employees to this workspace.',
createEntities: 'Auto-create entities',
@@ -2075,8 +2100,8 @@ export default {
reimbursedReportsDescription: 'Any time a report is paid using Expensify ACH, the corresponding bill payment will be created in the Quickbooks Online account below.',
qboBillPaymentAccount: 'QuickBooks bill payment account',
qboInvoiceCollectionAccount: 'QuickBooks invoice collections account',
- accountSelectDescription: "Choose a bank account for reimbursements and we'll create the payment in QuickBooks Online.",
- invoiceAccountSelectorDescription: 'Once an invoice is marked as paid in Expensify and exported to QuickBooks Online, it’ll appear against the account below.',
+ accountSelectDescription: "Choose where to pay bills from and we'll create the payment in QuickBooks Online.",
+ invoiceAccountSelectorDescription: "Choose where to receive invoice payments and we'll create the payment in QuickBooks Online.",
},
accounts: {
[CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD]: 'Debit card',
@@ -2092,8 +2117,8 @@ export default {
[`${CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL}Description`]:
"We'll create an itemized vendor bill for each Expensify report with the date of the last expense, and add it to the account below. If this period is closed, we'll post to the 1st of the next open period.",
- [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD}AccountDescription`]: 'Debit card transactions will export to the bank account below.',
- [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD}AccountDescription`]: 'Credit card transactions will export to the bank account below.',
+ [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD}AccountDescription`]: 'Choose where to export debit card transactions.',
+ [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD}AccountDescription`]: 'Choose where to export credit card transactions.',
[`${CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL}AccountDescription`]: 'Choose a vendor to apply to all credit card transactions.',
[`${CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL}Error`]: 'Vendor bills are unavailable when locations are enabled. Please choose a different export option.',
@@ -2122,7 +2147,6 @@ export default {
default: 'Xero contact default',
tag: 'Tags',
},
- export: 'Export',
exportDescription: 'Configure how Expensify data exports to Xero.',
exportCompanyCard: 'Export company card expenses as',
purchaseBill: 'Purchase bill',
@@ -2130,7 +2154,6 @@ export default {
bankTransactions: 'Bank transactions',
xeroBankAccount: 'Xero bank account',
xeroBankAccountDescription: 'Choose where expenses will post as bank transactions.',
- preferredExporter: 'Preferred exporter',
exportExpenses: 'Export out-of-pocket expenses as',
exportExpensesDescription: 'Reports will export as a purchase bill with the date and status selected below.',
purchaseBillDate: 'Purchase bill date',
@@ -2140,28 +2163,28 @@ export default {
advancedConfig: {
advanced: 'Advanced',
autoSync: 'Auto-sync',
- autoSyncDescription: 'Sync Xero and Expensify automatically, every day.',
+ autoSyncDescription: 'Expensify will automatically sync with Xero every day.',
purchaseBillStatusTitle: 'Purchase bill status',
reimbursedReports: 'Sync reimbursed reports',
reimbursedReportsDescription: 'Any time a report is paid using Expensify ACH, the corresponding bill payment will be created in the Xero account below.',
xeroBillPaymentAccount: 'Xero bill payment account',
xeroInvoiceCollectionAccount: 'Xero invoice collections account',
- invoiceAccountSelectorDescription: 'Once an invoice is marked as paid in Expensify and exported to Xero, it’ll appear against the account below.',
- xeroBillPaymentAccountDescription: "Choose a bank account for reimbursements and we'll create the payment in Xero.",
+ xeroBillPaymentAccountDescription: "Choose where to pay bills from and we'll create the payment in Xero.",
+ invoiceAccountSelectorDescription: "Choose where to receive invoice payments and we'll create the payment in Xero.",
},
exportDate: {
- label: 'Export date',
+ label: 'Purchase bill date',
description: 'Use this date when exporting reports to Xero.',
values: {
- [CONST.QUICKBOOKS_EXPORT_DATE.LAST_EXPENSE]: {
+ [CONST.XERO_EXPORT_DATE.LAST_EXPENSE]: {
label: 'Date of last expense',
description: 'Date of the most recent expense on the report.',
},
- [CONST.QUICKBOOKS_EXPORT_DATE.REPORT_EXPORTED]: {
+ [CONST.XERO_EXPORT_DATE.REPORT_EXPORTED]: {
label: 'Export date',
description: 'Date the report was exported to Xero.',
},
- [CONST.QUICKBOOKS_EXPORT_DATE.REPORT_SUBMITTED]: {
+ [CONST.XERO_EXPORT_DATE.REPORT_SUBMITTED]: {
label: 'Submitted date',
description: 'Date the report was submitted for approval.',
},
@@ -2169,30 +2192,153 @@ export default {
},
invoiceStatus: {
label: 'Purchase bill status',
- description: 'Choose a status for purchase bills exported to Xero.',
+ description: 'Use this status when exporting purchase bills to Xero.',
values: {
[CONST.XERO_CONFIG.INVOICE_STATUS.DRAFT]: 'Draft',
[CONST.XERO_CONFIG.INVOICE_STATUS.AWAITING_APPROVAL]: 'Awaiting approval',
[CONST.XERO_CONFIG.INVOICE_STATUS.AWAITING_PAYMENT]: 'Awaiting payment',
},
},
- exportPreferredExporterNote:
- 'The preferred exporter can be any workspace admin, but must be a domain admin if you set different export accounts for individual company cards in domain settings.',
- exportPreferredExporterSubNote: 'Once set, the preferred exporter will see reports for export in their account.',
noAccountsFound: 'No accounts found',
noAccountsFoundDescription: 'Add the account in Xero and sync the connection again.',
},
netsuite: {
subsidiary: 'Subsidiary',
subsidiarySelectDescription: "Choose the subsidiary in NetSuite that you'd like to import data from.",
+ exportDescription: 'Configure how Expensify data exports to NetSuite.',
+ exportReimbursable: 'Export reimbursable expenses as',
+ exportNonReimbursable: 'Export non-reimbursable expenses as',
+ exportInvoices: 'Export invoices to',
+ journalEntriesTaxPostingAccount: 'Journal entries tax posting account',
+ journalEntriesProvTaxPostingAccount: 'Journal entries provincial tax posting account',
+ foreignCurrencyAmount: 'Export foreign currency amount',
+ exportToNextOpenPeriod: 'Export to next open period',
+ nonReimbursableJournalPostingAccount: 'Non-reimbursable journal posting account',
+ reimbursableJournalPostingAccount: 'Reimbursable journal posting account',
+ journalPostingPreference: {
+ label: 'Journal entries posting preference',
+ values: {
+ [CONST.NETSUITE_JOURNAL_POSTING_PREFERENCE.JOURNALS_POSTING_INDIVIDUAL_LINE]: 'Single, itemized entry for each report',
+ [CONST.NETSUITE_JOURNAL_POSTING_PREFERENCE.JOURNALS_POSTING_TOTAL_LINE]: 'Single entry for each individual expense',
+ },
+ },
+ invoiceItem: {
+ label: 'Invoice item',
+ values: {
+ [CONST.NETSUITE_INVOICE_ITEM_PREFERENCE.CREATE]: {
+ label: 'Create one for me',
+ description: 'We\'ll create an "Expensify invoice line item" for you upon export (if one doesn’t exist already).',
+ },
+ [CONST.NETSUITE_INVOICE_ITEM_PREFERENCE.SELECT]: {
+ label: 'Select existing',
+ description: "We'll tie invoices from Expensify to the item selected below.",
+ },
+ },
+ },
+ exportDate: {
+ label: 'Export date',
+ description: 'Use this date when exporting reports to NetSuite.',
+ values: {
+ [CONST.NETSUITE_EXPORT_DATE.LAST_EXPENSE]: {
+ label: 'Date of last expense',
+ description: 'Date of the most recent expense on the report.',
+ },
+ [CONST.NETSUITE_EXPORT_DATE.EXPORTED]: {
+ label: 'Export date',
+ description: 'Date the report was exported to NetSuite.',
+ },
+ [CONST.NETSUITE_EXPORT_DATE.SUBMITTED]: {
+ label: 'Submitted date',
+ description: 'Date the report was submitted for approval.',
+ },
+ },
+ },
+ exportDestination: {
+ values: {
+ [CONST.NETSUITE_EXPORT_DESTINATION.EXPENSE_REPORT]: {
+ label: 'Expense reports',
+ reimbursableDescription: 'Reimbursable expenses will export as expense reports to NetSuite.',
+ nonReimbursableDescription: 'Non-reimbursable expenses will export as expense reports to NetSuite.',
+ },
+ [CONST.NETSUITE_EXPORT_DESTINATION.VENDOR_BILL]: {
+ label: 'Vendor bills',
+ reimbursableDescription:
+ 'Reimbursable expenses will export as bills payable to the NetSuite vendor specified below.\n' +
+ '\n' +
+ 'If you’d like to set a specific vendor for each card, go to *Settings > Domains > Company Cards*.',
+ nonReimbursableDescription:
+ 'Non-reimbursable expenses will export as bills payable to the NetSuite vendor specified below.\n' +
+ '\n' +
+ 'If you’d like to set a specific vendor for each card, go to *Settings > Domains > Company Cards*.',
+ },
+ [CONST.NETSUITE_EXPORT_DESTINATION.JOURNAL_ENTRY]: {
+ label: 'Journal Entries',
+ reimbursableDescription:
+ 'Reimbursable expenses will export as journal entries to the NetSuite account specified below.\n' +
+ '\n' +
+ 'If you’d like to set a specific vendor for each card, go to *Settings > Domains > Company Cards*.',
+ nonReimbursableDescription:
+ 'Non-reimbursable expenses will export as journal entries to the NetSuite account specified below.\n' +
+ '\n' +
+ 'If you’d like to set a specific vendor for each card, go to *Settings > Domains > Company Cards*.',
+ },
+ },
+ },
+ noAccountsFound: 'No accounts found',
+ noAccountsFoundDescription: 'Add the account in NetSuite and sync the connection again.',
+ noVendorsFound: 'No vendors found',
+ noVendorsFoundDescription: 'Add vendors in NetSuite and sync the connection again.',
+ noItemsFound: 'No invoice items found',
+ noItemsFoundDescription: 'Add invoice items in NetSuite and sync the connection again.',
noSubsidiariesFound: 'No subsidiaries found',
noSubsidiariesFoundDescription: 'Add the subsidiary in NetSuite and sync the connection again.',
+ import: {
+ expenseCategories: 'Expense categories',
+ expenseCategoriesDescription: 'NetSuite expense categories import into Expensify as categories.',
+ importFields: {
+ departments: 'Departments',
+ classes: 'Classes',
+ locations: 'Locations',
+ customers: 'Customers',
+ jobs: 'Projects (jobs)',
+ },
+ importTaxDescription: 'Import tax groups from NetSuite',
+ importCustomFields: {
+ customSegments: 'Custom segments/records',
+ customLists: 'Custom lists',
+ },
+ },
+ },
+ intacct: {
+ sageIntacctSetup: 'Sage Intacct setup',
+ prerequisitesTitle: 'Before you connect...',
+ downloadExpensifyPackage: 'Download the Expensify package for Sage Intacct',
+ followSteps: 'Follow the steps in our How-to: Connect to Sage Intacct instructions',
+ enterCredentials: 'Enter your Sage Intacct credentials',
+ createNewConnection: 'Create new connection',
+ reuseExistingConnection: 'Reuse existing connection',
+ existingConnections: 'Existing connections',
+ sageIntacctLastSync: (formattedDate: string) => `Sage Intacct - Last synced ${formattedDate}`,
},
type: {
free: 'Free',
control: 'Control',
collect: 'Collect',
},
+ expensifyCard: {
+ issueCard: 'Issue card',
+ name: 'Name',
+ lastFour: 'Last 4',
+ limit: 'Limit',
+ currentBalance: 'Current balance',
+ currentBalanceDescription: 'Current balance is the sum of all posted Expensify Card transactions that have occurred since the last settlement date.',
+ remainingLimit: 'Remaining limit',
+ requestLimitIncrease: 'Request limit increase',
+ remainingLimitDescription:
+ 'We consider a number of factors when calculating your remaining limit: your tenure as a customer, the business-related information you provided during signup, and the available cash in your business bank account. Your remaining limit can fluctuate on a daily basis.',
+ cashBack: 'Cash back',
+ cashBackDescription: 'Cash back balance is based on settled monthly Expensify Card spend across your workspace.',
+ },
categories: {
deleteCategories: 'Delete categories',
deleteCategoriesPrompt: 'Are you sure you want to delete these categories?',
@@ -2238,6 +2384,13 @@ export default {
title: 'Distance rates',
subtitle: 'Add, update, and enforce rates.',
},
+ expensifyCard: {
+ title: 'Expensify Card',
+ subtitle: 'Gain insights and control over spend',
+ disableCardTitle: 'Disable Expensify Card',
+ disableCardPrompt: 'You can’t disable the Expensify Card because it’s already in use. Reach out to Concierge for next steps.',
+ disableCardButton: 'Chat with Concierge',
+ },
workflows: {
title: 'Workflows',
subtitle: 'Configure how spend is approved and paid.',
@@ -2360,6 +2513,8 @@ export default {
people: {
genericFailureMessage: 'An error occurred removing a user from the workspace, please try again.',
removeMembersPrompt: 'Are you sure you want to remove these members?',
+ removeMembersWarningPrompt: ({memberName, ownerName}: RemoveMembersWarningPrompt) =>
+ `${memberName} is an approver in this workspace. When you unshare this workspace with them, we’ll replace them in the approval workflow with the workspace owner, ${ownerName}`,
removeMembersTitle: 'Remove members',
removeMemberButtonTitle: 'Remove from workspace',
removeMemberGroupButtonTitle: 'Remove from group',
@@ -2371,25 +2526,53 @@ export default {
selectAll: 'Select all',
error: {
genericAdd: 'There was a problem adding this workspace member.',
- cannotRemove: 'You cannot remove yourself or the workspace owner.',
+ cannotRemove: "You can't remove yourself or the workspace owner.",
genericRemove: 'There was a problem removing that workspace member.',
},
- addedWithPrimary: 'Some users were added with their primary logins.',
+ addedWithPrimary: 'Some members were added with their primary logins.',
invitedBySecondaryLogin: ({secondaryLogin}) => `Added by secondary login ${secondaryLogin}.`,
membersListTitle: 'Directory of all workspace members.',
},
card: {
header: 'Unlock free Expensify Cards',
headerWithEcard: 'Cards are ready!',
- noVBACopy: 'Connect a bank account to issue Expensify Cards to your workspace members, and access these incredible benefits and more:',
- VBANoECardCopy: 'Add a work email address to issue unlimited Expensify Cards for your workspace members, as well as all of these incredible benefits:',
+ noVBACopy: 'Connect a bank account to issue Expensify Cards to your workspace members and access exclusive benefits like:',
+ VBANoECardCopy: 'Add a work email to issue unlimited Expensify Cards to your workspace members and enjoy exclusive benefits like:',
VBAWithECardCopy: 'Access these incredible benefits and more:',
benefit1: 'Cash back on every US purchase',
- benefit2: 'Digital and physical cards',
+ benefit2: 'Unlimited virtual and physical cards',
benefit3: 'No personal liability',
- benefit4: 'Customizable limits',
+ benefit4: 'Customizable limits and spend controls',
addWorkEmail: 'Add work email address',
- checkingDomain: 'Hang tight! We are still working on enabling your Expensify Cards. Check back here in a few minutes.',
+ checkingDomain: "Hang tight! We're still working on enabling your Expensify Cards. Check back here in a few minutes.",
+ issueCard: 'Issue card',
+ issueNewCard: {
+ whoNeedsCard: 'Who needs a card?',
+ findMember: 'Find member',
+ chooseCardType: 'Choose a card type',
+ physicalCard: 'Physical card',
+ physicalCardDescription: 'Great for the frequent spender',
+ virtualCard: 'Virtual card',
+ virtualCardDescription: 'Instant and flexible',
+ chooseLimitType: 'Choose a limit type',
+ smartLimit: 'Smart Limit',
+ smartLimitDescription: 'Spend up to a certain amount before requiring approval',
+ monthly: 'Monthly',
+ monthlyDescription: 'Spend up to a certain amount per month',
+ fixedAmount: 'Fixed amount',
+ fixedAmountDescription: 'Spend up to a certain amount once',
+ setLimit: 'Set a limit',
+ giveItName: 'Give it a name',
+ giveItNameInstruction: 'Make it unique enough to tell apart from the other. Specific use cases are even better!',
+ cardName: 'Card name',
+ letsDoubleCheck: 'Let’s double check that everything looks right.',
+ willBeReady: 'This card will be ready to use immediately.',
+ cardholder: 'Cardholder',
+ cardType: 'Card type',
+ limit: 'Limit',
+ limitType: 'Limit type',
+ name: 'Name',
+ },
},
reimburse: {
captureReceipts: 'Capture receipts',
@@ -2403,10 +2586,10 @@ export default {
trackDistanceChooseUnit: 'Choose a default unit to track.',
unlockNextDayReimbursements: 'Unlock next-day reimbursements',
captureNoVBACopyBeforeEmail: 'Ask your workspace members to forward receipts to ',
- captureNoVBACopyAfterEmail: ' and download the Expensify App to track cash expenses on the go.',
- unlockNoVBACopy: 'Connect a bank account to reimburse your workspace members online.',
+ captureNoVBACopyAfterEmail: ' and download the Expensify app to track expenses on the go.',
+ unlockNoVBACopy: 'Connect a bank account to reimburse your workspace members quickly and easily.',
fastReimbursementsVBACopy: "You're all set to reimburse receipts from your bank account!",
- updateCustomUnitError: "Your changes couldn't be saved. The workspace was modified while you were offline, please try again.",
+ updateCustomUnitError: "Your changes couldn't be saved because the workspace was modified while you were offline. Please try again.",
invalidRateError: 'Please enter a valid rate.',
lowRateError: 'Rate must be greater than 0.',
},
@@ -2417,8 +2600,9 @@ export default {
qbo: 'Quickbooks Online',
xero: 'Xero',
netsuite: 'NetSuite',
+ intacct: 'Sage Intacct',
setup: 'Connect',
- lastSync: 'Last synced just now',
+ lastSync: (relativeDate: string) => `Last synced ${relativeDate}`,
import: 'Import',
export: 'Export',
advanced: 'Advanced',
@@ -2426,22 +2610,19 @@ export default {
syncNow: 'Sync now',
disconnect: 'Disconnect',
disconnectTitle: (integration?: ConnectionName): string => {
- switch (integration) {
- case CONST.POLICY.CONNECTIONS.NAME.QBO:
- return 'Disconnect QuickBooks Online';
- case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return 'Disconnect Xero';
- default: {
- return 'Disconnect integration';
- }
- }
+ const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integration] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integration] : 'integration';
+ return `Disconnect ${integrationName}`;
},
+ connectTitle: (integrationToConnect: ConnectionName): string => `Connect ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integrationToConnect] ?? 'accounting integration'}`,
+
syncError: (integration?: ConnectionName): string => {
switch (integration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return "Can't connect to QuickBooks Online.";
case CONST.POLICY.CONNECTIONS.NAME.XERO:
return "Can't connect to Xero.";
+ case CONST.POLICY.CONNECTIONS.NAME.NETSUITE:
+ return "Can't connect to NetSuite.";
default: {
return "Can't connect to integration.";
}
@@ -2451,34 +2632,27 @@ export default {
taxes: 'Taxes',
imported: 'Imported',
notImported: 'Not imported',
- importAsCategory: 'Imported, displayed as categories',
+ importAsCategory: 'Imported as categories',
importTypes: {
[CONST.INTEGRATION_ENTITY_MAP_TYPES.IMPORTED]: 'Imported',
- [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Imported, displayed as tags',
+ [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Imported as tags',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.DEFAULT]: 'Imported',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.NOT_IMPORTED]: 'Not imported',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE]: 'Not imported',
- [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Imported, displayed as report fields',
+ [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Imported as report fields',
+ [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'NetSuite employee default',
},
- disconnectPrompt: (integrationToConnect?: ConnectionName, currentIntegration?: ConnectionName): string => {
- switch (integrationToConnect) {
- case CONST.POLICY.CONNECTIONS.NAME.QBO:
- return 'Are you sure you want to disconnect Xero to set up QuickBooks Online?';
- case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return 'Are you sure you want to disconnect QuickBooks Online to set up Xero?';
- default: {
- switch (currentIntegration) {
- case CONST.POLICY.CONNECTIONS.NAME.QBO:
- return 'Are you sure you want to disconnect QuickBooks Online?';
- case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return 'Are you sure you want to disconnect Xero?';
- default: {
- return 'Are you sure you want to disconnect this integration?';
- }
- }
- }
- }
+ disconnectPrompt: (currentIntegration?: ConnectionName): string => {
+ const integrationName =
+ currentIntegration && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration]
+ ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration]
+ : 'this integration';
+ return `Are you sure you want to disconnect ${integrationName}?`;
},
+ connectPrompt: (integrationToConnect: ConnectionName): string =>
+ `Are you sure you want to connect ${
+ CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integrationToConnect] ?? 'this accounting integration'
+ }? This will remove any existing acounting connections.`,
enterCredentials: 'Enter your credentials',
connections: {
syncStageName: (stage: PolicyConnectionSyncStage) => {
@@ -2486,6 +2660,8 @@ export default {
case 'quickbooksOnlineImportCustomers':
return 'Importing customers';
case 'quickbooksOnlineImportEmployees':
+ case 'netSuiteSyncImportEmployees':
+ case 'intacctImportEmployees':
return 'Importing employees';
case 'quickbooksOnlineImportAccounts':
return 'Importing accounts';
@@ -2496,6 +2672,7 @@ export default {
case 'quickbooksOnlineImportProcessing':
return 'Processing imported data';
case 'quickbooksOnlineSyncBillPayments':
+ case 'intacctImportSyncBillPayments':
return 'Syncing reimbursed reports and bill payments';
case 'quickbooksOnlineSyncTaxCodes':
return 'Importing tax codes';
@@ -2510,6 +2687,8 @@ export default {
case 'quickbooksOnlineSyncTitle':
return 'Syncing QuickBooks Online data';
case 'quickbooksOnlineSyncLoadData':
+ case 'xeroSyncStep':
+ case 'intacctImportData':
return 'Loading data';
case 'quickbooksOnlineSyncApplyCategories':
return 'Updating categories';
@@ -2539,8 +2718,6 @@ export default {
return 'Checking Xero connection';
case 'xeroSyncTitle':
return 'Syncing Xero data';
- case 'xeroSyncStep':
- return 'Loading data';
case 'netSuiteSyncConnection':
return 'Initializing connection to NetSuite';
case 'netSuiteSyncCustomers':
@@ -2559,8 +2736,6 @@ export default {
return 'Syncing currencies';
case 'netSuiteSyncCategories':
return 'Syncing categories';
- case 'netSuiteSyncImportEmployees':
- return 'Importing employees';
case 'netSuiteSyncReportFields':
return 'Importing data as Expensify report fields';
case 'netSuiteSyncTags':
@@ -2571,12 +2746,22 @@ export default {
return 'Marking Expensify reports as reimbursed';
case 'netSuiteSyncExpensifyReimbursedReports':
return 'Marking NetSuite bills and invoices as paid';
+ case 'intacctCheckConnection':
+ return 'Checking Sage Intacct connection';
+ case 'intacctImportTitle':
+ return 'Importing Sage Intacct data';
default: {
return `Translation missing for stage: ${stage}`;
}
}
},
},
+ preferredExporter: 'Preferred exporter',
+ exportPreferredExporterNote:
+ 'The preferred exporter can be any workspace admin, but must also be a Domain Admin if you set different export accounts for individual company cards in Domain Settings.',
+ exportPreferredExporterSubNote: 'Once set, the preferred exporter will see reports for export in their account.',
+ exportAs: 'Export as',
+ defaultVendor: 'Default vendor',
},
bills: {
manageYourBills: 'Manage your bills',
@@ -2590,10 +2775,10 @@ export default {
},
invoices: {
invoiceClientsAndCustomers: 'Invoice clients and customers',
- invoiceFirstSectionCopy: 'Send beautiful, professional invoices directly to your clients and customers right from within the Expensify app.',
+ invoiceFirstSectionCopy: 'Send beautiful, professional invoices directly to your clients and customers right from the Expensify app.',
viewAllInvoices: 'View all invoices',
unlockOnlineInvoiceCollection: 'Unlock online invoice collection',
- unlockNoVBACopy: 'Connect your bank account to accept online payments for invoices - by ACH or credit card - to be deposited straight into your account.',
+ unlockNoVBACopy: 'Connect your bank account to accept online invoice payments by ACH or credit card.',
moneyBackInAFlash: 'Money back, in a flash!',
unlockVBACopy: "You're all set to accept payments by ACH or credit card!",
viewUnpaidInvoices: 'View unpaid invoices',
@@ -2619,7 +2804,7 @@ export default {
member: 'Invite member',
members: 'Invite members',
invitePeople: 'Invite new members',
- genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.',
+ genericFailureMessage: 'An error occurred inviting the member to the workspace. Please try again.',
pleaseEnterValidLogin: `Please ensure the email or phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
user: 'user',
users: 'users',
@@ -2633,14 +2818,14 @@ export default {
inviteMessageTitle: 'Add message',
inviteMessagePrompt: 'Make your invitation extra special by adding a message below',
personalMessagePrompt: 'Message',
- genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.',
+ genericFailureMessage: 'An error occurred inviting the member to the workspace. Please try again.',
inviteNoMembersError: 'Please select at least one member to invite.',
},
distanceRates: {
oopsNotSoFast: 'Oops! Not so fast...',
workspaceNeeds: 'A workspace needs at least one enabled distance rate.',
distance: 'Distance',
- centrallyManage: 'Centrally manage rates, choose to track in miles or kilometers, and set a default category.',
+ centrallyManage: 'Centrally manage rates, track in miles or kilometers, and set a default category.',
rate: 'Rate',
addRate: 'Add rate',
trackTax: 'Track tax',
@@ -2659,27 +2844,26 @@ export default {
editor: {
descriptionInputLabel: 'Description',
nameInputLabel: 'Name',
- nameInputHelpText: 'This is the name you will see on your workspace.',
- nameIsRequiredError: 'You need to define a name for your workspace.',
+ nameInputHelpText: "This is the name you'll see on your workspace.",
+ nameIsRequiredError: "You'll need to give your workspace a name.",
currencyInputLabel: 'Default currency',
currencyInputHelpText: 'All expenses on this workspace will be converted to this currency.',
currencyInputDisabledText: "The default currency can't be changed because this workspace is linked to a USD bank account.",
save: 'Save',
- genericFailureMessage: 'An error occurred updating the workspace, please try again.',
- avatarUploadFailureMessage: 'An error occurred uploading the avatar, please try again.',
- addressContext: 'A workspace address is required to enable Expensify Travel. Please enter an address associated with your business.',
+ genericFailureMessage: 'An error occurred updating the workspace. Please try again.',
+ avatarUploadFailureMessage: 'An error occurred uploading the avatar. Please try again.',
+ addressContext: 'A Workspace Address is required to enable Expensify Travel. Please enter an address associated with your business.',
},
bankAccount: {
continueWithSetup: 'Continue with setup',
- youreAlmostDone:
- "You're almost done setting up your bank account, which will let you issue corporate cards, reimburse expenses, collect invoices, and pay bills all from the same bank account.",
+ youreAlmostDone: "You're almost done setting up your bank account, which will let you issue corporate cards, reimburse expenses, collect invoices, and pay bills.",
streamlinePayments: 'Streamline payments',
oneMoreThing: 'One more thing!',
allSet: "You're all set!",
accountDescriptionNoCards:
- 'This bank account will be used to reimburse expenses, collect invoices, and pay bills all from the same account.\n\nPlease add a work email address as a secondary login to enable the Expensify Card.',
- accountDescriptionWithCards: 'This bank account will be used to issue corporate cards, reimburse expenses, collect invoices, and pay bills all from the same account.',
- addWorkEmail: 'Add work email address',
+ 'This bank account will be used to reimburse expenses, collect invoices, and pay bills.\n\nPlease add a work email as a secondary login to enable the Expensify Card.',
+ accountDescriptionWithCards: 'This bank account will be used to issue corporate cards, reimburse expenses, collect invoices, and pay bills.',
+ addWorkEmail: 'Add work email',
letsFinishInChat: "Let's finish in chat!",
almostDone: 'Almost done!',
disconnectBankAccount: 'Disconnect bank account',
@@ -2689,7 +2873,7 @@ export default {
yesStartOver: 'Yes, start over',
disconnectYour: 'Disconnect your ',
bankAccountAnyTransactions: ' bank account. Any outstanding transactions for this account will still complete.',
- clearProgress: 'Starting over will clear the progress you have made so far.',
+ clearProgress: "Starting over will clear any progress you've made.",
areYouSure: 'Are you sure?',
workspaceCurrency: 'Workspace currency',
updateCurrencyPrompt: 'It looks like your workspace is currently set to a different currency than USD. Please click the button below to update your currency to USD now.',
@@ -2711,7 +2895,7 @@ export default {
addPaymentCardSecurity: 'security',
amountOwedTitle: 'Outstanding balance',
amountOwedButtonText: 'OK',
- amountOwedText: 'This account has an outstanding balance from a previous month.\n\nDo you want to clear balance and take over billing of this workspace?',
+ amountOwedText: 'This account has an outstanding balance from a previous month.\n\nDo you want to clear the balance and take over billing of this workspace?',
ownerOwesAmountTitle: 'Outstanding balance',
ownerOwesAmountButtonText: 'Transfer balance',
ownerOwesAmountText: ({email, amount}) =>
@@ -2719,7 +2903,7 @@ export default {
subscriptionTitle: 'Take over annual subscription',
subscriptionButtonText: 'Transfer subscription',
subscriptionText: ({usersCount, finalCount}) =>
- `Taking over this workspace will merge its associated annual subscription with your current subscription. This will increase your subscription size by ${usersCount} users making your new subscription size ${finalCount}. Would you like to continue?`,
+ `Taking over this workspace will merge its annual subscription with your current subscription. This will increase your subscription size by ${usersCount} members making your new subscription size ${finalCount}. Would you like to continue?`,
duplicateSubscriptionTitle: 'Duplicate subscription alert',
duplicateSubscriptionButtonText: 'Continue',
duplicateSubscriptionText: ({email, workspaceName}) =>
@@ -2727,7 +2911,7 @@ export default {
hasFailedSettlementsTitle: 'Cannot transfer ownership',
hasFailedSettlementsButtonText: 'Got it',
hasFailedSettlementsText: ({email}) =>
- `You cannot take over billing because ${email} has an overdue expensify Expensify Card settlement. Please advise them to reach out to concierge@expensify.com to resolve the issue. Then, you can take over billing for this workspace.`,
+ `You can't take over billing because ${email} has an overdue expensify Expensify Card settlement. Please ask them to reach out to concierge@expensify.com to resolve the issue. Then, you can take over billing for this workspace.`,
failedToClearBalanceTitle: 'Failed to clear balance',
failedToClearBalanceButtonText: 'OK',
failedToClearBalanceText: 'We were unable to clear the balance. Please try again later.',
@@ -2788,14 +2972,14 @@ export default {
createRoom: 'Create room',
roomAlreadyExistsError: 'A room with this name already exists.',
roomNameReservedError: ({reservedName}: RoomNameReservedErrorParams) => `${reservedName} is a default room on all workspaces. Please choose another name.`,
- roomNameInvalidError: 'Room names can only include lowercase letters, numbers and hyphens.',
+ roomNameInvalidError: 'Room names can only include lowercase letters, numbers, and hyphens.',
pleaseEnterRoomName: 'Please enter a room name.',
pleaseSelectWorkspace: 'Please select a workspace.',
renamedRoomAction: ({oldName, newName}: RenamedRoomActionParams) => ` renamed this room from ${oldName} to ${newName}`,
roomRenamedTo: ({newName}: RoomRenamedToParams) => `Room renamed to ${newName}`,
social: 'social',
selectAWorkspace: 'Select a workspace',
- growlMessageOnRenameError: 'Unable to rename policy room, please check your connection and try again.',
+ growlMessageOnRenameError: 'Unable to rename workspace room. Please check your connection and try again.',
visibilityOptions: {
restricted: 'Workspace', // the translation for "restricted" visibility is actually workspace. This is so we can display restricted visibility rooms as "workspace" without having to change what's stored.
private: 'Private',
@@ -2805,8 +2989,8 @@ export default {
},
},
roomMembersPage: {
- memberNotFound: 'Member not found. To invite a new member to the room, please use the Invite button above.',
- notAuthorized: `You do not have access to this page. Are you trying to join the room? Please reach out to a member of this room so they can add you as a member! Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`,
+ memberNotFound: 'Member not found. To invite a new member to the room, please use the invite button above.',
+ notAuthorized: `You don't have access to this page. If you're trying to join this room, just ask a room member to add you. Something else? Reach out to ${CONST.EMAIL.CONCIERGE}`,
removeMembersPrompt: 'Are you sure you want to remove the selected members from the room?',
error: {
genericAdd: 'There was a problem adding this room member.',
@@ -2833,18 +3017,18 @@ export default {
completed: 'marked as complete',
canceled: 'deleted task',
reopened: 'marked as incomplete',
- error: 'You do not have the permission to do the requested action.',
+ error: "You don't have permission to take the requested action.",
},
markAsComplete: 'Mark as complete',
markAsIncomplete: 'Mark as incomplete',
- assigneeError: 'There was an error assigning this task, please try another assignee.',
- genericCreateTaskFailureMessage: 'Unexpected error create task, please try again later.',
+ assigneeError: 'There was an error assigning this task. Please try another assignee.',
+ genericCreateTaskFailureMessage: 'There was an error creating this task. Please try again later.',
deleteTask: 'Delete task',
- deleteConfirmation: 'Are you sure that you want to delete this task?',
+ deleteConfirmation: 'Are you sure you want to delete this task?',
},
statementPage: {
title: (year, monthName) => `${monthName} ${year} statement`,
- generatingPDF: "We're generating your PDF right now. Please come back later!",
+ generatingPDF: "We're generating your PDF right now. Please check back soon!",
},
keyboardShortcutsPage: {
title: 'Keyboard shortcuts',
@@ -2871,11 +3055,17 @@ export default {
},
},
groupedExpenses: 'grouped expenses',
+ bulkActions: {
+ delete: 'Delete',
+ hold: 'Hold',
+ unhold: 'Unhold',
+ noOptionsAvailable: 'No options available for the selected group of expenses.',
+ },
},
genericErrorPage: {
title: 'Uh-oh, something went wrong!',
body: {
- helpTextMobile: 'Please try closing and reopening the app or switching to',
+ helpTextMobile: 'Please close and reopen the app, or switch to',
helpTextWeb: 'web.',
helpTextConcierge: 'If the problem persists, reach out to',
},
@@ -2888,12 +3078,12 @@ export default {
qrMessage: 'Check your photos or downloads folder for a copy of your QR code. Protip: Add it to a presentation for your audience to scan and connect with you directly.',
},
generalError: {
- title: 'Attachment Error',
- message: 'Attachment cannot be downloaded.',
+ title: 'Attachment error',
+ message: "Attachment can't be downloaded.",
},
permissionError: {
title: 'Storage access',
- message: "Expensify can't save attachments without storage access. Tap Settings to update permissions.",
+ message: "Expensify can't save attachments without storage access. Tap settings to update permissions.",
},
},
desktopApplicationMenu: {
@@ -2949,27 +3139,55 @@ export default {
},
checkForUpdatesModal: {
available: {
- title: 'Update Available',
+ title: 'Update available',
message: ({isSilentUpdating}: {isSilentUpdating: boolean}) =>
`The new version will be available shortly.${!isSilentUpdating ? " We'll notify you when we're ready to update." : ''}`,
soundsGood: 'Sounds good',
},
notAvailable: {
- title: 'Update Not Available',
- message: 'There is no update available as of now! Check again at a later time.',
+ title: 'Update unavailable',
+ message: "There's no update available right now. Please check back later!",
okay: 'Okay',
},
error: {
- title: 'Update Check Failed.',
- message: "We couldn't look for an update. Please check again in a bit!.",
+ title: 'Update check failed.',
+ message: "We couldn't check for an update. Please try again in a bit.",
},
},
report: {
- genericCreateReportFailureMessage: 'Unexpected error creating this chat, please try again later.',
- genericAddCommentFailureMessage: 'Unexpected error while posting the comment, please try again later.',
- genericUpdateReportFieldFailureMessage: 'Unexpected error while updating the field, please try again later.',
- genericUpdateReporNameEditFailureMessage: 'Unexpected error while renaming the report, please try again later.',
+ genericCreateReportFailureMessage: 'Unexpected error creating this chat. Please try again later.',
+ genericAddCommentFailureMessage: 'Unexpected error posting the comment. Please try again later.',
+ genericUpdateReportFieldFailureMessage: 'Unexpected error updating the field. Please try again later.',
+ genericUpdateReporNameEditFailureMessage: 'Unexpected error renaming the report. Please try again later.',
noActivityYet: 'No activity yet',
+ actions: {
+ type: {
+ changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} from ${oldValue} to ${newValue}`,
+ changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `changed ${fieldName} to ${newValue}`,
+ changePolicy: ({fromPolicy, toPolicy}: ChangePolicyParams) => `changed policy from ${fromPolicy} to ${toPolicy}`,
+ changeType: ({oldType, newType}: ChangeTypeParams) => `changed type from ${oldType} to ${newType}`,
+ delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `sent this report to ${delegateUser} since ${originalManager} is on vacation`,
+ exportedToCSV: `exported this report to CSV`,
+ exportedToIntegration: ({label}: ExportedToIntegrationParams) => `exported this report to ${label}`,
+ forwarded: ({amount, currency}: ForwardedParams) => `approved ${currency}${amount}`,
+ integrationsMessage: (errorMessage: string, label: string) => `failed to export this report to ${label} ("${errorMessage}").`,
+ managerAttachReceipt: `added a receipt`,
+ managerDetachReceipt: `removed the receipt`,
+ markedReimbursed: ({amount, currency}: MarkedReimbursedParams) => `paid ${currency}${amount} elsewhere`,
+ markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `paid ${currency}${amount} via integration`,
+ outdatedBankAccount: `couldn’t process the payment due to a problem with the payer’s bank account`,
+ reimbursementACHBounce: `couldn’t process the payment, as the payer doesn’t have sufficient funds`,
+ reimbursementACHCancelled: `canceled the payment`,
+ reimbursementAccountChanged: `couldn’t process the payment, as the payer changed bank accounts`,
+ reimbursementDelayed: `processed the payment but it’s delayed by 1-2 more business days`,
+ selectedForRandomAudit: `[randomly selected](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) for review`,
+ share: ({to}: ShareParams) => `invited user ${to}`,
+ unshare: ({to}: UnshareParams) => `removed user ${to}`,
+ stripePaid: ({amount, currency}: StripePaidParams) => `paid ${currency}${amount}`,
+ takeControl: `took control`,
+ unapproved: ({amount, currency}: UnapprovedParams) => `unapproved ${currency}${amount}`,
+ },
+ },
},
chronos: {
oooEventSummaryFullDay: ({summary, dayCount, date}: OOOEventSummaryFullDayParams) => `${summary} for ${dayCount} ${dayCount === 1 ? 'day' : 'days'} until ${date}`,
@@ -3128,8 +3346,8 @@ export default {
reasonTitle: 'Why do you need a new card?',
cardDamaged: 'My card was damaged',
cardLostOrStolen: 'My card was lost or stolen',
- confirmAddressTitle: "Please confirm the address below is where you'd like us to send your new card.",
- cardDamagedInfo: 'Your new card will arrive in 2-3 business days, and your existing card will continue to work until you activate your new one.',
+ confirmAddressTitle: 'Please confirm the mailing address for your new card.',
+ cardDamagedInfo: 'Your new card will arrive in 2-3 business days. Your current card will continue to work until you activate your new one.',
cardLostOrStolenInfo: 'Your current card will be permanently deactivated as soon as your order is placed. Most cards arrive in a few business days.',
address: 'Address',
deactivateCardButton: 'Deactivate card',
@@ -3208,7 +3426,19 @@ export default {
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Amount over ${formattedLimit}/person limit`,
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Amount over daily ${formattedLimit}/person category limit`,
receiptNotSmartScanned: 'Receipt not verified. Please confirm accuracy.',
- receiptRequired: (params: ViolationsReceiptRequiredParams) => `Receipt required${params ? ` over ${params.formattedLimit}${params.category ? ' category limit' : ''}` : ''}`,
+ receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
+ let message = 'Receipt required';
+ if (formattedLimit ?? category) {
+ message += ' over';
+ if (formattedLimit) {
+ message += ` ${formattedLimit}`;
+ }
+ if (category) {
+ message += ' category limit';
+ }
+ }
+ return message;
+ },
reviewRequired: 'Review required',
rter: ({brokenBankConnection, email, isAdmin, isTransactionOlderThan7Days, member}: ViolationsRterParams) => {
if (brokenBankConnection) {
@@ -3282,11 +3512,67 @@ export default {
},
subscription: {
mobileReducedFunctionalityMessage: 'You can’t make changes to your subscription in the mobile app.',
+ badge: {
+ freeTrial: ({numOfDays}) => `Free trial: ${numOfDays} ${numOfDays === 1 ? 'day' : 'days'} left`,
+ },
billingBanner: {
+ policyOwnerAmountOwed: {
+ title: 'Your payment info is outdated',
+ subtitle: ({date}) => `Update your payment card by ${date} to continue using all of your favorite features.`,
+ },
+ policyOwnerAmountOwedOverdue: {
+ title: 'Your payment info is outdated',
+ subtitle: 'Please update your payment information.',
+ },
+ policyOwnerUnderInvoicing: {
+ title: 'Your payment info is outdated',
+ subtitle: ({date}) => `Your payment is past due. Please pay your invoice by ${date} to avoid service interruption.`,
+ },
+ policyOwnerUnderInvoicingOverdue: {
+ title: 'Your payment info is outdated',
+ subtitle: 'Your payment is past due. Please pay your invoice.',
+ },
+ billingDisputePending: {
+ title: 'Your card couldn’t be charged',
+ subtitle: ({amountOwed, cardEnding}) =>
+ `You disputed the ${amountOwed} charge on the card ending in ${cardEnding}. Your account will be locked until the dispute is resolved with your bank.`,
+ },
+ cardAuthenticationRequired: {
+ title: 'Your card couldn’t be charged',
+ subtitle: ({cardEnding}) =>
+ `Your payment card hasn’t been fully authenticated. Please complete the authentication process to activate your payment card ending in ${cardEnding}.`,
+ },
+ insufficientFunds: {
+ title: 'Your card couldn’t be charged',
+ subtitle: ({amountOwed}) =>
+ `Your payment card was declined due to insufficient funds. Please retry or add a new payment card to clear your ${amountOwed} outstanding balance.`,
+ },
+ cardExpired: {
+ title: 'Your card couldn’t be charged',
+ subtitle: ({amountOwed}) => `Your payment card expired. Please add a new payment card to clear your ${amountOwed} outstanding balance.`,
+ },
+ cardExpireSoon: {
+ title: 'Your card is expiring soon',
+ subtitle: 'Your payment card will expire at the end of this month. Click the three-dot menu below to update it and continue using all your favorite features.',
+ },
+ retryBillingSuccess: {
+ title: 'Success!',
+ subtitle: 'Your card has been billed successfully.',
+ },
+ retryBillingError: {
+ title: 'Your card couldn’t be charged',
+ subtitle: 'Before retrying, please call your bank directly to authorize Expensify charges and remove any holds. Otherwise, try adding a different payment card.',
+ },
+ cardOnDispute: ({amountOwed, cardEnding}) =>
+ `You disputed the ${amountOwed} charge on the card ending in ${cardEnding}. Your account will be locked until the dispute is resolved with your bank.`,
preTrial: {
title: 'Start a free trial',
subtitle: 'To get started, ',
- subtitleLink: 'complete your setup checklist here',
+ subtitleLink: 'complete your setup checklist here.',
+ },
+ trialStarted: {
+ title: ({numOfDays}) => `Free trial: ${numOfDays} ${numOfDays === 1 ? 'day' : 'days'} left!`,
+ subtitle: 'Add a payment card to continue using all of your favorite features.',
},
},
cardSection: {
@@ -3300,6 +3586,13 @@ export default {
changeCurrency: 'Change payment currency',
cardNotFound: 'No payment card added',
retryPaymentButton: 'Retry payment',
+ requestRefund: 'Request refund',
+ requestRefundModal: {
+ phrase1: 'Getting a refund is easy, just downgrade your account before your next billing date and you’ll receive a refund.',
+ phrase2:
+ 'Heads up: Downgrading your account means your workspace(s) will be deleted. This action can’t be undone, but you can always create a new workspace if you change your mind.',
+ confirm: 'Delete workspace(s) and downgrade',
+ },
viewPaymentHistory: 'View payment history',
},
yourPlan: {
@@ -3368,7 +3661,7 @@ export default {
title: 'Subscription settings',
autoRenew: 'Auto-renew',
autoIncrease: 'Auto-increase annual seats',
- saveUpTo: ({amountSaved}) => `Save up to $${amountSaved}/month per active member`,
+ saveUpTo: ({amountWithCurrency}) => `Save up to ${amountWithCurrency}/month per active member`,
automaticallyIncrease:
'Automatically increase your annual seats to accommodate for active members that exceed your subscription size. Note: This will extend your annual subscription end date.',
disableAutoRenew: 'Disable auto-renew',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index da228096eaf1..59aad3275c41 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -11,10 +11,14 @@ import type {
BeginningOfChatHistoryAnnounceRoomPartTwo,
BeginningOfChatHistoryDomainRoomPartOneParams,
CanceledRequestParams,
+ ChangeFieldParams,
+ ChangePolicyParams,
+ ChangeTypeParams,
CharacterLimitParams,
ConfirmThatParams,
DateShouldBeAfterParams,
DateShouldBeBeforeParams,
+ DelegateSubmitParams,
DeleteActionParams,
DeleteConfirmationParams,
DidSplitAmountMessageParams,
@@ -23,7 +27,9 @@ import type {
ElectronicFundsParams,
EnglishTranslation,
EnterMagicCodeParams,
+ ExportedToIntegrationParams,
FormattedMaxLengthParams,
+ ForwardedParams,
GoBackMessageParams,
GoToRoomParams,
InstantSummaryParams,
@@ -32,6 +38,8 @@ import type {
LogSizeParams,
ManagerApprovedAmountParams,
ManagerApprovedParams,
+ MarkedReimbursedParams,
+ MarkReimbursedFromIntegrationParams,
NoLongerHaveAccessParams,
NotAllowedExtensionParams,
NotYouParams,
@@ -49,6 +57,7 @@ import type {
PaySomeoneParams,
ReimbursementRateParams,
RemovedTheRequestParams,
+ RemoveMembersWarningPrompt,
RenamedRoomActionParams,
ReportArchiveReasonsClosedParams,
ReportArchiveReasonsMergedParams,
@@ -64,16 +73,20 @@ import type {
SetTheRequestParams,
SettledAfterAddedBankAccountParams,
SettleExpensifyCardParams,
+ ShareParams,
SignUpNewFaceCodeParams,
SizeExceededParams,
SplitAmountParams,
StepCounterParams,
+ StripePaidParams,
TaskCreatedActionParams,
TermsParams,
ThreadRequestReportNameParams,
ThreadSentMoneyReportNameParams,
ToValidateLoginParams,
TransferParams,
+ UnapprovedParams,
+ UnshareParams,
UntilTimeParams,
UpdatedTheDistanceParams,
UpdatedTheRequestParams,
@@ -264,7 +277,7 @@ export default {
your: 'tu',
conciergeHelp: 'Por favor, contacta con Concierge para obtener ayuda.',
youAppearToBeOffline: 'Parece que estás desconectado.',
- thisFeatureRequiresInternet: 'Esta función requiere una conexión a Internet activa para ser utilizada.',
+ thisFeatureRequiresInternet: 'Esta función requiere una conexión a Internet activa.',
attachementWillBeAvailableOnceBackOnline: 'El archivo adjunto estará disponible cuando vuelvas a estar en línea.',
areYouSure: '¿Estás seguro?',
verify: 'Verifique',
@@ -330,15 +343,17 @@ export default {
shared: 'Compartidos',
drafts: 'Borradores',
finished: 'Finalizados',
+ companyID: 'Empresa ID',
+ userID: 'Usuario ID',
disable: 'Deshabilitar',
},
connectionComplete: {
- title: 'Conexión Completa',
+ title: 'Conexión completa',
supportingText: 'Ya puedes cerrar esta página y volver a la App de Expensify.',
},
location: {
useCurrent: 'Usar ubicación actual',
- notFound: 'No pudimos encontrar tu ubicación, inténtalo de nuevo o introduce una dirección manualmente.',
+ notFound: 'No pudimos encontrar tu ubicación. Inténtalo de nuevo o introduce una dirección manualmente.',
permissionDenied: 'Parece que has denegado el permiso a tu ubicación.',
please: 'Por favor,',
allowPermission: 'habilita el permiso de ubicación en la configuración',
@@ -349,7 +364,7 @@ export default {
},
attachmentPicker: {
cameraPermissionRequired: 'Permiso para acceder a la cámara',
- expensifyDoesntHaveAccessToCamera: 'Expensify no puede tomar fotos sin acceso a la cámara. Haz click en Configuración para actualizar los permisos.',
+ expensifyDoesntHaveAccessToCamera: 'Expensify no puede tomar fotos sin acceso a la cámara. Haz click en configuración para actualizar los permisos.',
attachmentError: 'Error al adjuntar archivo',
errorWhileSelectingAttachment: 'Ha ocurrido un error al seleccionar un archivo adjunto. Por favor, inténtalo de nuevo.',
errorWhileSelectingCorruptedAttachment: 'Ha ocurrido un error al seleccionar un archivo adjunto corrupto. Por favor, inténtalo con otro archivo.',
@@ -421,7 +436,7 @@ export default {
welcomeText: {
getStarted: 'Comience a continuación.',
anotherLoginPageIsOpen: 'Otra página de inicio de sesión está abierta.',
- anotherLoginPageIsOpenExplanation: 'Ha abierto la página de inicio de sesión en una pestaña separada, inicie sesión desde esa pestaña específica.',
+ anotherLoginPageIsOpenExplanation: 'Ha abierto la página de inicio de sesión en una pestaña separada. Inicie sesión desde esa pestaña específica.',
welcome: '¡Bienvenido!',
welcomeWithoutExclamation: 'Bienvenido',
phrase2: 'El dinero habla. Y ahora que chat y pagos están en un mismo lugar, es también fácil.',
@@ -447,7 +462,7 @@ export default {
},
samlSignIn: {
welcomeSAMLEnabled: 'Continua iniciando sesión con el inicio de sesión único:',
- orContinueWithMagicCode: 'O, opcionalmente, tu empresa te permite iniciar sesión con un código mágico',
+ orContinueWithMagicCode: 'También puedes iniciar sesión con un código mágico',
useSingleSignOn: 'Usar el inicio de sesión único',
useMagicCode: 'Usar código mágico',
launching: 'Cargando...',
@@ -544,7 +559,7 @@ export default {
reportTypingIndicator: {
isTyping: 'está escribiendo...',
areTyping: 'están escribiendo...',
- multipleUsers: 'Varios usuarios',
+ multipleUsers: 'Varios miembros',
},
reportArchiveReasons: {
[CONST.REPORT.ARCHIVE_REASON.DEFAULT]: 'Esta sala de chat ha sido eliminada.',
@@ -596,7 +611,7 @@ export default {
takePhoto: 'Haz una foto',
cameraAccess: 'Se requiere acceso a la cámara para hacer fotos de los recibos.',
cameraErrorTitle: 'Error en la cámara',
- cameraErrorMessage: 'Se produjo un error al hacer una foto, Por favor, inténtalo de nuevo.',
+ cameraErrorMessage: 'Se produjo un error al hacer una foto. Por favor, inténtalo de nuevo.',
dropTitle: 'Suéltalo',
dropMessage: 'Suelta tu archivo aquí',
flash: 'flash',
@@ -652,14 +667,14 @@ export default {
canceled: 'Canceló',
posted: 'Contabilizado',
deleteReceipt: 'Eliminar recibo',
- pendingMatchWithCreditCard: 'Recibo pendiente de adjuntar con la tarjeta de crédito.',
- pendingMatchWithCreditCardDescription: 'Recibo pendiente de adjuntar con tarjeta de crédito. Marca como efectivo para ignorar y solicitar pago.',
+ pendingMatchWithCreditCard: 'Recibo pendiente de adjuntar con la transacción de la tarjeta',
+ pendingMatchWithCreditCardDescription: 'Recibo pendiente de adjuntar con la transacción de la tarjeta. Márcalo como efectivo para cancelar.',
markAsCash: 'Marcar como efectivo',
routePending: 'Ruta pendiente...',
receiptIssuesFound: (count: number) => `${count === 1 ? 'Problema encontrado' : 'Problemas encontrados'}`,
fieldPending: 'Pendiente...',
receiptScanning: 'Escaneando recibo...',
- receiptScanInProgress: 'Escaneado de recibo en proceso.',
+ receiptScanInProgress: 'Escaneado de recibo en proceso',
receiptScanInProgressDescription: 'Escaneado de recibo en proceso. Vuelve a comprobarlo más tarde o introduce los detalles ahora.',
defaultRate: 'Tasa predeterminada',
receiptMissingDetails: 'Recibo con campos vacíos',
@@ -668,7 +683,7 @@ export default {
receiptStatusTitle: 'Escaneando…',
receiptStatusText: 'Solo tú puedes ver este recibo cuando se está escaneando. Vuelve más tarde o introduce los detalles ahora.',
receiptScanningFailed: 'El escaneo de recibo ha fallado. Introduce los detalles manualmente.',
- transactionPendingDescription: 'Transacción pendiente. La transacción tarda unos días en contabilizarse desde la fecha en que se utilizó la tarjeta.',
+ transactionPendingDescription: 'Transacción pendiente. Puede tardar unos días en contabilizarse.',
expenseCount: ({count, scanningReceipts = 0, pendingReceipts = 0}: RequestCountParams) =>
`${count} ${Str.pluralize('gasto', 'gastos', count)}${scanningReceipts > 0 ? `, ${scanningReceipts} escaneando` : ''}${
pendingReceipts > 0 ? `, ${pendingReceipts} pendiente` : ''
@@ -683,7 +698,7 @@ export default {
settlePayment: ({formattedAmount}: SettleExpensifyCardParams) => `Pagar ${formattedAmount}`,
settleBusiness: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pagar ${formattedAmount} como negocio` : `Pagar como empresa`),
payElsewhere: ({formattedAmount}: SettleExpensifyCardParams) => (formattedAmount ? `Pagar ${formattedAmount} de otra forma` : `Pagar de otra forma`),
- nextStep: 'Pasos Siguientes',
+ nextStep: 'Pasos siguientes',
finished: 'Finalizado',
sendInvoice: ({amount}: RequestAmountParams) => `Enviar factura de ${amount}`,
submitAmount: ({amount}: RequestAmountParams) => `solicitar ${amount}`,
@@ -705,7 +720,7 @@ export default {
waitingOnBankAccount: ({submitterDisplayName}: WaitingOnBankAccountParams) => `inició el pago, pero no se procesará hasta que ${submitterDisplayName} añada una cuenta bancaria`,
adminCanceledRequest: ({manager, amount}: AdminCanceledRequestParams) => `${manager ? `${manager}: ` : ''}canceló el pago de ${amount}.`,
canceledRequest: ({amount, submitterDisplayName}: CanceledRequestParams) =>
- `canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu billetera Expensify en un plazo de 30 días.`,
+ `canceló el pago ${amount}, porque ${submitterDisplayName} no habilitó tu Billetera Expensify en un plazo de 30 días.`,
settledAfterAddedBankAccount: ({submitterDisplayName, amount}: SettledAfterAddedBankAccountParams) =>
`${submitterDisplayName} añadió una cuenta bancaria. El pago de ${amount} se ha realizado.`,
paidElsewhereWithAmount: ({payer, amount}: PaidElsewhereWithAmountParams) => `${payer ? `${payer} ` : ''}pagó ${amount} de otra forma`,
@@ -732,12 +747,12 @@ export default {
invalidTaxAmount: ({amount}: RequestAmountParams) => `El importe máximo del impuesto es ${amount}`,
invalidSplit: 'La suma de las partes debe ser igual al importe total.',
invalidSplitParticipants: 'Introduce un importe superior a cero para al menos dos participantes.',
- other: 'Error inesperado, por favor, inténtalo más tarde.',
- genericHoldExpenseFailureMessage: 'Error inesperado al bloquear el gasto, por favor, inténtalo de nuevo más tarde.',
- genericUnholdExpenseFailureMessage: 'Error inesperado al desbloquear el gasto, por favor, inténtalo de nuevo más tarde.',
+ other: 'Error inesperado. Por favor, inténtalo más tarde.',
+ genericHoldExpenseFailureMessage: 'Error inesperado al bloquear el gasto. Por favor, inténtalo de nuevo más tarde.',
+ genericUnholdExpenseFailureMessage: 'Error inesperado al desbloquear el gasto. Por favor, inténtalo de nuevo más tarde.',
genericCreateFailureMessage: 'Error inesperado al enviar este gasto. Por favor, inténtalo más tarde.',
- genericCreateInvoiceFailureMessage: 'Error inesperado al enviar la factura, inténtalo de nuevo más tarde.',
- receiptDeleteFailureError: 'Error inesperado al borrar este recibo. Vuelve a intentarlo más tarde.',
+ genericCreateInvoiceFailureMessage: 'Error inesperado al enviar la factura. Por favor, inténtalo de nuevo más tarde.',
+ receiptDeleteFailureError: 'Error inesperado al borrar este recibo. Por favor, vuelve a intentarlo más tarde.',
// eslint-disable-next-line rulesdir/use-periods-for-error-messages
receiptFailureMessage: 'El recibo no se subió. ',
// eslint-disable-next-line rulesdir/use-periods-for-error-messages
@@ -748,11 +763,11 @@ export default {
genericSmartscanFailureMessage: 'La transacción tiene campos vacíos.',
duplicateWaypointsErrorMessage: 'Por favor, elimina los puntos de ruta duplicados.',
atLeastTwoDifferentWaypoints: 'Por favor, introduce al menos dos direcciones diferentes.',
- splitExpenseMultipleParticipantsErrorMessage: 'Solo puedes dividir un gasto entre un único espacio de trabajo o con usuarios individuales. Por favor, actualiza tu selección.',
+ splitExpenseMultipleParticipantsErrorMessage: 'Solo puedes dividir un gasto entre un único espacio de trabajo o con miembros individuales. Por favor, actualiza tu selección.',
invalidMerchant: 'Por favor, introduce un comerciante correcto.',
},
waitingOnEnabledWallet: ({submitterDisplayName}: WaitingOnBankAccountParams) => `inició el pago, pero no se procesará hasta que ${submitterDisplayName} active su billetera`,
- enableWallet: 'Habilitar Billetera',
+ enableWallet: 'Habilitar billetera',
holdExpense: 'Bloquear gasto',
unholdExpense: 'Desbloquear gasto',
heldExpense: 'bloqueó este gasto',
@@ -761,7 +776,7 @@ export default {
reason: 'Razón',
holdReasonRequired: 'Se requiere una razón para bloquear.',
expenseOnHold: 'Este gasto está bloqueado. Revisa los comentarios para saber como proceder.',
- expensesOnHold: 'Todos los gastos quedaron bloqueado. Revisa los comentarios para saber como proceder.',
+ expensesOnHold: 'Todos los gastos quedaron bloqueados. Revisa los comentarios para saber como proceder.',
expenseDuplicate: 'Esta solicitud tiene los mismos detalles que otra. Revisa los duplicados para eliminar el bloqueo.',
reviewDuplicates: 'Revisar duplicados',
keepAll: 'Mantener todos',
@@ -806,7 +821,7 @@ export default {
editImage: 'Editar foto',
viewPhoto: 'Ver foto',
imageUploadFailed: 'Error al cargar la imagen',
- deleteWorkspaceError: 'Lo sentimos, hubo un problema eliminando el avatar de tu espacio de trabajo.',
+ deleteWorkspaceError: 'Lo sentimos, hubo un problema eliminando el avatar de tu espacio de trabajo',
sizeExceeded: ({maxUploadSizeInMB}: SizeExceededParams) => `La imagen supera el tamaño máximo de ${maxUploadSizeInMB}MB.`,
resolutionConstraints: ({minHeightInPx, minWidthInPx, maxHeightInPx, maxWidthInPx}: ResolutionConstraintsParams) =>
`Por favor, elige una imagen más grande que ${minHeightInPx}x${minWidthInPx} píxeles y más pequeña que ${maxHeightInPx}x${maxWidthInPx} píxeles.`,
@@ -858,7 +873,7 @@ export default {
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Por favor, introduce el código mágico enviado a ${contactMethod}`,
setAsDefault: 'Establecer como predeterminado',
yourDefaultContactMethod:
- 'Este es tu método de contacto predeterminado. No podrás eliminarlo hasta que añadas otro método de contacto y lo marques como predeterminado pulsando "Establecer como predeterminado".',
+ 'Este es tu método de contacto predeterminado. Antes de poder eliminarlo, tendrás que elegir otro método de contacto y haz clic en "Establecer como predeterminado".',
removeContactMethod: 'Eliminar método de contacto',
removeAreYouSure: '¿Estás seguro de que quieres eliminar este método de contacto? Esta acción no se puede deshacer.',
failedNewContact: 'Hubo un error al añadir este método de contacto.',
@@ -998,7 +1013,7 @@ export default {
changingYourPasswordPrompt: 'El cambio de contraseña va a afectar tanto a la cuenta de Expensify.com como la de Nuevo Expensify.',
currentPassword: 'Contraseña actual',
newPassword: 'Nueva contraseña',
- newPasswordPrompt: 'La nueva contraseña debe ser diferente de la antigua, tener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.',
+ newPasswordPrompt: 'La nueva contraseña debe ser diferente de la antigua y contener al menos 8 caracteres, 1 letra mayúscula, 1 letra minúscula y 1 número.',
},
twoFactorAuth: {
headerTitle: 'Autenticación de dos factores',
@@ -1053,6 +1068,18 @@ export default {
genericFailureMessage: 'Las notas privadas no han podido ser guardadas.',
},
},
+ billingCurrency: {
+ error: {
+ securityCode: 'Por favor, introduce un código de seguridad válido.',
+ },
+ securityCode: 'Código de seguridad',
+ changePaymentCurrency: 'Cambiar moneda de facturación',
+ changeBillingCurrency: 'Cambiar la moneda de pago',
+ paymentCurrency: 'Moneda de pago',
+ note: 'Nota: Cambiar tu moneda de pago puede afectar cuánto pagarás por Expensify. Consulta nuestra',
+ noteLink: 'página de precios',
+ noteDetails: 'para conocer todos los detalles.',
+ },
addDebitCardPage: {
addADebitCard: 'Añadir una tarjeta de débito',
nameOnCard: 'Nombre en la tarjeta',
@@ -1072,7 +1099,7 @@ export default {
addressStreet: 'Por favor, introduce una dirección de facturación válida que no sea un apartado postal.',
addressState: 'Por favor, selecciona un estado.',
addressCity: 'Por favor, introduce una ciudad.',
- genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Vuelva a intentarlo.',
+ genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Por favor, vuelva a intentarlo.',
password: 'Por favor, introduce tu contraseña de Expensify.',
},
},
@@ -1095,7 +1122,7 @@ export default {
addressStreet: 'Por favor, introduce una dirección de facturación válida que no sea un apartado postal.',
addressState: 'Por favor, selecciona un estado.',
addressCity: 'Por favor, introduce una ciudad.',
- genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Vuelve a intentarlo.',
+ genericFailureMessage: 'Se produjo un error al añadir tu tarjeta. Por favor, vuelva a intentarlo.',
password: 'Por favor, introduce tu contraseña de Expensify.',
},
},
@@ -1120,20 +1147,20 @@ export default {
expensifyWallet: 'Billetera Expensify',
sendAndReceiveMoney: 'Envía y recibe dinero desde tu Billetera Expensify.',
enableWalletToSendAndReceiveMoney: 'Habilita tu Billetera Expensify para comenzar a enviar y recibir dinero con amigos',
- enableWallet: 'Habilitar Billetera',
+ enableWallet: 'Habilitar billetera',
bankAccounts: 'Cuentas bancarias',
addBankAccountToSendAndReceive: 'Añade una cuenta bancaria para enviar y recibir pagos directamente en la aplicación.',
addBankAccount: 'Añadir cuenta bancaria',
assignedCards: 'Tarjetas asignadas',
assignedCardsDescription: 'Son tarjetas asignadas por un administrador del espacio de trabajo para gestionar los gastos de la empresa.',
expensifyCard: 'Tarjeta Expensify',
- walletActivationPending: 'Estamos revisando tu información, por favor vuelve en unos minutos.',
+ walletActivationPending: 'Estamos revisando tu información. Por favor, vuelve en unos minutos.',
walletActivationFailed: 'Lamentablemente, no podemos activar tu billetera en este momento. Chatea con Concierge para obtener más ayuda.',
- addYourBankAccount: 'Añadir tu cuenta bancaria.',
+ addYourBankAccount: 'Añadir tu cuenta bancaria',
addBankAccountBody: 'Conectemos tu cuenta bancaria a Expensify para que sea más fácil que nunca enviar y recibir pagos directamente en la aplicación.',
- chooseYourBankAccount: 'Elige tu cuenta bancaria.',
+ chooseYourBankAccount: 'Elige tu cuenta bancaria',
chooseAccountBody: 'Asegúrese de elegir el adecuado.',
- confirmYourBankAccount: 'Confirma tu cuenta bancaria.',
+ confirmYourBankAccount: 'Confirma tu cuenta bancaria',
},
cardPage: {
expensifyCard: 'Tarjeta Expensify',
@@ -1296,7 +1323,7 @@ export default {
priorityModePage: {
priorityMode: 'Modo prioridad',
explainerText:
- 'Elige si deseas mostrar por defecto todos los chats ordenados desde el más reciente y con los elementos anclados en la parte superior, o elige el modo #concentración, con los elementos no leídos anclados en la parte superior y ordenados alfabéticamente.',
+ 'Elige #concentración si deseas enfocarte sólo en los chats no leídos y en los anclados, o mostrarlo todo con los chats más recientes y los anclados en la parte superior.',
priorityModes: {
default: {
label: 'Más recientes',
@@ -1322,7 +1349,7 @@ export default {
groupChat: {
groupMembersListTitle: 'Directorio de los miembros del grupo.',
lastMemberTitle: '¡Atención!',
- lastMemberWarning: 'Ya que eres la última persona aquí, si te vas, este chat quedará inaccesible para todos los usuarios. ¿Estás seguro de que quieres salir del chat?',
+ lastMemberWarning: 'Ya que eres la última persona aquí, si te vas, este chat quedará inaccesible para todos los miembros. ¿Estás seguro de que quieres salir del chat?',
defaultReportName: ({displayName}: {displayName: string}) => `Chat de group de ${displayName}`,
},
languagePage: {
@@ -1402,6 +1429,12 @@ export default {
notYou: ({user}: NotYouParams) => `¿No eres ${user}?`,
},
onboarding: {
+ welcome: '¡Bienvenido!',
+ explanationModal: {
+ title: 'Bienvenido a Expensify',
+ description: 'Recibir pagos es tan fácil como mandar un mensaje',
+ secondaryDescription: 'Para volver a Expensify Classic, simplemente haz click en tu foto de perfil > Ir a Expensify Classic.',
+ },
welcomeVideo: {
title: 'Bienvenido a Expensify',
description: 'Una aplicación para gestionar todos tus gastos de empresa y personales en un chat. Pensada para tu empresa, tu equipo y tus amigos.',
@@ -1430,6 +1463,7 @@ export default {
error: {
containsReservedWord: 'El nombre no puede contener las palabras Expensify o Concierge.',
hasInvalidCharacter: 'El nombre no puede contener una coma o un punto y coma.',
+ requiredFirstName: 'El nombre no puede estar vacío.',
},
},
privatePersonalDetails: {
@@ -1647,7 +1681,7 @@ export default {
userIsAlreadyMember: ({login, name}: UserIsAlreadyMemberParams) => `${login} ya es miembro de ${name}`,
},
onfidoStep: {
- acceptTerms: 'Al continuar con la solicitud para activar tu billetera Expensify, confirma que ha leído, comprende y acepta ',
+ acceptTerms: 'Al continuar con la solicitud para activar tu Billetera Expensify, confirma que ha leído, comprende y acepta ',
facialScan: 'Política y lanzamiento de la exploración facial de Onfido',
tryAgain: 'Intentar otra vez',
verifyIdentity: 'Verificar identidad',
@@ -1669,7 +1703,7 @@ export default {
},
additionalDetailsStep: {
headerTitle: 'Detalles adicionales',
- helpText: 'Necesitamos confirmar la siguiente información antes de que puedas enviar y recibir dinero desde tu Billetera.',
+ helpText: 'Necesitamos confirmar la siguiente información antes de que puedas enviar y recibir dinero desde tu billetera.',
helpTextIdologyQuestions: 'Tenemos que preguntarte unas preguntas más para terminar de verificar tu identidad',
helpLink: 'Obtén más información sobre por qué necesitamos esto.',
legalFirstNameLabel: 'Primer nombre legal',
@@ -1680,7 +1714,7 @@ export default {
needSSNFull9: 'Estamos teniendo problemas para verificar tu número de seguridad social. Introduce los 9 dígitos del número de seguridad social.',
weCouldNotVerify: 'No se pudo verificar',
pleaseFixIt: 'Corrige esta información antes de continuar.',
- failedKYCTextBefore: 'No se ha podido verificar correctamente tu identidad. Vuelve a intentarlo más tarde y comunicate con ',
+ failedKYCTextBefore: 'No se ha podido verificar correctamente tu identidad. Vuelve a intentarlo más tarde o comunicate con ',
failedKYCTextAfter: ' si tienes alguna pregunta.',
},
termsStep: {
@@ -1700,7 +1734,7 @@ export default {
checkTheBoxes: 'Por favor, marca las siguientes casillas.',
agreeToTerms: 'Debes aceptar los términos y condiciones para continuar.',
shortTermsForm: {
- expensifyPaymentsAccount: ({walletProgram}: WalletProgramParams) => `La billetera Expensify es emitida por ${walletProgram}.`,
+ expensifyPaymentsAccount: ({walletProgram}: WalletProgramParams) => `La Billetera Expensify es emitida por ${walletProgram}.`,
perPurchase: 'Por compra',
atmWithdrawal: 'Retiro en cajeros automáticos',
cashReload: 'Recarga de efectivo',
@@ -1720,7 +1754,7 @@ export default {
electronicFundsInstantFeeMin: ({amount}: TermsParams) => `(mínimo ${amount})`,
},
longTermsForm: {
- listOfAllFees: 'Una lista de todas las tarifas de la billetera Expensify',
+ listOfAllFees: 'Una lista de todas las tarifas de la Billetera Expensify',
typeOfFeeHeader: 'Tipo de tarifa',
feeAmountHeader: 'Importe de la tarifa',
moreDetailsHeader: 'Más detalles',
@@ -1733,11 +1767,11 @@ export default {
sendingFundsTitle: 'Enviar fondos a otro titular de cuenta',
sendingFundsDetails: 'No se aplica ningún cargo por enviar fondos a otro titular de cuenta utilizando tu saldo cuenta bancaria o tarjeta de débito',
electronicFundsStandardDetails:
- 'No hay cargo por transferir fondos desde tu billetera Expensify ' +
+ 'No hay cargo por transferir fondos desde tu Billetera Expensify ' +
'a tu cuenta bancaria utilizando la opción estándar. Esta transferencia generalmente se completa en' +
'1-3 días laborables.',
electronicFundsInstantDetails: ({percentage, amount}: ElectronicFundsParams) =>
- 'Hay una tarifa para transferir fondos desde tu billetera Expensify a ' +
+ 'Hay una tarifa para transferir fondos desde tu Billetera Expensify a ' +
'la tarjeta de débito vinculada utilizando la opción de transferencia instantánea. Esta transferencia ' +
`generalmente se completa dentro de varios minutos. La tarifa es el ${percentage}% del importe de la ` +
`transferencia (con una tarifa mínima de ${amount}). `,
@@ -1760,7 +1794,7 @@ export default {
activateStep: {
headerTitle: 'Habilitar pagos',
activatedTitle: '¡Billetera activada!',
- activatedMessage: 'Felicidades, tu Billetera está configurada y lista para hacer pagos.',
+ activatedMessage: 'Felicidades, tu billetera está configurada y lista para hacer pagos.',
checkBackLaterTitle: 'Un momento...',
checkBackLaterMessage: 'Todavía estamos revisando tu información. Por favor, vuelve más tarde.',
continueToPayment: 'Continuar al pago',
@@ -1796,15 +1830,15 @@ export default {
},
personalInfoStep: {
personalInfo: 'Información Personal',
- enterYourLegalFirstAndLast: 'Introduce tu nombre y apellidos',
+ enterYourLegalFirstAndLast: '¿Cuál es tu nombre legal?',
legalFirstName: 'Nombre',
legalLastName: 'Apellidos',
legalName: 'Nombre legal',
- enterYourDateOfBirth: 'Introduce tu fecha de nacimiento',
- enterTheLast4: 'Introduce los últimos 4 dígitos de tu número de la seguridad social',
- dontWorry: 'No te preocupes, no hacemos ninguna verificación de crédito',
+ enterYourDateOfBirth: '¿Cuál es tu fecha de nacimiento?',
+ enterTheLast4: '¿Cuáles son los últimos 4 dígitos de tu número de la seguridad social?',
+ dontWorry: 'No te preocupes, no hacemos verificaciones de crédito personales.',
last4SSN: 'Últimos 4 dígitos de tu número de la seguridad social',
- enterYourAddress: 'Introduce tu dirección',
+ enterYourAddress: '¿Cuál es tu dirección?',
address: 'Dirección',
letsDoubleCheck: 'Revisemos que todo esté bien',
byAddingThisBankAccount: 'Añadiendo esta cuenta bancaria, confirmas que has leído, entendido y aceptado',
@@ -1819,16 +1853,16 @@ export default {
},
businessInfoStep: {
businessInfo: 'Información de la empresa',
- enterTheNameOfYourBusiness: 'Introduce el nombre de tu empresa.',
+ enterTheNameOfYourBusiness: '¿Cuál es el nombre de tu empresa?',
businessName: 'Nombre de la empresa',
- enterYourCompanysTaxIdNumber: 'Introduce el número de identificación fiscal.',
+ enterYourCompanysTaxIdNumber: '¿Cuál es el número de identificación fiscal?',
taxIDNumber: 'Número de identificación fiscal',
taxIDNumberPlaceholder: '9 dígitos',
- enterYourCompanysWebsite: 'Introduce la página web de tu empresa.',
+ enterYourCompanysWebsite: '¿Cuál es la página web de tu empresa?',
companyWebsite: 'Página web de la empresa',
- enterYourCompanysPhoneNumber: 'Introduce el número de teléfono de tu empresa.',
- enterYourCompanysAddress: 'Introduce la dirección de tu empresa.',
- selectYourCompanysType: 'Selecciona el tipo de empresa.',
+ enterYourCompanysPhoneNumber: '¿Cuál es el número de teléfono de tu empresa?',
+ enterYourCompanysAddress: '¿Cuál es la dirección de tu empresa?',
+ selectYourCompanysType: '¿Cuál es el tipo de empresa?',
companyType: 'Tipo de empresa',
incorporationType: {
LLC: 'SRL',
@@ -1838,11 +1872,11 @@ export default {
SOLE_PROPRIETORSHIP: 'Empresa individual',
OTHER: 'Otros',
},
- selectYourCompanysIncorporationDate: 'Selecciona la fecha de constitución de la empresa.',
+ selectYourCompanysIncorporationDate: '¿Cuál es la fecha de constitución de la empresa?',
incorporationDate: 'Fecha de constitución',
incorporationDatePlaceholder: 'Fecha de inicio (yyyy-mm-dd)',
incorporationState: 'Estado en el que se constituyó',
- pleaseSelectTheStateYourCompanyWasIncorporatedIn: 'Selecciona el estado en el que se constituyó la empresa.',
+ pleaseSelectTheStateYourCompanyWasIncorporatedIn: '¿Cuál es el estado en el que se constituyó la empresa?',
letsDoubleCheck: 'Verifiquemos que todo esté correcto',
companyAddress: 'Dirección de la empresa',
listOfRestrictedBusinesses: 'lista de negocios restringidos',
@@ -1854,14 +1888,14 @@ export default {
areThereMoreIndividualsWhoOwn25percent: '¿Hay más personas que posean el 25% o más de',
regulationRequiresUsToVerifyTheIdentity: 'La ley nos exige verificar la identidad de cualquier persona que posea más del 25% de la empresa.',
companyOwner: 'Dueño de la empresa',
- enterLegalFirstAndLastName: 'Introduce el nombre y apellidos legales del dueño.',
+ enterLegalFirstAndLastName: '¿Cuál es el nombre legal del dueño?',
legalFirstName: 'Nombre legal',
legalLastName: 'Apellidos legales',
- enterTheDateOfBirthOfTheOwner: 'Introduce la fecha de nacimiento del dueño.',
- enterTheLast4: 'Introduce los últimos 4 dígitos del número de la seguridad social del dueño.',
+ enterTheDateOfBirthOfTheOwner: '¿Cuál es la fecha de nacimiento del dueño?',
+ enterTheLast4: '¿Cuáles son los últimos 4 dígitos del número de la seguridad social del dueño?',
last4SSN: 'Últimos 4 dígitos del número de la seguridad social',
dontWorry: 'No te preocupes, ¡no realizamos verificaciones de crédito personales!',
- enterTheOwnersAddress: 'Introduce la dirección del dueño.',
+ enterTheOwnersAddress: '¿Cuál es la dirección del dueño?',
letsDoubleCheck: 'Vamos a verificar que todo esté correcto.',
legalName: 'Nombre legal',
address: 'Dirección',
@@ -1872,17 +1906,15 @@ export default {
headerTitle: 'Validar cuenta bancaria',
buttonText: 'Finalizar configuración',
maxAttemptsReached: 'Se ha inhabilitado la validación de esta cuenta bancaria debido a demasiados intentos incorrectos.',
- description:
- 'Uno o dos días después de añadir tu cuenta a Expensify, te enviaremos tres (3) transacciones a tu cuenta. Tienen un nombre de comerciante similar a "Expensify, Inc. Validation".',
+ description: 'Enviaremos tres (3) pequeñas transacciones a tu cuenta bancaria a nombre de "Expensify, Inc. Validation" dentro de los próximos 1-2 días laborables.',
descriptionCTA: 'Introduce el importe de cada transacción en los campos siguientes. Ejemplo: 1.51.',
reviewingInfo: '¡Gracias! Estamos revisando tu información y nos comunicaremos contigo en breve. Consulta el chat con Concierge ',
forNextStep: ' para conocer los próximos pasos para terminar de configurar tu cuenta bancaria.',
letsChatCTA: 'Sí, vamos a chatear',
- letsChatText: 'Gracias. Necesitamos tu ayuda para verificar la información, pero podemos hacerlo rápidamente a través del chat. ¿Estás listo?',
+ letsChatText: '¡Ya casi estamos! Necesitamos tu ayuda para verificar unos últimos datos a través del chat. ¿Estás listo?',
letsChatTitle: '¡Vamos a chatear!',
enable2FATitle: 'Evita fraudes, activa la autenticación de dos factores!',
- enable2FAText:
- 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores. Eso nos permitirá disputar las transacciones de la Tarjeta Expensify y reducirá tu riesgo de fraude.',
+ enable2FAText: 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores para añadir una capa adicional de protección a tu cuenta.',
secureYourAccount: 'Asegura tu cuenta',
},
beneficialOwnersStep: {
@@ -1904,7 +1936,7 @@ export default {
completeVerification: 'Completar la verificación',
confirmAgreements: 'Por favor, confirma los acuerdos siguientes.',
certifyTrueAndAccurate: 'Certifico que la información dada es verdadera y precisa',
- certifyTrueAndAccurateError: 'Debe certificar que la información es verdadera y precisa',
+ certifyTrueAndAccurateError: 'Por favor, certifica que la información es verdadera y exacta',
isAuthorizedToUseBankAccount: 'Estoy autorizado para usar la cuenta bancaria de mi empresa para gastos de empresa',
isAuthorizedToUseBankAccountError: 'Debes ser el responsable oficial con autorización para operar la cuenta bancaria de la empresa.',
termsAndConditions: 'Términos y Condiciones',
@@ -1916,17 +1948,15 @@ export default {
validateButtonText: 'Validar',
validationInputLabel: 'Transacción',
maxAttemptsReached: 'La validación de esta cuenta bancaria se ha desactivado debido a demasiados intentos incorrectos.',
- description:
- 'Un día o dos después de añadir tu cuenta a Expensify, te enviaremos tres (3) transacciones a tu cuenta. Tienen un nombre de comerciante similar a "Expensify, Inc. Validation".',
+ description: 'Enviaremos tres (3) pequeñas transacciones a tu cuenta bancaria a nombre de "Expensify, Inc. Validation" dentro de los próximos 1-2 días laborables.',
descriptionCTA: 'Introduce el importe de cada transacción en los campos siguientes. Ejemplo: 1.51.',
reviewingInfo: '¡Gracias! Estamos revisando tu información y nos comunicaremos contigo en breve. Consulta el chat con Concierge ',
forNextSteps: ' para conocer los próximos pasos para terminar de configurar tu cuenta bancaria.',
letsChatCTA: 'Sí, vamos a chatear',
- letsChatText: 'Gracias. Necesitamos tu ayuda para verificar la información, pero podemos resolverlo rápidamente a través del chat. ¿Estás Listo?',
+ letsChatText: '¡Ya casi estamos! Necesitamos tu ayuda para verificar unos últimos datos a través del chat. ¿Estás listo?',
letsChatTitle: '¡Vamos a chatear!',
enable2FATitle: '¡Evita fraudes, activa la autenticación de dos factores!',
- enable2FAText:
- 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores. Eso nos permitirá disputar las transacciones de la Tarjeta Expensify y reducirá tu riesgo de fraude.',
+ enable2FAText: 'Tu seguridad es importante para nosotros. Por favor, configura ahora la autenticación de dos factores para añadir una capa adicional de protección a tu cuenta.',
secureYourAccount: 'Asegura tu cuenta',
},
reimbursementAccountLoadingAnimation: {
@@ -1970,6 +2000,7 @@ export default {
workspace: {
common: {
card: 'Tarjetas',
+ expensifyCard: 'Tarjeta Expensify',
workflows: 'Flujos de trabajo',
workspace: 'Espacio de trabajo',
edit: 'Editar espacio de trabajo',
@@ -1999,8 +2030,8 @@ export default {
settlementFrequency: 'Frecuencia de liquidación',
deleteConfirmation: '¿Estás seguro de que quieres eliminar este espacio de trabajo?',
unavailable: 'Espacio de trabajo no disponible',
- memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro al espacio de trabajo, por favor, utiliza el botón Invitar que está arriba.',
- notAuthorized: `No tienes acceso a esta página. ¿Estás tratando de unirte al espacio de trabajo? Comunícate con el propietario de este espacio de trabajo para que pueda añadirte como miembro. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`,
+ memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro al espacio de trabajo, por favor, utiliza el botón invitar que está arriba.',
+ notAuthorized: `No tienes acceso a esta página. Si estás intentando unirte a este espacio de trabajo, pide al dueño del espacio de trabajo que te añada como miembro. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`,
goToRoom: ({roomName}: GoToRoomParams) => `Ir a la sala ${roomName}`,
workspaceName: 'Nombre del espacio de trabajo',
workspaceOwner: 'Dueño',
@@ -2029,13 +2060,10 @@ export default {
taxesJournalEntrySwitchNote: 'QuickBooks Online no permite impuestos en los asientos contables. Por favor, cambia la opción de exportación a factura de proveedor o cheque.',
locationsAdditionalDescription:
'QuickBooks Online no permite lugares en facturas de proveedores o cheques. Como tienes activadas los lugares en tu espacio de trabajo, estas opciones de exportación no están disponibles.',
- export: 'Exportar',
- exportAs: 'Exportar cómo',
exportExpenses: 'Exportar gastos de bolsillo como',
exportInvoices: 'Exportar facturas a',
exportCompany: 'Exportar tarjetas de empresa como',
exportDescription: 'Configura cómo se exportan los datos de Expensify a QuickBooks Online.',
- preferredExporter: 'Exportador preferido',
date: 'Fecha de exportación',
deepDiveExpensifyCard: 'Las transacciones de la Tarjeta Expensify se exportan automáticamente a una "Cuenta de Responsabilidad de la Tarjeta Expensify" creada con',
deepDiveExpensifyCardIntegration: 'nuestra integración.',
@@ -2060,23 +2088,19 @@ export default {
},
receivable: 'Cuentas por cobrar', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
archive: 'Archivo de cuentas por cobrar', // This is an account name that will come directly from QBO, so I don't know why we need a translation for it. It should take whatever the name of the account is in QBO. Leaving this note for CS.
- exportInvoicesDescription: 'Las facturas se exportarán a esta cuenta en QuickBooks Online.',
+ exportInvoicesDescription: 'Usa esta cuenta al exportar facturas a QuickBooks Online.',
exportCompanyCardsDescription: 'Establece cómo se exportan las compras con tarjeta de empresa a QuickBooks Online.',
account: 'Cuenta',
- accountDescription: 'Elige dónde contabilizar las compensaciones de entradas a los asientos contables.',
+ accountDescription: 'Elige dónde contabilizar los asientos contables.',
vendor: 'Proveedor',
- defaultVendor: 'Proveedor predeterminado',
defaultVendorDescription: 'Establece un proveedor predeterminado que se aplicará a todas las transacciones con tarjeta de crédito al momento de exportarlas.',
accountsPayable: 'Cuentas por pagar',
accountsPayableDescription: 'Elige dónde crear las facturas de proveedores.',
bankAccount: 'Cuenta bancaria',
bankAccountDescription: 'Elige desde dónde enviar los cheques.',
- optionBelow: 'Elija una opción a continuación:',
+ creditCardAccount: 'Cuenta de la tarjeta de crédito',
companyCardsLocationEnabledDescription:
'QuickBooks Online no permite lugares en las exportaciones de facturas de proveedores. Como tienes activadas los lugares en tu espacio de trabajo, esta opción de exportación no está disponible.',
- exportPreferredExporterNote:
- 'Puede ser cualquier administrador del espacio de trabajo, pero debe ser un administrador de dominio si configura diferentes cuentas de exportación para tarjetas de empresa individuales en la configuración del dominio.',
- exportPreferredExporterSubNote: 'Una vez configurado, el exportador preferido verá los informes para exportar en tu cuenta.',
exportOutOfPocketExpensesDescription: 'Establezca cómo se exportan los gastos de bolsillo a QuickBooks Online.',
exportCheckDescription: 'Crearemos un cheque desglosado para cada informe de Expensify y lo enviaremos desde la cuenta bancaria a continuación.',
exportJournalEntryDescription: 'Crearemos una entrada contable desglosada para cada informe de Expensify y lo contabilizaremos en la cuenta a continuación.',
@@ -2093,7 +2117,7 @@ export default {
advancedConfig: {
advanced: 'Avanzado',
autoSync: 'Autosincronización',
- autoSyncDescription: 'Sincroniza QuickBooks Online y Expensify automáticamente, todos los días.',
+ autoSyncDescription: 'Expensify se sincronizará automáticamente con QuickBooks Online todos los días.',
inviteEmployees: 'Invitar empleados',
inviteEmployeesDescription: 'Importe los registros de los empleados de Quickbooks Online e invítelos a este espacio de trabajo.',
createEntities: 'Crear entidades automáticamente',
@@ -2103,8 +2127,8 @@ export default {
'Cada vez que se pague un informe utilizando Expensify ACH, se creará el correspondiente pago de la factura en la cuenta de Quickbooks Online indicadas a continuación.',
qboBillPaymentAccount: 'Cuenta de pago de las facturas de QuickBooks',
qboInvoiceCollectionAccount: 'Cuenta de cobro de las facturas QuickBooks',
- accountSelectDescription: 'Elige una cuenta bancaria para los reembolsos y crearemos el pago en QuickBooks Online.',
- invoiceAccountSelectorDescription: 'Una vez que una factura se marca como pagada en Expensify y se exporta a QuickBooks Online, aparecerá contra la cuenta a continuación.',
+ accountSelectDescription: 'Elige desde dónde pagar las facturas y crearemos el pago en QuickBooks Online.',
+ invoiceAccountSelectorDescription: 'Elige dónde recibir los pagos de facturas y crearemos el pago en QuickBooks Online.',
},
accounts: {
[CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD]: 'Tarjeta de débito',
@@ -2120,10 +2144,8 @@ export default {
[`${CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL}Description`]:
'Crearemos una factura de proveedor desglosada para cada informe de Expensify con la fecha del último gasto, y la añadiremos a la cuenta a continuación. Si este periodo está cerrado, lo contabilizaremos en el día 1 del siguiente periodo abierto.',
- [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD}AccountDescription`]:
- 'Las transacciones con tarjeta de débito se exportarán a la cuenta bancaria que aparece a continuación.',
- [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD}AccountDescription`]:
- 'Las transacciones con tarjeta de crédito se exportarán a la cuenta bancaria que aparece a continuación.',
+ [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD}AccountDescription`]: 'Elige dónde exportar las transacciones con tarjeta de débito.',
+ [`${CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD}AccountDescription`]: 'Elige dónde exportar las transacciones con tarjeta de crédito.',
[`${CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL}AccountDescription`]: 'Selecciona el proveedor que se aplicará a todas las transacciones con tarjeta de crédito.',
[`${CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.VENDOR_BILL}Error`]:
@@ -2156,7 +2178,6 @@ export default {
default: 'Contacto de Xero por defecto',
tag: 'Etiquetas',
},
- export: 'Exportar',
exportDescription: 'Configura cómo se exportan los datos de Expensify a Xero.',
exportCompanyCard: 'Exportar gastos de la tarjeta de empresa como',
purchaseBill: 'Factura de compra',
@@ -2165,7 +2186,6 @@ export default {
bankTransactions: 'Transacciones bancarias',
xeroBankAccount: 'Cuenta bancaria de Xero',
xeroBankAccountDescription: 'Elige dónde se contabilizarán los gastos como transacciones bancarias.',
- preferredExporter: 'Exportador preferido',
exportExpenses: 'Exportar gastos por cuenta propia como',
exportExpensesDescription: 'Los informes se exportarán como una factura de compra utilizando la fecha y el estado que seleccione a continuación',
purchaseBillDate: 'Fecha de la factura de compra',
@@ -2175,60 +2195,184 @@ export default {
advancedConfig: {
advanced: 'Avanzado',
autoSync: 'Autosincronización',
- autoSyncDescription: 'Sincroniza Xero y Expensify automáticamente, todos los días.',
+ autoSyncDescription: 'Expensify se sincronizará automáticamente con Xero todos los días.',
purchaseBillStatusTitle: 'Estado de la factura de compra',
reimbursedReports: 'Sincronizar informes reembolsados',
reimbursedReportsDescription:
'Cada vez que se pague un informe utilizando Expensify ACH, se creará el correspondiente pago de la factura en la cuenta de Xero indicadas a continuación.',
xeroBillPaymentAccount: 'Cuenta de pago de las facturas de Xero',
xeroInvoiceCollectionAccount: 'Cuenta de cobro de las facturas Xero',
- invoiceAccountSelectorDescription: 'Una vez que una factura se marca como pagada en Expensify y se exporta a Xero, aparecerá contra la cuenta a continuación.',
- xeroBillPaymentAccountDescription: 'Elige una cuenta bancaria para los reembolsos y crearemos el pago en Xero.',
+ xeroBillPaymentAccountDescription: 'Elige desde dónde pagar las facturas y crearemos el pago en Xero.',
+ invoiceAccountSelectorDescription: 'Elige dónde recibir los pagos de facturas y crearemos el pago en Xero.',
},
exportDate: {
- label: 'Fecha de exportación',
- description: 'Usa esta fecha al exportar informe a Xero.',
+ label: 'Fecha de la factura de compra',
+ description: 'Usa esta fecha al exportar el informe a Xero.',
values: {
[CONST.XERO_EXPORT_DATE.LAST_EXPENSE]: {
label: 'Fecha del último gasto',
- description: 'Fecha del gasto mas reciente en el informe',
+ description: 'Fecha del gasto mas reciente en el informe.',
},
[CONST.XERO_EXPORT_DATE.REPORT_EXPORTED]: {
label: 'Fecha de exportación',
- description: 'Fecha de exportación del informe a Xero',
+ description: 'Fecha de exportación del informe a Xero.',
},
[CONST.XERO_EXPORT_DATE.REPORT_SUBMITTED]: {
label: 'Fecha de envío',
- description: 'Fecha en la que el informe se envió para su aprobación',
+ description: 'Fecha en la que el informe se envió para su aprobación.',
},
},
},
invoiceStatus: {
label: 'Estado de la factura de compra',
- description: 'Elige un estado para las facturas de compra exportadas a Xero.',
+ description: 'Usa este estado al exportar facturas de compra a Xero.',
values: {
[CONST.XERO_CONFIG.INVOICE_STATUS.DRAFT]: 'Borrador',
[CONST.XERO_CONFIG.INVOICE_STATUS.AWAITING_APPROVAL]: 'Pendiente de aprobación',
[CONST.XERO_CONFIG.INVOICE_STATUS.AWAITING_PAYMENT]: 'Pendiente de pago',
},
},
- exportPreferredExporterNote:
- 'Puede ser cualquier administrador del espacio de trabajo, pero debe ser un administrador de dominio si configura diferentes cuentas de exportación para tarjetas de empresa individuales en la configuración del dominio.',
- exportPreferredExporterSubNote: 'Una vez configurado, el exportador preferido verá los informes para exportar en su cuenta.',
noAccountsFound: 'No se ha encontrado ninguna cuenta',
noAccountsFoundDescription: 'Añade la cuenta en Xero y sincroniza de nuevo la conexión.',
},
netsuite: {
subsidiary: 'Subsidiaria',
subsidiarySelectDescription: 'Elige la subsidiaria de NetSuite de la que deseas importar datos.',
+ exportDescription: 'Configura cómo se exportan los datos de Expensify a NetSuite.',
+ exportReimbursable: 'Exportar gastos reembolsables como',
+ exportNonReimbursable: 'Exportar gastos no reembolsables como',
+ exportInvoices: 'Exportar facturas a',
+ journalEntriesTaxPostingAccount: 'Cuenta de registro de impuestos de asientos contables',
+ journalEntriesProvTaxPostingAccount: 'Cuenta de registro de impuestos provinciales de asientos contables',
+ foreignCurrencyAmount: 'Exportar importe en moneda extranjera',
+ exportToNextOpenPeriod: 'Exportar al siguiente período abierto',
+ nonReimbursableJournalPostingAccount: 'Cuenta de registro de diario no reembolsable',
+ reimbursableJournalPostingAccount: 'Cuenta de registro de diario reembolsable',
+ journalPostingPreference: {
+ label: 'Preferencia de registro de asientos contables',
+ values: {
+ [CONST.NETSUITE_JOURNAL_POSTING_PREFERENCE.JOURNALS_POSTING_INDIVIDUAL_LINE]: 'Entrada única y detallada para cada informe',
+ [CONST.NETSUITE_JOURNAL_POSTING_PREFERENCE.JOURNALS_POSTING_TOTAL_LINE]: 'Entrada única para cada gasto individual',
+ },
+ },
+ invoiceItem: {
+ label: 'Artículo de la factura',
+ values: {
+ [CONST.NETSUITE_INVOICE_ITEM_PREFERENCE.CREATE]: {
+ label: 'Crear uno para mí',
+ description: "Crearemos un 'Artículo de línea de factura de Expensify' para ti al exportar (si aún no existe).",
+ },
+ [CONST.NETSUITE_INVOICE_ITEM_PREFERENCE.SELECT]: {
+ label: 'Seleccionar existente',
+ description: 'Asociaremos las facturas de Expensify al artículo seleccionado a continuación.',
+ },
+ },
+ },
+ exportDate: {
+ label: 'Fecha de exportación',
+ description: 'Usa esta fecha al exportar informe a NetSuite.',
+ values: {
+ [CONST.NETSUITE_EXPORT_DATE.LAST_EXPENSE]: {
+ label: 'Fecha del último gasto',
+ description: 'Fecha del gasto mas reciente en el informe.',
+ },
+ [CONST.NETSUITE_EXPORT_DATE.EXPORTED]: {
+ label: 'Fecha de exportación',
+ description: 'Fecha de exportación del informe a NetSuite.',
+ },
+ [CONST.NETSUITE_EXPORT_DATE.SUBMITTED]: {
+ label: 'Fecha de envío',
+ description: 'Fecha en la que el informe se envió para su aprobación.',
+ },
+ },
+ },
+ exportDestination: {
+ values: {
+ [CONST.NETSUITE_EXPORT_DESTINATION.EXPENSE_REPORT]: {
+ label: 'Informes de gastos',
+ reimbursableDescription: 'Los gastos reembolsables se exportarán como informes de gastos a NetSuite.',
+ nonReimbursableDescription: 'Los gastos no reembolsables se exportarán como informes de gastos a NetSuite.',
+ },
+ [CONST.NETSUITE_EXPORT_DESTINATION.VENDOR_BILL]: {
+ label: 'Facturas de proveedores',
+ reimbursableDescription:
+ 'Los gastos reembolsables se exportarán como facturas pagaderas al proveedor especificado en NetSuite.\n' +
+ '\n' +
+ 'Si deseas establecer un proveedor específico para cada tarjeta, ve a *Configuraciones > Dominios > Tarjetas de Empresa*.',
+ nonReimbursableDescription:
+ 'Los gastos no reembolsables se exportarán como facturas pagaderas al proveedor especificado en NetSuite.\n' +
+ '\n' +
+ 'Si deseas establecer un proveedor específico para cada tarjeta, ve a *Configuraciones > Dominios > Tarjetas de Empresa*.',
+ },
+ [CONST.NETSUITE_EXPORT_DESTINATION.JOURNAL_ENTRY]: {
+ label: 'Asientos contables',
+ reimbursableDescription:
+ 'Los gastos reembolsables se exportarán como asientos contables a la cuenta especificada en NetSuite.\n' +
+ '\n' +
+ 'Si deseas establecer un proveedor específico para cada tarjeta, ve a *Configuraciones > Dominios > Tarjetas de Empresa*.',
+ nonReimbursableDescription:
+ 'Los gastos no reembolsables se exportarán como asientos contables a la cuenta especificada en NetSuite.\n' +
+ '\n' +
+ 'Si deseas establecer un proveedor específico para cada tarjeta, ve a *Configuraciones > Dominios > Tarjetas de Empresa*.',
+ },
+ },
+ },
+ noAccountsFound: 'No se han encontrado cuentas',
+ noAccountsFoundDescription: 'Añade la cuenta en NetSuite y sincroniza la conexión de nuevo.',
+ noVendorsFound: 'No se han encontrado proveedores',
+ noVendorsFoundDescription: 'Añade proveedores en NetSuite y sincroniza la conexión de nuevo.',
+ noItemsFound: 'No se han encontrado artículos de factura',
+ noItemsFoundDescription: 'Añade artículos de factura en NetSuite y sincroniza la conexión de nuevo.',
noSubsidiariesFound: 'No se ha encontrado subsidiarias',
noSubsidiariesFoundDescription: 'Añade la subsidiaria en NetSuite y sincroniza de nuevo la conexión.',
+ import: {
+ expenseCategories: 'Categorías de gastos',
+ expenseCategoriesDescription: 'Las categorías de gastos de NetSuite se importan a Expensify como categorías.',
+ importFields: {
+ departments: 'Departamentos',
+ classes: 'Clases',
+ locations: 'Ubicaciones',
+ customers: 'Clientes',
+ jobs: 'Proyectos (trabajos)',
+ },
+ importTaxDescription: 'Importar grupos de impuestos desde NetSuite',
+ importCustomFields: {
+ customSegments: 'Segmentos/registros personalizado',
+ customLists: 'Listas personalizado',
+ },
+ },
+ },
+ intacct: {
+ sageIntacctSetup: 'Sage Intacct configuración',
+ prerequisitesTitle: 'Antes de conectar...',
+ downloadExpensifyPackage: 'Descargar el paquete Expensify para Sage Intacct',
+ followSteps: 'Siga los pasos de nuestras instrucciones Cómo: Instrucciones para conectarse a Sage Intacct',
+ enterCredentials: 'Introduzca sus credenciales de Sage Intacct',
+ createNewConnection: 'Crear una nueva conexión',
+ reuseExistingConnection: 'Reutilizar la conexión existente',
+ existingConnections: 'Conexiones existentes',
+ sageIntacctLastSync: (formattedDate: string) => `Sage Intacct - Última sincronización ${formattedDate}`,
},
type: {
free: 'Gratis',
control: 'Control',
collect: 'Recolectar',
},
+ expensifyCard: {
+ issueCard: 'Emitir tarjeta',
+ name: 'Nombre',
+ lastFour: '4 últimos',
+ limit: 'Limite',
+ currentBalance: 'Saldo actual',
+ currentBalanceDescription:
+ 'El saldo actual es la suma de todas las transacciones contabilizadas con la Tarjeta Expensify que se han producido desde la última fecha de liquidación.',
+ remainingLimit: 'Límite restante',
+ requestLimitIncrease: 'Solicitar aumento de límite',
+ remainingLimitDescription:
+ 'A la hora de calcular tu límite restante, tenemos en cuenta una serie de factores: su antigüedad como cliente, la información relacionada con tu negocio que nos facilitaste al darte de alta y el efectivo disponible en tu cuenta bancaria comercial. Tu límite restante puede fluctuar a diario.',
+ cashBack: 'Reembolso',
+ cashBackDescription: 'El saldo de devolución se basa en el gasto mensual realizado con la tarjeta Expensify en tu espacio de trabajo.',
+ },
categories: {
deleteCategories: 'Eliminar categorías',
deleteCategoriesPrompt: '¿Estás seguro de que quieres eliminar estas categorías?',
@@ -2270,6 +2414,13 @@ export default {
title: 'Integrar',
subtitle: 'Conecta Expensify a otros productos financieros populares.',
},
+ expensifyCard: {
+ title: 'Tarjeta Expensify',
+ subtitle: 'Obtén información y control sobre tus gastos',
+ disableCardTitle: 'Deshabilitar la Tarjeta Expensify',
+ disableCardPrompt: 'No puedes deshabilitar la Tarjeta Expensify porque ya está en uso. Por favor, contacta con Concierge para conocer los pasos a seguir.',
+ disableCardButton: 'Chatear con Concierge',
+ },
distanceRates: {
title: 'Tasas de distancia',
subtitle: 'Añade, actualiza y haz cumplir las tasas.',
@@ -2339,7 +2490,7 @@ export default {
deleteFailureMessage: 'Se ha producido un error al intentar eliminar la etiqueta. Por favor, inténtalo más tarde.',
tagRequiredError: 'Lo nombre de la etiqueta es obligatorio.',
existingTagError: 'Ya existe una etiqueta con este nombre.',
- genericFailureMessage: 'Se produjo un error al actualizar la etiqueta, inténtelo nuevamente.',
+ genericFailureMessage: 'Se produjo un error al actualizar la etiqueta. Por favor, inténtelo nuevamente.',
importedFromAccountingSoftware: 'Etiquetas importadas desde',
},
taxes: {
@@ -2394,8 +2545,10 @@ export default {
getTheExpensifyCardAndMore: 'Consigue la Tarjeta Expensify y más',
},
people: {
- genericFailureMessage: 'Se ha producido un error al intentar eliminar a un usuario del espacio de trabajo. Por favor, inténtalo más tarde.',
+ genericFailureMessage: 'Se ha producido un error al intentar eliminar a un miembro del espacio de trabajo. Por favor, inténtalo más tarde.',
removeMembersPrompt: '¿Estás seguro de que deseas eliminar a estos miembros?',
+ removeMembersWarningPrompt: ({memberName, ownerName}: RemoveMembersWarningPrompt) =>
+ `${memberName} es un aprobador en este espacio de trabajo. Cuando lo elimine de este espacio de trabajo, los sustituiremos en el flujo de trabajo de aprobación por el propietario del espacio de trabajo, ${ownerName}`,
removeMembersTitle: 'Eliminar miembros',
removeMemberButtonTitle: 'Quitar del espacio de trabajo',
removeMemberGroupButtonTitle: 'Quitar del grupo',
@@ -2410,7 +2563,7 @@ export default {
cannotRemove: 'No puedes eliminarte ni a ti mismo ni al dueño del espacio de trabajo.',
genericRemove: 'Ha ocurrido un problema al eliminar al miembro del espacio de trabajo.',
},
- addedWithPrimary: 'Se agregaron algunos usuarios con sus nombres de usuario principales.',
+ addedWithPrimary: 'Se agregaron algunos miembros con sus nombres de usuario principales.',
invitedBySecondaryLogin: ({secondaryLogin}) => `Agregado por nombre de usuario secundario ${secondaryLogin}.`,
membersListTitle: 'Directorio de todos los miembros del espacio de trabajo.',
},
@@ -2421,31 +2574,28 @@ export default {
qbo: 'Quickbooks Online',
xero: 'Xero',
netsuite: 'NetSuite',
+ intacct: 'Sage Intacct',
setup: 'Configurar',
- lastSync: 'Recién sincronizado',
+ lastSync: (relativeDate: string) => `Recién sincronizado ${relativeDate}`,
import: 'Importar',
export: 'Exportar',
advanced: 'Avanzado',
other: 'Otras integraciones',
syncNow: 'Sincronizar ahora',
disconnect: 'Desconectar',
- disconnectTitle: (currentIntegration?: ConnectionName): string => {
- switch (currentIntegration) {
- case CONST.POLICY.CONNECTIONS.NAME.QBO:
- return 'Desconectar QuickBooks Online';
- case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return 'Desconectar Xero';
- default: {
- return 'Desconectar integración';
- }
- }
+ disconnectTitle: (integration?: ConnectionName): string => {
+ const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integration] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integration] : 'integración';
+ return `Desconectar ${integrationName}`;
},
+ connectTitle: (integrationToConnect: ConnectionName): string => `Conectar ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integrationToConnect] ?? 'accounting integration'}`,
syncError: (integration?: ConnectionName): string => {
switch (integration) {
case CONST.POLICY.CONNECTIONS.NAME.QBO:
return 'No se puede conectar a QuickBooks Online.';
case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return 'No se puede conectar a Xero';
+ return 'No se puede conectar a Xero.';
+ case CONST.POLICY.CONNECTIONS.NAME.NETSUITE:
+ return 'No se puede conectar a NetSuite.';
default: {
return 'No se ha podido conectar a la integración.';
}
@@ -2455,34 +2605,25 @@ export default {
taxes: 'Impuestos',
imported: 'Importado',
notImported: 'No importado',
- importAsCategory: 'Importado, mostrado as categoría',
+ importAsCategory: 'Importado como categorías',
importTypes: {
[CONST.INTEGRATION_ENTITY_MAP_TYPES.IMPORTED]: 'Importado',
- [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Importado, mostrado como etiqueta',
+ [CONST.INTEGRATION_ENTITY_MAP_TYPES.TAG]: 'Importado como etiquetas',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.DEFAULT]: 'Importado',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.NOT_IMPORTED]: 'No importado',
[CONST.INTEGRATION_ENTITY_MAP_TYPES.NONE]: 'No importado',
- [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado, mostrado como campo de informe',
+ [CONST.INTEGRATION_ENTITY_MAP_TYPES.REPORT_FIELD]: 'Importado como campos de informe',
+ [CONST.INTEGRATION_ENTITY_MAP_TYPES.NETSUITE_DEFAULT]: 'NetSuite employee default',
},
- disconnectPrompt: (integrationToConnect?: ConnectionName, currentIntegration?: ConnectionName): string => {
- switch (integrationToConnect) {
- case CONST.POLICY.CONNECTIONS.NAME.QBO:
- return '¿Estás seguro de que quieres desconectar Xero para configurar QuickBooks Online?';
- case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return '¿Estás seguro de que quieres desconectar QuickBooks Online para configurar Xero?';
- default: {
- switch (currentIntegration) {
- case CONST.POLICY.CONNECTIONS.NAME.QBO:
- return '¿Estás seguro de que quieres desconectar QuickBooks Online?';
- case CONST.POLICY.CONNECTIONS.NAME.XERO:
- return '¿Estás seguro de que quieres desconectar Xero?';
- default: {
- return '¿Estás seguro de que quieres desconectar integración?';
- }
- }
- }
- }
+ disconnectPrompt: (currentIntegration?: ConnectionName): string => {
+ const integrationName =
+ currentIntegration && CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration] ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration] : 'integración';
+ return `¿Estás seguro de que quieres desconectar ${integrationName}?`;
},
+ connectPrompt: (integrationToConnect: ConnectionName): string =>
+ `¿Estás seguro de que quieres conectar a ${
+ CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[integrationToConnect] ?? 'esta integración contable'
+ }? Esto eliminará cualquier conexión contable existente.`,
enterCredentials: 'Ingresa tus credenciales',
connections: {
syncStageName: (stage: PolicyConnectionSyncStage) => {
@@ -2490,6 +2631,8 @@ export default {
case 'quickbooksOnlineImportCustomers':
return 'Importando clientes';
case 'quickbooksOnlineImportEmployees':
+ case 'netSuiteSyncImportEmployees':
+ case 'intacctImportEmployees':
return 'Importando empleados';
case 'quickbooksOnlineImportAccounts':
return 'Importando cuentas';
@@ -2500,6 +2643,7 @@ export default {
case 'quickbooksOnlineImportProcessing':
return 'Procesando datos importados';
case 'quickbooksOnlineSyncBillPayments':
+ case 'intacctImportSyncBillPayments':
return 'Sincronizando reportes reembolsados y facturas pagadas';
case 'quickbooksOnlineSyncTaxCodes':
return 'Importando tipos de impuestos';
@@ -2514,6 +2658,8 @@ export default {
case 'quickbooksOnlineSyncTitle':
return 'Sincronizando datos desde QuickBooks Online';
case 'quickbooksOnlineSyncLoadData':
+ case 'xeroSyncStep':
+ case 'intacctImportData':
return 'Cargando datos';
case 'quickbooksOnlineSyncApplyCategories':
return 'Actualizando categorías';
@@ -2543,8 +2689,6 @@ export default {
return 'Comprobando la conexión a Xero';
case 'xeroSyncTitle':
return 'Sincronizando los datos de Xero';
- case 'xeroSyncStep':
- return 'Cargando datos';
case 'netSuiteSyncConnection':
return 'Iniciando conexión a NetSuite';
case 'netSuiteSyncCustomers':
@@ -2563,8 +2707,6 @@ export default {
return 'Sincronizando divisas';
case 'netSuiteSyncCategories':
return 'Sincronizando categorías';
- case 'netSuiteSyncImportEmployees':
- return 'Importando empleados';
case 'netSuiteSyncReportFields':
return 'Importando datos como campos de informe de Expensify';
case 'netSuiteSyncTags':
@@ -2575,26 +2717,66 @@ export default {
return 'Marcando informes de Expensify como reembolsados';
case 'netSuiteSyncExpensifyReimbursedReports':
return 'Marcando facturas y recibos de NetSuite como pagados';
+ case 'intacctCheckConnection':
+ return 'Comprobando la conexión a Sage Intacct';
+ case 'intacctImportDimensions':
+ return 'Importando dimensiones';
+ case 'intacctImportTitle':
+ return 'Importando datos desde Sage Intacct';
default: {
return `Translation missing for stage: ${stage}`;
}
}
},
},
+ preferredExporter: 'Exportador preferido',
+ exportPreferredExporterNote:
+ 'Puede ser cualquier administrador del espacio de trabajo, pero debe ser un administrador de dominio si configura diferentes cuentas de exportación para tarjetas de empresa individuales en la configuración del dominio.',
+ exportPreferredExporterSubNote: 'Una vez configurado, el exportador preferido verá los informes para exportar en tu cuenta.',
+ exportAs: 'Exportar cómo',
+ defaultVendor: 'Proveedor predeterminado',
},
card: {
header: 'Desbloquea Tarjetas Expensify gratis',
headerWithEcard: '¡Tus tarjetas están listas!',
- noVBACopy: 'Conecta una cuenta bancaria para emitir tarjetas Expensify a los miembros de tu espacio de trabajo y accede a estos increíbles beneficios y más:',
+ noVBACopy: 'Conecta una cuenta bancaria para emitir Tarjetas Expensify a los miembros de tu espacio de trabajo y acceder a estos increíbles beneficios y más:',
VBANoECardCopy:
- 'Añade tu correo electrónico de trabajo para emitir Tarjetas Expensify ilimitadas para los miembros de tu espacio de trabajo y acceder a todas estas increíbles ventajas:',
+ 'Añade tu correo electrónico de trabajo para emitir Tarjetas Expensify ilimitadas a los miembros de tu espacio de trabajo y acceder a todas estas increíbles ventajas:',
VBAWithECardCopy: 'Acceda a estos increíbles beneficios y más:',
benefit1: 'Devolución de dinero en cada compra en Estados Unidos',
- benefit2: 'Tarjetas digitales y físicas',
+ benefit2: 'Tarjetas virtuales y físicas ilimitadas',
benefit3: 'Sin responsabilidad personal',
benefit4: 'Límites personalizables',
addWorkEmail: 'Añadir correo electrónico de trabajo',
checkingDomain: '¡Un momento! Estamos todavía trabajando para habilitar tu Tarjeta Expensify. Vuelve aquí en unos minutos.',
+ issueCard: 'Emitir tarjeta',
+ issueNewCard: {
+ whoNeedsCard: '¿Quién necesita una tarjeta?',
+ findMember: 'Buscar miembro',
+ chooseCardType: 'Elegir un tipo de tarjeta',
+ physicalCard: 'Tarjeta física',
+ physicalCardDescription: 'Ideal para los consumidores habituales',
+ virtualCard: 'Tarjeta virtual',
+ virtualCardDescription: 'Instantáneo y flexible',
+ chooseLimitType: 'Elegir un tipo de límite',
+ smartLimit: 'Límite inteligente',
+ smartLimitDescription: 'Gasta hasta una determinada cantidad antes de requerir aprobación',
+ monthly: 'Mensual',
+ monthlyDescription: 'Gasta hasta una determinada cantidad al mes',
+ fixedAmount: 'Cantidad fija',
+ fixedAmountDescription: 'Gasta hasta una determinada cantidad una vez',
+ setLimit: 'Establecer un límite',
+ giveItName: 'Dale un nombre',
+ giveItNameInstruction: 'Hazlo lo suficientemente único como para distinguirlo de los demás. Los casos de uso específicos son aún mejores.',
+ cardName: 'Nombre de la tarjeta',
+ letsDoubleCheck: 'Vuelve a comprobar que todo parece correcto. ',
+ willBeReady: 'Esta tarjeta estará lista para su uso inmediato.',
+ cardholder: 'Titular de la tarjeta',
+ cardType: 'Tipo de tarjeta',
+ limit: 'Limite',
+ limitType: 'Tipo de limite',
+ name: 'Nombre',
+ },
},
reimburse: {
captureReceipts: 'Captura recibos',
@@ -2608,7 +2790,7 @@ export default {
trackDistanceChooseUnit: 'Elige una unidad predeterminada de medida.',
unlockNextDayReimbursements: 'Desbloquea reembolsos diarios',
captureNoVBACopyBeforeEmail: 'Pide a los miembros de tu espacio de trabajo que envíen recibos a ',
- captureNoVBACopyAfterEmail: ' y descarga la App de Expensify para controlar tus gastos en efectivo sobre la marcha.',
+ captureNoVBACopyAfterEmail: ' y descarga la app de Expensify para controlar tus gastos en efectivo sobre la marcha.',
unlockNoVBACopy: 'Conecta una cuenta bancaria para reembolsar online a los miembros de tu espacio de trabajo.',
fastReimbursementsVBACopy: '¡Todo listo para reembolsar recibos desde tu cuenta bancaria!',
updateCustomUnitError: 'Los cambios no han podido ser guardados. El espacio de trabajo ha sido modificado mientras estabas desconectado. Por favor, inténtalo de nuevo.',
@@ -2630,7 +2812,7 @@ export default {
invoiceFirstSectionCopy: 'Envía facturas detalladas y profesionales directamente a tus clientes desde la app de Expensify.',
viewAllInvoices: 'Ver facturas emitidas',
unlockOnlineInvoiceCollection: 'Desbloquea el cobro de facturas online',
- unlockNoVBACopy: 'Conecta tu cuenta bancaria para recibir pagos online de facturas - por transferencia o con tarjeta - directamente en tu cuenta.',
+ unlockNoVBACopy: 'Conecta tu cuenta bancaria para recibir pagos de facturas online por transferencia o con tarjeta.',
moneyBackInAFlash: '¡Tu dinero de vuelta en un momento!',
unlockVBACopy: '¡Todo listo para recibir pagos por transferencia o con tarjeta!',
viewUnpaidInvoices: 'Ver facturas emitidas pendientes',
@@ -2656,10 +2838,10 @@ export default {
member: 'Invitar miembros',
members: 'Invitar miembros',
invitePeople: 'Invitar nuevos miembros',
- genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..',
+ genericFailureMessage: 'Se produjo un error al invitar al miembro al espacio de trabajo. Vuelva a intentarlo..',
pleaseEnterValidLogin: `Asegúrese de que el correo electrónico o el número de teléfono sean válidos (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER}).`,
- user: 'usuario',
- users: 'usuarios',
+ user: 'miembro',
+ users: 'miembros',
invited: 'invitó',
removed: 'eliminó',
leftWorkspace: 'salió del espacio de trabajo',
@@ -2671,7 +2853,7 @@ export default {
inviteMessagePrompt: 'Añadir un mensaje para hacer tu invitación destacar',
personalMessagePrompt: 'Mensaje',
inviteNoMembersError: 'Por favor, selecciona al menos un miembro a invitar.',
- genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..',
+ genericFailureMessage: 'Se produjo un error al invitar al miembro al espacio de trabajo. Por favor, vuelva a intentarlo..',
},
distanceRates: {
oopsNotSoFast: 'Ups! No tan rápido...',
@@ -2708,14 +2890,13 @@ export default {
},
bankAccount: {
continueWithSetup: 'Continuar con la configuración',
- youreAlmostDone:
- 'Casi has acabado de configurar tu cuenta bancaria, que te permitirá emitir tarjetas corporativas, reembolsar gastos y cobrar pagar facturas, todo desde la misma cuenta bancaria.',
+ youreAlmostDone: 'Casi has acabado de configurar tu cuenta bancaria, que te permitirá emitir tarjetas corporativas, reembolsar gastos y cobrar pagar facturas.',
streamlinePayments: 'Optimiza pagos',
oneMoreThing: '¡Una cosa más!',
allSet: '¡Todo listo!',
accountDescriptionNoCards:
- 'Esta cuenta bancaria se utilizará para reembolsar gastos y cobrar y pagar facturas, todo desde la misma cuenta.\n\nPor favor, añade un correo electrónico de trabajo como tu nombre de usuario secundario para activar la Tarjeta Expensify.',
- accountDescriptionWithCards: 'Esta cuenta bancaria se utilizará para emitir tarjetas corporativas, reembolsar gastos y cobrar y pagar facturas, todo desde la misma cuenta.',
+ 'Esta cuenta bancaria se utilizará para reembolsar gastos y cobrar y pagar facturas.\n\nPor favor, añade un correo electrónico de trabajo como tu nombre de usuario secundario para activar la Tarjeta Expensify.',
+ accountDescriptionWithCards: 'Esta cuenta bancaria se utilizará para emitir tarjetas corporativas, reembolsar gastos y cobrar y pagar facturas.',
addWorkEmail: 'Añadir correo electrónico de trabajo',
letsFinishInChat: '¡Continuemos en el chat!',
almostDone: '¡Casi listo!',
@@ -2757,7 +2938,7 @@ export default {
subscriptionTitle: 'Asumir la suscripción anual',
subscriptionButtonText: 'Transferir suscripción',
subscriptionText: ({usersCount, finalCount}) =>
- `Al hacerse cargo de este espacio de trabajo se fusionará tu suscripción anual asociada con tu suscripción actual. Esto aumentará el tamaño de tu suscripción en ${usersCount} usuarios, lo que hará que tu nuevo tamaño de suscripción sea ${finalCount}. ¿Te gustaria continuar?`,
+ `Al hacerse cargo de este espacio de trabajo se fusionará tu suscripción anual asociada con tu suscripción actual. Esto aumentará el tamaño de tu suscripción en ${usersCount} miembros, lo que hará que tu nuevo tamaño de suscripción sea ${finalCount}. ¿Te gustaria continuar?`,
duplicateSubscriptionTitle: 'Alerta de suscripción duplicada',
duplicateSubscriptionButtonText: 'Continuar',
duplicateSubscriptionText: ({email, workspaceName}) =>
@@ -2834,7 +3015,7 @@ export default {
roomRenamedTo: ({newName}: RoomRenamedToParams) => `Sala renombrada a ${newName}`,
social: 'social',
selectAWorkspace: 'Seleccionar un espacio de trabajo',
- growlMessageOnRenameError: 'No se ha podido cambiar el nombre del espacio de trabajo, por favor, comprueba tu conexión e inténtalo de nuevo.',
+ growlMessageOnRenameError: 'No se ha podido cambiar el nombre del espacio de trabajo. Por favor, comprueba tu conexión e inténtalo de nuevo.',
visibilityOptions: {
restricted: 'Espacio de trabajo', // the translation for "restricted" visibility is actually workspace. This is so we can display restricted visibility rooms as "workspace" without having to change what's stored.
private: 'Privada',
@@ -2844,8 +3025,8 @@ export default {
},
},
roomMembersPage: {
- memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro a la sala de chat, por favor, utiliza el botón Invitar que está más arriba.',
- notAuthorized: `No tienes acceso a esta página. ¿Estás tratando de unirte a la sala de chat? Comunícate con el propietario de esta sala de chat para que pueda añadirte como miembro. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`,
+ memberNotFound: 'Miembro no encontrado. Para invitar a un nuevo miembro a la sala de chat, por favor, utiliza el botón invitar que está más arriba.',
+ notAuthorized: `No tienes acceso a esta página. Si estás intentando unirte a esta sala, pide a un miembro de la sala que te añada. ¿Necesitas algo más? Comunícate con ${CONST.EMAIL.CONCIERGE}`,
removeMembersPrompt: '¿Estás seguro de que quieres eliminar a los miembros seleccionados de la sala de chat?',
error: {
genericAdd: 'Hubo un problema al añadir este miembro a la sala de chat.',
@@ -2865,7 +3046,7 @@ export default {
task: 'Tarea',
title: 'Título',
description: 'Descripción',
- assignee: 'Usuario asignado',
+ assignee: 'Miembro asignado',
completed: 'Completada',
messages: {
created: ({title}: TaskCreatedActionParams) => `tarea para ${title}`,
@@ -2876,8 +3057,8 @@ export default {
},
markAsComplete: 'Marcar como completada',
markAsIncomplete: 'Marcar como incompleta',
- assigneeError: 'Hubo un error al asignar esta tarea, inténtalo con otro usuario.',
- genericCreateTaskFailureMessage: 'Error inesperado al crear el tarea, por favor, inténtalo más tarde.',
+ assigneeError: 'Hubo un error al asignar esta tarea. Por favor, inténtalo con otro miembro.',
+ genericCreateTaskFailureMessage: 'Error inesperado al crear el tarea. Por favor, inténtalo más tarde.',
deleteTask: 'Eliminar tarea',
deleteConfirmation: '¿Estás seguro de que quieres eliminar esta tarea?',
},
@@ -2910,6 +3091,12 @@ export default {
},
},
groupedExpenses: 'gastos agrupados',
+ bulkActions: {
+ delete: 'Eliminar',
+ hold: 'Bloquear',
+ unhold: 'Desbloquear',
+ noOptionsAvailable: 'No hay opciones disponibles para el grupo de gastos seleccionado.',
+ },
},
genericErrorPage: {
title: '¡Oh-oh, algo salió mal!',
@@ -2933,7 +3120,7 @@ export default {
},
permissionError: {
title: 'Permiso para acceder al almacenamiento',
- message: 'Expensify no puede guardar los archivos adjuntos sin permiso para acceder al almacenamiento. Haz click en Configuración para actualizar los permisos.',
+ message: 'Expensify no puede guardar los archivos adjuntos sin permiso para acceder al almacenamiento. Haz click en configuración para actualizar los permisos.',
},
},
desktopApplicationMenu: {
@@ -3008,8 +3195,36 @@ export default {
genericCreateReportFailureMessage: 'Error inesperado al crear el chat. Por favor, inténtalo más tarde.',
genericAddCommentFailureMessage: 'Error inesperado al añadir el comentario. Por favor, inténtalo más tarde.',
genericUpdateReportFieldFailureMessage: 'Error inesperado al actualizar el campo. Por favor, inténtalo más tarde.',
- genericUpdateReporNameEditFailureMessage: 'Error inesperado al cambiar el nombre del informe. Vuelva a intentarlo más tarde.',
+ genericUpdateReporNameEditFailureMessage: 'Error inesperado al cambiar el nombre del informe. Por favor, intentarlo más tarde.',
noActivityYet: 'Sin actividad todavía',
+ actions: {
+ type: {
+ changeField: ({oldValue, newValue, fieldName}: ChangeFieldParams) => `cambió ${fieldName} de ${oldValue} a ${newValue}`,
+ changeFieldEmpty: ({newValue, fieldName}: ChangeFieldParams) => `cambió ${fieldName} a ${newValue}`,
+ changePolicy: ({fromPolicy, toPolicy}: ChangePolicyParams) => `cambió policy de ${fromPolicy} a ${toPolicy}`,
+ changeType: ({oldType, newType}: ChangeTypeParams) => `cambió type de ${oldType} a ${newType}`,
+ delegateSubmit: ({delegateUser, originalManager}: DelegateSubmitParams) => `envié este informe a ${delegateUser} ya que ${originalManager} está de vacaciones`,
+ exportedToCSV: `exportó este informe a CSV`,
+ exportedToIntegration: ({label}: ExportedToIntegrationParams) => `exportó este informe a ${label}`,
+ forwarded: ({amount, currency}: ForwardedParams) => `aprobado ${currency}${amount}`,
+ integrationsMessage: (errorMessage: string, label: string) => `no se pudo exportar este informe a ${label} ("${errorMessage}").`,
+ managerAttachReceipt: `agregó un recibo`,
+ managerDetachReceipt: `quitó el recibo`,
+ markedReimbursed: ({amount, currency}: MarkedReimbursedParams) => `pagó ${currency}${amount} en otro lugar`,
+ markedReimbursedFromIntegration: ({amount, currency}: MarkReimbursedFromIntegrationParams) => `pagó ${currency}${amount} mediante integración`,
+ outdatedBankAccount: `no se pudo procesar el pago debido a un problema con la cuenta bancaria del pagador`,
+ reimbursementACHBounce: `no se pudo procesar el pago porque el pagador no tiene fondos suficientes`,
+ reimbursementACHCancelled: `canceled the payment`,
+ reimbursementAccountChanged: `no se pudo procesar el pago porque el pagador cambió de cuenta bancaria`,
+ reimbursementDelayed: `procesó el pago pero se retrasó entre 1 y 2 días hábiles más`,
+ selectedForRandomAudit: `[seleccionado al azar](https://help.expensify.com/articles/expensify-classic/reports/Set-a-random-report-audit-schedule) para revisión`,
+ share: ({to}: ShareParams) => `usuario invitado ${to}`,
+ unshare: ({to}: UnshareParams) => `usuario eliminado ${to}`,
+ stripePaid: ({amount, currency}: StripePaidParams) => `pagado ${currency}${amount}`,
+ takeControl: `tomó el control`,
+ unapproved: ({amount, currency}: UnapprovedParams) => `no aprobado ${currency}${amount}`,
+ },
+ },
},
chronos: {
oooEventSummaryFullDay: ({summary, dayCount, date}: OOOEventSummaryFullDayParams) => `${summary} por ${dayCount} ${dayCount === 1 ? 'día' : 'días'} hasta el ${date}`,
@@ -3629,8 +3844,8 @@ export default {
reasonTitle: '¿Por qué necesitas una tarjeta nueva?',
cardDamaged: 'Mi tarjeta está dañada',
cardLostOrStolen: 'He perdido o me han robado la tarjeta',
- confirmAddressTitle: 'Confirma que la dirección que aparece a continuación es a la que deseas que te enviemos tu nueva tarjeta.',
- cardDamagedInfo: 'La nueva tarjeta te llegará en 2-3 días laborables y la tarjeta actual seguirá funcionando hasta que actives la nueva.',
+ confirmAddressTitle: 'Por favor, confirma la dirección postal de tu nueva tarjeta.',
+ cardDamagedInfo: 'La nueva tarjeta te llegará en 2-3 días laborables. La tarjeta actual seguirá funcionando hasta que actives la nueva.',
cardLostOrStolenInfo: 'La tarjeta actual se desactivará permanentemente en cuanto realices el pedido. La mayoría de las tarjetas llegan en pocos días laborables.',
address: 'Dirección',
deactivateCardButton: 'Desactivar tarjeta',
@@ -3710,8 +3925,19 @@ export default {
overLimitAttendee: ({formattedLimit}: ViolationsOverLimitParams) => `Importe supera el límite${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`,
perDayLimit: ({formattedLimit}: ViolationsPerDayLimitParams) => `Importe supera el límite diario de la categoría${formattedLimit ? ` de ${formattedLimit}/persona` : ''}`,
receiptNotSmartScanned: 'Recibo no verificado. Por favor, confirma tu exactitud',
- receiptRequired: (params: ViolationsReceiptRequiredParams) =>
- `Recibo obligatorio${params ? ` para importes sobre${params.formattedLimit ? ` ${params.formattedLimit}` : ''}${params.category ? ' el límite de la categoría' : ''}` : ''}`,
+ receiptRequired: ({formattedLimit, category}: ViolationsReceiptRequiredParams) => {
+ let message = 'Recibo obligatorio';
+ if (formattedLimit ?? category) {
+ message += ' para importes sobre';
+ if (formattedLimit) {
+ message += ` ${formattedLimit}`;
+ }
+ if (category) {
+ message += ' el límite de la categoría';
+ }
+ }
+ return message;
+ },
reviewRequired: 'Revisión requerida',
rter: ({brokenBankConnection, isAdmin, email, isTransactionOlderThan7Days, member}: ViolationsRterParams) => {
if (brokenBankConnection) {
@@ -3786,11 +4012,69 @@ export default {
},
subscription: {
mobileReducedFunctionalityMessage: 'No puedes hacer cambios en tu suscripción en la aplicación móvil.',
+ badge: {
+ freeTrial: ({numOfDays}) => `Prueba gratuita: ${numOfDays === 1 ? `queda 1 día` : `quedan ${numOfDays} días`}`,
+ },
billingBanner: {
+ policyOwnerAmountOwed: {
+ title: 'Tu información de pago está desactualizada',
+ subtitle: ({date}) => `Actualiza tu tarjeta de pago antes del ${date} para continuar utilizando todas tus herramientas favoritas`,
+ },
+ policyOwnerAmountOwedOverdue: {
+ title: 'Tu información de pago está desactualizada',
+ subtitle: 'Por favor, actualiza tu información de pago.',
+ },
+ policyOwnerUnderInvoicing: {
+ title: 'Tu información de pago está desactualizada',
+ subtitle: ({date}) => `Tu pago está vencido. Por favor, paga tu factura antes del ${date} para evitar la interrupción del servicio.`,
+ },
+ policyOwnerUnderInvoicingOverdue: {
+ title: 'Tu información de pago está desactualizada',
+ subtitle: 'Tu pago está vencido. Por favor, paga tu factura.',
+ },
+ billingDisputePending: {
+ title: 'No se ha podido realizar el cobro a tu tarjeta',
+ subtitle: ({amountOwed, cardEnding}) =>
+ `Has impugnado el cargo ${amountOwed} en la tarjeta terminada en ${cardEnding}. Tu cuenta estará bloqueada hasta que se resuelva la disputa con tu banco.`,
+ },
+ cardAuthenticationRequired: {
+ title: 'No se ha podido realizar el cobro a tu tarjeta',
+ subtitle: ({cardEnding}) =>
+ `Tu tarjeta de pago no ha sido autenticada completamente. Por favor, completa el proceso de autenticación para activar tu tarjeta de pago que termina en ${cardEnding}.`,
+ },
+ insufficientFunds: {
+ title: 'No se ha podido realizar el cobro a tu tarjeta',
+ subtitle: ({amountOwed}) =>
+ `Tu tarjeta de pago fue rechazada por falta de fondos. Vuelve a intentarlo o añade una nueva tarjeta de pago para liquidar tu saldo pendiente de ${amountOwed}.`,
+ },
+ cardExpired: {
+ title: 'No se ha podido realizar el cobro a tu tarjeta',
+ subtitle: ({amountOwed}) => `Tu tarjeta de pago ha expirado. Por favor, añade una nueva tarjeta de pago para liquidar tu saldo pendiente de ${amountOwed}.`,
+ },
+ cardExpireSoon: {
+ title: 'Tu tarjeta caducará pronto',
+ subtitle:
+ 'Tu tarjeta de pago caducará a finales de este mes. Haz clic en el menú de tres puntos que aparece a continuación para actualizarla y continuar utilizando todas tus herramientas favoritas.',
+ },
+ retryBillingSuccess: {
+ title: 'Éxito!',
+ subtitle: 'Tu tarjeta fue facturada correctamente.',
+ },
+ retryBillingError: {
+ title: 'No se ha podido realizar el cobro a tu tarjeta',
+ subtitle:
+ 'Antes de volver a intentarlo, llama directamente a tu banco para que autorice los cargos de Expensify y elimine las retenciones. De lo contrario, añade una tarjeta de pago diferente.',
+ },
+ cardOnDispute: ({amountOwed, cardEnding}) =>
+ `Has impugnado el cargo ${amountOwed} en la tarjeta terminada en ${cardEnding}. Tu cuenta estará bloqueada hasta que se resuelva la disputa con tu banco.`,
preTrial: {
title: 'Iniciar una prueba gratuita',
subtitle: 'Para empezar, ',
- subtitleLink: 'completa la lista de configuración aquí',
+ subtitleLink: 'completa la lista de configuración aquí.',
+ },
+ trialStarted: {
+ title: ({numOfDays}) => `Prueba gratuita: ¡${numOfDays === 1 ? `queda 1 día` : `quedan ${numOfDays} días`}!`,
+ subtitle: 'Añade una tarjeta de pago para seguir utilizando tus funciones favoritas.',
},
},
cardSection: {
@@ -3804,6 +4088,13 @@ export default {
changeCurrency: 'Cambiar moneda de pago',
cardNotFound: 'No se ha añadido ninguna tarjeta de pago',
retryPaymentButton: 'Reintentar el pago',
+ requestRefund: 'Solicitar reembolso',
+ requestRefundModal: {
+ phrase1: 'Obtener un reembolso es fácil, simplemente baja tu cuenta de categoría antes de la próxima fecha de facturación y recibirás un reembolso.',
+ phrase2:
+ 'Atención: Bajar tu cuenta de categoría significa que tu(s) espacio(s) de trabajo será(n) eliminado(s). Esta acción no se puede deshacer, pero siempre puedes crear un nuevo espacio de trabajo si cambias de opinión.',
+ confirm: 'Eliminar y degradar',
+ },
viewPaymentHistory: 'Ver historial de pagos',
},
yourPlan: {
@@ -3872,7 +4163,7 @@ export default {
title: 'Configuración de suscripción',
autoRenew: 'Auto-renovación',
autoIncrease: 'Auto-incremento',
- saveUpTo: ({amountSaved}) => `Ahorre hasta $${amountSaved} al mes por miembro activo`,
+ saveUpTo: ({amountWithCurrency}) => `Ahorre hasta ${amountWithCurrency} al mes por miembro activo`,
automaticallyIncrease:
'Aumenta automáticamente tus plazas anuales para dar lugar a los miembros activos que superen el tamaño de tu suscripción. Nota: Esto ampliará la fecha de finalización de tu suscripción anual.',
disableAutoRenew: 'Desactivar auto-renovación',
diff --git a/src/languages/types.ts b/src/languages/types.ts
index de9b1d2dadeb..7ec56760c2f1 100644
--- a/src/languages/types.ts
+++ b/src/languages/types.ts
@@ -298,6 +298,47 @@ type DistanceRateOperationsParams = {count: number};
type ReimbursementRateParams = {unit: Unit};
+type ChangeFieldParams = {oldValue?: string; newValue: string; fieldName: string};
+
+type ChangePolicyParams = {fromPolicy: string; toPolicy: string};
+
+type ChangeTypeParams = {oldType: string; newType: string};
+
+type DelegateSubmitParams = {delegateUser: string; originalManager: string};
+
+type ExportedToIntegrationParams = {label: string};
+
+type ForwardedParams = {amount: string; currency: string};
+
+type IntegrationsMessageParams = {
+ label: string;
+ result: {
+ code?: number;
+ messages?: string[];
+ title?: string;
+ link?: {
+ url: string;
+ text: string;
+ };
+ };
+};
+
+type MarkedReimbursedParams = {amount: string; currency: string};
+
+type MarkReimbursedFromIntegrationParams = {amount: string; currency: string};
+
+type ShareParams = {to: string};
+
+type UnshareParams = {to: string};
+
+type StripePaidParams = {amount: string; currency: string};
+
+type UnapprovedParams = {amount: string; currency: string};
+type RemoveMembersWarningPrompt = {
+ memberName: string;
+ ownerName: string;
+};
+
export type {
AddressLineParams,
AdminCanceledRequestParams,
@@ -402,4 +443,18 @@ export type {
WelcomeNoteParams,
WelcomeToRoomParams,
ZipCodeExampleFormatParams,
+ ChangeFieldParams,
+ ChangePolicyParams,
+ ChangeTypeParams,
+ ExportedToIntegrationParams,
+ DelegateSubmitParams,
+ ForwardedParams,
+ IntegrationsMessageParams,
+ MarkedReimbursedParams,
+ MarkReimbursedFromIntegrationParams,
+ ShareParams,
+ UnshareParams,
+ StripePaidParams,
+ UnapprovedParams,
+ RemoveMembersWarningPrompt,
};
diff --git a/src/libs/API/parameters/AddPaymentCardParams.ts b/src/libs/API/parameters/AddPaymentCardParams.ts
index 1c9b1fc4fa30..3a59c678ac4f 100644
--- a/src/libs/API/parameters/AddPaymentCardParams.ts
+++ b/src/libs/API/parameters/AddPaymentCardParams.ts
@@ -8,7 +8,7 @@ type AddPaymentCardParams = {
cardCVV: string;
addressName: string;
addressZip: string;
- currency: ValueOf;
+ currency: ValueOf;
isP2PDebitCard: boolean;
};
export default AddPaymentCardParams;
diff --git a/src/libs/API/parameters/ConnectPolicyToSageIntacctParams.ts b/src/libs/API/parameters/ConnectPolicyToSageIntacctParams.ts
new file mode 100644
index 000000000000..3b5cfc973e4d
--- /dev/null
+++ b/src/libs/API/parameters/ConnectPolicyToSageIntacctParams.ts
@@ -0,0 +1,8 @@
+type ConnectPolicyToSageIntacctParams = {
+ policyID: string;
+ intacctCompanyID: string;
+ intacctUserID: string;
+ intacctPassword: string;
+};
+
+export default ConnectPolicyToSageIntacctParams;
diff --git a/src/libs/API/parameters/DeleteMoneyRequestOnSearchParams.ts b/src/libs/API/parameters/DeleteMoneyRequestOnSearchParams.ts
new file mode 100644
index 000000000000..e44774ae671b
--- /dev/null
+++ b/src/libs/API/parameters/DeleteMoneyRequestOnSearchParams.ts
@@ -0,0 +1,6 @@
+type DeleteMoneyRequestOnSearchParams = {
+ hash: number;
+ transactionIDList: string[];
+};
+
+export default DeleteMoneyRequestOnSearchParams;
diff --git a/src/libs/API/parameters/EnablePolicyExpensifyCardsParams.ts b/src/libs/API/parameters/EnablePolicyExpensifyCardsParams.ts
new file mode 100644
index 000000000000..e918683ffd1f
--- /dev/null
+++ b/src/libs/API/parameters/EnablePolicyExpensifyCardsParams.ts
@@ -0,0 +1,7 @@
+type EnablePolicyExpensifyCardsParams = {
+ authToken: string;
+ policyID: string;
+ enabled: boolean;
+};
+
+export default EnablePolicyExpensifyCardsParams;
diff --git a/src/libs/API/parameters/HoldMoneyRequestOnSearchParams.ts b/src/libs/API/parameters/HoldMoneyRequestOnSearchParams.ts
new file mode 100644
index 000000000000..46ceed818cb8
--- /dev/null
+++ b/src/libs/API/parameters/HoldMoneyRequestOnSearchParams.ts
@@ -0,0 +1,7 @@
+type HoldMoneyRequestOnSearchParams = {
+ hash: number;
+ transactionIDList: string[];
+ comment: string;
+};
+
+export default HoldMoneyRequestOnSearchParams;
diff --git a/src/libs/API/parameters/OpenPolicyExpensifyCardsPageParams.ts b/src/libs/API/parameters/OpenPolicyExpensifyCardsPageParams.ts
new file mode 100644
index 000000000000..c3c89857ab3b
--- /dev/null
+++ b/src/libs/API/parameters/OpenPolicyExpensifyCardsPageParams.ts
@@ -0,0 +1,6 @@
+type OpenPolicyExpensifyCardsPageParams = {
+ policyID: string;
+ authToken: string | null | undefined;
+};
+
+export default OpenPolicyExpensifyCardsPageParams;
diff --git a/src/libs/API/parameters/OpenPolicyInitialPageParams.ts b/src/libs/API/parameters/OpenPolicyInitialPageParams.ts
deleted file mode 100644
index 764abe9a6a77..000000000000
--- a/src/libs/API/parameters/OpenPolicyInitialPageParams.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-type OpenPolicyInitialPageParams = {
- policyID: string;
-};
-
-export default OpenPolicyInitialPageParams;
diff --git a/src/libs/API/parameters/OpenPolicyProfilePageParams.ts b/src/libs/API/parameters/OpenPolicyProfilePageParams.ts
deleted file mode 100644
index 55dce33a3dac..000000000000
--- a/src/libs/API/parameters/OpenPolicyProfilePageParams.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-type OpenPolicyProfilePageParams = {
- policyID: string;
-};
-
-export default OpenPolicyProfilePageParams;
diff --git a/src/libs/API/parameters/OpenProfileParams.ts b/src/libs/API/parameters/OpenProfileParams.ts
deleted file mode 100644
index f42ea8234fc8..000000000000
--- a/src/libs/API/parameters/OpenProfileParams.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-type OpenProfileParams = {
- timezone: string;
-};
-
-export default OpenProfileParams;
diff --git a/src/libs/API/parameters/RequestExpensifyCardLimitIncreaseParams.ts b/src/libs/API/parameters/RequestExpensifyCardLimitIncreaseParams.ts
new file mode 100644
index 000000000000..6e118f2a1c06
--- /dev/null
+++ b/src/libs/API/parameters/RequestExpensifyCardLimitIncreaseParams.ts
@@ -0,0 +1,6 @@
+type RequestExpensifyCardLimitIncreaseParams = {
+ authToken: string | null | undefined;
+ settlementBankAccountID: string;
+};
+
+export default RequestExpensifyCardLimitIncreaseParams;
diff --git a/src/libs/API/parameters/UnholdMoneyRequestOnSearchParams.ts b/src/libs/API/parameters/UnholdMoneyRequestOnSearchParams.ts
new file mode 100644
index 000000000000..a32b57731999
--- /dev/null
+++ b/src/libs/API/parameters/UnholdMoneyRequestOnSearchParams.ts
@@ -0,0 +1,6 @@
+type UnholdMoneyRequestOnSearchParams = {
+ hash: number;
+ transactionIDList: string[];
+};
+
+export default UnholdMoneyRequestOnSearchParams;
diff --git a/src/libs/API/parameters/UpdateBillingCurrencyParams.ts b/src/libs/API/parameters/UpdateBillingCurrencyParams.ts
new file mode 100644
index 000000000000..0ab3dc9665a5
--- /dev/null
+++ b/src/libs/API/parameters/UpdateBillingCurrencyParams.ts
@@ -0,0 +1,9 @@
+import type {ValueOf} from 'type-fest';
+import type CONST from '@src/CONST';
+
+type UpdateBillingCurrencyParams = {
+ currency: ValueOf;
+ cardCVV: string;
+};
+
+export default UpdateBillingCurrencyParams;
diff --git a/src/libs/API/parameters/UpdateNetSuiteGenericTypeParams.ts b/src/libs/API/parameters/UpdateNetSuiteGenericTypeParams.ts
new file mode 100644
index 000000000000..3834dfbf7e66
--- /dev/null
+++ b/src/libs/API/parameters/UpdateNetSuiteGenericTypeParams.ts
@@ -0,0 +1,7 @@
+type UpdateNetSuiteGenericTypeParams = {
+ [K2 in K]: Type;
+} & {
+ policyID: string;
+};
+
+export default UpdateNetSuiteGenericTypeParams;
diff --git a/src/libs/API/parameters/index.ts b/src/libs/API/parameters/index.ts
index c43ab514b251..2f203a4cfd9a 100644
--- a/src/libs/API/parameters/index.ts
+++ b/src/libs/API/parameters/index.ts
@@ -32,7 +32,6 @@ export type {default as OpenAppParams} from './OpenAppParams';
export type {default as OpenOldDotLinkParams} from './OpenOldDotLinkParams';
export type {default as OpenPlaidBankAccountSelectorParams} from './OpenPlaidBankAccountSelectorParams';
export type {default as OpenPlaidBankLoginParams} from './OpenPlaidBankLoginParams';
-export type {default as OpenProfileParams} from './OpenProfileParams';
export type {default as OpenPublicProfilePageParams} from './OpenPublicProfilePageParams';
export type {default as OpenReimbursementAccountPageParams} from './OpenReimbursementAccountPageParams';
export type {default as OpenReportParams} from './OpenReportParams';
@@ -97,6 +96,7 @@ export type {default as UpdateRoomVisibilityParams} from './UpdateRoomVisibility
export type {default as UpdateReportWriteCapabilityParams} from './UpdateReportWriteCapabilityParams';
export type {default as AddWorkspaceRoomParams} from './AddWorkspaceRoomParams';
export type {default as UpdatePolicyRoomNameParams} from './UpdatePolicyRoomNameParams';
+export type {default as UpdateBillingCurrencyParams} from './UpdateBillingCurrencyParams';
export type {default as AddEmojiReactionParams} from './AddEmojiReactionParams';
export type {default as RemoveEmojiReactionParams} from './RemoveEmojiReactionParams';
export type {default as LeaveRoomParams} from './LeaveRoomParams';
@@ -122,6 +122,7 @@ export type {default as AddMembersToWorkspaceParams} from './AddMembersToWorkspa
export type {default as DeleteMembersFromWorkspaceParams} from './DeleteMembersFromWorkspaceParams';
export type {default as OpenWorkspaceParams} from './OpenWorkspaceParams';
export type {default as OpenWorkspaceViewParams} from './OpenWorkspaceViewParams';
+export type {default as ConnectPolicyToSageIntacctParams} from './ConnectPolicyToSageIntacctParams';
export type {default as OpenWorkspaceReimburseViewParams} from './OpenWorkspaceReimburseViewParams';
export type {default as OpenWorkspaceInvitePageParams} from './OpenWorkspaceInvitePageParams';
export type {default as OpenWorkspaceMembersPageParams} from './OpenWorkspaceMembersPageParams';
@@ -182,6 +183,7 @@ export type {default as EnablePolicyTagsParams} from './EnablePolicyTagsParams';
export type {default as SetPolicyTagsEnabled} from './SetPolicyTagsEnabled';
export type {default as EnablePolicyWorkflowsParams} from './EnablePolicyWorkflowsParams';
export type {default as EnablePolicyReportFieldsParams} from './EnablePolicyReportFieldsParams';
+export type {default as EnablePolicyExpensifyCardsParams} from './EnablePolicyExpensifyCardsParams';
export type {default as AcceptJoinRequestParams} from './AcceptJoinRequest';
export type {default as DeclineJoinRequestParams} from './DeclineJoinRequest';
export type {default as JoinPolicyInviteLinkParams} from './JoinPolicyInviteLink';
@@ -191,8 +193,6 @@ export type {default as OpenPolicyDistanceRatesPageParams} from './OpenPolicyDis
export type {default as OpenPolicyTaxesPageParams} from './OpenPolicyTaxesPageParams';
export type {default as EnablePolicyTaxesParams} from './EnablePolicyTaxesParams';
export type {default as OpenPolicyMoreFeaturesPageParams} from './OpenPolicyMoreFeaturesPageParams';
-export type {default as OpenPolicyProfilePageParams} from './OpenPolicyProfilePageParams';
-export type {default as OpenPolicyInitialPageParams} from './OpenPolicyInitialPageParams';
export type {default as CreatePolicyDistanceRateParams} from './CreatePolicyDistanceRateParams';
export type {default as SetPolicyDistanceRatesUnitParams} from './SetPolicyDistanceRatesUnitParams';
export type {default as SetPolicyDistanceRatesDefaultCategoryParams} from './SetPolicyDistanceRatesDefaultCategoryParams';
@@ -233,4 +233,10 @@ export type {default as UpdateSubscriptionAutoRenewParams} from './UpdateSubscri
export type {default as UpdateSubscriptionAddNewUsersAutomaticallyParams} from './UpdateSubscriptionAddNewUsersAutomaticallyParams';
export type {default as GenerateSpotnanaTokenParams} from './GenerateSpotnanaTokenParams';
export type {default as UpdateSubscriptionSizeParams} from './UpdateSubscriptionSizeParams';
+export type {default as DeleteMoneyRequestOnSearchParams} from './DeleteMoneyRequestOnSearchParams';
+export type {default as HoldMoneyRequestOnSearchParams} from './HoldMoneyRequestOnSearchParams';
+export type {default as UnholdMoneyRequestOnSearchParams} from './UnholdMoneyRequestOnSearchParams';
export type {default as UpdateNetSuiteSubsidiaryParams} from './UpdateNetSuiteSubsidiaryParams';
+export type {default as OpenPolicyExpensifyCardsPageParams} from './OpenPolicyExpensifyCardsPageParams';
+export type {default as RequestExpensifyCardLimitIncreaseParams} from './RequestExpensifyCardLimitIncreaseParams';
+export type {default as UpdateNetSuiteGenericTypeParams} from './UpdateNetSuiteGenericTypeParams';
diff --git a/src/libs/API/types.ts b/src/libs/API/types.ts
index f94ba0c54978..c5d5f1ad1e6e 100644
--- a/src/libs/API/types.ts
+++ b/src/libs/API/types.ts
@@ -1,5 +1,6 @@
import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';
+import type {EmptyObject} from '@src/types/utils/EmptyObject';
import type * as Parameters from './parameters';
import type SignInUserParams from './parameters/SignInUserParams';
import type UpdateBeneficialOwnersForBankAccountParams from './parameters/UpdateBeneficialOwnersForBankAccountParams';
@@ -16,7 +17,6 @@ const WRITE_COMMANDS = {
UPDATE_PREFERRED_LOCALE: 'UpdatePreferredLocale',
OPEN_APP: 'OpenApp',
RECONNECT_APP: 'ReconnectApp',
- OPEN_PROFILE: 'OpenProfile',
HANDLE_RESTRICTED_EVENT: 'HandleRestrictedEvent',
OPEN_REPORT: 'OpenReport',
DELETE_PAYMENT_BANK_ACCOUNT: 'DeletePaymentBankAccount',
@@ -142,6 +142,7 @@ const WRITE_COMMANDS = {
REOPEN_TASK: 'ReopenTask',
COMPLETE_TASK: 'CompleteTask',
COMPLETE_GUIDED_SETUP: 'CompleteGuidedSetup',
+ COMPLETE_HYBRID_APP_ONBOARDING: 'CompleteHybridAppOnboarding',
SET_NAME_VALUE_PAIR: 'SetNameValuePair',
SET_REPORT_FIELD: 'Report_SetFields',
DELETE_REPORT_FIELD: 'RemoveReportField',
@@ -158,6 +159,7 @@ const WRITE_COMMANDS = {
UPDATE_MONEY_REQUEST_DESCRIPTION: 'UpdateMoneyRequestDescription',
UPDATE_MONEY_REQUEST_AMOUNT_AND_CURRENCY: 'UpdateMoneyRequestAmountAndCurrency',
HOLD_MONEY_REQUEST: 'HoldRequest',
+ UPDATE_BILLING_CARD_CURRENCY: 'UpdateBillingCardCurrency',
UNHOLD_MONEY_REQUEST: 'UnHoldRequest',
UPDATE_DISTANCE_REQUEST: 'UpdateDistanceRequest',
REQUEST_MONEY: 'RequestMoney',
@@ -186,6 +188,7 @@ const WRITE_COMMANDS = {
ENABLE_POLICY_TAXES: 'EnablePolicyTaxes',
ENABLE_POLICY_WORKFLOWS: 'EnablePolicyWorkflows',
ENABLE_POLICY_REPORT_FIELDS: 'EnablePolicyReportFields',
+ ENABLE_POLICY_EXPENSIFY_CARDS: 'EnablePolicyExpensifyCards',
SET_POLICY_TAXES_CURRENCY_DEFAULT: 'SetPolicyCurrencyDefaultTax',
SET_POLICY_TAXES_FOREIGN_CURRENCY_DEFAULT: 'SetPolicyForeignCurrencyDefaultTax',
SET_POLICY_CUSTOM_TAX_NAME: 'SetPolicyCustomTaxName',
@@ -226,7 +229,29 @@ const WRITE_COMMANDS = {
UPDATE_SUBSCRIPTION_AUTO_RENEW: 'UpdateSubscriptionAutoRenew',
UPDATE_SUBSCRIPTION_ADD_NEW_USERS_AUTOMATICALLY: 'UpdateSubscriptionAddNewUsersAutomatically',
UPDATE_SUBSCRIPTION_SIZE: 'UpdateSubscriptionSize',
+ DELETE_MONEY_REQUEST_ON_SEARCH: 'DeleteMoneyRequestOnSearch',
+ HOLD_MONEY_REQUEST_ON_SEARCH: 'HoldMoneyRequestOnSearch',
+ UNHOLD_MONEY_REQUEST_ON_SEARCH: 'UnholdMoneyRequestOnSearch',
+ REQUEST_REFUND: 'User_RefundPurchase',
UPDATE_NETSUITE_SUBSIDIARY: 'UpdateNetSuiteSubsidiary',
+ UPDATE_NETSUITE_SYNC_TAX_CONFIGURATION: 'UpdateNetSuiteSyncTaxConfiguration',
+ UPDATE_NETSUITE_EXPORTER: 'UpdateNetSuiteExporter',
+ UPDATE_NETSUITE_EXPORT_DATE: 'UpdateNetSuiteExportDate',
+ UPDATE_NETSUITE_REIMBURSABLE_EXPENSES_EXPORT_DESTINATION: 'UpdateNetSuiteReimbursableExpensesExportDestination',
+ UPDATE_NETSUITE_NONREIMBURSABLE_EXPENSES_EXPORT_DESTINATION: 'UpdateNetSuiteNonreimbursableExpensesExportDestination',
+ UPDATE_NETSUITE_DEFAULT_VENDOR: 'UpdateNetSuiteDefaultVendor',
+ UPDATE_NETSUITE_REIMBURSABLE_PAYABLE_ACCOUNT: 'UpdateNetSuiteReimbursablePayableAccount',
+ UPDATE_NETSUITE_PAYABLE_ACCT: 'UpdateNetSuitePayableAcct',
+ UPDATE_NETSUITE_JOURNAL_POSTING_PREFERENCE: 'UpdateNetSuiteJournalPostingPreference',
+ UPDATE_NETSUITE_RECEIVABLE_ACCOUNT: 'UpdateNetSuiteReceivableAccount',
+ UPDATE_NETSUITE_INVOICE_ITEM_PREFERENCE: 'UpdateNetSuiteInvoiceItemPreference',
+ UPDATE_NETSUITE_INVOICE_ITEM: 'UpdateNetSuiteInvoiceItem',
+ UPDATE_NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT: 'UpdateNetSuiteProvincialTaxPostingAccount',
+ UPDATE_NETSUITE_TAX_POSTING_ACCOUNT: 'UpdateNetSuiteTaxPostingAccount',
+ UPDATE_NETSUITE_ALLOW_FOREIGN_CURRENCY: 'UpdateNetSuiteAllowForeignCurrency',
+ UPDATE_NETSUITE_EXPORT_TO_NEXT_OPEN_PERIOD: 'UpdateNetSuiteExportToNextOpenPeriod',
+ REQUEST_EXPENSIFY_CARD_LIMIT_INCREASE: 'RequestExpensifyCardLimitIncrease',
+ CONNECT_POLICY_TO_SAGE_INTACCT: 'ConnectPolicyToSageIntacct',
} as const;
type WriteCommand = ValueOf;
@@ -236,7 +261,6 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UPDATE_PREFERRED_LOCALE]: Parameters.UpdatePreferredLocaleParams;
[WRITE_COMMANDS.RECONNECT_APP]: Parameters.ReconnectAppParams;
[WRITE_COMMANDS.OPEN_APP]: Parameters.OpenAppParams;
- [WRITE_COMMANDS.OPEN_PROFILE]: Parameters.OpenProfileParams;
[WRITE_COMMANDS.HANDLE_RESTRICTED_EVENT]: Parameters.HandleRestrictedEventParams;
[WRITE_COMMANDS.OPEN_REPORT]: Parameters.OpenReportParams;
[WRITE_COMMANDS.DELETE_PAYMENT_BANK_ACCOUNT]: Parameters.DeletePaymentBankAccountParams;
@@ -362,6 +386,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.REOPEN_TASK]: Parameters.ReopenTaskParams;
[WRITE_COMMANDS.COMPLETE_TASK]: Parameters.CompleteTaskParams;
[WRITE_COMMANDS.COMPLETE_GUIDED_SETUP]: Parameters.CompleteGuidedSetupParams;
+ [WRITE_COMMANDS.COMPLETE_HYBRID_APP_ONBOARDING]: EmptyObject;
[WRITE_COMMANDS.SET_NAME_VALUE_PAIR]: Parameters.SetNameValuePairParams;
[WRITE_COMMANDS.SET_REPORT_FIELD]: Parameters.SetReportFieldParams;
[WRITE_COMMANDS.SET_REPORT_NAME]: Parameters.SetReportNameParams;
@@ -412,6 +437,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.ENABLE_POLICY_TAXES]: Parameters.EnablePolicyTaxesParams;
[WRITE_COMMANDS.ENABLE_POLICY_WORKFLOWS]: Parameters.EnablePolicyWorkflowsParams;
[WRITE_COMMANDS.ENABLE_POLICY_REPORT_FIELDS]: Parameters.EnablePolicyReportFieldsParams;
+ [WRITE_COMMANDS.ENABLE_POLICY_EXPENSIFY_CARDS]: Parameters.EnablePolicyExpensifyCardsParams;
[WRITE_COMMANDS.JOIN_POLICY_VIA_INVITE_LINK]: Parameters.JoinPolicyInviteLinkParams;
[WRITE_COMMANDS.ACCEPT_JOIN_REQUEST]: Parameters.AcceptJoinRequestParams;
[WRITE_COMMANDS.DECLINE_JOIN_REQUEST]: Parameters.DeclineJoinRequestParams;
@@ -429,8 +455,8 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.SET_POLICY_DISTANCE_RATES_UNIT]: Parameters.SetPolicyDistanceRatesUnitParams;
[WRITE_COMMANDS.SET_POLICY_DISTANCE_RATES_DEFAULT_CATEGORY]: Parameters.SetPolicyDistanceRatesDefaultCategoryParams;
[WRITE_COMMANDS.ENABLE_DISTANCE_REQUEST_TAX]: Parameters.SetPolicyDistanceRatesDefaultCategoryParams;
+ [WRITE_COMMANDS.REQUEST_EXPENSIFY_CARD_LIMIT_INCREASE]: Parameters.RequestExpensifyCardLimitIncreaseParams;
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
[WRITE_COMMANDS.UPDATE_POLICY_CONNECTION_CONFIG]: Parameters.UpdatePolicyConnectionConfigParams;
[WRITE_COMMANDS.UPDATE_MANY_POLICY_CONNECTION_CONFIGS]: Parameters.UpdateManyPolicyConnectionConfigurationsParams;
[WRITE_COMMANDS.REMOVE_POLICY_CONNECTION]: Parameters.RemovePolicyConnectionParams;
@@ -440,6 +466,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.SET_POLICY_DISTANCE_RATES_ENABLED]: Parameters.SetPolicyDistanceRatesEnabledParams;
[WRITE_COMMANDS.DELETE_POLICY_DISTANCE_RATES]: Parameters.DeletePolicyDistanceRatesParams;
[WRITE_COMMANDS.DISMISS_TRACK_EXPENSE_ACTIONABLE_WHISPER]: Parameters.DismissTrackExpenseActionableWhisperParams;
+ [WRITE_COMMANDS.UPDATE_BILLING_CARD_CURRENCY]: Parameters.UpdateBillingCurrencyParams;
[WRITE_COMMANDS.CONVERT_TRACKED_EXPENSE_TO_REQUEST]: Parameters.ConvertTrackedExpenseToRequestParams;
[WRITE_COMMANDS.CATEGORIZE_TRACKED_EXPENSE]: Parameters.CategorizeTrackedExpenseParams;
[WRITE_COMMANDS.SHARE_TRACKED_EXPENSE]: Parameters.ShareTrackedExpenseParams;
@@ -456,8 +483,31 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UPDATE_SUBSCRIPTION_ADD_NEW_USERS_AUTOMATICALLY]: Parameters.UpdateSubscriptionAddNewUsersAutomaticallyParams;
[WRITE_COMMANDS.UPDATE_SUBSCRIPTION_SIZE]: Parameters.UpdateSubscriptionSizeParams;
+ [WRITE_COMMANDS.DELETE_MONEY_REQUEST_ON_SEARCH]: Parameters.DeleteMoneyRequestOnSearchParams;
+ [WRITE_COMMANDS.HOLD_MONEY_REQUEST_ON_SEARCH]: Parameters.HoldMoneyRequestOnSearchParams;
+ [WRITE_COMMANDS.UNHOLD_MONEY_REQUEST_ON_SEARCH]: Parameters.UnholdMoneyRequestOnSearchParams;
+
+ [WRITE_COMMANDS.REQUEST_REFUND]: null;
+ [WRITE_COMMANDS.CONNECT_POLICY_TO_SAGE_INTACCT]: Parameters.ConnectPolicyToSageIntacctParams;
+
// Netsuite parameters
[WRITE_COMMANDS.UPDATE_NETSUITE_SUBSIDIARY]: Parameters.UpdateNetSuiteSubsidiaryParams;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_SYNC_TAX_CONFIGURATION]: Parameters.UpdateNetSuiteGenericTypeParams<'enabled', boolean>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_EXPORTER]: Parameters.UpdateNetSuiteGenericTypeParams<'email', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_EXPORT_DATE]: Parameters.UpdateNetSuiteGenericTypeParams<'value', ValueOf>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_REIMBURSABLE_EXPENSES_EXPORT_DESTINATION]: Parameters.UpdateNetSuiteGenericTypeParams<'value', ValueOf>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_NONREIMBURSABLE_EXPENSES_EXPORT_DESTINATION]: Parameters.UpdateNetSuiteGenericTypeParams<'value', ValueOf>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_DEFAULT_VENDOR]: Parameters.UpdateNetSuiteGenericTypeParams<'vendorID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_REIMBURSABLE_PAYABLE_ACCOUNT]: Parameters.UpdateNetSuiteGenericTypeParams<'bankAccountID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_PAYABLE_ACCT]: Parameters.UpdateNetSuiteGenericTypeParams<'bankAccountID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_JOURNAL_POSTING_PREFERENCE]: Parameters.UpdateNetSuiteGenericTypeParams<'value', ValueOf>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_RECEIVABLE_ACCOUNT]: Parameters.UpdateNetSuiteGenericTypeParams<'bankAccountID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_INVOICE_ITEM_PREFERENCE]: Parameters.UpdateNetSuiteGenericTypeParams<'value', ValueOf>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_INVOICE_ITEM]: Parameters.UpdateNetSuiteGenericTypeParams<'itemID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT]: Parameters.UpdateNetSuiteGenericTypeParams<'bankAccountID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_TAX_POSTING_ACCOUNT]: Parameters.UpdateNetSuiteGenericTypeParams<'bankAccountID', string>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_ALLOW_FOREIGN_CURRENCY]: Parameters.UpdateNetSuiteGenericTypeParams<'enabled', boolean>;
+ [WRITE_COMMANDS.UPDATE_NETSUITE_EXPORT_TO_NEXT_OPEN_PERIOD]: Parameters.UpdateNetSuiteGenericTypeParams<'enabled', boolean>;
};
const READ_COMMANDS = {
@@ -496,13 +546,12 @@ const READ_COMMANDS = {
OPEN_POLICY_CATEGORIES_PAGE: 'OpenPolicyCategoriesPage',
OPEN_POLICY_TAGS_PAGE: 'OpenPolicyTagsPage',
OPEN_POLICY_TAXES_PAGE: 'OpenPolicyTaxesPage',
+ OPEN_POLICY_EXPENSIFY_CARDS_PAGE: 'OpenPolicyExpensifyCardsPage',
OPEN_WORKSPACE_INVITE_PAGE: 'OpenWorkspaceInvitePage',
OPEN_DRAFT_WORKSPACE_REQUEST: 'OpenDraftWorkspaceRequest',
OPEN_POLICY_WORKFLOWS_PAGE: 'OpenPolicyWorkflowsPage',
OPEN_POLICY_DISTANCE_RATES_PAGE: 'OpenPolicyDistanceRatesPage',
OPEN_POLICY_MORE_FEATURES_PAGE: 'OpenPolicyMoreFeaturesPage',
- OPEN_POLICY_PROFILE_PAGE: 'OpenPolicyProfilePage',
- OPEN_POLICY_INITIAL_PAGE: 'OpenPolicyInitialPage',
OPEN_POLICY_ACCOUNTING_PAGE: 'OpenPolicyAccountingPage',
SEARCH: 'Search',
OPEN_SUBSCRIPTION_PAGE: 'OpenSubscriptionPage',
@@ -551,9 +600,8 @@ type ReadCommandParameters = {
[READ_COMMANDS.OPEN_POLICY_WORKFLOWS_PAGE]: Parameters.OpenPolicyWorkflowsPageParams;
[READ_COMMANDS.OPEN_POLICY_DISTANCE_RATES_PAGE]: Parameters.OpenPolicyDistanceRatesPageParams;
[READ_COMMANDS.OPEN_POLICY_MORE_FEATURES_PAGE]: Parameters.OpenPolicyMoreFeaturesPageParams;
- [READ_COMMANDS.OPEN_POLICY_PROFILE_PAGE]: Parameters.OpenPolicyProfilePageParams;
- [READ_COMMANDS.OPEN_POLICY_INITIAL_PAGE]: Parameters.OpenPolicyInitialPageParams;
[READ_COMMANDS.OPEN_POLICY_ACCOUNTING_PAGE]: Parameters.OpenPolicyAccountingPageParams;
+ [READ_COMMANDS.OPEN_POLICY_EXPENSIFY_CARDS_PAGE]: Parameters.OpenPolicyExpensifyCardsPageParams;
[READ_COMMANDS.SEARCH]: Parameters.SearchParams;
[READ_COMMANDS.OPEN_SUBSCRIPTION_PAGE]: null;
};
@@ -567,6 +615,7 @@ const SIDE_EFFECT_REQUEST_COMMANDS = {
OPEN_OLD_DOT_LINK: 'OpenOldDotLink',
OPEN_REPORT: 'OpenReport',
RECONNECT_APP: 'ReconnectApp',
+ ADD_PAYMENT_CARD_GBR: 'AddPaymentCardGBP',
REVEAL_EXPENSIFY_CARD_DETAILS: 'RevealExpensifyCardDetails',
SWITCH_TO_OLD_DOT: 'SwitchToOldDot',
} as const;
@@ -582,6 +631,7 @@ type SideEffectRequestCommandParameters = {
[SIDE_EFFECT_REQUEST_COMMANDS.JOIN_POLICY_VIA_INVITE_LINK]: Parameters.JoinPolicyInviteLinkParams;
[SIDE_EFFECT_REQUEST_COMMANDS.RECONNECT_APP]: Parameters.ReconnectAppParams;
[SIDE_EFFECT_REQUEST_COMMANDS.GENERATE_SPOTNANA_TOKEN]: Parameters.GenerateSpotnanaTokenParams;
+ [SIDE_EFFECT_REQUEST_COMMANDS.ADD_PAYMENT_CARD_GBR]: Parameters.AddPaymentCardParams;
[SIDE_EFFECT_REQUEST_COMMANDS.ACCEPT_SPOTNANA_TERMS]: null;
};
diff --git a/src/libs/CardUtils.ts b/src/libs/CardUtils.ts
index 106debd0a7e5..6f80a8a20a6b 100644
--- a/src/libs/CardUtils.ts
+++ b/src/libs/CardUtils.ts
@@ -139,6 +139,10 @@ function hasDetectedFraud(cardList: Record): boolean {
return Object.values(cardList).some((card) => card.fraud !== CONST.EXPENSIFY_CARD.FRAUD_TYPES.NONE);
}
+function getMCardNumberString(cardNumber: string): string {
+ return cardNumber.replace(/\s/g, '');
+}
+
export {
isExpensifyCard,
isCorporateCard,
@@ -150,4 +154,5 @@ export {
getCardDescription,
findPhysicalCard,
hasDetectedFraud,
+ getMCardNumberString,
};
diff --git a/src/libs/ConnectionUtils.ts b/src/libs/ConnectionUtils.ts
new file mode 100644
index 000000000000..b3a5e38ffb8a
--- /dev/null
+++ b/src/libs/ConnectionUtils.ts
@@ -0,0 +1,19 @@
+import CONST from '@src/CONST';
+import type {QBONonReimbursableExportAccountType} from '@src/types/onyx/Policy';
+import {translateLocal} from './Localize';
+
+function getQBONonReimbursableExportAccountType(exportDestination: QBONonReimbursableExportAccountType | undefined): string {
+ switch (exportDestination) {
+ case CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.DEBIT_CARD:
+ return translateLocal('workspace.qbo.bankAccount');
+ case CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.CREDIT_CARD:
+ return translateLocal('workspace.qbo.creditCardAccount');
+ case CONST.QUICKBOOKS_NON_REIMBURSABLE_EXPORT_ACCOUNT_TYPE.VENDOR_BILL:
+ return translateLocal('workspace.qbo.accountsPayable');
+ default:
+ return translateLocal('workspace.qbo.account');
+ }
+}
+
+// eslint-disable-next-line import/prefer-default-export
+export {getQBONonReimbursableExportAccountType};
diff --git a/src/libs/DateUtils.ts b/src/libs/DateUtils.ts
index 467c4b27bc11..f538e5e719e2 100644
--- a/src/libs/DateUtils.ts
+++ b/src/libs/DateUtils.ts
@@ -137,7 +137,15 @@ function getLocalDateFromDatetime(locale: Locale, datetime?: string, currentSele
}
return res;
}
- const parsedDatetime = new Date(`${datetime}Z`);
+ let parsedDatetime;
+ try {
+ // in some cases we cannot add 'Z' to the date string
+ parsedDatetime = new Date(`${datetime}Z`);
+ parsedDatetime.toISOString(); // we need to call toISOString because it throws RangeError in case of an invalid date
+ } catch (e) {
+ parsedDatetime = new Date(datetime);
+ }
+
return utcToZonedTime(parsedDatetime, currentSelectedTimezone);
}
diff --git a/src/libs/E2E/reactNativeLaunchingTest.ts b/src/libs/E2E/reactNativeLaunchingTest.ts
index 46922091497c..f952998f0aad 100644
--- a/src/libs/E2E/reactNativeLaunchingTest.ts
+++ b/src/libs/E2E/reactNativeLaunchingTest.ts
@@ -66,7 +66,7 @@ E2EClient.getTestConfig()
branch: Config.E2E_BRANCH,
name: config.name,
error: `Test '${config.name}' not found`,
- isCritical: false,
+ isCritical: false,
});
}
diff --git a/src/libs/E2E/tests/appStartTimeTest.e2e.ts b/src/libs/E2E/tests/appStartTimeTest.e2e.ts
index 321fc3773d51..188dd65c85e9 100644
--- a/src/libs/E2E/tests/appStartTimeTest.e2e.ts
+++ b/src/libs/E2E/tests/appStartTimeTest.e2e.ts
@@ -26,7 +26,8 @@ const test = () => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: `App start ${metric.name}`,
- duration: metric.duration,
+ metric: metric.duration,
+ unit: 'ms',
}),
),
)
diff --git a/src/libs/E2E/tests/chatOpeningTest.e2e.ts b/src/libs/E2E/tests/chatOpeningTest.e2e.ts
index 8e43c4ece564..8e2a0a81da7d 100644
--- a/src/libs/E2E/tests/chatOpeningTest.e2e.ts
+++ b/src/libs/E2E/tests/chatOpeningTest.e2e.ts
@@ -49,7 +49,8 @@ const test = (config: NativeConfig) => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: 'Chat opening',
- duration: entry.duration,
+ metric: entry.duration,
+ unit: 'ms',
})
.then(() => {
console.debug('[E2E] Done with chat opening, exiting…');
@@ -64,7 +65,8 @@ const test = (config: NativeConfig) => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: 'Chat TTI',
- duration: entry.duration,
+ metric: entry.duration,
+ unit: 'ms',
})
.then(() => {
console.debug('[E2E] Done with chat TTI tracking, exiting…');
diff --git a/src/libs/E2E/tests/linkingTest.e2e.ts b/src/libs/E2E/tests/linkingTest.e2e.ts
index a3449ce5010b..7e6c7ea697ba 100644
--- a/src/libs/E2E/tests/linkingTest.e2e.ts
+++ b/src/libs/E2E/tests/linkingTest.e2e.ts
@@ -75,7 +75,8 @@ const test = (config: NativeConfig) => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: 'Comment linking',
- duration: entry.duration,
+ metric: entry.duration,
+ unit: 'ms',
});
switchReportResolve();
diff --git a/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts b/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts
index 4ac7995b914f..c6aead2d5336 100644
--- a/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts
+++ b/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts
@@ -44,7 +44,8 @@ const test = () => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: 'Open Chat Finder Page TTI',
- duration: entry.duration,
+ metric: entry.duration,
+ unit: 'ms',
})
.then(() => {
openSearchPageResolve();
@@ -59,7 +60,8 @@ const test = () => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: 'Load Search Options',
- duration: entry.duration,
+ metric: entry.duration,
+ unit: 'ms',
})
.then(() => {
loadSearchOptionsResolve();
diff --git a/src/libs/E2E/tests/reportTypingTest.e2e.ts b/src/libs/E2E/tests/reportTypingTest.e2e.ts
index 817bda941611..9624d7ab992b 100644
--- a/src/libs/E2E/tests/reportTypingTest.e2e.ts
+++ b/src/libs/E2E/tests/reportTypingTest.e2e.ts
@@ -53,7 +53,8 @@ const test = (config: NativeConfig) => {
E2EClient.submitTestResults({
branch: Config.E2E_BRANCH,
name: 'Composer typing rerender count',
- renderCount: rerenderCount,
+ metric: rerenderCount,
+ unit: 'renders',
}).then(E2EClient.submitTestDone);
}, 3000);
})
diff --git a/src/libs/E2E/types.ts b/src/libs/E2E/types.ts
index fdbc01872cb3..8640c76e631e 100644
--- a/src/libs/E2E/types.ts
+++ b/src/libs/E2E/types.ts
@@ -33,6 +33,8 @@ type TestModule = {default: Test};
type Tests = Record, Test>;
+type Unit = 'ms' | 'MB' | '%' | 'renders' | 'FPS';
+
type TestResult = {
/** Name of the test */
name: string;
@@ -40,8 +42,8 @@ type TestResult = {
/** The branch where test were running */
branch?: string;
- /** Duration in milliseconds */
- duration?: number;
+ /** The numeric value of the measurement */
+ metric?: number;
/** Optional, if set indicates that the test run failed and has no valid results. */
error?: string;
@@ -52,8 +54,8 @@ type TestResult = {
*/
isCritical?: boolean;
- /** Render count */
- renderCount?: number;
+ /** The unit of the measurement */
+ unit?: Unit;
};
-export type {SigninParams, IsE2ETestSession, NetworkCacheMap, NetworkCacheEntry, TestConfig, TestResult, TestModule, Tests};
+export type {SigninParams, IsE2ETestSession, NetworkCacheMap, NetworkCacheEntry, TestConfig, TestResult, TestModule, Tests, Unit};
diff --git a/src/libs/LoginUtils.ts b/src/libs/LoginUtils.ts
index ded60ab3e800..191fd72db4e9 100644
--- a/src/libs/LoginUtils.ts
+++ b/src/libs/LoginUtils.ts
@@ -21,7 +21,14 @@ function getPhoneNumberWithoutSpecialChars(phone: string): string {
* Append user country code to the phone number
*/
function appendCountryCode(phone: string): string {
- return phone.startsWith('+') ? phone : `+${countryCodeByIP}${phone}`;
+ if (phone.startsWith('+')) {
+ return phone;
+ }
+ const phoneWithCountryCode = `+${countryCodeByIP}${phone}`;
+ if (parsePhoneNumber(phoneWithCountryCode).possible) {
+ return phoneWithCountryCode;
+ }
+ return `+${phone}`;
}
/**
diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx
index c9773f104393..ba296522ccef 100644
--- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx
+++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx
@@ -48,6 +48,7 @@ import createCustomStackNavigator from './createCustomStackNavigator';
import defaultScreenOptions from './defaultScreenOptions';
import getRootNavigatorScreenOptions from './getRootNavigatorScreenOptions';
import BottomTabNavigator from './Navigators/BottomTabNavigator';
+import ExplanationModalNavigator from './Navigators/ExplanationModalNavigator';
import FeatureTrainingModalNavigator from './Navigators/FeatureTrainingModalNavigator';
import FullScreenNavigator from './Navigators/FullScreenNavigator';
import LeftModalNavigator from './Navigators/LeftModalNavigator';
@@ -76,16 +77,20 @@ const loadReportAvatar = () => require('../../../pages/Rep
const loadReceiptView = () => require('../../../pages/TransactionReceiptPage').default;
const loadWorkspaceJoinUser = () => require('@pages/workspace/WorkspaceJoinUserPage').default;
-function getCentralPaneScreenInitialParams(screenName: CentralPaneName): Partial> {
+function shouldOpenOnAdminRoom() {
const url = getCurrentUrl();
- const openOnAdminRoom = url ? new URL(url).searchParams.get('openOnAdminRoom') : undefined;
+ return url ? new URL(url).searchParams.get('openOnAdminRoom') === 'true' : false;
+}
+function getCentralPaneScreenInitialParams(screenName: CentralPaneName): Partial> {
if (screenName === SCREENS.SEARCH.CENTRAL_PANE) {
return {sortBy: CONST.SEARCH.TABLE_COLUMNS.DATE, sortOrder: CONST.SEARCH.SORT_ORDER.DESC};
}
- if (screenName === SCREENS.REPORT && openOnAdminRoom === 'true') {
- return {openOnAdminRoom: true};
+ if (screenName === SCREENS.REPORT) {
+ return {
+ openOnAdminRoom: shouldOpenOnAdminRoom() ? true : undefined,
+ };
}
return undefined;
@@ -416,6 +421,11 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
options={screenOptions.fullScreen}
component={DesktopSignInRedirectPage}
/>
+ React.ComponentType>>;
const CENTRAL_PANE_SCREENS = {
- [SCREENS.SETTINGS.WORKSPACES]: () => withPrepareCentralPaneScreen(require('../../../pages/workspace/WorkspacesListPage').default),
- [SCREENS.SETTINGS.PREFERENCES.ROOT]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/Preferences/PreferencesPage').default),
- [SCREENS.SETTINGS.SECURITY]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/Security/SecuritySettingsPage').default),
- [SCREENS.SETTINGS.PROFILE.ROOT]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/Profile/ProfilePage').default),
- [SCREENS.SETTINGS.WALLET.ROOT]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/Wallet/WalletPage').default),
- [SCREENS.SETTINGS.ABOUT]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/AboutPage/AboutPage').default),
- [SCREENS.SETTINGS.TROUBLESHOOT]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/Troubleshoot/TroubleshootPage').default),
- [SCREENS.SETTINGS.SAVE_THE_WORLD]: () => withPrepareCentralPaneScreen(require('../../../pages/TeachersUnite/SaveTheWorldPage').default),
- [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: () => withPrepareCentralPaneScreen(require('../../../pages/settings/Subscription/SubscriptionSettingsPage').default),
- [SCREENS.SEARCH.CENTRAL_PANE]: () => withPrepareCentralPaneScreen(require('../../../pages/Search/SearchPage').default),
- [SCREENS.REPORT]: () => withPrepareCentralPaneScreen(require('./ReportScreenWrapper').default),
+ [SCREENS.SETTINGS.WORKSPACES]: withPrepareCentralPaneScreen(() => require('../../../pages/workspace/WorkspacesListPage').default),
+ [SCREENS.SETTINGS.PREFERENCES.ROOT]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/Preferences/PreferencesPage').default),
+ [SCREENS.SETTINGS.SECURITY]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/Security/SecuritySettingsPage').default),
+ [SCREENS.SETTINGS.PROFILE.ROOT]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/Profile/ProfilePage').default),
+ [SCREENS.SETTINGS.WALLET.ROOT]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/Wallet/WalletPage').default),
+ [SCREENS.SETTINGS.ABOUT]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/AboutPage/AboutPage').default),
+ [SCREENS.SETTINGS.TROUBLESHOOT]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/Troubleshoot/TroubleshootPage').default),
+ [SCREENS.SETTINGS.SAVE_THE_WORLD]: withPrepareCentralPaneScreen(() => require('../../../pages/TeachersUnite/SaveTheWorldPage').default),
+ [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: withPrepareCentralPaneScreen(() => require('../../../pages/settings/Subscription/SubscriptionSettingsPage').default),
+ [SCREENS.SEARCH.CENTRAL_PANE]: withPrepareCentralPaneScreen(() => require('../../../pages/Search/SearchPage').default),
+ [SCREENS.REPORT]: withPrepareCentralPaneScreen(() => require('../../../pages/home/ReportScreen').default),
} satisfies Screens;
export default CENTRAL_PANE_SCREENS;
diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx
index cb13c347d8aa..e0fb17f882d3 100644
--- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx
+++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx
@@ -318,15 +318,49 @@ const SettingsModalStackNavigator = createModalStackNavigator('../../../../pages/workspace/accounting/xero/export/XeroPreferredExporterSelectPage').default,
[SCREENS.WORKSPACE.ACCOUNTING.XERO_BILL_PAYMENT_ACCOUNT_SELECTOR]: () =>
require('../../../../pages/workspace/accounting/xero/advanced/XeroBillPaymentAccountSelectorPage').default,
+
[SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_SUBSIDIARY_SELECTOR]: () => require('../../../../pages/workspace/accounting/netsuite/NetSuiteSubsidiarySelector').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_IMPORT]: () => require('../../../../pages/workspace/accounting/netsuite/import/NetSuiteImportPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT]: () => require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteExportConfigurationPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PREFERRED_EXPORTER_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuitePreferredExporterSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_DATE_SELECT]: () => require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteDateSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES]: () => require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteExportExpensesPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteExportExpensesDestinationSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteExportExpensesVendorSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteExportExpensesPayableAccountSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteExportExpensesJournalPostingPreferenceSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_RECEIVABLE_ACCOUNT_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteReceivableAccountSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteInvoiceItemPreferenceSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteInvoiceItemSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_TAX_POSTING_ACCOUNT_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteTaxPostingAccountSelectPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT]: () =>
+ require('../../../../pages/workspace/accounting/netsuite/export/NetSuiteProvincialTaxPostingAccountSelectPage').default,
+
+ [SCREENS.WORKSPACE.ACCOUNTING.SAGE_INTACCT_PREREQUISITES]: () => require('../../../../pages/workspace/accounting/intacct/IntacctPrerequisitesPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.ENTER_SAGE_INTACCT_CREDENTIALS]: () =>
+ require('../../../../pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage').default,
+ [SCREENS.WORKSPACE.ACCOUNTING.EXISTING_SAGE_INTACCT_CONNECTIONS]: () => require('../../../../pages/workspace/accounting/intacct/ExistingConnectionsPage').default,
[SCREENS.WORKSPACE.WORKFLOWS_AUTO_REPORTING_FREQUENCY]: () => require('../../../../pages/workspace/workflows/WorkspaceAutoReportingFrequencyPage').default,
[SCREENS.WORKSPACE.WORKFLOWS_AUTO_REPORTING_MONTHLY_OFFSET]: () => require('../../../../pages/workspace/workflows/WorkspaceAutoReportingMonthlyOffsetPage').default,
[SCREENS.WORKSPACE.TAX_EDIT]: () => require('../../../../pages/workspace/taxes/WorkspaceEditTaxPage').default,
[SCREENS.WORKSPACE.TAX_NAME]: () => require('../../../../pages/workspace/taxes/NamePage').default,
[SCREENS.WORKSPACE.TAX_VALUE]: () => require('../../../../pages/workspace/taxes/ValuePage').default,
[SCREENS.WORKSPACE.TAX_CREATE]: () => require('../../../../pages/workspace/taxes/WorkspaceCreateTaxPage').default,
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD_ISSUE_NEW]: () => require('../../../../pages/workspace/card/issueNew/IssueNewCardPage').default,
[SCREENS.SETTINGS.SAVE_THE_WORLD]: () => require('../../../../pages/TeachersUnite/SaveTheWorldPage').default,
- [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD]: () => require('../../../../pages/settings/Subscription/PaymentCard/AddPaymentCard').default,
+ [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY]: () => require('../../../../pages/settings/PaymentCard/ChangeCurrency').default,
+ [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY]: () => require('../../../../pages/settings/Subscription/PaymentCard/ChangeBillingCurrency').default,
+ [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD]: () => require('../../../../pages/settings/Subscription/PaymentCard').default,
+ [SCREENS.SETTINGS.ADD_PAYMENT_CARD_CHANGE_CURRENCY]: () => require('../../../../pages/settings/PaymentCard/ChangeCurrency').default,
});
const EnablePaymentsStackNavigator = createModalStackNavigator({
diff --git a/src/libs/Navigation/AppNavigator/Navigators/ExplanationModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/ExplanationModalNavigator.tsx
new file mode 100644
index 000000000000..f4136bb8783a
--- /dev/null
+++ b/src/libs/Navigation/AppNavigator/Navigators/ExplanationModalNavigator.tsx
@@ -0,0 +1,28 @@
+import {createStackNavigator} from '@react-navigation/stack';
+import React from 'react';
+import {View} from 'react-native';
+import NoDropZone from '@components/DragAndDrop/NoDropZone';
+import ExplanationModal from '@components/ExplanationModal';
+import type {ExplanationModalNavigatorParamList} from '@libs/Navigation/types';
+import SCREENS from '@src/SCREENS';
+
+const Stack = createStackNavigator();
+
+function ExplanationModalNavigator() {
+ return (
+
+
+
+
+
+
+
+ );
+}
+
+ExplanationModalNavigator.displayName = 'ExplanationModalNavigator';
+
+export default ExplanationModalNavigator;
diff --git a/src/libs/Navigation/AppNavigator/Navigators/FullScreenNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/FullScreenNavigator.tsx
index 82c5c3fcd855..16e8404f5fe9 100644
--- a/src/libs/Navigation/AppNavigator/Navigators/FullScreenNavigator.tsx
+++ b/src/libs/Navigation/AppNavigator/Navigators/FullScreenNavigator.tsx
@@ -19,6 +19,7 @@ type Screens = Partial React.Co
const CENTRAL_PANE_WORKSPACE_SCREENS = {
[SCREENS.WORKSPACE.PROFILE]: () => require('../../../../pages/workspace/WorkspaceProfilePage').default,
[SCREENS.WORKSPACE.CARD]: () => require('../../../../pages/workspace/card/WorkspaceCardPage').default,
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD]: () => require('../../../../pages/workspace/expensifyCard/WorkspaceExpensifyCardPage').default,
[SCREENS.WORKSPACE.WORKFLOWS]: () => require('../../../../pages/workspace/workflows/WorkspaceWorkflowsPage').default,
[SCREENS.WORKSPACE.REIMBURSE]: () => require('../../../../pages/workspace/reimburse/WorkspaceReimbursePage').default,
[SCREENS.WORKSPACE.BILLS]: () => require('../../../../pages/workspace/bills/WorkspaceBillsPage').default,
diff --git a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts b/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts
deleted file mode 100644
index 5306f6b55054..000000000000
--- a/src/libs/Navigation/AppNavigator/ReportScreenIDSetter.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import {useEffect} from 'react';
-import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
-import {useOnyx} from 'react-native-onyx';
-import useActiveWorkspace from '@hooks/useActiveWorkspace';
-import usePermissions from '@hooks/usePermissions';
-import {getPolicyEmployeeListByIdWithoutCurrentUser} from '@libs/PolicyUtils';
-import * as ReportUtils from '@libs/ReportUtils';
-import ONYXKEYS from '@src/ONYXKEYS';
-import type {Policy, Report, ReportMetadata} from '@src/types/onyx';
-import type {ReportScreenWrapperProps} from './ReportScreenWrapper';
-
-type ReportScreenIDSetterProps = ReportScreenWrapperProps;
-
-/**
- * Get the most recently accessed report for the user
- */
-const getLastAccessedReportID = (
- reports: OnyxCollection,
- ignoreDefaultRooms: boolean,
- policies: OnyxCollection,
- isFirstTimeNewExpensifyUser: OnyxEntry,
- openOnAdminRoom: boolean,
- reportMetadata: OnyxCollection,
- policyID?: string,
- policyMemberAccountIDs?: number[],
-): string | undefined => {
- const lastReport = ReportUtils.findLastAccessedReport(
- reports,
- ignoreDefaultRooms,
- policies,
- !!isFirstTimeNewExpensifyUser,
- openOnAdminRoom,
- reportMetadata,
- policyID,
- policyMemberAccountIDs,
- );
- return lastReport?.reportID;
-};
-
-// This wrapper is responsible for opening the last accessed report if there is no reportID specified in the route params
-function ReportScreenIDSetter({route, navigation}: ReportScreenIDSetterProps) {
- const {canUseDefaultRooms} = usePermissions();
- const {activeWorkspaceID} = useActiveWorkspace();
-
- const [reports] = useOnyx(ONYXKEYS.COLLECTION.REPORT, {allowStaleData: true});
- const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {allowStaleData: true});
- const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
- const [isFirstTimeNewExpensifyUser] = useOnyx(ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER, {initialValue: false});
- const [reportMetadata] = useOnyx(ONYXKEYS.COLLECTION.REPORT_METADATA, {allowStaleData: true});
- const [accountID] = useOnyx(ONYXKEYS.SESSION, {selector: (session) => session?.accountID});
-
- useEffect(() => {
- // Don't update if there is a reportID in the params already
- if (route?.params?.reportID) {
- const reportActionID = route?.params?.reportActionID;
- const regexValidReportActionID = new RegExp(/^\d*$/);
- if (reportActionID && !regexValidReportActionID.test(reportActionID)) {
- navigation.setParams({reportActionID: ''});
- }
- return;
- }
-
- const policyMemberAccountIDs = getPolicyEmployeeListByIdWithoutCurrentUser(policies, activeWorkspaceID, accountID);
-
- // If there is no reportID in route, try to find last accessed and use it for setParams
- const reportID = getLastAccessedReportID(
- reports,
- !canUseDefaultRooms,
- policies,
- isFirstTimeNewExpensifyUser,
- !!reports?.params?.openOnAdminRoom,
- reportMetadata,
- activeWorkspaceID,
- policyMemberAccountIDs,
- );
-
- // It's possible that reports aren't fully loaded yet
- // in that case the reportID is undefined
- if (reportID) {
- navigation.setParams({reportID: String(reportID)});
- }
- }, [route, navigation, reports, canUseDefaultRooms, policies, isFirstTimeNewExpensifyUser, reportMetadata, activeWorkspaceID, personalDetails, accountID]);
-
- // The ReportScreen without the reportID set will display a skeleton
- // until the reportID is loaded and set in the route param
- return null;
-}
-
-ReportScreenIDSetter.displayName = 'ReportScreenIDSetter';
-
-export default ReportScreenIDSetter;
diff --git a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx b/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx
deleted file mode 100644
index 692bbf8edde2..000000000000
--- a/src/libs/Navigation/AppNavigator/ReportScreenWrapper.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import type {StackScreenProps} from '@react-navigation/stack';
-import React from 'react';
-import type {AuthScreensParamList} from '@navigation/types';
-import ReportScreen from '@pages/home/ReportScreen';
-import type SCREENS from '@src/SCREENS';
-import ReportScreenIDSetter from './ReportScreenIDSetter';
-
-type ReportScreenWrapperProps = StackScreenProps;
-
-function ReportScreenWrapper({route, navigation}: ReportScreenWrapperProps) {
- // The ReportScreen without the reportID set will display a skeleton
- // until the reportID is loaded and set in the route param
- return (
- <>
-
-
- >
- );
-}
-
-ReportScreenWrapper.displayName = 'ReportScreenWrapper';
-
-export default ReportScreenWrapper;
-export type {ReportScreenWrapperProps};
diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.tsx
index 472d2c7d6d29..772c51915d1d 100644
--- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.tsx
+++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.tsx
@@ -1,6 +1,6 @@
import {useNavigation, useNavigationState} from '@react-navigation/native';
import React, {memo, useCallback, useEffect} from 'react';
-import {View} from 'react-native';
+import {NativeModules, View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import Icon from '@components/Icon';
@@ -17,7 +17,7 @@ import getTopmostBottomTabRoute from '@libs/Navigation/getTopmostBottomTabRoute'
import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute';
import Navigation from '@libs/Navigation/Navigation';
import type {RootStackParamList, State} from '@libs/Navigation/types';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import {getChatTabBrickRoad} from '@libs/WorkspacesSettingsUtils';
import BottomTabAvatar from '@pages/home/sidebar/BottomTabAvatar';
import BottomTabBarFloatingActionButton from '@pages/home/sidebar/BottomTabBarFloatingActionButton';
@@ -52,6 +52,11 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
return;
}
+ // HybridApp has own entry point when we decide whether to display onboarding and explanation modal.
+ if (NativeModules.HybridAppModule) {
+ return;
+ }
+
Welcome.isOnboardingFlowCompleted({onNotCompleted: () => Navigation.navigate(ROUTES.ONBOARDING_ROOT)});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoadingApp]);
@@ -71,9 +76,12 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
const chatTabBrickRoad = getChatTabBrickRoad(activeWorkspaceID);
const navigateToChats = useCallback(() => {
+ if (currentTabName === SCREENS.HOME) {
+ return;
+ }
const route = activeWorkspaceID ? (`/w/${activeWorkspaceID}/home` as Route) : ROUTES.HOME;
Navigation.navigate(route);
- }, [activeWorkspaceID]);
+ }, [activeWorkspaceID, currentTabName]);
return (
@@ -101,6 +109,9 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
{
+ if (currentTabName === SCREENS.SEARCH.BOTTOM_TAB || currentTabName === SCREENS.SEARCH.CENTRAL_PANE) {
+ return;
+ }
interceptAnonymousUser(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH.TAB.ALL)));
}}
role={CONST.ROLE.BUTTON}
diff --git a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.website.tsx b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.website.tsx
index 9fe78273bdb0..90a7a0df056f 100644
--- a/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.website.tsx
+++ b/src/libs/Navigation/AppNavigator/createCustomBottomTabNavigator/BottomTabBar/index.website.tsx
@@ -17,7 +17,7 @@ import getTopmostBottomTabRoute from '@libs/Navigation/getTopmostBottomTabRoute'
import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute';
import Navigation from '@libs/Navigation/Navigation';
import type {RootStackParamList, State} from '@libs/Navigation/types';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import {getChatTabBrickRoad} from '@libs/WorkspacesSettingsUtils';
import BottomTabAvatar from '@pages/home/sidebar/BottomTabAvatar';
import BottomTabBarFloatingActionButton from '@pages/home/sidebar/BottomTabBarFloatingActionButton';
@@ -72,9 +72,12 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
const chatTabBrickRoad = getChatTabBrickRoad(activeWorkspaceID);
const navigateToChats = useCallback(() => {
+ if (currentTabName === SCREENS.HOME) {
+ return;
+ }
const route = activeWorkspaceID ? (`/w/${activeWorkspaceID}/home` as Route) : ROUTES.HOME;
Navigation.navigate(route);
- }, [activeWorkspaceID]);
+ }, [activeWorkspaceID, currentTabName]);
return (
@@ -102,6 +105,9 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
{
+ if (currentTabName === SCREENS.SEARCH.BOTTOM_TAB || currentTabName === SCREENS.SEARCH.CENTRAL_PANE) {
+ return;
+ }
interceptAnonymousUser(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH.TAB.ALL)));
}}
role={CONST.ROLE.BUTTON}
diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.ts b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.ts
index fa7e8a55d1fc..a1768df5e0d6 100644
--- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.ts
+++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/CustomRouter.ts
@@ -7,7 +7,7 @@ import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRo
import linkingConfig from '@libs/Navigation/linkingConfig';
import getAdaptedStateFromPath from '@libs/Navigation/linkingConfig/getAdaptedStateFromPath';
import type {NavigationPartialRoute, RootStackParamList, State} from '@libs/Navigation/types';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import NAVIGATORS from '@src/NAVIGATORS';
import SCREENS from '@src/SCREENS';
import type {ResponsiveStackNavigatorRouterOptions} from './types';
diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
index 84123dbfa569..310766f80e9d 100644
--- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
+++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
@@ -9,7 +9,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions';
import getTopmostCentralPaneRoute from '@libs/Navigation/getTopmostCentralPaneRoute';
import navigationRef from '@libs/Navigation/navigationRef';
import type {RootStackParamList, State} from '@libs/Navigation/types';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import SCREENS from '@src/SCREENS';
import CustomRouter from './CustomRouter';
import type {ResponsiveStackNavigatorProps, ResponsiveStackNavigatorRouterOptions} from './types';
diff --git a/src/libs/Navigation/Navigation.ts b/src/libs/Navigation/Navigation.ts
index 5a7182405681..e9bfb7227403 100644
--- a/src/libs/Navigation/Navigation.ts
+++ b/src/libs/Navigation/Navigation.ts
@@ -4,7 +4,7 @@ import {CommonActions, getPathFromState, StackActions} from '@react-navigation/n
import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
import Log from '@libs/Log';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName, removePolicyIDParamFromState} from '@libs/NavigationUtils';
import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import NAVIGATORS from '@src/NAVIGATORS';
@@ -129,7 +129,9 @@ function getDistanceFromPathInRootNavigator(path?: string): number {
break;
}
- const pathFromState = getPathFromState(currentState, linkingConfig.config);
+ // When comparing path and pathFromState, the policyID parameter isn't included in the comparison
+ const currentStateWithoutPolicyID = removePolicyIDParamFromState(currentState as State);
+ const pathFromState = getPathFromState(currentStateWithoutPolicyID, linkingConfig.config);
if (path === pathFromState.substring(1)) {
return index;
}
diff --git a/src/libs/Navigation/NavigationRoot.tsx b/src/libs/Navigation/NavigationRoot.tsx
index eaaf5eae12c0..dd3a2890d0ec 100644
--- a/src/libs/Navigation/NavigationRoot.tsx
+++ b/src/libs/Navigation/NavigationRoot.tsx
@@ -1,6 +1,7 @@
import type {NavigationState} from '@react-navigation/native';
import {DefaultTheme, findFocusedRoute, NavigationContainer} from '@react-navigation/native';
import React, {useContext, useEffect, useMemo, useRef} from 'react';
+import HybridAppMiddleware from '@components/HybridAppMiddleware';
import {ScrollOffsetContext} from '@components/ScrollOffsetContextProvider';
import useActiveWorkspace from '@hooks/useActiveWorkspace';
import useCurrentReportID from '@hooks/useCurrentReportID';
@@ -152,7 +153,10 @@ function NavigationRoot({authenticated, lastVisitedPath, initialUrl, onReady}: N
enabled: false,
}}
>
-
+ {/* HybridAppMiddleware needs to have access to navigation ref and SplashScreenHidden context */}
+
+
+
);
}
diff --git a/src/libs/Navigation/dismissModalWithReport.ts b/src/libs/Navigation/dismissModalWithReport.ts
index 1bb939f5230f..1579a0565726 100644
--- a/src/libs/Navigation/dismissModalWithReport.ts
+++ b/src/libs/Navigation/dismissModalWithReport.ts
@@ -4,7 +4,7 @@ import {StackActions} from '@react-navigation/native';
import {findLastIndex} from 'lodash';
import type {OnyxEntry} from 'react-native-onyx';
import Log from '@libs/Log';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import getPolicyEmployeeAccountIDs from '@libs/PolicyEmployeeListUtils';
import {doesReportBelongToWorkspace} from '@libs/ReportUtils';
import NAVIGATORS from '@src/NAVIGATORS';
diff --git a/src/libs/Navigation/getTopmostCentralPaneRoute.ts b/src/libs/Navigation/getTopmostCentralPaneRoute.ts
index 977f23cd3cd7..5ac72281eaf6 100644
--- a/src/libs/Navigation/getTopmostCentralPaneRoute.ts
+++ b/src/libs/Navigation/getTopmostCentralPaneRoute.ts
@@ -1,4 +1,4 @@
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import type {CentralPaneName, NavigationPartialRoute, RootStackParamList, State} from './types';
// Get the name of topmost central pane route in the navigation stack.
diff --git a/src/libs/Navigation/getTopmostReportActionID.ts b/src/libs/Navigation/getTopmostReportActionID.ts
index ade982c87b7d..d3c6e41887d8 100644
--- a/src/libs/Navigation/getTopmostReportActionID.ts
+++ b/src/libs/Navigation/getTopmostReportActionID.ts
@@ -1,5 +1,5 @@
import type {NavigationState, PartialState} from '@react-navigation/native';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import SCREENS from '@src/SCREENS';
import type {RootStackParamList} from './types';
diff --git a/src/libs/Navigation/getTopmostReportId.ts b/src/libs/Navigation/getTopmostReportId.ts
index 19bf24f1ba74..dc53d040f087 100644
--- a/src/libs/Navigation/getTopmostReportId.ts
+++ b/src/libs/Navigation/getTopmostReportId.ts
@@ -1,5 +1,5 @@
import type {NavigationState, PartialState} from '@react-navigation/native';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import SCREENS from '@src/SCREENS';
import type {RootStackParamList} from './types';
diff --git a/src/libs/Navigation/linkTo/getActionForBottomTabNavigator.ts b/src/libs/Navigation/linkTo/getActionForBottomTabNavigator.ts
index 8af683e273d6..85580d068ad7 100644
--- a/src/libs/Navigation/linkTo/getActionForBottomTabNavigator.ts
+++ b/src/libs/Navigation/linkTo/getActionForBottomTabNavigator.ts
@@ -13,7 +13,6 @@ function getActionForBottomTabNavigator(
shouldNavigate?: boolean,
): Writable | undefined {
const bottomTabNavigatorRoute = state.routes.at(0);
-
if (!bottomTabNavigatorRoute || bottomTabNavigatorRoute.state === undefined || !action || action.type !== CONST.NAVIGATION.ACTION_TYPE.NAVIGATE) {
return;
}
@@ -22,10 +21,10 @@ function getActionForBottomTabNavigator(
let payloadParams = params.params as Record;
const screen = params.screen;
- if (!payloadParams) {
- payloadParams = {policyID};
- } else if (!('policyID' in payloadParams && !!payloadParams?.policyID)) {
+ if (policyID && !payloadParams?.policyID) {
payloadParams = {...payloadParams, policyID};
+ } else if (!policyID) {
+ delete payloadParams?.policyID;
}
// Check if the current bottom tab is the same as the one we want to navigate to. If it is, we don't need to do anything.
diff --git a/src/libs/Navigation/linkTo/index.ts b/src/libs/Navigation/linkTo/index.ts
index 90e52d02163c..2c23cf573248 100644
--- a/src/libs/Navigation/linkTo/index.ts
+++ b/src/libs/Navigation/linkTo/index.ts
@@ -4,7 +4,7 @@ import {findFocusedRoute} from '@react-navigation/native';
import {omitBy} from 'lodash';
import getIsNarrowLayout from '@libs/getIsNarrowLayout';
import extractPolicyIDsFromState from '@libs/Navigation/linkingConfig/extractPolicyIDsFromState';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import shallowCompare from '@libs/ObjectUtils';
import {extractPolicyIDFromPath, getPathWithoutPolicyID} from '@libs/PolicyUtils';
import getActionsFromPartialDiff from '@navigation/AppNavigator/getActionsFromPartialDiff';
@@ -72,17 +72,21 @@ export default function linkTo(navigation: NavigationContainerRef | undefined, (value) => value === undefined),
- omitBy(actionParams?.params as Record | undefined, (value) => value === undefined),
+ omitBy(targetParams as Record | undefined, (value) => value === undefined),
);
// If this action is navigating to the report screen and the top most navigator is different from the one we want to navigate - PUSH the new screen to the top of the stack by default
@@ -110,8 +114,8 @@ export default function linkTo(navigation: NavigationContainerRef).policyIDs = policyID;
+ if (targetName === SCREENS.SEARCH.CENTRAL_PANE && targetParams && policyID) {
+ (targetParams as Record).policyIDs = policyID;
}
// If the type is UP, we deeplinked into one of the RHP flows and we want to replace the current screen with the previous one in the flow
diff --git a/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
index c4858d3141f1..1192e4649ea0 100755
--- a/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
+++ b/src/libs/Navigation/linkingConfig/CENTRAL_PANE_TO_RHP_MAPPING.ts
@@ -39,7 +39,13 @@ const CENTRAL_PANE_TO_RHP_MAPPING: Partial> =
[SCREENS.SETTINGS.SAVE_THE_WORLD]: [SCREENS.I_KNOW_A_TEACHER, SCREENS.INTRO_SCHOOL_PRINCIPAL, SCREENS.I_AM_A_TEACHER],
[SCREENS.SETTINGS.TROUBLESHOOT]: [SCREENS.SETTINGS.CONSOLE],
[SCREENS.SEARCH.CENTRAL_PANE]: [SCREENS.SEARCH.REPORT_RHP],
- [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: [SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD, SCREENS.SETTINGS.SUBSCRIPTION.SIZE, SCREENS.SETTINGS.SUBSCRIPTION.DISABLE_AUTO_RENEW_SURVEY],
+ [SCREENS.SETTINGS.SUBSCRIPTION.ROOT]: [
+ SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD,
+ SCREENS.SETTINGS.SUBSCRIPTION.SIZE,
+ SCREENS.SETTINGS.SUBSCRIPTION.DISABLE_AUTO_RENEW_SURVEY,
+ SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY,
+ SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY,
+ ],
};
export default CENTRAL_PANE_TO_RHP_MAPPING;
diff --git a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts
index 5defdd9d2e08..1ebbdb5aa0df 100755
--- a/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts
+++ b/src/libs/Navigation/linkingConfig/FULL_SCREEN_TO_RHP_MAPPING.ts
@@ -11,6 +11,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = {
SCREENS.WORKSPACE.OWNER_CHANGE_CHECK,
SCREENS.WORKSPACE.OWNER_CHANGE_SUCCESS,
SCREENS.WORKSPACE.OWNER_CHANGE_ERROR,
+ SCREENS.WORKSPACE.OWNER_CHANGE_ERROR,
],
[SCREENS.WORKSPACE.WORKFLOWS]: [
SCREENS.WORKSPACE.WORKFLOWS_APPROVER,
@@ -55,6 +56,23 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = {
SCREENS.WORKSPACE.ACCOUNTING.XERO_BILL_PAYMENT_ACCOUNT_SELECTOR,
SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT_BANK_ACCOUNT_SELECT,
SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_SUBSIDIARY_SELECTOR,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_IMPORT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PREFERRED_EXPORTER_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_DATE_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_RECEIVABLE_ACCOUNT_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_TAX_POSTING_ACCOUNT_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT,
+ SCREENS.WORKSPACE.ACCOUNTING.SAGE_INTACCT_PREREQUISITES,
+ SCREENS.WORKSPACE.ACCOUNTING.ENTER_SAGE_INTACCT_CREDENTIALS,
+ SCREENS.WORKSPACE.ACCOUNTING.EXISTING_SAGE_INTACCT_CONNECTIONS,
],
[SCREENS.WORKSPACE.TAXES]: [
SCREENS.WORKSPACE.TAXES_SETTINGS,
@@ -85,6 +103,7 @@ const FULL_SCREEN_TO_RHP_MAPPING: Partial> = {
SCREENS.WORKSPACE.DISTANCE_RATE_DETAILS,
],
[SCREENS.WORKSPACE.REPORT_FIELDS]: [],
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD]: [],
};
export default FULL_SCREEN_TO_RHP_MAPPING;
diff --git a/src/libs/Navigation/linkingConfig/config.ts b/src/libs/Navigation/linkingConfig/config.ts
index bba611136450..01b467fb53de 100644
--- a/src/libs/Navigation/linkingConfig/config.ts
+++ b/src/libs/Navigation/linkingConfig/config.ts
@@ -92,6 +92,14 @@ const config: LinkingOptions['config'] = {
},
},
},
+ [NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR]: {
+ screens: {
+ [SCREENS.EXPLANATION_MODAL.ROOT]: {
+ path: ROUTES.EXPLANATION_MODAL_ROOT,
+ exact: true,
+ },
+ },
+ },
[NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR]: {
path: ROUTES.ONBOARDING_ROOT,
initialRouteName: SCREENS.ONBOARDING.PURPOSE,
@@ -126,6 +134,18 @@ const config: LinkingOptions['config'] = {
path: ROUTES.SETTINGS_SUBSCRIPTION_ADD_PAYMENT_CARD,
exact: true,
},
+ [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY]: {
+ path: ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_BILLING_CURRENCY,
+ exact: true,
+ },
+ [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY]: {
+ path: ROUTES.SETTINGS_SUBSCRIPTION_CHANGE_PAYMENT_CURRENCY,
+ exact: true,
+ },
+ [SCREENS.SETTINGS.ADD_PAYMENT_CARD_CHANGE_CURRENCY]: {
+ path: ROUTES.SETTINGS_CHANGE_CURRENCY,
+ exact: true,
+ },
[SCREENS.SETTINGS.PREFERENCES.THEME]: {
path: ROUTES.SETTINGS_THEME,
exact: true,
@@ -334,6 +354,49 @@ const config: LinkingOptions['config'] = {
[SCREENS.WORKSPACE.ACCOUNTING.XERO_EXPORT_PREFERRED_EXPORTER_SELECT]: {path: ROUTES.POLICY_ACCOUNTING_XERO_PREFERRED_EXPORTER_SELECT.route},
[SCREENS.WORKSPACE.ACCOUNTING.XERO_BILL_PAYMENT_ACCOUNT_SELECTOR]: {path: ROUTES.POLICY_ACCOUNTING_XERO_BILL_PAYMENT_ACCOUNT_SELECTOR.route},
[SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_SUBSIDIARY_SELECTOR]: {path: ROUTES.POLICY_ACCOUNTING_NETSUITE_SUBSIDIARY_SELECTOR.route},
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_IMPORT]: {path: ROUTES.POLICY_ACCOUNTING_NETSUITE_IMPORT.route},
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_EXPORT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PREFERRED_EXPORTER_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_PREFERRED_EXPORTER_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_DATE_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_DATE_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_RECEIVABLE_ACCOUNT_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_RECEIVABLE_ACCOUNT_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_INVOICE_ITEM_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_TAX_POSTING_ACCOUNT_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_TAX_POSTING_ACCOUNT_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT]: {
+ path: ROUTES.POLICY_ACCOUNTING_NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT.route,
+ },
+ [SCREENS.WORKSPACE.ACCOUNTING.SAGE_INTACCT_PREREQUISITES]: {path: ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_PREREQUISITES.route},
+ [SCREENS.WORKSPACE.ACCOUNTING.ENTER_SAGE_INTACCT_CREDENTIALS]: {path: ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_ENTER_CREDENTIALS.route},
+ [SCREENS.WORKSPACE.ACCOUNTING.EXISTING_SAGE_INTACCT_CONNECTIONS]: {path: ROUTES.POLICY_ACCOUNTING_SAGE_INTACCT_EXISTING_CONNECTIONS.route},
[SCREENS.WORKSPACE.DESCRIPTION]: {
path: ROUTES.WORKSPACE_PROFILE_DESCRIPTION.route,
},
@@ -346,6 +409,9 @@ const config: LinkingOptions['config'] = {
[SCREENS.WORKSPACE.SHARE]: {
path: ROUTES.WORKSPACE_PROFILE_SHARE.route,
},
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD_ISSUE_NEW]: {
+ path: ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW,
+ },
[SCREENS.WORKSPACE.RATE_AND_UNIT]: {
path: ROUTES.WORKSPACE_RATE_AND_UNIT.route,
},
@@ -762,6 +828,9 @@ const config: LinkingOptions['config'] = {
[SCREENS.WORKSPACE.CARD]: {
path: ROUTES.WORKSPACE_CARD.route,
},
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD]: {
+ path: ROUTES.WORKSPACE_EXPENSIFY_CARD.route,
+ },
[SCREENS.WORKSPACE.WORKFLOWS]: {
path: ROUTES.WORKSPACE_WORKFLOWS.route,
},
diff --git a/src/libs/Navigation/linkingConfig/customGetPathFromState.ts b/src/libs/Navigation/linkingConfig/customGetPathFromState.ts
index 3ae1ed245ec6..a9c9b6f23b19 100644
--- a/src/libs/Navigation/linkingConfig/customGetPathFromState.ts
+++ b/src/libs/Navigation/linkingConfig/customGetPathFromState.ts
@@ -1,22 +1,13 @@
import {getPathFromState} from '@react-navigation/native';
-import _ from 'lodash';
import getPolicyIDFromState from '@libs/Navigation/getPolicyIDFromState';
import getTopmostBottomTabRoute from '@libs/Navigation/getTopmostBottomTabRoute';
import type {BottomTabName, RootStackParamList, State} from '@libs/Navigation/types';
+import {removePolicyIDParamFromState} from '@libs/NavigationUtils';
import SCREENS from '@src/SCREENS';
// The policy ID parameter should be included in the URL when any of these pages is opened in the bottom tab.
const SCREENS_WITH_POLICY_ID_IN_URL: BottomTabName[] = [SCREENS.HOME] as const;
-const removePolicyIDParamFromState = (state: State) => {
- const stateCopy = _.cloneDeep(state);
- const bottomTabRoute = getTopmostBottomTabRoute(stateCopy);
- if (bottomTabRoute?.params && 'policyID' in bottomTabRoute.params) {
- delete bottomTabRoute.params.policyID;
- }
- return stateCopy;
-};
-
const customGetPathFromState: typeof getPathFromState = (state, options) => {
// For the Home and Settings pages we should remove policyID from the params, because on small screens it's displayed twice in the URL
const stateWithoutPolicyID = removePolicyIDParamFromState(state as State);
diff --git a/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts b/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
index 17ea0e17d1b9..2b057bf5edaa 100644
--- a/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
+++ b/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
@@ -4,7 +4,7 @@ import type {TupleToUnion} from 'type-fest';
import {isAnonymousUser} from '@libs/actions/Session';
import getIsNarrowLayout from '@libs/getIsNarrowLayout';
import type {BottomTabName, CentralPaneName, FullScreenName, NavigationPartialRoute, RootStackParamList} from '@libs/Navigation/types';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import {extractPolicyIDFromPath, getPathWithoutPolicyID} from '@libs/PolicyUtils';
import CONST from '@src/CONST';
import NAVIGATORS from '@src/NAVIGATORS';
diff --git a/src/libs/Navigation/linkingConfig/getMatchingBottomTabRouteForState.ts b/src/libs/Navigation/linkingConfig/getMatchingBottomTabRouteForState.ts
index 4b4ed25959f0..67d76de4932d 100644
--- a/src/libs/Navigation/linkingConfig/getMatchingBottomTabRouteForState.ts
+++ b/src/libs/Navigation/linkingConfig/getMatchingBottomTabRouteForState.ts
@@ -23,7 +23,7 @@ function getMatchingBottomTabRouteForState(state: State, pol
const tabName = CENTRAL_PANE_TO_TAB_MAPPING[topmostCentralPaneRoute.name];
if (tabName === SCREENS.SEARCH.BOTTOM_TAB) {
- const topmostCentralPaneRouteParams = topmostCentralPaneRoute.params as Record;
+ const topmostCentralPaneRouteParams = {...topmostCentralPaneRoute.params} as Record;
delete topmostCentralPaneRouteParams?.policyIDs;
if (policyID) {
topmostCentralPaneRouteParams.policyID = policyID;
diff --git a/src/libs/Navigation/switchPolicyID.ts b/src/libs/Navigation/switchPolicyID.ts
index 59461bfc3c8f..0f6477a9ee0e 100644
--- a/src/libs/Navigation/switchPolicyID.ts
+++ b/src/libs/Navigation/switchPolicyID.ts
@@ -3,7 +3,7 @@ import type {NavigationAction, NavigationContainerRef, NavigationState, PartialS
import {getPathFromState} from '@react-navigation/native';
import type {Writable} from 'type-fest';
import getIsNarrowLayout from '@libs/getIsNarrowLayout';
-import isCentralPaneName from '@libs/NavigationUtils';
+import {isCentralPaneName} from '@libs/NavigationUtils';
import CONST from '@src/CONST';
import type {Route} from '@src/ROUTES';
import ROUTES from '@src/ROUTES';
diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts
index 4f09e3a42d58..0a2809d97208 100644
--- a/src/libs/Navigation/types.ts
+++ b/src/libs/Navigation/types.ts
@@ -254,6 +254,8 @@ type SettingsNavigatorParamList = {
canChangeSize: 0 | 1;
};
[SCREENS.SETTINGS.SUBSCRIPTION.ADD_PAYMENT_CARD]: undefined;
+ [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_BILLING_CURRENCY]: undefined;
+ [SCREENS.SETTINGS.SUBSCRIPTION.CHANGE_PAYMENT_CURRENCY]: undefined;
[SCREENS.WORKSPACE.TAXES_SETTINGS]: {
policyID: string;
};
@@ -385,9 +387,65 @@ type SettingsNavigatorParamList = {
[SCREENS.WORKSPACE.ACCOUNTING.XERO_BILL_PAYMENT_ACCOUNT_SELECTOR]: {
policyID: string;
};
+ [SCREENS.WORKSPACE.ACCOUNTING.SAGE_INTACCT_PREREQUISITES]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.ENTER_SAGE_INTACCT_CREDENTIALS]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.EXISTING_SAGE_INTACCT_CONNECTIONS]: {
+ policyID: string;
+ };
[SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_SUBSIDIARY_SELECTOR]: {
policyID: string;
};
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_IMPORT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PREFERRED_EXPORTER_SELECT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_DATE_SELECT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES]: {
+ policyID: string;
+ expenseType: ValueOf;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_DESTINATION_SELECT]: {
+ policyID: string;
+ expenseType: ValueOf;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT]: {
+ policyID: string;
+ expenseType: ValueOf;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_PAYABLE_ACCOUNT_SELECT]: {
+ policyID: string;
+ expenseType: ValueOf;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_EXPORT_EXPENSES_JOURNAL_POSTING_PREFERENCE_SELECT]: {
+ policyID: string;
+ expenseType: ValueOf;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_RECEIVABLE_ACCOUNT_SELECT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_PREFERENCE_SELECT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_INVOICE_ITEM_SELECT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_TAX_POSTING_ACCOUNT_SELECT]: {
+ policyID: string;
+ };
+ [SCREENS.WORKSPACE.ACCOUNTING.NETSUITE_PROVINCIAL_TAX_POSTING_ACCOUNT_SELECT]: {
+ policyID: string;
+ };
[SCREENS.GET_ASSISTANCE]: {
backTo: Routes;
};
@@ -798,9 +856,15 @@ type FullScreenNavigatorParamList = {
[SCREENS.WORKSPACE.CARD]: {
policyID: string;
};
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD]: {
+ policyID: string;
+ };
[SCREENS.WORKSPACE.WORKFLOWS]: {
policyID: string;
};
+ [SCREENS.WORKSPACE.EXPENSIFY_CARD]: {
+ policyID: string;
+ };
[SCREENS.WORKSPACE.WORKFLOWS_APPROVER]: {
policyID: string;
};
@@ -870,6 +934,10 @@ type WelcomeVideoModalNavigatorParamList = {
[SCREENS.WELCOME_VIDEO.ROOT]: undefined;
};
+type ExplanationModalNavigatorParamList = {
+ [SCREENS.EXPLANATION_MODAL.ROOT]: undefined;
+};
+
type BottomTabNavigatorParamList = {
[SCREENS.HOME]: {policyID?: string};
[SCREENS.SEARCH.BOTTOM_TAB]: {
@@ -942,6 +1010,7 @@ type AuthScreensParamList = CentralPaneScreensParamList &
[NAVIGATORS.ONBOARDING_MODAL_NAVIGATOR]: NavigatorScreenParams;
[NAVIGATORS.FEATURE_TRANING_MODAL_NAVIGATOR]: NavigatorScreenParams;
[NAVIGATORS.WELCOME_VIDEO_MODAL_NAVIGATOR]: NavigatorScreenParams;
+ [NAVIGATORS.EXPLANATION_MODAL_NAVIGATOR]: NavigatorScreenParams;
[SCREENS.DESKTOP_SIGN_IN_REDIRECT]: undefined;
[SCREENS.TRANSACTION_RECEIPT]: {
reportID: string;
@@ -988,6 +1057,7 @@ export type {
DetailsNavigatorParamList,
EditRequestNavigatorParamList,
EnablePaymentsNavigatorParamList,
+ ExplanationModalNavigatorParamList,
FlagCommentNavigatorParamList,
FullScreenName,
FullScreenNavigatorParamList,
diff --git a/src/libs/NavigationUtils.ts b/src/libs/NavigationUtils.ts
index f0442e4995d2..34fc0b971ef6 100644
--- a/src/libs/NavigationUtils.ts
+++ b/src/libs/NavigationUtils.ts
@@ -1,7 +1,9 @@
+import cloneDeep from 'lodash/cloneDeep';
import SCREENS from '@src/SCREENS';
-import type {CentralPaneName} from './Navigation/types';
+import getTopmostBottomTabRoute from './Navigation/getTopmostBottomTabRoute';
+import type {CentralPaneName, RootStackParamList, State} from './Navigation/types';
-const CENTRAL_PANE_SCREEN_NAMES = [
+const CENTRAL_PANE_SCREEN_NAMES = new Set([
SCREENS.SETTINGS.WORKSPACES,
SCREENS.SETTINGS.PREFERENCES.ROOT,
SCREENS.SETTINGS.SECURITY,
@@ -13,14 +15,23 @@ const CENTRAL_PANE_SCREEN_NAMES = [
SCREENS.SETTINGS.SUBSCRIPTION.ROOT,
SCREENS.SEARCH.CENTRAL_PANE,
SCREENS.REPORT,
-];
+]);
function isCentralPaneName(screen: string | undefined): screen is CentralPaneName {
if (!screen) {
return false;
}
- return CENTRAL_PANE_SCREEN_NAMES.includes(screen as CentralPaneName);
+ return CENTRAL_PANE_SCREEN_NAMES.has(screen as CentralPaneName);
}
-export default isCentralPaneName;
+const removePolicyIDParamFromState = (state: State) => {
+ const stateCopy = cloneDeep(state);
+ const bottomTabRoute = getTopmostBottomTabRoute(stateCopy);
+ if (bottomTabRoute?.params && 'policyID' in bottomTabRoute.params) {
+ delete bottomTabRoute.params.policyID;
+ }
+ return stateCopy;
+};
+
+export {isCentralPaneName, removePolicyIDParamFromState};
diff --git a/src/libs/OptionsListUtils.ts b/src/libs/OptionsListUtils.ts
index b85d93bf0d33..b952fbe9af4e 100644
--- a/src/libs/OptionsListUtils.ts
+++ b/src/libs/OptionsListUtils.ts
@@ -175,6 +175,7 @@ type GetOptionsConfig = {
recentlyUsedPolicyReportFieldOptions?: string[];
transactionViolations?: OnyxCollection;
includeInvoiceRooms?: boolean;
+ includeDomainEmail?: boolean;
};
type GetUserToInviteConfig = {
@@ -297,7 +298,7 @@ Onyx.connect({
const transactionThreadReportID = ReportActionUtils.getOneTransactionThreadReportID(reportID, actions[reportActions[0]]);
if (transactionThreadReportID) {
const transactionThreadReportActionsArray = Object.values(actions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadReportID}`] ?? {});
- sortedReportActions = ReportActionUtils.getCombinedReportActions(reportActionsArray, transactionThreadReportActionsArray, reportID);
+ sortedReportActions = ReportActionUtils.getCombinedReportActions(sortedReportActions, transactionThreadReportID, transactionThreadReportActionsArray, reportID);
}
lastReportActions[reportID] = sortedReportActions[0];
@@ -1100,7 +1101,7 @@ function getCategoryOptionTree(options: Record | Category[], i
keyForList: searchText,
searchText,
tooltipText: optionName,
- isDisabled: isChild ? !option.enabled || option.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE : true,
+ isDisabled: isChild ? !option.enabled || option.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE : !selectedOptionsName.includes(searchText),
isSelected: isChild ? !!option.isSelected : selectedOptionsName.includes(searchText),
pendingAction: option.pendingAction,
});
@@ -1740,6 +1741,26 @@ function getUserToInviteOption({
return userToInvite;
}
+/**
+ * Check whether report has violations
+ */
+function shouldShowViolations(report: Report, betas: OnyxEntry, transactionViolations: OnyxCollection) {
+ if (!Permissions.canUseViolations(betas)) {
+ return false;
+ }
+ const {parentReportID, parentReportActionID} = report ?? {};
+ const canGetParentReport = parentReportID && parentReportActionID && allReportActions;
+ if (!canGetParentReport) {
+ return false;
+ }
+ const parentReportActions = allReportActions ? allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`] ?? {} : {};
+ const parentReportAction = parentReportActions[parentReportActionID] ?? null;
+ if (!parentReportAction) {
+ return false;
+ }
+ return ReportUtils.shouldDisplayTransactionThreadViolations(report, transactionViolations, parentReportAction);
+}
+
/**
* filter options based on specific conditions
*/
@@ -1782,6 +1803,7 @@ function getOptions(
policyReportFieldOptions = [],
recentlyUsedPolicyReportFieldOptions = [],
includeInvoiceRooms = false,
+ includeDomainEmail = false,
}: GetOptionsConfig,
): Options {
if (includeCategories) {
@@ -1847,13 +1869,7 @@ function getOptions(
// Filter out all the reports that shouldn't be displayed
const filteredReportOptions = options.reports.filter((option) => {
const report = option.item;
-
- const {parentReportID, parentReportActionID} = report ?? {};
- const canGetParentReport = parentReportID && parentReportActionID && allReportActions;
- const parentReportActions = allReportActions ? allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`] ?? {} : {};
- const parentReportAction = canGetParentReport ? parentReportActions[parentReportActionID] ?? null : null;
- const doesReportHaveViolations =
- (betas?.includes(CONST.BETAS.VIOLATIONS) && ReportUtils.doesTransactionThreadHaveViolations(report, transactionViolations, parentReportAction)) ?? false;
+ const doesReportHaveViolations = shouldShowViolations(report, betas, transactionViolations);
return ReportUtils.shouldReportBeInOptionList({
report,
@@ -1864,6 +1880,8 @@ function getOptions(
isInFocusMode: false,
excludeEmptyChats: false,
includeSelfDM,
+ login: option.login,
+ includeDomainEmail,
});
});
@@ -1937,7 +1955,9 @@ function getOptions(
return option;
});
- const havingLoginPersonalDetails = includeP2P ? options.personalDetails.filter((detail) => !!detail?.login && !!detail.accountID && !detail?.isOptimisticPersonalDetail) : [];
+ const havingLoginPersonalDetails = includeP2P
+ ? options.personalDetails.filter((detail) => !!detail?.login && !!detail.accountID && !detail?.isOptimisticPersonalDetail && (includeDomainEmail || !Str.isDomainEmail(detail.login)))
+ : [];
let allPersonalDetailsOptions = havingLoginPersonalDetails;
if (sortPersonalDetailsByAlphaAsc) {
@@ -2581,6 +2601,7 @@ export {
getFirstKeyForList,
canCreateOptimisticPersonalDetailOption,
getUserToInviteOption,
+ shouldShowViolations,
};
export type {MemberForList, CategorySection, CategoryTreeSection, Options, OptionList, SearchOption, PayeePersonalDetails, Category, Tax, TaxRatesOption, Option, OptionTree};
diff --git a/src/libs/Permissions.ts b/src/libs/Permissions.ts
index 79936d498280..faea5965fee4 100644
--- a/src/libs/Permissions.ts
+++ b/src/libs/Permissions.ts
@@ -44,6 +44,10 @@ function canUseNetSuiteIntegration(betas: OnyxEntry): boolean {
return !!betas?.includes(CONST.BETAS.NETSUITE_ON_NEW_EXPENSIFY) || canUseAllBetas(betas);
}
+function canUseSageIntacctIntegration(betas: OnyxEntry): boolean {
+ return !!betas?.includes(CONST.BETAS.INTACCT_ON_NEW_EXPENSIFY) || canUseAllBetas(betas);
+}
+
function canUseReportFieldsFeature(betas: OnyxEntry): boolean {
return !!betas?.includes(CONST.BETAS.REPORT_FIELDS_FEATURE) || canUseAllBetas(betas);
}
@@ -52,6 +56,10 @@ function canUseWorkspaceFeeds(betas: OnyxEntry): boolean {
return !!betas?.includes(CONST.BETAS.WORKSPACE_FEEDS) || canUseAllBetas(betas);
}
+function canUseNetSuiteUSATax(betas: OnyxEntry): boolean {
+ return !!betas?.includes(CONST.BETAS.NETSUITE_USA_TAX) || canUseAllBetas(betas);
+}
+
/**
* Link previews are temporarily disabled.
*/
@@ -70,6 +78,8 @@ export default {
canUseWorkflowsDelayedSubmission,
canUseSpotnanaTravel,
canUseNetSuiteIntegration,
+ canUseSageIntacctIntegration,
canUseReportFieldsFeature,
canUseWorkspaceFeeds,
+ canUseNetSuiteUSATax,
};
diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts
index da4323a077b8..5bd496ab9d39 100644
--- a/src/libs/PolicyUtils.ts
+++ b/src/libs/PolicyUtils.ts
@@ -7,7 +7,7 @@ import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {OnyxInputOrEntry, Policy, PolicyCategories, PolicyEmployeeList, PolicyTagList, PolicyTags, TaxRate} from '@src/types/onyx';
-import type {CustomUnit, PolicyFeatureName, Rate, Tenant} from '@src/types/onyx/Policy';
+import type {ConnectionLastSync, Connections, CustomUnit, NetSuiteConnection, PolicyFeatureName, Rate, Tenant} from '@src/types/onyx/Policy';
import type PolicyEmployee from '@src/types/onyx/PolicyEmployee';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import Navigation from './Navigation/Navigation';
@@ -21,6 +21,11 @@ type WorkspaceDetails = {
name: string;
};
+type ConnectionWithLastSyncData = {
+ /** State of the last synchronization */
+ lastSync?: ConnectionLastSync;
+};
+
let allPolicies: OnyxCollection;
Onyx.connect({
@@ -153,7 +158,7 @@ const isPolicyAdmin = (policy: OnyxInputOrEntry, currentUserLogin?: stri
(policy?.role ?? (currentUserLogin && policy?.employeeList?.[currentUserLogin]?.role)) === CONST.POLICY.ROLE.ADMIN;
/**
- * Checks if the current user is an user of the policy.
+ * Checks if the current user is of the role "user" on the policy.
*/
const isPolicyUser = (policy: OnyxInputOrEntry, currentUserLogin?: string): boolean =>
(policy?.role ?? (currentUserLogin && policy?.employeeList?.[currentUserLogin]?.role)) === CONST.POLICY.ROLE.USER;
@@ -466,6 +471,81 @@ function getXeroBankAccountsWithDefaultSelect(policy: Policy | undefined, select
}));
}
+function getNetSuiteVendorOptions(policy: Policy | undefined, selectedVendorId: string | undefined): SelectorType[] {
+ const vendors = policy?.connections?.netsuite.options.data.vendors ?? [];
+
+ return (vendors ?? []).map(({id, name}) => ({
+ value: id,
+ text: name,
+ keyForList: id,
+ isSelected: selectedVendorId === id,
+ }));
+}
+
+function getNetSuitePayableAccountOptions(policy: Policy | undefined, selectedBankAccountId: string | undefined): SelectorType[] {
+ const payableAccounts = policy?.connections?.netsuite.options.data.payableList ?? [];
+
+ return (payableAccounts ?? []).map(({id, name}) => ({
+ value: id,
+ text: name,
+ keyForList: id,
+ isSelected: selectedBankAccountId === id,
+ }));
+}
+
+function getNetSuiteReceivableAccountOptions(policy: Policy | undefined, selectedBankAccountId: string | undefined): SelectorType[] {
+ const receivableAccounts = policy?.connections?.netsuite.options.data.receivableList ?? [];
+
+ return (receivableAccounts ?? []).map(({id, name}) => ({
+ value: id,
+ text: name,
+ keyForList: id,
+ isSelected: selectedBankAccountId === id,
+ }));
+}
+
+function getNetSuiteInvoiceItemOptions(policy: Policy | undefined, selectedItemId: string | undefined): SelectorType[] {
+ const invoiceItems = policy?.connections?.netsuite.options.data.items ?? [];
+
+ return (invoiceItems ?? []).map(({id, name}) => ({
+ value: id,
+ text: name,
+ keyForList: id,
+ isSelected: selectedItemId === id,
+ }));
+}
+
+function getNetSuiteTaxAccountOptions(policy: Policy | undefined, subsidiaryCountry?: string, selectedAccountId?: string): SelectorType[] {
+ const taxAccounts = policy?.connections?.netsuite.options.data.taxAccountsList ?? [];
+
+ return (taxAccounts ?? [])
+ .filter(({country}) => country === subsidiaryCountry)
+ .map(({externalID, name}) => ({
+ value: externalID,
+ text: name,
+ keyForList: externalID,
+ isSelected: selectedAccountId === externalID,
+ }));
+}
+
+function canUseTaxNetSuite(canUseNetSuiteUSATax?: boolean, subsidiaryCountry?: string) {
+ return !!canUseNetSuiteUSATax || CONST.NETSUITE_TAX_COUNTRIES.includes(subsidiaryCountry ?? '');
+}
+
+function canUseProvincialTaxNetSuite(subsidiaryCountry?: string) {
+ return subsidiaryCountry === '_canada';
+}
+
+function getIntegrationLastSuccessfulDate(connection?: Connections[keyof Connections]) {
+ if (!connection) {
+ return undefined;
+ }
+ if ((connection as NetSuiteConnection)?.lastSyncDate) {
+ return (connection as NetSuiteConnection)?.lastSyncDate;
+ }
+ return (connection as ConnectionWithLastSyncData)?.lastSync?.successfulDate;
+}
+
/**
* Sort the workspaces by their name, while keeping the selected one at the beginning.
* @param workspace1 Details of the first workspace to be compared.
@@ -500,6 +580,12 @@ function navigateWhenEnableFeature(policyID: string) {
}, CONST.WORKSPACE_ENABLE_FEATURE_REDIRECT_DELAY);
}
+function getCurrentConnectionName(policy: Policy | undefined): string | undefined {
+ const accountingIntegrations = Object.values(CONST.POLICY.CONNECTIONS.NAME);
+ const connectionKey = accountingIntegrations.find((integration) => !!policy?.connections?.[integration]);
+ return connectionKey ? CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[connectionKey] : undefined;
+}
+
export {
canEditTaxRate,
extractPolicyIDFromPath,
@@ -552,11 +638,20 @@ export {
findCurrentXeroOrganization,
getCurrentXeroOrganizationName,
getXeroBankAccountsWithDefaultSelect,
+ getNetSuiteVendorOptions,
+ canUseTaxNetSuite,
+ canUseProvincialTaxNetSuite,
+ getNetSuitePayableAccountOptions,
+ getNetSuiteReceivableAccountOptions,
+ getNetSuiteInvoiceItemOptions,
+ getNetSuiteTaxAccountOptions,
getCustomUnit,
getCustomUnitRate,
sortWorkspacesBySelected,
removePendingFieldsFromCustomUnit,
navigateWhenEnableFeature,
+ getIntegrationLastSuccessfulDate,
+ getCurrentConnectionName,
};
export type {MemberEmailsToAccountIDs};
diff --git a/src/libs/ReportActionItemEventHandler/index.android.ts b/src/libs/ReportActionItemEventHandler/index.android.ts
new file mode 100644
index 000000000000..ba24fceb9899
--- /dev/null
+++ b/src/libs/ReportActionItemEventHandler/index.android.ts
@@ -0,0 +1,14 @@
+import {InteractionManager} from 'react-native';
+import type ReportActionItemEventHandler from './types';
+
+const reportActionItemEventHandler: ReportActionItemEventHandler = {
+ handleComposerLayoutChange: (reportScrollManager, index) => () => {
+ InteractionManager.runAfterInteractions(() => {
+ requestAnimationFrame(() => {
+ reportScrollManager.scrollToIndex(index, true);
+ });
+ });
+ },
+};
+
+export default reportActionItemEventHandler;
diff --git a/src/libs/ReportActionItemEventHandler/index.ts b/src/libs/ReportActionItemEventHandler/index.ts
new file mode 100644
index 000000000000..87d79a8d3ad0
--- /dev/null
+++ b/src/libs/ReportActionItemEventHandler/index.ts
@@ -0,0 +1,7 @@
+import type ReportActionItemEventHandler from './types';
+
+const reportActionItemEventHandler: ReportActionItemEventHandler = {
+ handleComposerLayoutChange: () => () => {},
+};
+
+export default reportActionItemEventHandler;
diff --git a/src/libs/ReportActionItemEventHandler/types.ts b/src/libs/ReportActionItemEventHandler/types.ts
new file mode 100644
index 000000000000..810c3ec02373
--- /dev/null
+++ b/src/libs/ReportActionItemEventHandler/types.ts
@@ -0,0 +1,8 @@
+import type {LayoutChangeEvent} from 'react-native';
+import type ReportScrollManagerData from '@hooks/useReportScrollManager/types';
+
+type ReportActionItemEventHandler = {
+ handleComposerLayoutChange: (reportScrollManager: ReportScrollManagerData, index: number) => (event: LayoutChangeEvent) => void;
+};
+
+export default ReportActionItemEventHandler;
diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts
index 352a75bf9255..65aaf4c9de0a 100644
--- a/src/libs/ReportActionsUtils.ts
+++ b/src/libs/ReportActionsUtils.ts
@@ -10,7 +10,7 @@ import ONYXKEYS from '@src/ONYXKEYS';
import type {OnyxInputOrEntry} from '@src/types/onyx';
import type {JoinWorkspaceResolution} from '@src/types/onyx/OriginalMessage';
import type Report from '@src/types/onyx/Report';
-import type {Message, OriginalMessage, ReportActions} from '@src/types/onyx/ReportAction';
+import type {Message, OldDotReportAction, OriginalMessage, ReportActions} from '@src/types/onyx/ReportAction';
import type ReportAction from '@src/types/onyx/ReportAction';
import type ReportActionName from '@src/types/onyx/ReportActionName';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
@@ -191,7 +191,7 @@ function getWhisperedTo(reportAction: OnyxInputOrEntry): number[]
const originalMessage = getOriginalMessage(reportAction);
const message = getReportActionMessage(reportAction);
- if (!(originalMessage && 'whisperedTo' in originalMessage) && !(message && 'whisperedTo' in message)) {
+ if (!(originalMessage && typeof originalMessage === 'object' && 'whisperedTo' in originalMessage) && !(message && typeof message === 'object' && 'whisperedTo' in message)) {
return [];
}
@@ -199,10 +199,14 @@ function getWhisperedTo(reportAction: OnyxInputOrEntry): number[]
return message?.whisperedTo ?? [];
}
- if (originalMessage && 'whisperedTo' in originalMessage) {
+ if (originalMessage && typeof originalMessage === 'object' && 'whisperedTo' in originalMessage) {
return originalMessage?.whisperedTo ?? [];
}
+ if (typeof originalMessage !== 'object') {
+ Log.info('Original message is not an object for reportAction: ', true, {reportActionID: reportAction?.reportActionID, actionName: reportAction?.actionName});
+ }
+
return [];
}
@@ -373,14 +377,21 @@ function shouldIgnoreGap(currentReportAction: ReportAction | undefined, nextRepo
* Returns a sorted and filtered list of report actions from a report and it's associated child
* transaction thread report in order to correctly display reportActions from both reports in the one-transaction report view.
*/
-function getCombinedReportActions(reportActions: ReportAction[], transactionThreadReportActions: ReportAction[], reportID?: string): ReportAction[] {
- if (isEmptyObject(transactionThreadReportActions)) {
+function getCombinedReportActions(
+ reportActions: ReportAction[],
+ transactionThreadReportID: string | null,
+ transactionThreadReportActions: ReportAction[],
+ reportID?: string,
+): ReportAction[] {
+ const isSentMoneyReport = reportActions.some((action) => isSentMoneyReportAction(action));
+
+ // We don't want to combine report actions of transaction thread in iou report of send money request because we display the transaction report of send money request as a normal thread
+ if (_.isEmpty(transactionThreadReportID) || isSentMoneyReport) {
return reportActions;
}
- // Filter out the created action from the transaction thread report actions, since we already have the parent report's created action in `reportActions`
+ // Filter out request money actions because we don't want to show any preview actions for one transaction reports
const filteredTransactionThreadReportActions = transactionThreadReportActions?.filter((action) => action.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED);
-
const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
const isSelfDM = report?.chatType === CONST.REPORT.CHAT_TYPE.SELF_DM;
// Filter out request and send money request actions because we don't want to show any preview actions for one transaction reports
@@ -390,9 +401,9 @@ function getCombinedReportActions(reportActions: ReportAction[], transactionThre
}
const actionType = getOriginalMessage(action)?.type ?? '';
if (isSelfDM) {
- return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && !isSentMoneyReportAction(action);
+ return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE;
}
- return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && actionType !== CONST.IOU.REPORT_ACTION_TYPE.TRACK && !isSentMoneyReportAction(action);
+ return actionType !== CONST.IOU.REPORT_ACTION_TYPE.CREATE && actionType !== CONST.IOU.REPORT_ACTION_TYPE.TRACK;
});
return getSortedReportActions(filteredReportActions, true);
@@ -1160,17 +1171,24 @@ function getMemberChangeMessageFragment(reportAction: OnyxEntry):
};
}
-function isOldDotReportAction(action: ReportAction): boolean {
+function isOldDotLegacyAction(action: OldDotReportAction | PartialReportAction): action is PartialReportAction {
+ return [
+ CONST.REPORT.ACTIONS.TYPE.DELETED_ACCOUNT,
+ CONST.REPORT.ACTIONS.TYPE.DONATION,
+ CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_QUICK_BOOKS,
+ CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_REQUESTED,
+ CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_SETUP,
+ ].some((oldDotActionName) => oldDotActionName === action?.actionName);
+}
+
+function isOldDotReportAction(action: ReportAction | OldDotReportAction) {
return [
CONST.REPORT.ACTIONS.TYPE.CHANGE_FIELD,
CONST.REPORT.ACTIONS.TYPE.CHANGE_POLICY,
CONST.REPORT.ACTIONS.TYPE.CHANGE_TYPE,
CONST.REPORT.ACTIONS.TYPE.DELEGATE_SUBMIT,
- CONST.REPORT.ACTIONS.TYPE.DELETED_ACCOUNT,
- CONST.REPORT.ACTIONS.TYPE.DONATION,
CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_CSV,
CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_INTEGRATION,
- CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_QUICK_BOOKS,
CONST.REPORT.ACTIONS.TYPE.FORWARDED,
CONST.REPORT.ACTIONS.TYPE.INTEGRATIONS_MESSAGE,
CONST.REPORT.ACTIONS.TYPE.MANAGER_ATTACH_RECEIPT,
@@ -1182,28 +1200,95 @@ function isOldDotReportAction(action: ReportAction): boolean {
CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_CANCELLED,
CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACCOUNT_CHANGED,
CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_DELAYED,
- CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_REQUESTED,
- CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_SETUP,
CONST.REPORT.ACTIONS.TYPE.SELECTED_FOR_RANDOM_AUDIT,
CONST.REPORT.ACTIONS.TYPE.SHARE,
CONST.REPORT.ACTIONS.TYPE.STRIPE_PAID,
CONST.REPORT.ACTIONS.TYPE.TAKE_CONTROL,
CONST.REPORT.ACTIONS.TYPE.UNAPPROVED,
CONST.REPORT.ACTIONS.TYPE.UNSHARE,
+ CONST.REPORT.ACTIONS.TYPE.DELETED_ACCOUNT,
+ CONST.REPORT.ACTIONS.TYPE.DONATION,
+ CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_QUICK_BOOKS,
+ CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_REQUESTED,
+ CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_SETUP,
].some((oldDotActionName) => oldDotActionName === action.actionName);
}
+function getMessageOfOldDotLegacyAction(legacyAction: PartialReportAction) {
+ if (!Array.isArray(legacyAction?.message)) {
+ return getReportActionText(legacyAction);
+ }
+ if (legacyAction.message.length !== 0) {
+ // Sometime html can be an empty string
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
+ return legacyAction?.message?.map((element) => getTextFromHtml(element?.html || element?.text)).join('') ?? '';
+ }
+ return '';
+}
+
/**
* Helper method to format message of OldDot Actions.
- * For now, we just concat all of the text elements of the message to create the full message.
*/
-function getMessageOfOldDotReportAction(reportAction: OnyxEntry): string {
- if (!Array.isArray(reportAction?.message)) {
- return getReportActionText(reportAction);
+function getMessageOfOldDotReportAction(oldDotAction: PartialReportAction | OldDotReportAction): string {
+ if (isOldDotLegacyAction(oldDotAction)) {
+ return getMessageOfOldDotLegacyAction(oldDotAction);
+ }
+
+ const {originalMessage, actionName} = oldDotAction;
+ switch (actionName) {
+ case CONST.REPORT.ACTIONS.TYPE.CHANGE_FIELD: {
+ const {oldValue, newValue, fieldName} = originalMessage;
+ if (!oldValue) {
+ Localize.translateLocal('report.actions.type.changeFieldEmpty', {newValue, fieldName});
+ }
+ return Localize.translateLocal('report.actions.type.changeField', {oldValue, newValue, fieldName});
+ }
+ case CONST.REPORT.ACTIONS.TYPE.CHANGE_POLICY: {
+ const {fromPolicy, toPolicy} = originalMessage;
+ return Localize.translateLocal('report.actions.type.changePolicy', {fromPolicy, toPolicy});
+ }
+ case CONST.REPORT.ACTIONS.TYPE.DELEGATE_SUBMIT: {
+ const {delegateUser, originalManager} = originalMessage;
+ return Localize.translateLocal('report.actions.type.delegateSubmit', {delegateUser, originalManager});
+ }
+ case CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_CSV:
+ return Localize.translateLocal('report.actions.type.exportedToCSV');
+ case CONST.REPORT.ACTIONS.TYPE.EXPORTED_TO_INTEGRATION:
+ return Localize.translateLocal('report.actions.type.exportedToIntegration', {label: originalMessage.label});
+ case CONST.REPORT.ACTIONS.TYPE.INTEGRATIONS_MESSAGE: {
+ const {result, label} = originalMessage;
+ const errorMessage = result?.messages?.join(', ') ?? '';
+ return Localize.translateLocal('report.actions.type.integrationsMessage', errorMessage, label);
+ }
+ case CONST.REPORT.ACTIONS.TYPE.MANAGER_ATTACH_RECEIPT:
+ return Localize.translateLocal('report.actions.type.managerAttachReceipt');
+ case CONST.REPORT.ACTIONS.TYPE.MANAGER_DETACH_RECEIPT:
+ return Localize.translateLocal('report.actions.type.managerDetachReceipt');
+ case CONST.REPORT.ACTIONS.TYPE.MARK_REIMBURSED_FROM_INTEGRATION: {
+ const {amount, currency} = originalMessage;
+ return Localize.translateLocal('report.actions.type.markedReimbursedFromIntegration', {amount, currency});
+ }
+ case CONST.REPORT.ACTIONS.TYPE.OUTDATED_BANK_ACCOUNT:
+ return Localize.translateLocal('report.actions.type.outdatedBankAccount');
+ case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_BOUNCE:
+ return Localize.translateLocal('report.actions.type.reimbursementACHBounce');
+ case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACH_CANCELLED:
+ return Localize.translateLocal('report.actions.type.reimbursementACHCancelled');
+ case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_ACCOUNT_CHANGED:
+ return Localize.translateLocal('report.actions.type.reimbursementAccountChanged');
+ case CONST.REPORT.ACTIONS.TYPE.REIMBURSEMENT_DELAYED:
+ return Localize.translateLocal('report.actions.type.reimbursementDelayed');
+ case CONST.REPORT.ACTIONS.TYPE.SELECTED_FOR_RANDOM_AUDIT:
+ return Localize.translateLocal('report.actions.type.selectedForRandomAudit');
+ case CONST.REPORT.ACTIONS.TYPE.SHARE:
+ return Localize.translateLocal('report.actions.type.share', {to: originalMessage.to});
+ case CONST.REPORT.ACTIONS.TYPE.UNSHARE:
+ return Localize.translateLocal('report.actions.type.unshare', {to: originalMessage.to});
+ case CONST.REPORT.ACTIONS.TYPE.TAKE_CONTROL:
+ return Localize.translateLocal('report.actions.type.takeControl');
+ default:
+ return '';
}
- // Sometime html can be an empty string
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
- return reportAction?.message?.map((element) => getTextFromHtml(element?.html || element?.text)).join('') ?? '';
}
function getMemberChangeMessagePlainText(reportAction: OnyxEntry): string {
@@ -1367,6 +1452,14 @@ function getIOUActionForReportID(reportID: string, transactionID: string): OnyxE
return action;
}
+/**
+ * Get the track expense actionable whisper of the corresponding track expense
+ */
+function getTrackExpenseActionableWhisper(transactionID: string, chatReportID: string) {
+ const chatReportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${chatReportID}`] ?? {};
+ return Object.values(chatReportActions).find((action: ReportAction) => isActionableTrackExpense(action) && getOriginalMessage(action)?.transactionID === transactionID);
+}
+
export {
extractLinksFromMessageHtml,
getDismissedViolationMessageText,
@@ -1423,6 +1516,7 @@ export {
isMemberChangeAction,
getMemberChangeMessageFragment,
isOldDotReportAction,
+ getTrackExpenseActionableWhisper,
getMessageOfOldDotReportAction,
getMemberChangeMessagePlainText,
isReimbursementDeQueuedAction,
diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts
index 3fe054efb3ea..8dfc05e911e5 100644
--- a/src/libs/ReportUtils.ts
+++ b/src/libs/ReportUtils.ts
@@ -331,6 +331,7 @@ type OptimisticTaskReport = Pick<
| 'notificationPreference'
| 'parentReportActionID'
| 'lastVisibleActionCreated'
+ | 'hasParentAccess'
>;
type TransactionDetails = {
@@ -1080,7 +1081,7 @@ function doesReportBelongToWorkspace(report: OnyxEntry, policyMemberAcco
/**
* Given an array of reports, return them filtered by a policyID and policyMemberAccountIDs.
*/
-function filterReportsByPolicyIDAndMemberAccountIDs(reports: Report[], policyMemberAccountIDs: number[] = [], policyID?: string) {
+function filterReportsByPolicyIDAndMemberAccountIDs(reports: Array>, policyMemberAccountIDs: number[] = [], policyID?: string) {
return reports.filter((report) => !!report && doesReportBelongToWorkspace(report, policyMemberAccountIDs, policyID));
}
@@ -1166,6 +1167,7 @@ function findLastAccessedReport(
reportMetadata: OnyxCollection = {},
policyID?: string,
policyMemberAccountIDs: number[] = [],
+ excludeReportID?: string,
): OnyxEntry {
// If it's the user's first time using New Expensify, then they could either have:
// - just a Concierge report, if so we'll return that
@@ -1173,7 +1175,7 @@ function findLastAccessedReport(
// If it's the latter, we'll use the deeplinked report over the Concierge report,
// since the Concierge report would be incorrectly selected over the deep-linked report in the logic below.
- let reportsValues = Object.values(reports ?? {}) as Report[];
+ let reportsValues = Object.values(reports ?? {});
if (!!policyID || policyMemberAccountIDs.length > 0) {
reportsValues = filterReportsByPolicyIDAndMemberAccountIDs(reportsValues, policyMemberAccountIDs, policyID);
@@ -1189,13 +1191,28 @@ function findLastAccessedReport(
});
}
- if (ignoreDomainRooms) {
- // We allow public announce rooms, admins, and announce rooms through since we bypass the default rooms beta for them.
- // Check where ReportUtils.findLastAccessedReport is called in MainDrawerNavigator.js for more context.
- // Domain rooms are now the only type of default room that are on the defaultRooms beta.
- sortedReports = sortedReports.filter(
- (report) => !isDomainRoom(report) || getPolicyType(report, policies) === CONST.POLICY.TYPE.FREE || hasExpensifyGuidesEmails(Object.keys(report?.participants ?? {}).map(Number)),
- );
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
+ const shouldFilter = excludeReportID || ignoreDomainRooms;
+ if (shouldFilter) {
+ sortedReports = sortedReports.filter((report) => {
+ if (excludeReportID && report?.reportID === excludeReportID) {
+ return false;
+ }
+
+ // We allow public announce rooms, admins, and announce rooms through since we bypass the default rooms beta for them.
+ // Check where ReportUtils.findLastAccessedReport is called in MainDrawerNavigator.js for more context.
+ // Domain rooms are now the only type of default room that are on the defaultRooms beta.
+ if (
+ ignoreDomainRooms &&
+ isDomainRoom(report) &&
+ getPolicyType(report, policies) !== CONST.POLICY.TYPE.FREE &&
+ !hasExpensifyGuidesEmails(Object.keys(report?.participants ?? {}).map(Number))
+ ) {
+ return false;
+ }
+
+ return true;
+ });
}
if (isFirstTimeNewExpensifyUser) {
@@ -2279,7 +2296,15 @@ function getLastVisibleMessage(reportID: string | undefined, actionsToMerge: Rep
* @param [parentReportAction] - The parent report action of the report (Used to check if the task has been canceled)
*/
function isWaitingForAssigneeToCompleteTask(report: OnyxEntry, parentReportAction: OnyxEntry): boolean {
- return isTaskReport(report) && isReportManager(report) && isOpenTaskReport(report, parentReportAction);
+ if (report?.hasOutstandingChildTask) {
+ return true;
+ }
+
+ if (isOpenTaskReport(report, parentReportAction) && !report?.hasParentAccess && isReportManager(report)) {
+ return true;
+ }
+
+ return false;
}
function isUnreadWithMention(reportOrOption: OnyxEntry | OptionData): boolean {
@@ -2918,7 +2943,7 @@ function getTransactionReportName(reportAction: OnyxEntry): string {
/**
* Get the title for a report.
*/
-function getReportName(report: OnyxEntry, policy?: OnyxEntry): string {
+function getReportName(report: OnyxEntry, policy?: OnyxEntry, parentReportActionParam?: OnyxInputOrEntry): string {
let formattedName: string | undefined;
- const parentReportAction = ReportActionsUtils.getParentReportAction(report);
+ const parentReportAction = parentReportActionParam ?? ReportActionsUtils.getParentReportAction(report);
if (isChatThread(report)) {
if (!isEmptyObject(parentReportAction) && ReportActionsUtils.isTransactionThread(parentReportAction)) {
formattedName = getTransactionReportName(parentReportAction);
@@ -4043,8 +4068,8 @@ function getIOUReportActionMessage(iouReportID: string, type: string, total: num
}
const amount =
- type === CONST.IOU.REPORT_ACTION_TYPE.PAY
- ? CurrencyUtils.convertToDisplayString(getMoneyRequestSpendBreakdown(!isEmptyObject(report) ? report : undefined).totalDisplaySpend, currency)
+ type === CONST.IOU.REPORT_ACTION_TYPE.PAY && !isEmptyObject(report)
+ ? CurrencyUtils.convertToDisplayString(getMoneyRequestSpendBreakdown(report).totalDisplaySpend, currency)
: CurrencyUtils.convertToDisplayString(total, currency);
let paymentMethodMessage;
@@ -5105,6 +5130,7 @@ function buildOptimisticTaskReport(
statusNum: CONST.REPORT.STATUS_NUM.OPEN,
notificationPreference,
lastVisibleActionCreated: DateUtils.getDBTime(),
+ hasParentAccess: true,
};
}
@@ -5218,7 +5244,7 @@ function isEmptyReport(report: OnyxEntry): boolean {
if (!report) {
return true;
}
- const lastVisibleMessage = ReportActionsUtils.getLastVisibleMessage(report.reportID);
+ const lastVisibleMessage = getLastVisibleMessage(report.reportID);
return !report.lastMessageText && !report.lastMessageTranslationKey && !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey;
}
@@ -5227,7 +5253,7 @@ function isUnread(report: OnyxEntry): boolean {
return false;
}
- if (isEmptyReport(report)) {
+ if (isEmptyReport(report) && !isSelfDM(report)) {
return false;
}
// lastVisibleActionCreated and lastReadTime are both datetime strings and can be compared directly
@@ -5383,6 +5409,8 @@ function shouldReportBeInOptionList({
excludeEmptyChats,
doesReportHaveViolations,
includeSelfDM = false,
+ login,
+ includeDomainEmail = false,
}: {
report: OnyxEntry;
currentReportId: string;
@@ -5392,6 +5420,8 @@ function shouldReportBeInOptionList({
excludeEmptyChats: boolean;
doesReportHaveViolations: boolean;
includeSelfDM?: boolean;
+ login?: string;
+ includeDomainEmail?: boolean;
}) {
const isInDefaultMode = !isInFocusMode;
// Exclude reports that have no data because there wouldn't be anything to show in the option item.
@@ -5495,6 +5525,11 @@ function shouldReportBeInOptionList({
if (isSelfDM(report)) {
return includeSelfDM;
}
+
+ if (Str.isDomainEmail(login ?? '') && !includeDomainEmail) {
+ return false;
+ }
+
const parentReportAction = ReportActionsUtils.getParentReportAction(report);
// Hide chat threads where the parent message is pending removal
@@ -5523,7 +5558,7 @@ function getSystemChat(): OnyxEntry {
/**
* Attempts to find a report in onyx with the provided list of participants. Does not include threads, task, expense, room, and policy expense chat.
*/
-function getChatByParticipants(newParticipantList: number[], reports: OnyxCollection = allReports): OnyxEntry {
+function getChatByParticipants(newParticipantList: number[], reports: OnyxCollection = allReports, shouldIncludeGroupChats = false): OnyxEntry {
const sortedNewParticipantList = newParticipantList.sort();
return Object.values(reports ?? {}).find((report) => {
const participantAccountIDs = Object.keys(report?.participants ?? {});
@@ -5536,7 +5571,7 @@ function getChatByParticipants(newParticipantList: number[], reports: OnyxCollec
isMoneyRequestReport(report) ||
isChatRoom(report) ||
isPolicyExpenseChat(report) ||
- isGroupChat(report)
+ (isGroupChat(report) && !shouldIncludeGroupChats)
) {
return false;
}
@@ -6647,7 +6682,11 @@ function getAllAncestorReportActions(report: Report | null | undefined): Ancesto
const parentReport = getReportOrDraftReport(parentReportID);
const parentReportAction = ReportActionsUtils.getReportAction(parentReportID, parentReportActionID ?? '-1');
- if (!parentReportAction || ReportActionsUtils.isTransactionThread(parentReportAction) || ReportActionsUtils.isReportPreviewAction(parentReportAction)) {
+ if (
+ !parentReportAction ||
+ (ReportActionsUtils.isTransactionThread(parentReportAction) && !ReportActionsUtils.isSentMoneyReportAction(parentReportAction)) ||
+ ReportActionsUtils.isReportPreviewAction(parentReportAction)
+ ) {
break;
}
@@ -6693,7 +6732,9 @@ function getAllAncestorReportActionIDs(report: Report | null | undefined, includ
if (
!parentReportAction ||
- (!includeTransactionThread && (ReportActionsUtils.isTransactionThread(parentReportAction) || ReportActionsUtils.isReportPreviewAction(parentReportAction)))
+ (!includeTransactionThread &&
+ ((ReportActionsUtils.isTransactionThread(parentReportAction) && !ReportActionsUtils.isSentMoneyReportAction(parentReportAction)) ||
+ ReportActionsUtils.isReportPreviewAction(parentReportAction)))
) {
break;
}
@@ -6960,6 +7001,7 @@ function createDraftTransactionAndNavigateToParticipantSelector(transactionID: s
currency,
comment,
merchant,
+ modifiedMerchant: '',
mccGroup,
} as Transaction);
@@ -7008,7 +7050,7 @@ function canReportBeMentionedWithinPolicy(report: OnyxEntry, policyID: s
return false;
}
- return isChatRoom(report) && !isThread(report);
+ return isChatRoom(report) && !isInvoiceRoom(report) && !isThread(report);
}
function shouldShowMerchantColumn(transactions: Transaction[]) {
diff --git a/src/libs/SearchUtils.ts b/src/libs/SearchUtils.ts
index 6e6a541ccdff..5a7f514a7196 100644
--- a/src/libs/SearchUtils.ts
+++ b/src/libs/SearchUtils.ts
@@ -1,7 +1,7 @@
import type {ValueOf} from 'react-native-gesture-handler/lib/typescript/typeUtils';
import ReportListItem from '@components/SelectionList/Search/ReportListItem';
import TransactionListItem from '@components/SelectionList/Search/TransactionListItem';
-import type {ReportListItemType, TransactionListItemType} from '@components/SelectionList/types';
+import type {ListItem, ReportListItemType, TransactionListItemType} from '@components/SelectionList/types';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type * as OnyxTypes from '@src/types/onyx';
@@ -26,7 +26,7 @@ const columnNamesToSortingProperty = {
[CONST.SEARCH.TABLE_COLUMNS.CATEGORY]: 'category' as const,
[CONST.SEARCH.TABLE_COLUMNS.TYPE]: 'type' as const,
[CONST.SEARCH.TABLE_COLUMNS.ACTION]: 'action' as const,
- [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: null,
+ [CONST.SEARCH.TABLE_COLUMNS.DESCRIPTION]: 'comment' as const,
[CONST.SEARCH.TABLE_COLUMNS.TAX_AMOUNT]: null,
[CONST.SEARCH.TABLE_COLUMNS.RECEIPT]: null,
};
@@ -79,10 +79,15 @@ function getShouldShowMerchant(data: OnyxTypes.SearchResults['data']): boolean {
const currentYear = new Date().getFullYear();
-function isReportListItemType(item: TransactionListItemType | ReportListItemType): item is ReportListItemType {
+function isReportListItemType(item: ListItem): item is ReportListItemType {
return 'transactions' in item;
}
+function isTransactionListItemType(item: TransactionListItemType | ReportListItemType): item is TransactionListItemType {
+ const transactionListItem = item as TransactionListItemType;
+ return transactionListItem.transactionID !== undefined;
+}
+
function shouldShowYear(data: TransactionListItemType[] | ReportListItemType[] | OnyxTypes.SearchResults['data']): boolean {
if (Array.isArray(data)) {
return data.some((item: TransactionListItemType | ReportListItemType) => {
@@ -138,9 +143,9 @@ function getTransactionsSections(data: OnyxTypes.SearchResults['data'], metadata
formattedMerchant,
date,
shouldShowMerchant,
- shouldShowCategory: metadata?.columnsToShow.shouldShowCategoryColumn,
- shouldShowTag: metadata?.columnsToShow.shouldShowTagColumn,
- shouldShowTax: metadata?.columnsToShow.shouldShowTaxColumn,
+ shouldShowCategory: metadata?.columnsToShow?.shouldShowCategoryColumn,
+ shouldShowTag: metadata?.columnsToShow?.shouldShowTagColumn,
+ shouldShowTax: metadata?.columnsToShow?.shouldShowTaxColumn,
keyForList: transactionItem.transactionID,
shouldShowYear: doesDataContainAPastYearTransaction,
};
@@ -185,9 +190,9 @@ function getReportSections(data: OnyxTypes.SearchResults['data'], metadata: Onyx
formattedMerchant,
date,
shouldShowMerchant,
- shouldShowCategory: metadata?.columnsToShow.shouldShowCategoryColumn,
- shouldShowTag: metadata?.columnsToShow.shouldShowTagColumn,
- shouldShowTax: metadata?.columnsToShow.shouldShowTaxColumn,
+ shouldShowCategory: metadata?.columnsToShow?.shouldShowCategoryColumn,
+ shouldShowTag: metadata?.columnsToShow?.shouldShowTagColumn,
+ shouldShowTax: metadata?.columnsToShow?.shouldShowTaxColumn,
keyForList: transactionItem.transactionID,
shouldShowYear: doesDataContainAPastYearTransaction,
};
@@ -254,8 +259,8 @@ function getSortedTransactionData(data: TransactionListItemType[], sortBy?: Sear
}
return data.sort((a, b) => {
- const aValue = a[sortingProperty];
- const bValue = b[sortingProperty];
+ const aValue = sortingProperty === 'comment' ? a.comment.comment : a[sortingProperty];
+ const bValue = sortingProperty === 'comment' ? b.comment.comment : b[sortingProperty];
if (aValue === undefined || bValue === undefined) {
return 0;
@@ -278,5 +283,5 @@ function getSearchParams() {
return topmostCentralPaneRoute?.params as AuthScreensParamList['Search_Central_Pane'];
}
-export {getListItem, getQueryHash, getSections, getSortedSections, getShouldShowMerchant, getSearchType, getSearchParams, shouldShowYear};
+export {getListItem, getQueryHash, getSections, getSortedSections, getShouldShowMerchant, getSearchType, getSearchParams, shouldShowYear, isReportListItemType, isTransactionListItemType};
export type {SearchColumnType, SortOrder};
diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts
index ee2807a94c7c..b7d365a103ae 100644
--- a/src/libs/SidebarUtils.ts
+++ b/src/libs/SidebarUtils.ts
@@ -82,41 +82,48 @@ function getOrderedReportIDs(
const allReportsDictValues = Object.values(allReports ?? {});
// Filter out all the reports that shouldn't be displayed
- let reportsToDisplay = allReportsDictValues.filter((report) => {
+ let reportsToDisplay: Array = [];
+ allReportsDictValues.forEach((report) => {
if (!report) {
- return false;
+ return;
}
-
- const parentReportActionsKey = `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.parentReportID}`;
- const parentReportActions = allReportActions?.[parentReportActionsKey];
const reportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`] ?? {};
- const parentReportAction = parentReportActions?.find((action) => action && action?.reportActionID === report.parentReportActionID);
- const doesReportHaveViolations = !!(
- betas?.includes(CONST.BETAS.VIOLATIONS) &&
- !!parentReportAction &&
- ReportUtils.shouldDisplayTransactionThreadViolations(report, transactionViolations, parentReportAction as OnyxEntry)
- );
+ const doesReportHaveViolations = OptionsListUtils.shouldShowViolations(report, betas ?? [], transactionViolations);
const isHidden = report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
const isFocused = report.reportID === currentReportId;
const allReportErrors = OptionsListUtils.getAllReportErrors(report, reportActions) ?? {};
const hasErrorsOtherThanFailedReceipt =
doesReportHaveViolations || Object.values(allReportErrors).some((error) => error?.[0] !== Localize.translateLocal('iou.error.genericSmartscanFailureMessage'));
+ if (ReportUtils.isOneTransactionThread(report.reportID, report.parentReportID ?? '0')) {
+ return;
+ }
+ if (hasErrorsOtherThanFailedReceipt) {
+ reportsToDisplay.push({
+ ...report,
+ hasErrorsOtherThanFailedReceipt: true,
+ });
+ return;
+ }
const isSystemChat = ReportUtils.isSystemChat(report);
const shouldOverrideHidden = hasErrorsOtherThanFailedReceipt || isFocused || isSystemChat || report.isPinned;
if (isHidden && !shouldOverrideHidden) {
- return false;
+ return;
}
- return ReportUtils.shouldReportBeInOptionList({
- report,
- currentReportId: currentReportId ?? '-1',
- isInFocusMode,
- betas,
- policies: policies as OnyxCollection,
- excludeEmptyChats: true,
- doesReportHaveViolations,
- includeSelfDM: true,
- });
+ if (
+ ReportUtils.shouldReportBeInOptionList({
+ report,
+ currentReportId: currentReportId ?? '-1',
+ isInFocusMode,
+ betas,
+ policies: policies as OnyxCollection,
+ excludeEmptyChats: true,
+ doesReportHaveViolations,
+ includeSelfDM: true,
+ })
+ ) {
+ reportsToDisplay.push(report);
+ }
});
// The LHN is split into four distinct groups, and each group is sorted a little differently. The groups will ALWAYS be in this order:
@@ -128,10 +135,12 @@ function getOrderedReportIDs(
// 4. Archived reports
// - Sorted by lastVisibleActionCreated in default (most recent) view mode
// - Sorted by reportDisplayName in GSD (focus) view mode
+
const pinnedAndGBRReports: MiniReport[] = [];
const draftReports: MiniReport[] = [];
const nonArchivedReports: MiniReport[] = [];
const archivedReports: MiniReport[] = [];
+ const errorReports: MiniReport[] = [];
if (currentPolicyID || policyMemberAccountIDs.length > 0) {
reportsToDisplay = reportsToDisplay.filter(
@@ -140,7 +149,7 @@ function getOrderedReportIDs(
}
// There are a few properties that need to be calculated for the report which are used when sorting reports.
reportsToDisplay.forEach((reportToDisplay) => {
- const report = reportToDisplay as OnyxEntry;
+ const report = reportToDisplay;
const miniReport: MiniReport = {
reportID: report?.reportID,
displayName: ReportUtils.getReportName(report),
@@ -155,6 +164,8 @@ function getOrderedReportIDs(
draftReports.push(miniReport);
} else if (ReportUtils.isArchivedRoom(report)) {
archivedReports.push(miniReport);
+ } else if (report?.hasErrorsOtherThanFailedReceipt) {
+ errorReports.push(miniReport);
} else {
nonArchivedReports.push(miniReport);
}
@@ -162,6 +173,7 @@ function getOrderedReportIDs(
// Sort each group of reports accordingly
pinnedAndGBRReports.sort((a, b) => (a?.displayName && b?.displayName ? localeCompare(a.displayName, b.displayName) : 0));
+ errorReports.sort((a, b) => (a?.displayName && b?.displayName ? localeCompare(a.displayName, b.displayName) : 0));
draftReports.sort((a, b) => (a?.displayName && b?.displayName ? localeCompare(a.displayName, b.displayName) : 0));
if (isInDefaultMode) {
@@ -182,7 +194,9 @@ function getOrderedReportIDs(
// Now that we have all the reports grouped and sorted, they must be flattened into an array and only return the reportID.
// The order the arrays are concatenated in matters and will determine the order that the groups are displayed in the sidebar.
- const LHNReports = [...pinnedAndGBRReports, ...draftReports, ...nonArchivedReports, ...archivedReports].map((report) => report?.reportID ?? '-1');
+
+ const LHNReports = [...pinnedAndGBRReports, ...errorReports, ...draftReports, ...nonArchivedReports, ...archivedReports].map((report) => report?.reportID ?? '-1');
+
return LHNReports;
}
@@ -231,6 +245,8 @@ function getOptionData({
searchText: undefined,
isPinned: false,
hasOutstandingChildRequest: false,
+ hasOutstandingChildTask: false,
+ hasParentAccess: undefined,
isIOUReportOwner: null,
isChatRoom: false,
isArchivedRoom: false,
@@ -284,6 +300,8 @@ function getOptionData({
result.isDeletedParentAction = report.isDeletedParentAction;
result.isSelfDM = ReportUtils.isSelfDM(report);
result.tooltipText = ReportUtils.getReportParticipantsTitle(visibleParticipantAccountIDs);
+ result.hasOutstandingChildTask = report.hasOutstandingChildTask;
+ result.hasParentAccess = report.hasParentAccess;
const hasMultipleParticipants = participantPersonalDetailList.length > 1 || result.isChatRoom || result.isPolicyExpenseChat || ReportUtils.isExpenseReport(report);
const subtitle = ReportUtils.getChatRoomSubtitle(report);
diff --git a/src/libs/SubscriptionUtils.ts b/src/libs/SubscriptionUtils.ts
index 50dc4f99eec0..8569a3f03128 100644
--- a/src/libs/SubscriptionUtils.ts
+++ b/src/libs/SubscriptionUtils.ts
@@ -1,9 +1,107 @@
import {differenceInSeconds, fromUnixTime, isAfter, isBefore, parse as parseDate} from 'date-fns';
-import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
+import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
-import type {BillingGraceEndPeriod, Policy} from '@src/types/onyx';
+import type {BillingGraceEndPeriod, BillingStatus, Fund, FundList, Policy, StripeCustomerID} from '@src/types/onyx';
+import {isEmptyObject} from '@src/types/utils/EmptyObject';
+import * as PolicyUtils from './PolicyUtils';
+
+const PAYMENT_STATUS = {
+ POLICY_OWNER_WITH_AMOUNT_OWED: 'policy_owner_with_amount_owed',
+ POLICY_OWNER_WITH_AMOUNT_OWED_OVERDUE: 'policy_owner_with_amount_owed_overdue',
+ OWNER_OF_POLICY_UNDER_INVOICING: 'owner_of_policy_under_invoicing',
+ OWNER_OF_POLICY_UNDER_INVOICING_OVERDUE: 'owner_of_policy_under_invoicing_overdue',
+ BILLING_DISPUTE_PENDING: 'billing_dispute_pending',
+ CARD_AUTHENTICATION_REQUIRED: 'authentication_required',
+ INSUFFICIENT_FUNDS: 'insufficient_funds',
+ CARD_EXPIRED: 'expired_card',
+ CARD_EXPIRE_SOON: 'card_expire_soon',
+ RETRY_BILLING_SUCCESS: 'retry_billing_success',
+ RETRY_BILLING_ERROR: 'retry_billing_error',
+ GENERIC_API_ERROR: 'generic_api_error',
+} as const;
+
+let currentUserAccountID = -1;
+Onyx.connect({
+ key: ONYXKEYS.SESSION,
+ callback: (value) => {
+ currentUserAccountID = value?.accountID ?? -1;
+ },
+});
+
+let amountOwed: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.NVP_PRIVATE_AMOUNT_OWED,
+ callback: (value) => (amountOwed = value),
+});
+
+let stripeCustomerId: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.NVP_PRIVATE_STRIPE_CUSTOMER_ID,
+ callback: (value) => {
+ if (!value) {
+ return;
+ }
+
+ stripeCustomerId = value;
+ },
+});
+
+let billingDisputePending: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.NVP_PRIVATE_BILLING_DISPUTE_PENDING,
+ callback: (value) => (billingDisputePending = value),
+});
+
+let billingStatus: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.NVP_PRIVATE_BILLING_STATUS,
+ callback: (value) => (billingStatus = value),
+});
+
+let ownerBillingGraceEndPeriod: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END,
+ callback: (value) => (ownerBillingGraceEndPeriod = value),
+});
+
+let fundList: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.FUND_LIST,
+ callback: (value) => {
+ if (!value) {
+ return;
+ }
+
+ fundList = value;
+ },
+});
+
+let retryBillingSuccessful: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.SUBSCRIPTION_RETRY_BILLING_STATUS_SUCCESSFUL,
+ callback: (value) => {
+ if (value === undefined) {
+ return;
+ }
+
+ retryBillingSuccessful = value;
+ },
+});
+
+let retryBillingFailed: OnyxEntry;
+Onyx.connect({
+ key: ONYXKEYS.SUBSCRIPTION_RETRY_BILLING_STATUS_FAILED,
+ callback: (value) => {
+ if (value === undefined) {
+ return;
+ }
+
+ retryBillingFailed = value;
+ },
+ initWithStoredValues: false,
+});
let firstDayFreeTrial: OnyxEntry;
Onyx.connect({
@@ -30,18 +128,6 @@ Onyx.connect({
waitForCollectionCallback: true,
});
-let ownerBillingGraceEndPeriod: OnyxEntry;
-Onyx.connect({
- key: ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END,
- callback: (value) => (ownerBillingGraceEndPeriod = value),
-});
-
-let amountOwed: OnyxEntry;
-Onyx.connect({
- key: ONYXKEYS.NVP_PRIVATE_AMOUNT_OWNED,
- callback: (value) => (amountOwed = value),
-});
-
let allPolicies: OnyxCollection;
Onyx.connect({
key: ONYXKEYS.COLLECTION.POLICY,
@@ -49,6 +135,224 @@ Onyx.connect({
waitForCollectionCallback: true,
});
+/**
+ * @returns The date when the grace period ends.
+ */
+function getOverdueGracePeriodDate(): OnyxEntry {
+ return ownerBillingGraceEndPeriod;
+}
+
+/**
+ * @returns Whether the workspace owner has an overdue grace period.
+ */
+function hasOverdueGracePeriod(): boolean {
+ return !!ownerBillingGraceEndPeriod ?? false;
+}
+
+/**
+ * @returns Whether the workspace owner's grace period is overdue.
+ */
+function hasGracePeriodOverdue(): boolean {
+ return !!ownerBillingGraceEndPeriod && Date.now() > new Date(ownerBillingGraceEndPeriod).getTime();
+}
+
+/**
+ * @returns The amount owed by the workspace owner.
+ */
+function getAmountOwed(): number {
+ return amountOwed ?? 0;
+}
+
+/**
+ * @returns Whether there is an amount owed by the workspace owner.
+ */
+function hasAmountOwed(): boolean {
+ return !!amountOwed;
+}
+
+/**
+ * @returns Whether there is a card authentication error.
+ */
+function hasCardAuthenticatedError() {
+ return stripeCustomerId?.status === 'authentication_required' && amountOwed === 0;
+}
+
+/**
+ * @returns Whether there is a billing dispute pending.
+ */
+function hasBillingDisputePending() {
+ return !!billingDisputePending ?? false;
+}
+
+/**
+ * @returns Whether there is a card expired error.
+ */
+function hasCardExpiredError() {
+ return billingStatus?.declineReason === 'expired_card' && amountOwed !== 0;
+}
+
+/**
+ * @returns Whether there is an insufficient funds error.
+ */
+function hasInsufficientFundsError() {
+ return billingStatus?.declineReason === 'insufficient_funds' && amountOwed !== 0;
+}
+
+/**
+ * @returns The card to be used for subscription billing.
+ */
+function getCardForSubscriptionBilling(): Fund | undefined {
+ return Object.values(fundList ?? {}).find((card) => card?.isDefault);
+}
+
+/**
+ * @returns Whether the card is due to expire soon.
+ */
+function hasCardExpiringSoon(): boolean {
+ if (!isEmptyObject(billingStatus)) {
+ return false;
+ }
+
+ const card = getCardForSubscriptionBilling();
+
+ if (!card) {
+ return false;
+ }
+
+ const cardYear = card?.accountData?.cardYear;
+ const cardMonth = card?.accountData?.cardMonth;
+ const currentYear = new Date().getFullYear();
+ const currentMonth = new Date().getMonth();
+
+ const isExpiringThisMonth = cardYear === currentYear && cardMonth === currentMonth;
+ const isExpiringNextMonth = cardYear === (currentMonth === 12 ? currentYear + 1 : currentYear) && cardMonth === (currentMonth === 12 ? 1 : currentMonth + 1);
+
+ return isExpiringThisMonth || isExpiringNextMonth;
+}
+
+/**
+ * @returns Whether there is a retry billing error.
+ */
+function hasRetryBillingError(): boolean {
+ return !!retryBillingFailed ?? false;
+}
+
+/**
+ * @returns Whether the retry billing was successful.
+ */
+function isRetryBillingSuccessful(): boolean {
+ return !!retryBillingSuccessful ?? false;
+}
+
+type SubscriptionStatus = {
+ status: string;
+ isError?: boolean;
+};
+
+/**
+ * @returns The subscription status.
+ */
+function getSubscriptionStatus(): SubscriptionStatus | undefined {
+ if (hasOverdueGracePeriod()) {
+ if (hasAmountOwed()) {
+ // 1. Policy owner with amount owed, within grace period
+ if (!hasGracePeriodOverdue()) {
+ return {
+ status: PAYMENT_STATUS.POLICY_OWNER_WITH_AMOUNT_OWED,
+ isError: true,
+ };
+ }
+
+ // 2. Policy owner with amount owed, overdue (past grace period)
+ if (hasGracePeriodOverdue()) {
+ return {
+ status: PAYMENT_STATUS.POLICY_OWNER_WITH_AMOUNT_OWED_OVERDUE,
+ };
+ }
+ } else {
+ // 3. Owner of policy under invoicing, within grace period
+ if (!hasGracePeriodOverdue()) {
+ return {
+ status: PAYMENT_STATUS.OWNER_OF_POLICY_UNDER_INVOICING,
+ };
+ }
+
+ // 4. Owner of policy under invoicing, overdue (past grace period)
+ if (hasGracePeriodOverdue()) {
+ return {
+ status: PAYMENT_STATUS.OWNER_OF_POLICY_UNDER_INVOICING_OVERDUE,
+ };
+ }
+ }
+ }
+ // 5. Billing disputed by cardholder
+ if (hasBillingDisputePending()) {
+ return {
+ status: PAYMENT_STATUS.BILLING_DISPUTE_PENDING,
+ };
+ }
+
+ // 6. Card not authenticated
+ if (hasCardAuthenticatedError()) {
+ return {
+ status: PAYMENT_STATUS.CARD_AUTHENTICATION_REQUIRED,
+ };
+ }
+
+ // 7. Insufficient funds
+ if (hasInsufficientFundsError()) {
+ return {
+ status: PAYMENT_STATUS.INSUFFICIENT_FUNDS,
+ };
+ }
+
+ // 8. Card expired
+ if (hasCardExpiredError()) {
+ return {
+ status: PAYMENT_STATUS.CARD_EXPIRED,
+ };
+ }
+
+ // 9. Card due to expire soon
+ if (hasCardExpiringSoon()) {
+ return {
+ status: PAYMENT_STATUS.CARD_EXPIRE_SOON,
+ };
+ }
+
+ // 10. Retry billing success
+ if (isRetryBillingSuccessful()) {
+ return {
+ status: PAYMENT_STATUS.RETRY_BILLING_SUCCESS,
+ isError: false,
+ };
+ }
+
+ // 11. Retry billing error
+ if (hasRetryBillingError()) {
+ return {
+ status: PAYMENT_STATUS.RETRY_BILLING_ERROR,
+ isError: true,
+ };
+ }
+
+ return undefined;
+}
+
+/**
+ * @returns Whether there is a subscription red dot error.
+ */
+function hasSubscriptionRedDotError(): boolean {
+ return getSubscriptionStatus()?.isError ?? false;
+}
+
+/**
+ * @returns Whether there is a subscription green dot info.
+ */
+function hasSubscriptionGreenDotInfo(): boolean {
+ return !getSubscriptionStatus()?.isError ?? false;
+}
+
/**
* Calculates the remaining number of days of the workspace owner's free trial before it ends.
*/
@@ -106,6 +410,8 @@ function doesUserHavePaymentCardAdded(): boolean {
function shouldRestrictUserBillableActions(policyID: string): boolean {
const currentDate = new Date();
+ const policy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`];
+
// This logic will be executed if the user is a workspace's non-owner (normal user or admin).
// We should restrict the workspace's non-owner actions if it's member of a workspace where the owner is
// past due and is past its grace period end.
@@ -114,10 +420,9 @@ function shouldRestrictUserBillableActions(policyID: string): boolean {
if (userBillingGracePeriodEnd && isAfter(currentDate, fromUnixTime(userBillingGracePeriodEnd.value))) {
// Extracts the owner account ID from the collection member key.
- const ownerAccountID = entryKey.slice(ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_USER_BILLING_GRACE_PERIOD_END.length);
+ const ownerAccountID = Number(entryKey.slice(ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_USER_BILLING_GRACE_PERIOD_END.length));
- const ownerPolicy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${policyID}`];
- if (String(ownerPolicy?.ownerAccountID ?? -1) === ownerAccountID) {
+ if (PolicyUtils.isPolicyOwner(policy, ownerAccountID)) {
return true;
}
}
@@ -125,11 +430,31 @@ function shouldRestrictUserBillableActions(policyID: string): boolean {
// If it reached here it means that the user is actually the workspace's owner.
// We should restrict the workspace's owner actions if it's past its grace period end date and it's owing some amount.
- if (ownerBillingGraceEndPeriod && amountOwed !== undefined && amountOwed > 0 && isAfter(currentDate, fromUnixTime(ownerBillingGraceEndPeriod))) {
+ if (
+ PolicyUtils.isPolicyOwner(policy, currentUserAccountID) &&
+ ownerBillingGraceEndPeriod &&
+ amountOwed !== undefined &&
+ amountOwed > 0 &&
+ isAfter(currentDate, fromUnixTime(ownerBillingGraceEndPeriod))
+ ) {
return true;
}
return false;
}
-export {calculateRemainingFreeTrialDays, doesUserHavePaymentCardAdded, hasUserFreeTrialEnded, isUserOnFreeTrial, shouldRestrictUserBillableActions};
+export {
+ calculateRemainingFreeTrialDays,
+ doesUserHavePaymentCardAdded,
+ hasUserFreeTrialEnded,
+ isUserOnFreeTrial,
+ shouldRestrictUserBillableActions,
+ getSubscriptionStatus,
+ hasSubscriptionRedDotError,
+ getAmountOwed,
+ getOverdueGracePeriodDate,
+ getCardForSubscriptionBilling,
+ hasSubscriptionGreenDotInfo,
+ hasRetryBillingError,
+ PAYMENT_STATUS,
+};
diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts
index 87dcede7f0c9..5fedd5443a89 100644
--- a/src/libs/ValidationUtils.ts
+++ b/src/libs/ValidationUtils.ts
@@ -407,7 +407,7 @@ function isNumeric(value: string): boolean {
if (typeof value !== 'string') {
return false;
}
- return /^\d*$/.test(value);
+ return CONST.REGEX.NUMBER.test(value);
}
/**
diff --git a/src/libs/actions/App.ts b/src/libs/actions/App.ts
index 846d19b25857..988de759d763 100644
--- a/src/libs/actions/App.ts
+++ b/src/libs/actions/App.ts
@@ -7,18 +7,9 @@ import Onyx from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
import {importEmojiLocale} from '@assets/emojis';
import * as API from '@libs/API';
-import type {
- GetMissingOnyxMessagesParams,
- HandleRestrictedEventParams,
- OpenAppParams,
- OpenOldDotLinkParams,
- OpenProfileParams,
- ReconnectAppParams,
- UpdatePreferredLocaleParams,
-} from '@libs/API/parameters';
+import type {GetMissingOnyxMessagesParams, HandleRestrictedEventParams, OpenAppParams, OpenOldDotLinkParams, ReconnectAppParams, UpdatePreferredLocaleParams} from '@libs/API/parameters';
import {SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
import * as Browser from '@libs/Browser';
-import DateUtils from '@libs/DateUtils';
import {buildEmojisTrie} from '@libs/EmojiTrie';
import Log from '@libs/Log';
import getCurrentUrl from '@libs/Navigation/currentUrl';
@@ -32,7 +23,6 @@ import type {OnyxKey} from '@src/ONYXKEYS';
import type {Route} from '@src/ROUTES';
import ROUTES from '@src/ROUTES';
import type * as OnyxTypes from '@src/types/onyx';
-import type {SelectedTimezone} from '@src/types/onyx/PersonalDetails';
import type {OnyxData} from '@src/types/onyx/Request';
import * as Policy from './Policy/Policy';
import * as Session from './Session';
@@ -457,52 +447,6 @@ function redirectThirdPartyDesktopSignIn() {
}
}
-function openProfile(personalDetails: OnyxTypes.PersonalDetails) {
- const oldTimezoneData = personalDetails.timezone ?? {};
- let newTimezoneData = oldTimezoneData;
-
- if (oldTimezoneData?.automatic ?? true) {
- newTimezoneData = {
- automatic: true,
- selected: Intl.DateTimeFormat().resolvedOptions().timeZone as SelectedTimezone,
- };
- }
-
- newTimezoneData = DateUtils.formatToSupportedTimezone(newTimezoneData);
-
- const parameters: OpenProfileParams = {
- timezone: JSON.stringify(newTimezoneData),
- };
-
- // We expect currentUserAccountID to be a number because it doesn't make sense to open profile if currentUserAccountID is not set
- if (typeof currentUserAccountID === 'number') {
- API.write(WRITE_COMMANDS.OPEN_PROFILE, parameters, {
- optimisticData: [
- {
- onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.PERSONAL_DETAILS_LIST,
- value: {
- [currentUserAccountID]: {
- timezone: newTimezoneData,
- },
- },
- },
- ],
- failureData: [
- {
- onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.PERSONAL_DETAILS_LIST,
- value: {
- [currentUserAccountID]: {
- timezone: oldTimezoneData,
- },
- },
- },
- ],
- });
- }
-}
-
/**
* @param shouldAuthenticateWithCurrentAccount Optional, indicates whether default authentication method (shortLivedAuthToken) should be used
*/
@@ -558,7 +502,6 @@ export {
setLocaleAndNavigate,
setSidebarLoaded,
setUpPoliciesAndNavigate,
- openProfile,
redirectThirdPartyDesktopSignIn,
openApp,
reconnectApp,
diff --git a/src/libs/actions/Card.ts b/src/libs/actions/Card.ts
index 9a011d88e582..aea952618071 100644
--- a/src/libs/actions/Card.ts
+++ b/src/libs/actions/Card.ts
@@ -5,7 +5,7 @@ import type {ActivatePhysicalExpensifyCardParams, ReportVirtualExpensifyCardFrau
import {SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
-import type {ExpensifyCardDetails} from '@src/types/onyx/Card';
+import type {ExpensifyCardDetails, IssueNewCardStep} from '@src/types/onyx/Card';
type ReplacementReason = 'damaged' | 'stolen';
@@ -44,7 +44,11 @@ function reportVirtualExpensifyCardFraud(cardID: number) {
cardID,
};
- API.write(WRITE_COMMANDS.REPORT_VIRTUAL_EXPENSIFY_CARD_FRAUD, parameters, {optimisticData, successData, failureData});
+ API.write(WRITE_COMMANDS.REPORT_VIRTUAL_EXPENSIFY_CARD_FRAUD, parameters, {
+ optimisticData,
+ successData,
+ failureData,
+ });
}
/**
@@ -89,7 +93,11 @@ function requestReplacementExpensifyCard(cardID: number, reason: ReplacementReas
reason,
};
- API.write(WRITE_COMMANDS.REQUEST_REPLACEMENT_EXPENSIFY_CARD, parameters, {optimisticData, successData, failureData});
+ API.write(WRITE_COMMANDS.REQUEST_REPLACEMENT_EXPENSIFY_CARD, parameters, {
+ optimisticData,
+ successData,
+ failureData,
+ });
}
/**
@@ -177,5 +185,9 @@ function revealVirtualCardDetails(cardID: number): Promise
});
}
-export {requestReplacementExpensifyCard, activatePhysicalExpensifyCard, clearCardListErrors, reportVirtualExpensifyCardFraud, revealVirtualCardDetails};
+function setIssueNewCardStep(step: IssueNewCardStep | null) {
+ Onyx.merge(ONYXKEYS.ISSUE_NEW_EXPENSIFY_CARD, {currentStep: step});
+}
+
+export {requestReplacementExpensifyCard, activatePhysicalExpensifyCard, clearCardListErrors, reportVirtualExpensifyCardFraud, revealVirtualCardDetails, setIssueNewCardStep};
export type {ReplacementReason};
diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts
index 6a9427e884ec..48c70021cacc 100644
--- a/src/libs/actions/IOU.ts
+++ b/src/libs/actions/IOU.ts
@@ -44,6 +44,7 @@ import * as PolicyUtils from '@libs/PolicyUtils';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import type {OptimisticChatReport, OptimisticCreatedReportAction, OptimisticIOUReportAction, TransactionDetails} from '@libs/ReportUtils';
import * as ReportUtils from '@libs/ReportUtils';
+import * as SubscriptionUtils from '@libs/SubscriptionUtils';
import * as TransactionUtils from '@libs/TransactionUtils';
import ViolationsUtils from '@libs/Violations/ViolationsUtils';
import type {IOUAction, IOUType} from '@src/CONST';
@@ -1704,13 +1705,16 @@ function getDeleteTrackExpenseInformation(
}
if (actionableWhisperReportActionID) {
+ const actionableWhisperReportAction = ReportActionsUtils.getReportAction(chatReportID, actionableWhisperReportActionID);
failureData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${chatReport?.reportID}`,
value: {
[actionableWhisperReportActionID]: {
originalMessage: {
- resolution: null,
+ resolution: ReportActionsUtils.isActionableTrackExpense(actionableWhisperReportAction)
+ ? ReportActionsUtils.getOriginalMessage(actionableWhisperReportAction)?.resolution ?? null
+ : null,
},
},
},
@@ -2438,7 +2442,7 @@ function calculateAmountForUpdatedWaypoint(
) {
let updatedAmount: number = CONST.IOU.DEFAULT_AMOUNT;
let updatedMerchant = Localize.translateLocal('iou.fieldPending');
- if (!isEmptyObject(transactionChanges?.routes)) {
+ if (!isEmptyObject(transactionChanges?.routes?.route0?.geometry)) {
const customUnitRateID = TransactionUtils.getRateID(transaction) ?? '';
const mileageRates = DistanceRequestUtils.getMileageRates(policy, true);
const policyCurrency = policy?.outputCurrency ?? PolicyUtils.getPersonalPolicy()?.outputCurrency ?? CONST.CURRENCY.USD;
@@ -3623,6 +3627,9 @@ function trackExpense(
const moneyRequestReportID = isMoneyRequestReport ? report.reportID : '';
const isMovingTransactionFromTrackExpense = IOUUtils.isMovingTransactionFromTrackExpense(action);
+ // Pass an open receipt so the distance expense will show a map with the route optimistically
+ const trackedReceipt = validWaypoints ? {source: ReceiptGeneric as ReceiptSource, state: CONST.IOU.RECEIPT_STATE.OPEN} : receipt;
+
const {
createdWorkspaceParams,
iouReport,
@@ -3645,7 +3652,7 @@ function trackExpense(
currency,
created,
merchant,
- receipt,
+ trackedReceipt,
category,
tag,
taxCode,
@@ -3691,7 +3698,7 @@ function trackExpense(
taxCode,
taxAmount,
billable,
- receipt,
+ trackedReceipt,
createdWorkspaceParams,
);
break;
@@ -3722,7 +3729,7 @@ function trackExpense(
taxCode,
taxAmount,
billable,
- receipt,
+ trackedReceipt,
createdWorkspaceParams,
);
break;
@@ -3741,8 +3748,8 @@ function trackExpense(
createdChatReportActionID: createdChatReportActionID ?? '-1',
createdIOUReportActionID,
reportPreviewReportActionID: reportPreviewAction?.reportActionID,
- receipt,
- receiptState: receipt?.state,
+ receipt: trackedReceipt,
+ receiptState: trackedReceipt?.state,
category,
tag,
taxCode,
@@ -3776,11 +3783,9 @@ function getOrCreateOptimisticSplitChatReport(existingSplitChatReportID: string,
// Check if the report is available locally if we do have one
let existingSplitChatReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${existingChatReportID}`];
- // If we do not have one locally then we will search for a chat with the same participants (only for 1:1 chats).
- const shouldGetOrCreateOneOneDM = participants.length < 2;
const allParticipantsAccountIDs = [...participantAccountIDs, currentUserAccountID];
- if (!existingSplitChatReport && shouldGetOrCreateOneOneDM) {
- existingSplitChatReport = ReportUtils.getChatByParticipants(allParticipantsAccountIDs);
+ if (!existingSplitChatReport) {
+ existingSplitChatReport = ReportUtils.getChatByParticipants(allParticipantsAccountIDs, undefined, participantAccountIDs.length > 1);
}
// We found an existing chat report we are done...
@@ -5586,7 +5591,17 @@ function deleteTrackExpense(chatReportID: string, transactionID: string, reportA
return deleteMoneyRequest(transactionID, reportAction, isSingleTransactionView);
}
- const {parameters, optimisticData, successData, failureData, shouldDeleteTransactionThread} = getDeleteTrackExpenseInformation(chatReportID, transactionID, reportAction);
+ const whisperAction = ReportActionsUtils.getTrackExpenseActionableWhisper(transactionID, chatReportID);
+ const actionableWhisperReportActionID = whisperAction?.reportActionID;
+ const {parameters, optimisticData, successData, failureData, shouldDeleteTransactionThread} = getDeleteTrackExpenseInformation(
+ chatReportID,
+ transactionID,
+ reportAction,
+ undefined,
+ undefined,
+ actionableWhisperReportActionID,
+ CONST.REPORT.ACTIONABLE_TRACK_EXPENSE_WHISPER_RESOLUTION.NOTHING,
+ );
// STEP 6: Make the API request
API.write(WRITE_COMMANDS.DELETE_MONEY_REQUEST, parameters, {optimisticData, successData, failureData});
@@ -6207,6 +6222,11 @@ function hasIOUToApproveOrPay(chatReport: OnyxEntry, excludedI
}
function approveMoneyRequest(expenseReport: OnyxEntry, full?: boolean) {
+ if (expenseReport?.policyID && SubscriptionUtils.shouldRestrictUserBillableActions(expenseReport.policyID)) {
+ Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(expenseReport.policyID));
+ return;
+ }
+
const currentNextStep = allNextSteps[`${ONYXKEYS.COLLECTION.NEXT_STEP}${expenseReport?.reportID}`] ?? null;
let total = expenseReport?.total ?? 0;
const hasHeldExpenses = ReportUtils.hasHeldExpenses(expenseReport?.reportID);
@@ -6340,6 +6360,11 @@ function approveMoneyRequest(expenseReport: OnyxEntry, full?:
}
function submitReport(expenseReport: OnyxTypes.Report) {
+ if (expenseReport.policyID && SubscriptionUtils.shouldRestrictUserBillableActions(expenseReport.policyID)) {
+ Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(expenseReport.policyID));
+ return;
+ }
+
const currentNextStep = allNextSteps[`${ONYXKEYS.COLLECTION.NEXT_STEP}${expenseReport.reportID}`] ?? null;
const parentReport = getReportOrDraftReport(expenseReport.parentReportID);
const policy = PolicyUtils.getPolicy(expenseReport.policyID);
@@ -6570,6 +6595,11 @@ function cancelPayment(expenseReport: OnyxTypes.Report, chatReport: OnyxTypes.Re
}
function payMoneyRequest(paymentType: PaymentMethodType, chatReport: OnyxTypes.Report, iouReport: OnyxTypes.Report, full = true) {
+ if (chatReport.policyID && SubscriptionUtils.shouldRestrictUserBillableActions(chatReport.policyID)) {
+ Navigation.navigate(ROUTES.RESTRICTED_ACTION.getRoute(chatReport.policyID));
+ return;
+ }
+
const recipient = {accountID: iouReport.ownerAccountID};
const {params, optimisticData, successData, failureData} = getPayMoneyRequestParams(chatReport, iouReport, recipient, paymentType, full);
diff --git a/src/libs/actions/Link.ts b/src/libs/actions/Link.ts
index 702153dac0b7..19f5281e086f 100644
--- a/src/libs/actions/Link.ts
+++ b/src/libs/actions/Link.ts
@@ -21,9 +21,13 @@ Onyx.connect({
});
let currentUserEmail = '';
+let currentUserAccountID = -1;
Onyx.connect({
key: ONYXKEYS.SESSION,
- callback: (value) => (currentUserEmail = value?.email ?? ''),
+ callback: (value) => {
+ currentUserEmail = value?.email ?? '';
+ currentUserAccountID = value?.accountID ?? -1;
+ },
});
function buildOldDotURL(url: string, shortLivedAuthToken?: string): Promise {
@@ -157,4 +161,29 @@ function openLink(href: string, environmentURL: string, isAttachment = false) {
openExternalLink(href);
}
-export {buildOldDotURL, openOldDotLink, openExternalLink, openLink, getInternalNewExpensifyPath, getInternalExpensifyPath, openTravelDotLink, buildTravelDotURL};
+function buildURLWithAuthToken(url: string, shortLivedAuthToken?: string) {
+ const authTokenParam = shortLivedAuthToken ? `shortLivedAuthToken=${shortLivedAuthToken}` : '';
+ const emailParam = `email=${encodeURIComponent(currentUserEmail)}`;
+ const exitTo = `exitTo=${url}`;
+ const accountID = `accountID=${currentUserAccountID}`;
+ const paramsArray = [accountID, emailParam, authTokenParam, exitTo];
+ const params = paramsArray.filter(Boolean).join('&');
+
+ return `${CONFIG.EXPENSIFY.NEW_EXPENSIFY_URL}transition?${params}`;
+}
+
+/**
+ * @param shouldSkipCustomSafariLogic When true, we will use `Linking.openURL` even if the browser is Safari.
+ */
+function openExternalLinkWithToken(url: string, shouldSkipCustomSafariLogic = false) {
+ asyncOpenURL(
+ // eslint-disable-next-line rulesdir/no-api-side-effects-method
+ API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.OPEN_OLD_DOT_LINK, {}, {})
+ .then((response) => (response ? buildURLWithAuthToken(url, response.shortLivedAuthToken) : buildURLWithAuthToken(url)))
+ .catch(() => buildURLWithAuthToken(url)),
+ (link) => link,
+ shouldSkipCustomSafariLogic,
+ );
+}
+
+export {buildOldDotURL, openOldDotLink, openExternalLink, openLink, getInternalNewExpensifyPath, getInternalExpensifyPath, openTravelDotLink, buildTravelDotURL, openExternalLinkWithToken};
diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts
index 6371c970379f..d4713e580b64 100644
--- a/src/libs/actions/PaymentMethods.ts
+++ b/src/libs/actions/PaymentMethods.ts
@@ -5,15 +5,23 @@ import type {OnyxEntry, OnyxUpdate} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
import * as API from '@libs/API';
-import type {AddPaymentCardParams, DeletePaymentCardParams, MakeDefaultPaymentMethodParams, PaymentCardParams, TransferWalletBalanceParams} from '@libs/API/parameters';
-import {READ_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
+import type {
+ AddPaymentCardParams,
+ DeletePaymentCardParams,
+ MakeDefaultPaymentMethodParams,
+ PaymentCardParams,
+ TransferWalletBalanceParams,
+ UpdateBillingCurrencyParams,
+} from '@libs/API/parameters';
+import {READ_COMMANDS, SIDE_EFFECT_REQUEST_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
import * as CardUtils from '@libs/CardUtils';
import Navigation from '@libs/Navigation/Navigation';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type {Route} from '@src/ROUTES';
-import INPUT_IDS from '@src/types/form/AddDebitCardForm';
+import INPUT_IDS from '@src/types/form/AddPaymentCardForm';
import type {BankAccountList, FundList} from '@src/types/onyx';
+import type {AccountData} from '@src/types/onyx/Fund';
import type {PaymentMethodType} from '@src/types/onyx/OriginalMessage';
import type PaymentMethod from '@src/types/onyx/PaymentMethod';
import type {FilterMethodPaymentType} from '@src/types/onyx/WalletTransfer';
@@ -154,20 +162,20 @@ function addPaymentCard(params: PaymentCardParams) {
const cardYear = CardUtils.getYearFromExpirationDateString(params.expirationDate);
const parameters: AddPaymentCardParams = {
- cardNumber: params.cardNumber,
+ cardNumber: CardUtils.getMCardNumberString(params.cardNumber),
cardYear,
cardMonth,
cardCVV: params.securityCode,
addressName: params.nameOnCard,
addressZip: params.addressZipCode,
- currency: CONST.CURRENCY.USD,
+ currency: CONST.PAYMENT_CARD_CURRENCY.USD,
isP2PDebitCard: true,
};
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
+ key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM,
value: {isLoading: true},
},
];
@@ -175,7 +183,7 @@ function addPaymentCard(params: PaymentCardParams) {
const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
+ key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM,
value: {isLoading: false},
},
];
@@ -183,7 +191,7 @@ function addPaymentCard(params: PaymentCardParams) {
const failureData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
+ key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM,
value: {isLoading: false},
},
];
@@ -206,7 +214,7 @@ function addSubscriptionPaymentCard(cardData: {
cardCVV: string;
addressName: string;
addressZip: string;
- currency: ValueOf;
+ currency: ValueOf;
}) {
const {cardNumber, cardYear, cardMonth, cardCVV, addressName, addressZip, currency} = cardData;
@@ -224,7 +232,7 @@ function addSubscriptionPaymentCard(cardData: {
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
+ key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM,
value: {isLoading: true},
},
];
@@ -232,7 +240,7 @@ function addSubscriptionPaymentCard(cardData: {
const successData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
+ key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM,
value: {isLoading: false},
},
];
@@ -240,24 +248,37 @@ function addSubscriptionPaymentCard(cardData: {
const failureData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
- key: ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM,
+ key: ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM,
value: {isLoading: false},
},
];
- // TODO integrate API for subscription card as a follow up
- API.write(WRITE_COMMANDS.ADD_PAYMENT_CARD, parameters, {
- optimisticData,
- successData,
- failureData,
- });
+ if (currency === CONST.PAYMENT_CARD_CURRENCY.GBP) {
+ // eslint-disable-next-line rulesdir/no-api-side-effects-method
+ API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.ADD_PAYMENT_CARD_GBR, parameters, {optimisticData, successData, failureData}).then((response) => {
+ if (response?.jsonCode !== CONST.JSON_CODE.SUCCESS) {
+ return;
+ }
+ // TODO 3ds flow will be done as a part https://github.com/Expensify/App/issues/42432
+ // We will use this onyx key to open Modal and preview iframe. Potentially we can save the whole object which come from side effect
+ Onyx.set(ONYXKEYS.VERIFY_3DS_SUBSCRIPTION, (response as {authenticationLink: string}).authenticationLink);
+ });
+ } else {
+ // eslint-disable-next-line rulesdir/no-multiple-api-calls
+ API.write(WRITE_COMMANDS.ADD_PAYMENT_CARD, parameters, {
+ optimisticData,
+ successData,
+ failureData,
+ });
+ Navigation.goBack();
+ }
}
/**
- * Resets the values for the add debit card form back to their initial states
+ * Resets the values for the add payment card form back to their initial states
*/
-function clearDebitCardFormErrorAndSubmit() {
- Onyx.set(ONYXKEYS.FORMS.ADD_DEBIT_CARD_FORM, {
+function clearPaymentCardFormErrorAndSubmit() {
+ Onyx.set(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, {
isLoading: false,
errors: undefined,
[INPUT_IDS.SETUP_COMPLETE]: false,
@@ -269,6 +290,25 @@ function clearDebitCardFormErrorAndSubmit() {
[INPUT_IDS.ADDRESS_ZIP_CODE]: '',
[INPUT_IDS.ADDRESS_STATE]: '',
[INPUT_IDS.ACCEPT_TERMS]: '',
+ [INPUT_IDS.CURRENCY]: CONST.PAYMENT_CARD_CURRENCY.USD,
+ });
+}
+
+/**
+ * Clear 3ds flow - when verification will be finished
+ *
+ */
+function clearPaymentCard3dsVerification() {
+ Onyx.set(ONYXKEYS.VERIFY_3DS_SUBSCRIPTION, '');
+}
+
+/**
+ * Set currency for payments
+ *
+ */
+function setPaymentMethodCurrency(currency: ValueOf) {
+ Onyx.merge(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, {
+ [INPUT_IDS.CURRENCY]: currency,
});
}
@@ -421,6 +461,69 @@ function deletePaymentCard(fundID: number) {
});
}
+/**
+ * Call the API to change billing currency.
+ *
+ */
+function updateBillingCurrency(currency: ValueOf, cardCVV: string) {
+ const parameters: UpdateBillingCurrencyParams = {
+ cardCVV,
+ currency,
+ };
+
+ const optimisticData: OnyxUpdate[] = [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM,
+ value: {
+ isLoading: true,
+ errors: null,
+ },
+ },
+ ];
+
+ const successData: OnyxUpdate[] = [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM,
+ value: {
+ isLoading: false,
+ },
+ },
+ ];
+
+ const failureData: OnyxUpdate[] = [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: ONYXKEYS.FORMS.CHANGE_BILLING_CURRENCY_FORM,
+ value: {
+ isLoading: false,
+ },
+ },
+ ];
+
+ API.write(WRITE_COMMANDS.UPDATE_BILLING_CARD_CURRENCY, parameters, {
+ optimisticData,
+ successData,
+ failureData,
+ });
+}
+
+/**
+ * Set payment card form with API data
+ *
+ */
+function setPaymentCardForm(values: AccountData) {
+ Onyx.merge(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM, {
+ [INPUT_IDS.CARD_NUMBER]: values.cardNumber,
+ [INPUT_IDS.EXPIRATION_DATE]: `${values.cardMonth}${values.cardYear?.toString()?.substring(2)}`,
+ [INPUT_IDS.ADDRESS_STREET]: values.addressStreet,
+ [INPUT_IDS.ADDRESS_ZIP_CODE]: values.addressZip?.toString(),
+ [INPUT_IDS.ADDRESS_STATE]: values.addressState,
+ [INPUT_IDS.CURRENCY]: values.currency,
+ });
+}
+
export {
deletePaymentCard,
addPaymentCard,
@@ -429,15 +532,19 @@ export {
kycWallRef,
continueSetup,
addSubscriptionPaymentCard,
- clearDebitCardFormErrorAndSubmit,
+ clearPaymentCardFormErrorAndSubmit,
dismissSuccessfulTransferBalancePage,
transferWalletBalance,
resetWalletTransferData,
saveWalletTransferAccountTypeAndID,
saveWalletTransferMethodType,
hasPaymentMethodError,
+ updateBillingCurrency,
clearDeletePaymentMethodError,
clearAddPaymentMethodError,
clearWalletError,
+ setPaymentMethodCurrency,
+ clearPaymentCard3dsVerification,
clearWalletTermsError,
+ setPaymentCardForm,
};
diff --git a/src/libs/actions/Policy/Member.ts b/src/libs/actions/Policy/Member.ts
index 9874a175d0a2..f8472bd43098 100644
--- a/src/libs/actions/Policy/Member.ts
+++ b/src/libs/actions/Policy/Member.ts
@@ -101,6 +101,14 @@ Onyx.connect({
},
});
+/** Check if the passed employee is an approver in the policy's employeeList */
+function isApprover(policy: OnyxEntry, employeeAccountID: number) {
+ const employeeLogin = allPersonalDetails?.[employeeAccountID]?.login;
+ return Object.values(policy?.employeeList ?? {}).some(
+ (employee) => employee?.submitsTo === employeeLogin || employee?.forwardsTo === employeeLogin || employee?.overLimitForwardsTo === employeeLogin,
+ );
+}
+
/**
* Returns the policy of the report
*/
@@ -243,6 +251,42 @@ function removeMembers(accountIDs: number[], policyID: string) {
failureMembersState[email] = {errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('workspace.people.error.genericRemove')};
});
+ Object.keys(policy?.employeeList ?? {}).forEach((employeeEmail) => {
+ const employee = policy?.employeeList?.[employeeEmail];
+ optimisticMembersState[employeeEmail] = optimisticMembersState[employeeEmail] ?? {};
+ failureMembersState[employeeEmail] = failureMembersState[employeeEmail] ?? {};
+ if (employee?.submitsTo && emailList.includes(employee?.submitsTo)) {
+ optimisticMembersState[employeeEmail] = {
+ ...optimisticMembersState[employeeEmail],
+ submitsTo: policy?.owner,
+ };
+ failureMembersState[employeeEmail] = {
+ ...failureMembersState[employeeEmail],
+ submitsTo: employee?.submitsTo,
+ };
+ }
+ if (employee?.forwardsTo && emailList.includes(employee?.forwardsTo)) {
+ optimisticMembersState[employeeEmail] = {
+ ...optimisticMembersState[employeeEmail],
+ forwardsTo: policy?.owner,
+ };
+ failureMembersState[employeeEmail] = {
+ ...failureMembersState[employeeEmail],
+ forwardsTo: employee?.forwardsTo,
+ };
+ }
+ if (employee?.overLimitForwardsTo && emailList.includes(employee?.overLimitForwardsTo)) {
+ optimisticMembersState[employeeEmail] = {
+ ...optimisticMembersState[employeeEmail],
+ overLimitForwardsTo: policy?.owner,
+ };
+ failureMembersState[employeeEmail] = {
+ ...failureMembersState[employeeEmail],
+ overLimitForwardsTo: employee?.overLimitForwardsTo,
+ };
+ }
+ });
+
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
@@ -801,6 +845,7 @@ export {
inviteMemberToWorkspace,
acceptJoinRequest,
declineJoinRequest,
+ isApprover,
};
export type {NewCustomUnit};
diff --git a/src/libs/actions/Policy/Policy.ts b/src/libs/actions/Policy/Policy.ts
index 5945c09d67af..cd1acb564e22 100644
--- a/src/libs/actions/Policy/Policy.ts
+++ b/src/libs/actions/Policy/Policy.ts
@@ -12,19 +12,20 @@ import type {
DeleteWorkspaceAvatarParams,
DeleteWorkspaceParams,
EnablePolicyConnectionsParams,
+ EnablePolicyExpensifyCardsParams,
EnablePolicyReportFieldsParams,
EnablePolicyTaxesParams,
EnablePolicyWorkflowsParams,
LeavePolicyParams,
OpenDraftWorkspaceRequestParams,
- OpenPolicyInitialPageParams,
+ OpenPolicyExpensifyCardsPageParams,
OpenPolicyMoreFeaturesPageParams,
- OpenPolicyProfilePageParams,
OpenPolicyTaxesPageParams,
OpenPolicyWorkflowsPageParams,
OpenWorkspaceInvitePageParams,
OpenWorkspaceParams,
OpenWorkspaceReimburseViewParams,
+ RequestExpensifyCardLimitIncreaseParams,
SetWorkspaceApprovalModeParams,
SetWorkspaceAutoReportingFrequencyParams,
SetWorkspaceAutoReportingMonthlyOffsetParams,
@@ -41,6 +42,7 @@ import DateUtils from '@libs/DateUtils';
import * as ErrorUtils from '@libs/ErrorUtils';
import getIsNarrowLayout from '@libs/getIsNarrowLayout';
import Log from '@libs/Log';
+import * as NetworkStore from '@libs/Network/NetworkStore';
import * as NumberUtils from '@libs/NumberUtils';
import * as PhoneNumber from '@libs/PhoneNumber';
import * as PolicyUtils from '@libs/PolicyUtils';
@@ -606,12 +608,7 @@ function leaveWorkspace(policyID: string) {
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
- value: {
- pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
- employeeList: {
- [sessionEmail]: null,
- },
- },
+ value: null,
},
];
const failureData: OnyxUpdate[] = [
@@ -1932,6 +1929,17 @@ function openPolicyTaxesPage(policyID: string) {
API.read(READ_COMMANDS.OPEN_POLICY_TAXES_PAGE, params);
}
+function openPolicyExpensifyCardsPage(policyID: string) {
+ const authToken = NetworkStore.getAuthToken();
+
+ const params: OpenPolicyExpensifyCardsPageParams = {
+ policyID,
+ authToken,
+ };
+
+ API.read(READ_COMMANDS.OPEN_POLICY_EXPENSIFY_CARDS_PAGE, params);
+}
+
function openWorkspaceInvitePage(policyID: string, clientMemberEmails: string[]) {
if (!policyID || !clientMemberEmails) {
Log.warn('openWorkspaceInvitePage invalid params', {policyID, clientMemberEmails});
@@ -1952,6 +1960,17 @@ function openDraftWorkspaceRequest(policyID: string) {
API.read(READ_COMMANDS.OPEN_DRAFT_WORKSPACE_REQUEST, params);
}
+function requestExpensifyCardLimitIncrease(settlementBankAccountID: string) {
+ const authToken = NetworkStore.getAuthToken();
+
+ const params: RequestExpensifyCardLimitIncreaseParams = {
+ authToken,
+ settlementBankAccountID,
+ };
+
+ API.write(WRITE_COMMANDS.REQUEST_EXPENSIFY_CARD_LIMIT_INCREASE, params);
+}
+
function setWorkspaceInviteMessageDraft(policyID: string, message: string | null) {
Onyx.set(`${ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MESSAGE_DRAFT}${policyID}`, message);
}
@@ -2190,7 +2209,6 @@ function createWorkspaceFromIOUPayment(iouReport: OnyxEntry): string | u
},
},
];
-
successData.push(...employeeWorkspaceChat.onyxSuccessData);
const failureData: OnyxUpdate[] = [
@@ -2460,6 +2478,58 @@ function enablePolicyConnections(policyID: string, enabled: boolean) {
}
}
+function enableExpensifyCard(policyID: string, enabled: boolean) {
+ const authToken = NetworkStore.getAuthToken();
+ if (!authToken) {
+ return;
+ }
+ const onyxData: OnyxData = {
+ optimisticData: [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
+ value: {
+ areExpensifyCardsEnabled: enabled,
+ pendingFields: {
+ areExpensifyCardsEnabled: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE,
+ },
+ },
+ },
+ ],
+ successData: [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
+ value: {
+ pendingFields: {
+ areExpensifyCardsEnabled: null,
+ },
+ },
+ },
+ ],
+ failureData: [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
+ value: {
+ areExpensifyCardsEnabled: !enabled,
+ pendingFields: {
+ areExpensifyCardsEnabled: null,
+ },
+ },
+ },
+ ],
+ };
+
+ const parameters: EnablePolicyExpensifyCardsParams = {authToken, policyID, enabled};
+
+ API.write(WRITE_COMMANDS.ENABLE_POLICY_EXPENSIFY_CARDS, parameters, onyxData);
+
+ if (enabled && getIsNarrowLayout()) {
+ navigateWhenEnableFeature(policyID);
+ }
+}
+
function enablePolicyReportFields(policyID: string, enabled: boolean) {
const onyxData: OnyxData = {
optimisticData: [
@@ -2775,18 +2845,6 @@ function openPolicyMoreFeaturesPage(policyID: string) {
API.read(READ_COMMANDS.OPEN_POLICY_MORE_FEATURES_PAGE, params);
}
-function openPolicyProfilePage(policyID: string) {
- const params: OpenPolicyProfilePageParams = {policyID};
-
- API.read(READ_COMMANDS.OPEN_POLICY_PROFILE_PAGE, params);
-}
-
-function openPolicyInitialPage(policyID: string) {
- const params: OpenPolicyInitialPageParams = {policyID};
-
- API.read(READ_COMMANDS.OPEN_POLICY_INITIAL_PAGE, params);
-}
-
function setPolicyCustomTaxName(policyID: string, customTaxName: string) {
const policy = getPolicy(policyID);
const originalCustomTaxName = policy?.taxRates?.name;
@@ -2943,6 +3001,10 @@ function setForeignCurrencyDefault(policyID: string, taxCode: string) {
API.write(WRITE_COMMANDS.SET_POLICY_TAXES_FOREIGN_CURRENCY_DEFAULT, parameters, onyxData);
}
+function getPoliciesConnectedToSageIntacct(): Policy[] {
+ return Object.values(allPolicies ?? {}).filter((policy): policy is Policy => !!policy && !!policy?.connections?.intacct);
+}
+
export {
leaveWorkspace,
addBillingCardAndRequestPolicyOwnerChange,
@@ -2990,11 +3052,10 @@ export {
enablePolicyWorkflows,
enableDistanceRequestTax,
openPolicyMoreFeaturesPage,
- openPolicyProfilePage,
- openPolicyInitialPage,
generateCustomUnitID,
clearQBOErrorField,
clearXeroErrorField,
+ clearNetSuiteErrorField,
clearWorkspaceReimbursementErrors,
setWorkspaceCurrencyDefault,
setForeignCurrencyDefault,
@@ -3004,8 +3065,11 @@ export {
getPrimaryPolicy,
createDraftWorkspace,
buildPolicyData,
+ enableExpensifyCard,
createPolicyExpenseChats,
- clearNetSuiteErrorField,
+ openPolicyExpensifyCardsPage,
+ requestExpensifyCardLimitIncrease,
+ getPoliciesConnectedToSageIntacct,
};
export type {NewCustomUnit};
diff --git a/src/libs/actions/Report.ts b/src/libs/actions/Report.ts
index e528fde34ffe..31e801deeea4 100644
--- a/src/libs/actions/Report.ts
+++ b/src/libs/actions/Report.ts
@@ -783,7 +783,9 @@ function openReport(
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {
- errorFields: null,
+ errorFields: {
+ notFound: null,
+ },
},
},
{
@@ -959,6 +961,7 @@ function openReport(
function navigateToAndOpenReport(
userLogins: string[],
shouldDismissModal = true,
+ actionType?: string,
reportName?: string,
avatarUri?: string,
avatarFile?: File | CustomRNImageManipulatorResult | undefined,
@@ -1001,7 +1004,7 @@ function navigateToAndOpenReport(
Navigation.dismissModalWithReport(report);
} else {
Navigation.navigateWithSwitchPolicyID({route: ROUTES.HOME});
- Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report?.reportID ?? '-1'));
+ Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report?.reportID ?? '-1'), actionType);
}
}
@@ -1538,6 +1541,7 @@ function editReportComment(reportID: string, originalReportAction: OnyxEntry true) {
+function navigateToConciergeChat(shouldDismissModal = false, checkIfCurrentPageActive = () => true, actionType?: string) {
// If conciergeChatReportID contains a concierge report ID, we navigate to the concierge chat using the stored report ID.
// Otherwise, we would find the concierge chat and navigate to it.
if (!conciergeChatReportID) {
@@ -2019,12 +2023,12 @@ function navigateToConciergeChat(shouldDismissModal = false, checkIfCurrentPageA
if (!checkIfCurrentPageActive()) {
return;
}
- navigateToAndOpenReport([CONST.EMAIL.CONCIERGE], shouldDismissModal);
+ navigateToAndOpenReport([CONST.EMAIL.CONCIERGE], shouldDismissModal, actionType);
});
} else if (shouldDismissModal) {
Navigation.dismissModal(conciergeChatReportID);
} else {
- Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeChatReportID));
+ Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(conciergeChatReportID), actionType);
}
}
@@ -2254,18 +2258,6 @@ function clearPolicyRoomNameErrors(reportID: string) {
});
}
-/**
- * @param reportID The reportID of the report.
- */
-// eslint-disable-next-line rulesdir/no-negated-variables
-function clearReportNotFoundErrors(reportID: string) {
- Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {
- errorFields: {
- notFound: null,
- },
- });
-}
-
function setIsComposerFullSize(reportID: string, isComposerFullSize: boolean) {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_IS_COMPOSER_FULL_SIZE}${reportID}`, isComposerFullSize);
}
@@ -2505,7 +2497,7 @@ function toggleEmojiReaction(
addEmojiReaction(originalReportID, reportAction.reportActionID, emoji, skinTone);
}
-function openReportFromDeepLink(url: string, shouldNavigate = true) {
+function openReportFromDeepLink(url: string) {
const reportID = ReportUtils.getReportIDFromLink(url);
const isAuthenticated = Session.hasAuthToken();
@@ -2549,7 +2541,7 @@ function openReportFromDeepLink(url: string, shouldNavigate = true) {
return;
}
- if (!shouldNavigate) {
+ if (isAuthenticated) {
return;
}
@@ -2564,40 +2556,20 @@ function getCurrentUserAccountID(): number {
}
function navigateToMostRecentReport(currentReport: OnyxEntry) {
- const reportID = currentReport?.reportID;
- const sortedReportsByLastRead = ReportUtils.sortReportsByLastRead(Object.values(allReports ?? {}) as Report[], reportMetadata);
-
- // We want to filter out the current report, hidden reports and empty chats
- const filteredReportsByLastRead = sortedReportsByLastRead.filter(
- (sortedReport) =>
- sortedReport?.reportID !== reportID &&
- sortedReport?.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN &&
- ReportUtils.shouldReportBeInOptionList({
- report: sortedReport,
- currentReportId: '',
- isInFocusMode: false,
- betas: [],
- policies: {},
- excludeEmptyChats: true,
- doesReportHaveViolations: false,
- includeSelfDM: true,
- }),
- );
- const lastAccessedReportID = filteredReportsByLastRead.at(-1)?.reportID;
- const isChatThread = ReportUtils.isChatThread(currentReport);
+ const lastAccessedReportID = ReportUtils.findLastAccessedReport(allReports, false, undefined, false, false, reportMetadata, undefined, [], currentReport?.reportID)?.reportID;
+
if (lastAccessedReportID) {
const lastAccessedReportRoute = ROUTES.REPORT_WITH_ID.getRoute(lastAccessedReportID ?? '-1');
Navigation.goBack(lastAccessedReportRoute);
} else {
- const participantAccountIDs = PersonalDetailsUtils.getAccountIDsByLogins([CONST.EMAIL.CONCIERGE]);
- const chat = ReportUtils.getChatByParticipants([...participantAccountIDs, currentUserAccountID]);
- if (chat?.reportID) {
- // If it is not a chat thread we should call Navigation.goBack to pop the current route first before navigating to Concierge.
- if (!isChatThread) {
- Navigation.goBack();
- }
- Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(chat?.reportID), CONST.NAVIGATION.TYPE.UP);
+ const isChatThread = ReportUtils.isChatThread(currentReport);
+
+ // If it is not a chat thread we should call Navigation.goBack to pop the current route first before navigating to Concierge.
+ if (!isChatThread) {
+ Navigation.goBack();
}
+
+ navigateToConciergeChat(false, () => true, CONST.NAVIGATION.TYPE.UP);
}
}
@@ -3239,6 +3211,8 @@ function completeOnboarding(
description: taskDescription ?? '',
}));
+ const hasOutstandingChildTask = tasksData.some((task) => !task.completedTaskReportAction);
+
const tasksForOptimisticData = tasksData.reduce((acc, {currentTask, taskCreatedAction, taskReportAction, taskDescription, completedTaskReportAction}) => {
acc.push(
{
@@ -3261,6 +3235,7 @@ function completeOnboarding(
managerID: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
},
isOptimisticReport: true,
+ managerID: currentUserAccountID,
},
},
{
@@ -3287,6 +3262,7 @@ function completeOnboarding(
value: {
stateNum: CONST.REPORT.STATE_NUM.APPROVED,
statusNum: CONST.REPORT.STATUS_NUM.APPROVED,
+ managerID: currentUserAccountID,
},
});
}
@@ -3371,6 +3347,7 @@ function completeOnboarding(
key: `${ONYXKEYS.COLLECTION.REPORT}${targetChatReportID}`,
value: {
lastMentionedTime: DateUtils.getDBTime(),
+ hasOutstandingChildTask,
},
},
{
@@ -3402,6 +3379,7 @@ function completeOnboarding(
lastMessageTranslationKey: '',
lastMessageText: '',
lastVisibleActionCreated: '',
+ hasOutstandingChildTask: false,
};
const {lastMessageText = '', lastMessageTranslationKey = ''} = ReportActionsUtils.getLastVisibleMessage(targetChatReportID);
if (lastMessageText || lastMessageTranslationKey) {
@@ -3780,7 +3758,6 @@ export {
toggleSubscribeToChildReport,
updatePolicyRoomNameAndNavigate,
clearPolicyRoomNameErrors,
- clearReportNotFoundErrors,
clearIOUError,
subscribeToNewActionEvent,
notifyNewAction,
diff --git a/src/libs/actions/Search.ts b/src/libs/actions/Search.ts
index ec45298c3910..70f7d2d5b7e0 100644
--- a/src/libs/actions/Search.ts
+++ b/src/libs/actions/Search.ts
@@ -2,7 +2,7 @@ import Onyx from 'react-native-onyx';
import type {OnyxUpdate} from 'react-native-onyx';
import * as API from '@libs/API';
import type {SearchParams} from '@libs/API/parameters';
-import {READ_COMMANDS} from '@libs/API/types';
+import {READ_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
import ONYXKEYS from '@src/ONYXKEYS';
import type {SearchTransaction} from '@src/types/onyx/SearchResults';
import * as Report from './Report';
@@ -15,7 +15,7 @@ Onyx.connect({
},
});
-function search({hash, query, policyIDs, offset, sortBy, sortOrder}: SearchParams) {
+function getOnyxLoadingData(hash: number): {optimisticData: OnyxUpdate[]; finallyData: OnyxUpdate[]} {
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
@@ -40,6 +40,12 @@ function search({hash, query, policyIDs, offset, sortBy, sortOrder}: SearchParam
},
];
+ return {optimisticData, finallyData};
+}
+
+function search({hash, query, policyIDs, offset, sortBy, sortOrder}: SearchParams) {
+ const {optimisticData, finallyData} = getOnyxLoadingData(hash);
+
API.read(READ_COMMANDS.SEARCH, {hash, query, offset, policyIDs, sortBy, sortOrder}, {optimisticData, finallyData});
}
@@ -61,4 +67,19 @@ function createTransactionThread(hash: number, transactionID: string, reportID:
Onyx.merge(`${ONYXKEYS.COLLECTION.SNAPSHOT}${hash}`, onyxUpdate);
}
-export {search, createTransactionThread};
+function holdMoneyRequestOnSearch(hash: number, transactionIDList: string[], comment: string) {
+ const {optimisticData, finallyData} = getOnyxLoadingData(hash);
+ API.write(WRITE_COMMANDS.HOLD_MONEY_REQUEST_ON_SEARCH, {hash, transactionIDList, comment}, {optimisticData, finallyData});
+}
+
+function unholdMoneyRequestOnSearch(hash: number, transactionIDList: string[]) {
+ const {optimisticData, finallyData} = getOnyxLoadingData(hash);
+ API.write(WRITE_COMMANDS.UNHOLD_MONEY_REQUEST_ON_SEARCH, {hash, transactionIDList}, {optimisticData, finallyData});
+}
+
+function deleteMoneyRequestOnSearch(hash: number, transactionIDList: string[]) {
+ const {optimisticData, finallyData} = getOnyxLoadingData(hash);
+ API.write(WRITE_COMMANDS.DELETE_MONEY_REQUEST_ON_SEARCH, {hash, transactionIDList}, {optimisticData, finallyData});
+}
+
+export {search, createTransactionThread, deleteMoneyRequestOnSearch, holdMoneyRequestOnSearch, unholdMoneyRequestOnSearch};
diff --git a/src/libs/actions/Session/index.ts b/src/libs/actions/Session/index.ts
index b3e77e9fe66e..db78b94731ae 100644
--- a/src/libs/actions/Session/index.ts
+++ b/src/libs/actions/Session/index.ts
@@ -202,6 +202,11 @@ function signOutAndRedirectToSignIn(shouldResetToHome?: boolean, shouldStashSess
Log.info('Redirecting to Sign In because signOut() was called');
hideContextMenu(false);
if (!isAnonymousUser()) {
+ // In the HybridApp, we want the Old Dot to handle the sign out process
+ if (NativeModules.HybridAppModule) {
+ NativeModules.HybridAppModule.closeReactNativeApp();
+ return;
+ }
// We'll only call signOut if we're not stashing the session and this is not a supportal session,
// otherwise we'll call the API to invalidate the autogenerated credentials used for infinite
// session.
diff --git a/src/libs/actions/Task.ts b/src/libs/actions/Task.ts
index 15522a84da62..013ae698ed3f 100644
--- a/src/libs/actions/Task.ts
+++ b/src/libs/actions/Task.ts
@@ -132,12 +132,14 @@ function createTaskAndNavigate(
const currentTime = DateUtils.getDBTimeWithSkew();
const lastCommentText = ReportUtils.formatReportLastMessageText(ReportActionsUtils.getReportActionText(optimisticAddCommentReport.reportAction));
+ const parentReport = getReport(parentReportID);
const optimisticParentReport = {
lastVisibleActionCreated: optimisticAddCommentReport.reportAction.created,
lastMessageText: lastCommentText,
lastActorAccountID: currentUserAccountID,
lastReadTime: currentTime,
lastMessageTranslationKey: '',
+ hasOutstandingChildTask: assigneeAccountID === currentUserAccountID ? true : parentReport?.hasOutstandingChildTask,
};
// We're only setting onyx data for the task report here because it's possible for the parent report to not exist yet (if you're assigning a task to someone you haven't chatted with before)
@@ -272,6 +274,13 @@ function createTaskAndNavigate(
},
},
});
+ failureData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`,
+ value: {
+ hasOutstandingChildTask: parentReport?.hasOutstandingChildTask,
+ },
+ });
clearOutTaskInfo();
@@ -295,6 +304,29 @@ function createTaskAndNavigate(
Report.notifyNewAction(parentReportID, currentUserAccountID);
}
+/**
+ * @returns the object to update `report.hasOutstandingChildTask`
+ */
+function getOutstandingChildTask(taskReport: OnyxEntry) {
+ const parentReportActions = allReportActions?.[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${taskReport?.parentReportID}`] ?? {};
+ return Object.values(parentReportActions).some((reportAction) => {
+ if (String(reportAction.childReportID) === String(taskReport?.reportID)) {
+ return false;
+ }
+
+ if (
+ reportAction.childType === CONST.REPORT.TYPE.TASK &&
+ reportAction?.childStateNum === CONST.REPORT.STATE_NUM.OPEN &&
+ reportAction?.childStatusNum === CONST.REPORT.STATUS_NUM.OPEN &&
+ ReportActionsUtils.getReportActionMessage(reportAction)?.isDeletedParentAction
+ ) {
+ return true;
+ }
+
+ return false;
+ });
+}
+
/**
* Complete a task
*/
@@ -302,7 +334,7 @@ function completeTask(taskReport: OnyxEntry) {
const taskReportID = taskReport?.reportID ?? '-1';
const message = `marked as complete`;
const completedTaskReportAction = ReportUtils.buildOptimisticTaskReportAction(taskReportID, CONST.REPORT.ACTIONS.TYPE.TASK_COMPLETED, message);
-
+ const parentReport = getParentReport(taskReport);
const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
@@ -310,9 +342,9 @@ function completeTask(taskReport: OnyxEntry) {
value: {
stateNum: CONST.REPORT.STATE_NUM.APPROVED,
statusNum: CONST.REPORT.STATUS_NUM.APPROVED,
+ lastReadTime: DateUtils.getDBTime(),
},
},
-
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${taskReportID}`,
@@ -339,6 +371,7 @@ function completeTask(taskReport: OnyxEntry) {
value: {
stateNum: CONST.REPORT.STATE_NUM.OPEN,
statusNum: CONST.REPORT.STATUS_NUM.OPEN,
+ lastReadTime: taskReport?.lastReadTime ?? null,
},
},
{
@@ -352,6 +385,24 @@ function completeTask(taskReport: OnyxEntry) {
},
];
+ if (parentReport?.hasOutstandingChildTask) {
+ const hasOutstandingChildTask = getOutstandingChildTask(taskReport);
+ optimisticData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${taskReport?.parentReportID}`,
+ value: {
+ hasOutstandingChildTask,
+ },
+ });
+ failureData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${taskReport?.parentReportID}`,
+ value: {
+ hasOutstandingChildTask: parentReport?.hasOutstandingChildTask,
+ },
+ });
+ }
+
const parameters: CompleteTaskParams = {
taskReportID,
completedTaskReportActionID: completedTaskReportAction.reportActionID,
@@ -369,6 +420,8 @@ function reopenTask(taskReport: OnyxEntry) {
const taskReportID = taskReport?.reportID ?? '-1';
const message = `marked as incomplete`;
const reopenedTaskReportAction = ReportUtils.buildOptimisticTaskReportAction(taskReportID, CONST.REPORT.ACTIONS.TYPE.TASK_REOPENED, message);
+ const parentReport = getParentReport(taskReport);
+ const hasOutstandingChildTask = taskReport?.managerID === currentUserAccountID ? true : parentReport?.hasOutstandingChildTask;
const optimisticData: OnyxUpdate[] = [
{
@@ -383,6 +436,13 @@ function reopenTask(taskReport: OnyxEntry) {
lastReadTime: reopenedTaskReportAction.created,
},
},
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${taskReport?.parentReportID}`,
+ value: {
+ hasOutstandingChildTask,
+ },
+ },
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${taskReportID}`,
@@ -410,6 +470,13 @@ function reopenTask(taskReport: OnyxEntry) {
statusNum: CONST.REPORT.STATUS_NUM.APPROVED,
},
},
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${taskReport?.parentReportID}`,
+ value: {
+ hasOutstandingChildTask: taskReport?.hasOutstandingChildTask,
+ },
+ },
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${taskReportID}`,
@@ -565,6 +632,39 @@ function editTaskAssignee(report: OnyxTypes.Report, ownerAccountID: number, assi
},
];
+ if (currentUserAccountID === assigneeAccountID) {
+ const parentReport = getParentReport(report);
+ if (!isEmptyObject(parentReport)) {
+ optimisticData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport.reportID}`,
+ value: {hasOutstandingChildTask: true},
+ });
+ failureData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport.reportID}`,
+ value: {hasOutstandingChildTask: parentReport?.hasOutstandingChildTask},
+ });
+ }
+ }
+
+ if (report.managerID === currentUserAccountID) {
+ const hasOutstandingChildTask = getOutstandingChildTask(report);
+ const parentReport = getParentReport(report);
+ if (!isEmptyObject(parentReport)) {
+ optimisticData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport.reportID}`,
+ value: {hasOutstandingChildTask},
+ });
+ failureData.push({
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport.reportID}`,
+ value: {hasOutstandingChildTask: parentReport?.hasOutstandingChildTask},
+ });
+ }
+ }
+
// If we make a change to the assignee, we want to add a comment to the assignee's chat
// Check if the assignee actually changed
if (assigneeAccountID && assigneeAccountID !== report.managerID && assigneeAccountID !== ownerAccountID && assigneeChatReport) {
@@ -812,6 +912,13 @@ function getParentReport(report: OnyxEntry): OnyxEntry {
+ return allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportID}`];
+}
+
/**
* Cancels a task by setting the report state to SUBMITTED and status to CLOSED
*/
@@ -846,6 +953,7 @@ function deleteTask(report: OnyxEntry) {
const optimisticReportActions = {
[parentReportAction?.reportActionID ?? '-1']: optimisticReportAction,
};
+ const hasOutstandingChildTask = getOutstandingChildTask(report);
const optimisticData: OnyxUpdate[] = [
{
@@ -864,6 +972,7 @@ function deleteTask(report: OnyxEntry) {
value: {
lastMessageText: ReportActionsUtils.getLastVisibleMessage(parentReport?.reportID ?? '-1', optimisticReportActions as OnyxTypes.ReportActions).lastMessageText ?? '',
lastVisibleActionCreated: ReportActionsUtils.getLastVisibleAction(parentReport?.reportID ?? '-1', optimisticReportActions as OnyxTypes.ReportActions)?.created,
+ hasOutstandingChildTask,
},
},
{
@@ -926,6 +1035,13 @@ function deleteTask(report: OnyxEntry) {
statusNum: report.statusNum ?? '',
} as OnyxTypes.Report,
},
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: `${ONYXKEYS.COLLECTION.REPORT}${parentReport?.reportID}`,
+ value: {
+ hasOutstandingChildTask: parentReport?.hasOutstandingChildTask,
+ },
+ },
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${report.reportID}`,
diff --git a/src/libs/actions/User.ts b/src/libs/actions/User.ts
index fbeed3cd72e9..7acc79485f0c 100644
--- a/src/libs/actions/User.ts
+++ b/src/libs/actions/User.ts
@@ -1022,6 +1022,10 @@ function dismissTrackTrainingModal() {
});
}
+function requestRefund() {
+ API.write(WRITE_COMMANDS.REQUEST_REFUND, null);
+}
+
export {
clearFocusModeNotification,
closeAccount,
@@ -1053,4 +1057,5 @@ export {
clearCustomStatus,
updateDraftCustomStatus,
clearDraftCustomStatus,
+ requestRefund,
};
diff --git a/src/libs/actions/Welcome.ts b/src/libs/actions/Welcome.ts
index 82af0765e179..cee4e24041f1 100644
--- a/src/libs/actions/Welcome.ts
+++ b/src/libs/actions/Welcome.ts
@@ -1,18 +1,31 @@
-import type {OnyxCollection} from 'react-native-onyx';
+import {NativeModules} from 'react-native';
+import type {OnyxCollection, OnyxUpdate} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
+import * as API from '@libs/API';
+import {WRITE_COMMANDS} from '@libs/API/types';
+import Navigation from '@libs/Navigation/Navigation';
+import variables from '@styles/variables';
import type {OnboardingPurposeType} from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
+import ROUTES from '@src/ROUTES';
import type Onboarding from '@src/types/onyx/Onboarding';
import type OnyxPolicy from '@src/types/onyx/Policy';
+import type TryNewDot from '@src/types/onyx/TryNewDot';
let onboarding: Onboarding | [] | undefined;
let isLoadingReportData = true;
+let tryNewDotData: TryNewDot | undefined;
type HasCompletedOnboardingFlowProps = {
onCompleted?: () => void;
onNotCompleted?: () => void;
};
+type HasOpenedForTheFirstTimeFromHybridAppProps = {
+ onFirstTimeInHybridApp?: () => void;
+ onSubsequentRuns?: () => void;
+};
+
let resolveIsReadyPromise: (value?: Promise) => void | undefined;
let isServerDataReadyPromise = new Promise((resolve) => {
resolveIsReadyPromise = resolve;
@@ -23,6 +36,11 @@ let isOnboardingFlowStatusKnownPromise = new Promise((resolve) => {
resolveOnboardingFlowStatus = resolve;
});
+let resolveTryNewDotStatus: (value?: Promise) => void | undefined;
+const tryNewDotStatusPromise = new Promise((resolve) => {
+ resolveTryNewDotStatus = resolve;
+});
+
function onServerDataReady(): Promise {
return isServerDataReadyPromise;
}
@@ -42,6 +60,54 @@ function isOnboardingFlowCompleted({onCompleted, onNotCompleted}: HasCompletedOn
}
/**
+ * Determines whether the application is being launched for the first time by a hybrid app user,
+ * and executes corresponding callback functions.
+ */
+function isFirstTimeHybridAppUser({onFirstTimeInHybridApp, onSubsequentRuns}: HasOpenedForTheFirstTimeFromHybridAppProps) {
+ tryNewDotStatusPromise.then(() => {
+ let completedHybridAppOnboarding = tryNewDotData?.classicRedirect?.completedHybridAppOnboarding;
+ // Backend might return strings instead of booleans
+ if (typeof completedHybridAppOnboarding === 'string') {
+ completedHybridAppOnboarding = completedHybridAppOnboarding === 'true';
+ }
+
+ if (NativeModules.HybridAppModule && !completedHybridAppOnboarding) {
+ onFirstTimeInHybridApp?.();
+ return;
+ }
+
+ onSubsequentRuns?.();
+ });
+}
+
+/**
+ * Handles HybridApp onboarding flow if it's possible and necessary.
+ */
+function handleHybridAppOnboarding() {
+ if (!NativeModules.HybridAppModule) {
+ return;
+ }
+
+ isFirstTimeHybridAppUser({
+ // When user opens New Expensify for the first time from HybridApp we always want to show explanation modal first.
+ onFirstTimeInHybridApp: () => Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT),
+ // In other scenarios we need to check if onboarding was completed.
+ onSubsequentRuns: () =>
+ isOnboardingFlowCompleted({
+ onNotCompleted: () =>
+ setTimeout(() => {
+ Navigation.navigate(ROUTES.EXPLANATION_MODAL_ROOT);
+ }, variables.explanationModalDelay),
+ }),
+ });
+}
+
+/**
+ * Check that a few requests have completed so that the welcome action can proceed:
+ *
+ * - Whether we are a first time new expensify user
+ * - Whether we have loaded all policies the server knows about
+ * - Whether we have loaded all reports the server knows about
* Check if onboarding data is ready in order to check if the user has completed onboarding or not
*/
function checkOnboardingDataReady() {
@@ -63,6 +129,17 @@ function checkServerDataReady() {
resolveIsReadyPromise?.();
}
+/**
+ * Check if user completed HybridApp onboarding
+ */
+function checkTryNewDotDataReady() {
+ if (tryNewDotData === undefined) {
+ return;
+ }
+
+ resolveTryNewDotStatus?.();
+}
+
function setOnboardingPurposeSelected(value: OnboardingPurposeType) {
Onyx.set(ONYXKEYS.ONBOARDING_PURPOSE_SELECTED, value ?? null);
}
@@ -75,9 +152,36 @@ function setOnboardingPolicyID(policyID?: string) {
Onyx.set(ONYXKEYS.ONBOARDING_POLICY_ID, policyID ?? null);
}
+function completeHybridAppOnboarding() {
+ const optimisticData: OnyxUpdate[] = [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: ONYXKEYS.NVP_TRYNEWDOT,
+ value: {
+ classicRedirect: {
+ completedHybridAppOnboarding: true,
+ },
+ },
+ },
+ ];
+
+ const failureData: OnyxUpdate[] = [
+ {
+ onyxMethod: Onyx.METHOD.MERGE,
+ key: ONYXKEYS.NVP_TRYNEWDOT,
+ value: {
+ classicRedirect: {
+ completedHybridAppOnboarding: false,
+ },
+ },
+ },
+ ];
+
+ API.write(WRITE_COMMANDS.COMPLETE_HYBRID_APP_ONBOARDING, {}, {optimisticData, failureData});
+}
+
Onyx.connect({
key: ONYXKEYS.NVP_ONBOARDING,
- initWithStoredValues: false,
callback: (value) => {
if (value === undefined) {
return;
@@ -115,6 +219,14 @@ Onyx.connect({
},
});
+Onyx.connect({
+ key: ONYXKEYS.NVP_TRYNEWDOT,
+ callback: (value) => {
+ tryNewDotData = value;
+ checkTryNewDotDataReady();
+ },
+});
+
function resetAllChecks() {
isServerDataReadyPromise = new Promise((resolve) => {
resolveIsReadyPromise = resolve;
@@ -126,4 +238,13 @@ function resetAllChecks() {
isLoadingReportData = true;
}
-export {onServerDataReady, isOnboardingFlowCompleted, setOnboardingPurposeSelected, resetAllChecks, setOnboardingAdminsChatReportID, setOnboardingPolicyID};
+export {
+ onServerDataReady,
+ isOnboardingFlowCompleted,
+ setOnboardingPurposeSelected,
+ resetAllChecks,
+ setOnboardingAdminsChatReportID,
+ setOnboardingPolicyID,
+ completeHybridAppOnboarding,
+ handleHybridAppOnboarding,
+};
diff --git a/src/libs/actions/__mocks__/App.ts b/src/libs/actions/__mocks__/App.ts
index 3d2b5814684b..03744b397597 100644
--- a/src/libs/actions/__mocks__/App.ts
+++ b/src/libs/actions/__mocks__/App.ts
@@ -11,7 +11,6 @@ const {
setLocaleAndNavigate,
setSidebarLoaded,
setUpPoliciesAndNavigate,
- openProfile,
redirectThirdPartyDesktopSignIn,
openApp,
reconnectApp,
@@ -59,7 +58,6 @@ export {
setLocaleAndNavigate,
setSidebarLoaded,
setUpPoliciesAndNavigate,
- openProfile,
redirectThirdPartyDesktopSignIn,
openApp,
reconnectApp,
diff --git a/src/libs/actions/connections/NetSuiteCommands.ts b/src/libs/actions/connections/NetSuiteCommands.ts
index 49c42a95542e..4d1a6617c253 100644
--- a/src/libs/actions/connections/NetSuiteCommands.ts
+++ b/src/libs/actions/connections/NetSuiteCommands.ts
@@ -1,9 +1,12 @@
+import type {OnyxUpdate} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
+import type {ValueOf} from 'type-fest';
import * as API from '@libs/API';
import {WRITE_COMMANDS} from '@libs/API/types';
import * as ErrorUtils from '@libs/ErrorUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
+import type {Connections} from '@src/types/onyx/Policy';
import type {OnyxData} from '@src/types/onyx/Request';
type SubsidiaryParam = {
@@ -11,6 +14,86 @@ type SubsidiaryParam = {
subsidiary: string;
};
+function updateNetSuiteOnyxData(
+ policyID: string,
+ settingName: TSettingName,
+ settingValue: Partial