diff --git a/.eslintrc.js b/.eslintrc.js index 77c7fafb7a02..5f450f3ae6c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -108,7 +108,7 @@ module.exports = { 'plugin:you-dont-need-lodash-underscore/all', 'plugin:prettier/recommended', ], - plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler', 'lodash'], + plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler', 'lodash', 'deprecation'], ignorePatterns: ['lib/**'], parser: '@typescript-eslint/parser', parserOptions: { @@ -177,6 +177,7 @@ module.exports = { // ESLint core rules 'es/no-nullish-coalescing-operators': 'off', 'es/no-optional-chaining': 'off', + 'deprecation/deprecation': 'off', // Import specific rules 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'], diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/action.yml b/.github/actions/javascript/markPullRequestsAsDeployed/action.yml index f0ca77bdbf00..40dfc05e5448 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/action.yml +++ b/.github/actions/javascript/markPullRequestsAsDeployed/action.yml @@ -14,7 +14,6 @@ inputs: GITHUB_TOKEN: description: "Github token for authentication" required: true - default: "${{ github.token }}" ANDROID: description: "Android job result ('success', 'failure', 'cancelled', or 'skipped')" required: true @@ -27,6 +26,12 @@ inputs: WEB: description: "Web job result ('success', 'failure', 'cancelled', or 'skipped')" required: true + DATE: + description: "The date of deployment" + required: false + NOTE: + description: "Additional note from the deployer" + required: false runs: using: "node20" main: "./index.js" diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 6b78a204b57a..62d326c9af3a 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -12713,9 +12713,15 @@ async function run() { const desktopResult = getDeployTableMessage(core.getInput('DESKTOP', { required: true })); const iOSResult = getDeployTableMessage(core.getInput('IOS', { required: true })); const webResult = getDeployTableMessage(core.getInput('WEB', { required: true })); + const date = core.getInput('DATE'); + const note = core.getInput('NOTE'); function getDeployMessage(deployer, deployVerb, prTitle) { let message = `🚀 [${deployVerb}](${workflowURL}) to ${isProd ? 'production' : 'staging'}`; - message += ` by https://github.com/${deployer} in version: ${version} 🚀`; + message += ` by https://github.com/${deployer} in version: ${version} `; + if (date) { + message += `on ${date}`; + } + message += `🚀`; message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`; message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`; if (deployVerb === 'Cherry-picked' && !/no ?qa/gi.test(prTitle ?? '')) { @@ -12723,6 +12729,9 @@ async function run() { message += '\n\n@Expensify/applauseleads please QA this PR and check it off on the [deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) if it passes.'; } + if (note) { + message += `\n\n_Note:_ ${note}`; + } return message; } if (isProd) { diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts b/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts index 986c6c12afb9..9c2defebd01d 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts +++ b/.github/actions/javascript/markPullRequestsAsDeployed/markPullRequestsAsDeployed.ts @@ -55,9 +55,16 @@ async function run() { const iOSResult = getDeployTableMessage(core.getInput('IOS', {required: true}) as PlatformResult); const webResult = getDeployTableMessage(core.getInput('WEB', {required: true}) as PlatformResult); + const date = core.getInput('DATE'); + const note = core.getInput('NOTE'); + function getDeployMessage(deployer: string, deployVerb: string, prTitle?: string): string { let message = `🚀 [${deployVerb}](${workflowURL}) to ${isProd ? 'production' : 'staging'}`; - message += ` by https://github.com/${deployer} in version: ${version} 🚀`; + message += ` by https://github.com/${deployer} in version: ${version} `; + if (date) { + message += `on ${date}`; + } + message += `🚀`; message += `\n\nplatform | result\n---|---\n🤖 android 🤖|${androidResult}\n🖥 desktop 🖥|${desktopResult}`; message += `\n🍎 iOS 🍎|${iOSResult}\n🕸 web 🕸|${webResult}`; @@ -67,6 +74,10 @@ async function run() { '\n\n@Expensify/applauseleads please QA this PR and check it off on the [deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) if it passes.'; } + if (note) { + message += `\n\n_Note:_ ${note}`; + } + return message; } diff --git a/.github/scripts/verifyDeploy.sh b/.github/scripts/verifyDeploy.sh new file mode 100755 index 000000000000..0a8fd3c97bcf --- /dev/null +++ b/.github/scripts/verifyDeploy.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +ENV="$1" +EXPECTED_VERSION="$2" + +BASE_URL="" +if [[ "$ENV" == 'staging' ]]; then + BASE_URL='https://staging.new.expensify.com' +else + BASE_URL='https://new.expensify.com' +fi + +sleep 5 +ATTEMPT=0 +MAX_ATTEMPTS=10 +while [[ $ATTEMPT -lt $MAX_ATTEMPTS ]]; do + ((ATTEMPT++)) + + echo "Attempt $ATTEMPT: Checking deployed version..." + DOWNLOADED_VERSION="$(wget -q -O /dev/stdout "$BASE_URL"/version.json | jq -r '.version')" + + if [[ "$EXPECTED_VERSION" == "$DOWNLOADED_VERSION" ]]; then + echo "Success: Deployed version matches local version: $DOWNLOADED_VERSION" + exit 0 + fi + + if [[ $ATTEMPT -lt $MAX_ATTEMPTS ]]; then + echo "Version mismatch, found $DOWNLOADED_VERSION. Retrying in 5 seconds..." + sleep 5 + fi +done + +echo "Error: Deployed version did not match local version after $MAX_ATTEMPTS attempts. Something went wrong..." +exit 1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2ab19d13183a..99cd0c1dabc5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -386,23 +386,11 @@ jobs: - name: Verify staging deploy if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - run: | - sleep 5 - DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://staging.new.expensify.com/version.json | jq -r '.version')" - if [[ '${{ needs.prep.outputs.APP_VERSION }}' != "$DOWNLOADED_VERSION" ]]; then - echo "Error: deployed version $DOWNLOADED_VERSION does not match local version ${{ needs.prep.outputs.APP_VERSION }}. Something went wrong..." - exit 1 - fi + run: ./.github/scripts/verifyDeploy.sh staging ${{ needs.prep.outputs.APP_VERSION }} - name: Verify production deploy if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - run: | - sleep 5 - DOWNLOADED_VERSION="$(wget -q -O /dev/stdout https://new.expensify.com/version.json | jq -r '.version')" - if [[ '${{ needs.prep.outputs.APP_VERSION }}' != "$DOWNLOADED_VERSION" ]]; then - echo "Error: deployed version $DOWNLOADED_VERSION does not match local version ${{ needs.prep.outputs.APP_VERSION }}. Something went wrong..." - exit 1 - fi + run: ./.github/scripts/verifyDeploy.sh production ${{ needs.prep.outputs.APP_VERSION }} - name: Upload web sourcemaps artifact uses: actions/upload-artifact@v4 @@ -507,11 +495,13 @@ jobs: GITHUB_TOKEN: ${{ github.token }} - name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name + continue-on-error: true run: | mv ./desktop-staging-sourcemaps-artifact/merged-source-map.js.map ./desktop-staging-sourcemaps-artifact/desktop-staging-merged-source-map.js.map mv ./web-staging-sourcemaps-artifact/merged-source-map.js.map ./web-staging-sourcemaps-artifact/web-staging-merged-source-map.js.map - name: Upload artifacts to GitHub Release + continue-on-error: true run: | gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --clobber \ ./android-sourcemaps-artifact/index.android.bundle.map#android-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \ @@ -552,11 +542,6 @@ jobs: - name: Download all workflow run artifacts uses: actions/download-artifact@v4 - - name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name - run: | - mv ./desktop-sourcemaps-artifact/merged-source-map.js.map ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map - mv ./web-sourcemaps-artifact/merged-source-map.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map - - name: 🚀 Edit the release to be no longer a prerelease 🚀 run: | LATEST_RELEASE="$(gh release list --repo ${{ github.repository }} --exclude-pre-releases --json tagName,isLatest --jq '.[] | select(.isLatest) | .tagName')" @@ -565,7 +550,14 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} + - name: Rename web and desktop sourcemaps artifacts before assets upload in order to have unique ReleaseAsset.name + continue-on-error: true + run: | + mv ./desktop-sourcemaps-artifact/merged-source-map.js.map ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map + mv ./web-sourcemaps-artifact/merged-source-map.js.map ./web-sourcemaps-artifact/web-merged-source-map.js.map + - name: Upload artifacts to GitHub Release + continue-on-error: true run: | gh release upload ${{ needs.prep.outputs.APP_VERSION }} --repo ${{ github.repository }} --clobber \ ./desktop-sourcemaps-artifact/desktop-merged-source-map.js.map#desktop-sourcemap-${{ needs.prep.outputs.APP_VERSION }} \ @@ -649,34 +641,14 @@ jobs: GITHUB_TOKEN: ${{ github.token }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} - postGithubComment: - name: Post a GitHub comments on all deployed PRs when platforms are done building and deploying - runs-on: ubuntu-latest + postGithubComments: + uses: ./.github/workflows/postDeployComments.yml if: ${{ always() && fromJSON(needs.checkDeploymentSuccess.outputs.IS_AT_LEAST_ONE_PLATFORM_DEPLOYED) }} needs: [prep, android, desktop, iOS, web, checkDeploymentSuccess, createPrerelease, finalizeRelease] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: ./.github/actions/composite/setupNode - - - name: Get Release Pull Request List - id: getReleasePRList - uses: ./.github/actions/javascript/getDeployPullRequestList - with: - TAG: ${{ needs.prep.outputs.APP_VERSION }} - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - IS_PRODUCTION_DEPLOY: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - - - name: Comment on issues - uses: ./.github/actions/javascript/markPullRequestsAsDeployed - with: - PR_LIST: ${{ steps.getReleasePRList.outputs.PR_LIST }} - IS_PRODUCTION_DEPLOY: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - DEPLOY_VERSION: ${{ needs.prep.outputs.APP_VERSION }} - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - ANDROID: ${{ needs.android.result }} - DESKTOP: ${{ needs.desktop.result }} - IOS: ${{ needs.iOS.result }} - WEB: ${{ needs.web.result }} + with: + version: ${{ needs.prep.outputs.APP_VERSION }} + env: ${{ github.ref == 'refs/heads/production' && 'production' || 'staging' }} + android: ${{ needs.android.result }} + ios: ${{ needs.iOS.result }} + web: ${{ needs.web.result }} + desktop: ${{ needs.desktop.result }} diff --git a/.github/workflows/deployNewHelp.yml b/.github/workflows/deployNewHelp.yml new file mode 100644 index 000000000000..8c4d0fb0ae3b --- /dev/null +++ b/.github/workflows/deployNewHelp.yml @@ -0,0 +1,74 @@ +name: Deploy New Help Site + +on: + # Run on any push to main that has changes to the help directory +# TEST: Verify Cloudflare picks this up even if not run when merged to main +# push: +# branches: +# - main +# paths: +# - 'help/**' + + # Run on any pull request (except PRs against staging or production) that has changes to the help directory + pull_request: + types: [opened, synchronize] + branches-ignore: [staging, production] + paths: + - 'help/**' + + # Run on any manual trigger + workflow_dispatch: + +# Allow only one concurrent deployment +concurrency: + group: "newhelp" + cancel-in-progress: false + +jobs: + build: + env: + IS_PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }} + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + # Set up Ruby and run bundle install inside the /help directory + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + working-directory: ./help + + - name: Build Jekyll site + run: bundle exec jekyll build --source ./ --destination ./_site + working-directory: ./help # Ensure Jekyll is building the site in /help + + - name: Deploy to Cloudflare Pages + uses: cloudflare/pages-action@v1 + id: deploy + if: env.IS_PR_FROM_FORK != 'true' + with: + apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: newhelp + directory: ./help/_site # Deploy the built site + + - name: Setup Cloudflare CLI + if: env.IS_PR_FROM_FORK != 'true' + run: pip3 install cloudflare==2.19.0 + + - name: Purge Cloudflare cache + if: env.IS_PR_FROM_FORK != 'true' + run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["newhelp.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache + env: + CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }} + + - name: Leave a comment on the PR + uses: actions-cool/maintain-one-comment@v3.2.0 + if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }} + with: + token: ${{ github.token }} + body: ${{ format('A preview of your New Help changes have been deployed to {0} :zap:️', steps.deploy.outputs.alias) }} + diff --git a/.github/workflows/postDeployComments.yml b/.github/workflows/postDeployComments.yml new file mode 100644 index 000000000000..3893d3cf3f7c --- /dev/null +++ b/.github/workflows/postDeployComments.yml @@ -0,0 +1,118 @@ +name: Post Deploy Comments + +on: + workflow_call: + inputs: + version: + description: The version that was deployed + required: true + type: string + env: + description: The environment that was deployed (staging or prod) + required: true + type: string + android: + description: Android deploy status + required: true + type: string + ios: + description: iOS deploy status + required: true + type: string + web: + description: Web deploy status + required: true + type: string + desktop: + description: Desktop deploy status + required: true + type: string + workflow_dispatch: + inputs: + version: + description: The version that was deployed + required: true + type: string + env: + description: The environment that was deployed (staging or prod) + required: true + type: choice + options: + - staging + - production + android: + description: Android deploy status + required: true + type: choice + options: + - success + - failure + - cancelled + - skipped + ios: + description: iOS deploy status + required: true + type: choice + options: + - success + - failure + - cancelled + - skipped + web: + description: Web deploy status + required: true + type: choice + options: + - success + - failure + - cancelled + - skipped + desktop: + description: Desktop deploy status + required: true + type: choice + options: + - success + - failure + - cancelled + - skipped + date: + description: The date when this deploy occurred + required: false + type: string + note: + description: Any additional note you want to include with the deploy comment + required: false + type: string + +jobs: + postDeployComments: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: ./.github/actions/composite/setupNode + + - name: Get pull request list + id: getPullRequestList + uses: ./.github/actions/javascript/getDeployPullRequestList + with: + TAG: ${{ inputs.version }} + GITHUB_TOKEN: ${{ github.token }} + IS_PRODUCTION_DEPLOY: ${{ inputs.env == 'production' }} + + - name: Comment on issues + uses: ./.github/actions/javascript/markPullRequestsAsDeployed + with: + PR_LIST: ${{ steps.getPullRequestList.outputs.PR_LIST }} + IS_PRODUCTION_DEPLOY: ${{ inputs.env == 'production' }} + DEPLOY_VERSION: ${{ inputs.version }} + GITHUB_TOKEN: ${{ github.token }} + ANDROID: ${{ inputs.android }} + DESKTOP: ${{ inputs.desktop }} + IOS: ${{ inputs.ios }} + WEB: ${{ inputs.web }} + DATE: ${{ inputs.date }} + NOTE: ${{ inputs.note }} diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 796468170275..bfe860e60224 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -4,7 +4,7 @@ name: Process new code merged to main on: push: branches: [main] - paths-ignore: [docs/**, contributingGuides/**, jest/**, tests/**] + paths-ignore: [docs/**, help/**, contributingGuides/**, jest/**, tests/**] jobs: typecheck: diff --git a/.github/workflows/reassurePerformanceTests.yml b/.github/workflows/reassurePerformanceTests.yml index d4a25a63952b..fb7a34d6fa01 100644 --- a/.github/workflows/reassurePerformanceTests.yml +++ b/.github/workflows/reassurePerformanceTests.yml @@ -4,7 +4,7 @@ on: pull_request: types: [opened, synchronize] branches-ignore: [staging, production] - paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh'] + paths-ignore: [docs/**, help/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh'] jobs: perf-tests: diff --git a/.github/workflows/sendReassurePerfData.yml b/.github/workflows/sendReassurePerfData.yml index 42d946cece95..884182bfc896 100644 --- a/.github/workflows/sendReassurePerfData.yml +++ b/.github/workflows/sendReassurePerfData.yml @@ -3,7 +3,7 @@ name: Send Reassure Performance Tests to Graphite on: push: branches: [main] - paths-ignore: [docs/**, contributingGuides/**, jest/**] + paths-ignore: [docs/**, help/**, contributingGuides/**, jest/**] jobs: perf-tests: diff --git a/.prettierignore b/.prettierignore index a9f7e1464529..98d06e8c5f71 100644 --- a/.prettierignore +++ b/.prettierignore @@ -15,6 +15,7 @@ package-lock.json *.css *.scss *.md +*.markdown # We need to modify the import here specifically, hence we disable prettier to get rid of the sorted imports src/libs/E2E/reactNativeLaunchingTest.ts # Temporary while we keep react-compiler in our repo diff --git a/README.md b/README.md index c8faff111bae..4a691045e7c2 100644 --- a/README.md +++ b/README.md @@ -619,7 +619,30 @@ Some pointers: key to the translation file and use the arrow function version, like so: `nameOfTheKey: ({amount, dateTime}) => "User has sent " + amount + " to you on " + dateTime,`. This is because the order of the phrases might vary from one language to another. - +- When working with translations that involve plural forms, it's important to handle different cases correctly. + + For example: + - zero: Used when there are no items **(optional)**. + - one: Used when there's exactly one item. + - two: Used when there's two items. **(optional)** + - few: Used for a small number of items **(optional)**. + - many: Used for larger quantities **(optional)**. + - other: A catch-all case for other counts or variations. + + Here’s an example of how to implement plural translations: + + messages: () => ({ + zero: 'No messages', + one: 'One message', + two: 'Two messages', + few: (count) => `${count} messages`, + many: (count) => `You have ${count} messages`, + other: (count) => `You have ${count} unread messages`, + }) + + In your code, you can use the translation like this: + + `translate('common.messages', {count: 1});` ---- # Deploying diff --git a/__mocks__/react-native-haptic-feedback.ts b/__mocks__/react-native-haptic-feedback.ts new file mode 100644 index 000000000000..6d20b410d835 --- /dev/null +++ b/__mocks__/react-native-haptic-feedback.ts @@ -0,0 +1,5 @@ +import type HapticFeedback from 'react-native-haptic-feedback'; + +const RNHapticFeedback: typeof HapticFeedback = {trigger: jest.fn()}; + +export default RNHapticFeedback; diff --git a/android/app/build.gradle b/android/app/build.gradle index 0594d6afc211..3a620c00fd95 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -110,8 +110,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1009003904 - versionName "9.0.39-4" + versionCode 1009004103 + versionName "9.0.41-3" // 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/android/gradle.properties b/android/gradle.properties index 87333d20f743..46cd98554d29 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -55,3 +55,5 @@ MYAPP_UPLOAD_KEY_ALIAS=ReactNativeChat-Key-Alias disableFrameProcessors=true android.nonTransitiveRClass=false + +org.gradle.parallel=true diff --git a/assets/images/table.svg b/assets/images/table.svg index a9cfe68f339e..36d4ced774f1 100644 --- a/assets/images/table.svg +++ b/assets/images/table.svg @@ -1,3 +1,3 @@ - + diff --git a/docs/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements.md b/docs/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements.md index b0c767fce277..37d8d8bbe42b 100644 --- a/docs/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements.md +++ b/docs/articles/expensify-classic/bank-accounts-and-payments/bank-accounts/Enable-Global-Reimbursements.md @@ -90,6 +90,10 @@ Have the employee double-check that their [default workspace](https://help.expen - **Authorized User**: The person who will process global reimbursements. The Authorized User should be the same person who manages the bank account connection in Expensify. - **User**: You can leave this section blank because the “User” is Expensify. +**Does Global Reimbursement support Sepa in the EU?** + +Global Reimbursement uses Sepa B2B to facilitate payments from EU-based accounts. Sepa Core is not supported. + {% include faq-end.md %} diff --git a/docs/articles/expensify-classic/connections/quickbooks-desktop/Connect-To-QuickBooks-Desktop.md b/docs/articles/expensify-classic/connections/quickbooks-desktop/Connect-To-QuickBooks-Desktop.md index 1fb1b09328b9..bda84eb0a49f 100644 --- a/docs/articles/expensify-classic/connections/quickbooks-desktop/Connect-To-QuickBooks-Desktop.md +++ b/docs/articles/expensify-classic/connections/quickbooks-desktop/Connect-To-QuickBooks-Desktop.md @@ -26,9 +26,7 @@ To connect QuickBooks Desktop to Expensify, you must log into QuickBooks Desktop 7. Download the Web Connector and go through the guided installation process. 8. Open the Web Connector. -9. Click on **Add an Application**. - - ![The Web Connnector Pop-up where you will need to click on Add an Application](https://help.expensify.com/assets/images/QBO_desktop_03.png){:width="100%"} +9. Download the config file when prompted during the setup process, then open it using your File Explorer. This will automatically load the application into the QuickBooks Web Connector. {% include info.html %} For this step, it is key to ensure that the correct company file is open in QuickBooks Desktop and that it is the only one open. diff --git a/docs/articles/new-expensify/connections/quickbooks-online/Configure-Quickbooks-Online.md b/docs/articles/new-expensify/connections/quickbooks-online/Configure-Quickbooks-Online.md index 787602337bd2..73e3340d41a2 100644 --- a/docs/articles/new-expensify/connections/quickbooks-online/Configure-Quickbooks-Online.md +++ b/docs/articles/new-expensify/connections/quickbooks-online/Configure-Quickbooks-Online.md @@ -1,9 +1,76 @@ --- title: Configure Quickbooks Online -description: Coming Soon +description: Configure your QuickBooks Online connection with Expensify --- -# FAQ +Once you've set up your QuickBooks Online connection, you'll be able to configure your import and export settings. + +# Step 1: Configure import settings + +The following steps help you determine how data will be imported from QuickBooks Online to Expensify. + +
    +
  1. Under the Accounting settings for your workspace, click Import under the QuickBooks Online connection.
  2. +
  3. Review each of the following import settings:
  4. + +
+ +# Step 2: Configure export settings + +The following steps help you determine how data will be exported from Expensify to QuickBooks Online. + +
    +
  1. Under the Accounting settings for your workspace, click Export under the QuickBooks Online connection.
  2. +
  3. Review each of the following export settings:
  4. + +
+ +# Step 3: Configure advanced settings + +The following steps help you determine the advanced settings for your connection, like auto-sync and employee invitation settings. + +
    +
  1. Under the Accounting settings for your workspace, click Advanced under the QuickBooks Online connection.
  2. +
  3. Select an option for each of the following settings:
  4. + +
+ +{% include faq-begin.md %} ## How do I know if a report is successfully exported to QuickBooks Online? @@ -22,3 +89,5 @@ When an admin manually exports a report, Expensify will notify them if the repor - If a report has been exported and marked as paid in QuickBooks Online, it will be automatically marked as reimbursed in Expensify during the next sync. Reports that have yet to be exported to QuickBooks Online won’t be automatically exported. + +{% include faq-end.md %} diff --git a/docs/articles/new-expensify/expenses-&-payments/Pay-an-invoice.md b/docs/articles/new-expensify/expenses-&-payments/Pay-an-invoice.md index 727c6b86b7a6..615fac731c41 100644 --- a/docs/articles/new-expensify/expenses-&-payments/Pay-an-invoice.md +++ b/docs/articles/new-expensify/expenses-&-payments/Pay-an-invoice.md @@ -32,6 +32,8 @@ To pay an invoice, You can also view all unpaid invoices by searching for the sender’s email or phone number on the left-hand side of the app. The invoices waiting for your payment will have a green dot. +![Click Pay Button on the Invoice]({{site.url}}/assets/images/ExpensifyHelp-Invoice-1.png){:width="100%"} + {% include faq-begin.md %} **Can someone else pay an invoice besides the person who received it?** diff --git a/docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md b/docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md index 85bd6b655186..57b81a031a01 100644 --- a/docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md +++ b/docs/articles/new-expensify/expenses-&-payments/Send-an-invoice.md @@ -57,6 +57,18 @@ Only workspace admins can send invoices. Invoices can be sent directly from Expe {% include end-selector.html %} +![Go to Account Settings click Workspace]({{site.url}}/assets/images/invoices_01.png){:width="100%"} + +![Click More Features for the workspace and enable Invoices]({{site.url}}/assets/images/invoices_02.png){:width="100%"} + +![Click the green button Send Invoice]({{site.url}}/assets/images/invoices_03.png){:width="100%"} + +![Enter Invoice amount]({{site.url}}/assets/images/invoices_04.png){:width="100%"} + +![Choose a recipient]({{site.url}}/assets/images/invoices_05.png){:width="100%"} + +![Add Invoice details and Send Invoice]({{site.url}}/assets/images/invoices_06.png){:width="100%"} + # Receive invoice payment If you have not [connected a business bank account](https://help.expensify.com/articles/new-expensify/expenses-&-payments/Connect-a-Business-Bank-Account) to receive invoice payments, you will see an **Invoice balance** in your [Wallet](https://help.expensify.com/articles/new-expensify/expenses-&-payments/Set-up-your-wallet). Expensify will automatically transfer these invoice payments once a business bank account is connected. diff --git a/docs/articles/new-expensify/workspaces/Add-approvals.md b/docs/articles/new-expensify/workspaces/Add-approvals.md new file mode 100644 index 000000000000..5d8c1f733287 --- /dev/null +++ b/docs/articles/new-expensify/workspaces/Add-approvals.md @@ -0,0 +1,73 @@ +--- +title: Add approvals +description: Add approvals to your workspace to require additional approval before authorizing payments. +--- +
+ +# Add approvals + +Each Expensify workspace can be configured to require additional approvals before payments are authorized. Once approvals are enabled on a workspace, admins will be able to set a default approval workflow to apply to all members of the workspace, as well as set custom approval workflows for specific members. + +When workspace members submit expenses, the expenses will require approval from each approver in their approval workflow before payment is authorized. + +## Add approvals on a workspace + +**To enable Add approvals on a workspace you are an admin on:** + +1. Click your profile image or icon in the bottom left menu +2. Click **Workspaces** in the left menu +3. Select the workspace where you want to add approvals +4. Click **Workflows** in the left menu +5. Click the toggle next to **Add approvals** + +Toggling on **Add approvals** will reveal an option to set a default approval workflow. + +## Configure approval workflows + +**To configure the default approval workflow for the workspace:** + +1. Click your profile image or icon in the bottom left menu +2. Click **Workspaces** in the left menu +3. Select the workspace where you want to set the approval workflow +4. Click **Workflows** in the left menu +5. Under **Expenses from Everyone**, click on **First approver** +6. Select the workspace member who should be the first approver in the approval workflow +7. Under **Additional approver**, continue selecting workspace members until all the desired approvers are listed +8. Click **Save** + +Note: When Add approvals is enabled, the workspace must have a default approval workflow. + +**To set an approval workflow that applies only to specific workspace members:** + +1. Click your profile image or icon in the bottom left menu +2. Click **Workspaces** in the left menu +3. Select the workspace where you want to add approvals +4. Click **Workflows** in the left menu +5. Under **Add approvals**, click on **Add approval workflow** +6. Choose the workspace member whose expenses should go through the custom approval workfow +7. Click **Next** +8. Choose the workspace member who should be the first approver on submitted expenses in the approval workflow +9. Click **Next** +10. Click **Additional approver** to continue selecting workspace members until all the desired approvers are listed +11. Click **Add workflow** to save it + +## Edit or delete approval workflows + +**To edit an approval workflow:** + +1. On the **Workflows** page, click the approval workflow that should be edited +2. Click on the Approver field for the approval level where the edit should be made +3. Choose the workspace member who should be set as the approver for that level, or deselect them to remove the approval level from the workflow +4. Click **Save** + +**To delete an approval workflow:** + +1. On the **Workflows** page, click the approval workflow that shoudld be deleted +2. Click **Delete** +3. In the window that appears,click **Delete** again + +# FAQ + +## Can an employee have more than one approval workflow? +No, each employee can have only one approval workflow + diff --git a/docs/articles/new-expensify/workspaces/Set-distance-rates.md b/docs/articles/new-expensify/workspaces/Set-distance-rates.md new file mode 100644 index 000000000000..c434f34d2cef --- /dev/null +++ b/docs/articles/new-expensify/workspaces/Set-distance-rates.md @@ -0,0 +1,50 @@ +--- +title: Set Distance Rates +description: Set distance rates on your Expensify workspace +--- +
+ +# Set Distance eates + +Each Expensify workspace can be configured with one or more distance rates. Once distance rates are enabled on your workspace, employees will be able to choose between the available rates to create distance expenses. + +## Enable distance rates on a workspace + +**To enable distance rates on a workspace you are an admin on:** + +1. Click your profile image or icon in the bottom left menu +2. Click **Workspaces** in the left menu +3. Select the workspace where you want to enable distance rates +4. Click **More features** in the left menu +5. Click the toggle next to **Distance rates** + +After toggling on distance rates, you will see a new **Distance rates** option in the left menu. + +## Add, delete, or edit distance rates + +**To add a distance rate:** + +1. Click your profile image or icon in the bottom left menu +2. Click **Workspaces** in the left menu +3. Select the workspace where you want to add distance rates +4. Click **Distance rates** in the left menu +5. Click **Add rate** in the top right +6. Enter a value, then click **Save** + +**To enable, disable, edit or delete a single distance rate:** + +1. Click the distance rate on the **Distance rates** settings page +2. To enable or disable the distance rate, click the toggle next to **Enable rate**, then click **Save** +3. To edit the rate amount, click on the amount field, enter the new value, then click **Save** +4. To permanently delete the distance rate, click **Delete** + +Note: When Distance rates is enabled, the workspace must have at least one enabled distance rate. + +**To enable, disable, edit or delete distance rates in bulk:** + +1. On the **Distance rates** settings page, click the checkboxes next to the distance rates that should me modified +2. Click “x selected” at the top right +3. To enable or disable all the selected distance rates, click **Enable rates** or **Disable rates** +4. To permanently delete the distance rates, click **Delete rates** + +Note: When Distance rates are enabled, the workspace must have at least one enabled distance rate. diff --git a/help/.gitignore b/help/.gitignore new file mode 100644 index 000000000000..f40fbd8ba564 --- /dev/null +++ b/help/.gitignore @@ -0,0 +1,5 @@ +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor diff --git a/help/.ruby-version b/help/.ruby-version new file mode 100644 index 000000000000..a0891f563f38 --- /dev/null +++ b/help/.ruby-version @@ -0,0 +1 @@ +3.3.4 diff --git a/help/404.html b/help/404.html new file mode 100644 index 000000000000..086a5c9ea988 --- /dev/null +++ b/help/404.html @@ -0,0 +1,25 @@ +--- +permalink: /404.html +layout: default +--- + + + +
+

404

+ +

Page not found :(

+

The requested page could not be found.

+
diff --git a/help/Gemfile b/help/Gemfile new file mode 100644 index 000000000000..4f2e425b8aba --- /dev/null +++ b/help/Gemfile @@ -0,0 +1,19 @@ +source "https://rubygems.org" + +gem "jekyll", "~> 4.3.4" +gem "minima", "~> 2.5" +gem "nokogiri" + +group :jekyll_plugins do + gem "jekyll-feed", "~> 0.12" +end + +# If using tzinfo-data for timezone support, ensure it's bundled for relevant platforms +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", ">= 1", "< 3" + gem "tzinfo-data" +end + +gem "wdm", "~> 0.1", platforms: [:mingw, :x64_mingw, :mswin] +gem "http_parser.rb", "~> 0.6.0", platforms: [:jruby] + diff --git a/help/Gemfile.lock b/help/Gemfile.lock new file mode 100644 index 000000000000..7434e1c4e935 --- /dev/null +++ b/help/Gemfile.lock @@ -0,0 +1,200 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + bigdecimal (3.1.8) + colorator (1.1.0) + concurrent-ruby (1.3.4) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.17.0) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-aarch64-linux-musl) + ffi (1.17.0-arm-linux-gnu) + ffi (1.17.0-arm-linux-musl) + ffi (1.17.0-arm64-darwin) + ffi (1.17.0-x86-linux-gnu) + ffi (1.17.0-x86-linux-musl) + ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) + ffi (1.17.0-x86_64-linux-musl) + forwardable-extended (2.6.0) + google-protobuf (4.28.2) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-aarch64-linux) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-x86-linux) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-x86_64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.28.2-x86_64-linux) + bigdecimal + rake (>= 13) + http_parser.rb (0.8.0) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + jekyll (4.3.4) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + mini_portile2 (2.8.7) + minima (2.5.2) + jekyll (>= 3.5, < 5.0) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) + nokogiri (1.16.7) + mini_portile2 (~> 2.8.2) + racc (~> 1.4) + nokogiri (1.16.7-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.7-arm-linux) + racc (~> 1.4) + nokogiri (1.16.7-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.7-x86-linux) + racc (~> 1.4) + nokogiri (1.16.7-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.7-x86_64-linux) + racc (~> 1.4) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (6.0.1) + racc (1.8.1) + rake (13.2.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + rexml (3.3.7) + rouge (4.4.0) + safe_yaml (1.0.5) + sass-embedded (1.79.3) + google-protobuf (~> 4.27) + rake (>= 13) + sass-embedded (1.79.3-aarch64-linux-android) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-aarch64-linux-gnu) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-aarch64-linux-musl) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-aarch64-mingw-ucrt) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-arm-linux-androideabi) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-arm-linux-gnueabihf) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-arm-linux-musleabihf) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-arm64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-riscv64-linux-android) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-riscv64-linux-gnu) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-riscv64-linux-musl) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86-cygwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86-linux-android) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86-linux-gnu) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86-linux-musl) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86-mingw-ucrt) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-cygwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-linux-android) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-linux-gnu) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-linux-musl) + google-protobuf (~> 4.27) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.6.0) + webrick (1.8.2) + +PLATFORMS + aarch64-linux + aarch64-linux-android + aarch64-linux-gnu + aarch64-linux-musl + aarch64-mingw-ucrt + arm-linux-androideabi + arm-linux-gnu + arm-linux-gnueabihf + arm-linux-musl + arm-linux-musleabihf + arm64-darwin + riscv64-linux-android + riscv64-linux-gnu + riscv64-linux-musl + ruby + x86-cygwin + x86-linux + x86-linux-android + x86-linux-gnu + x86-linux-musl + x86-mingw-ucrt + x86_64-cygwin + x86_64-darwin + x86_64-linux + x86_64-linux-android + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + http_parser.rb (~> 0.6.0) + jekyll (~> 4.3.4) + jekyll-feed (~> 0.12) + minima (~> 2.5) + nokogiri + tzinfo (>= 1, < 3) + tzinfo-data + wdm (~> 0.1) + +BUNDLED WITH + 2.5.19 diff --git a/help/_config.yml b/help/_config.yml new file mode 100644 index 000000000000..9135a372964e --- /dev/null +++ b/help/_config.yml @@ -0,0 +1,7 @@ +title: New Expensify Help +email: concierge@expensify.com +description: Comprehensive help documentation for New Expensify. +url: https://newhelp.expensify.com +twitter_username: expensify +github_username: expensify + diff --git a/help/_layouts/default.html b/help/_layouts/default.html new file mode 100644 index 000000000000..cf95e1f54b06 --- /dev/null +++ b/help/_layouts/default.html @@ -0,0 +1,25 @@ + + + + + + {{ page.title }} + + +
+ +
+ + +
+ {{ content }} +
+ +
+

© 2024 Your Website

+
+ + + diff --git a/help/_layouts/product.html b/help/_layouts/product.html new file mode 100644 index 000000000000..cb8b5e882f24 --- /dev/null +++ b/help/_layouts/product.html @@ -0,0 +1,11 @@ +--- +layout: default +--- + +

{{ page.title }}

+ + +
+ {{ content }} +
+ diff --git a/help/_plugins/51_HeaderIDPostRender.rb b/help/_plugins/51_HeaderIDPostRender.rb new file mode 100644 index 000000000000..4af97cc788f6 --- /dev/null +++ b/help/_plugins/51_HeaderIDPostRender.rb @@ -0,0 +1,59 @@ +require 'nokogiri' +require 'cgi' # Use CGI for URL encoding + +module Jekyll + class HeaderIDPostRender + # Hook into Jekyll's post_render stage to ensure we work with the final HTML + Jekyll::Hooks.register :pages, :post_render, priority: 51 do |page| + process_page(page) + end + + Jekyll::Hooks.register :documents, :post_render, priority: 51 do |post| + process_page(post) + end + + def self.process_page(page) + return unless page.output_ext == ".html" # Only apply to HTML pages + return if page.output.nil? # Skip if no output has been generated + + puts " Processing page: #{page.path}" + + # Parse the page's content for header elements + doc = Nokogiri::HTML(page.output) + h1_id = "" + h2_id = "" + h3_id = "" + + # Process all

,

, and

elements + (2..4).each do |level| + doc.css("h#{level}").each do |header| + header_text = header.text.strip.downcase + header_id = CGI.escape(header_text.gsub(/\s+/, '-').gsub(/[^\w\-]/, '')) + + puts " Found h#{level}: '#{header_text}' -> ID: '#{header_id}'" + + # Create hierarchical IDs by appending to the parent header IDs + if level == 2 + h2_id = header_id + header['id'] = h2_id + elsif level == 3 + h3_id = "#{h2_id}:#{header_id}" + header['id'] = h3_id + elsif level == 4 + h4_id = "#{h3_id}:#{header_id}" + header['id'] = h4_id + end + + puts " Assigned ID: #{header['id']}" + end + end + + # Log the final output being written + puts " Writing updated HTML for page: #{page.path}" + + # Write the updated HTML back to the page + page.output = doc.to_html + end + end +end + diff --git a/help/index.md b/help/index.md new file mode 100644 index 000000000000..e5d075402ecb --- /dev/null +++ b/help/index.md @@ -0,0 +1,5 @@ +--- +title: New Expensify Help +--- +Pages: +* [Expensify Superapp](/superapp.html) diff --git a/help/robots.txt b/help/robots.txt new file mode 100644 index 000000000000..6ffbc308f73e --- /dev/null +++ b/help/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Disallow: / + diff --git a/help/superapp.md b/help/superapp.md new file mode 100644 index 000000000000..d09860a1ce7e --- /dev/null +++ b/help/superapp.md @@ -0,0 +1,115 @@ +--- +layout: product +title: Expensify Superapp +--- + +## Introduction +The Expensify Superapp packs the full power of 6 world class business, finance, and collaboration products, into a single app that works identically on desktop and mobile, efficiently with your colleagues, and seamlessly with your customers, vendors, family, and friends. + +### When should I use Expensify? +Expensify can do a lot. You should check us out whenever you need to: + +Track and manage expenses +: Whether you are reimbursing employee receipts, deducting personal expenses, or just splitting the bill, Expensify Expense is for you. + +Issue corporate cards +: Skip the reimbursement and capture receipts electronically in realtime by issuing the Expensify Card to yourself and your employees. + +Book and manage travel +: If you are booking your own business trip, arranging a trip for a colleague, or managing the travel of your whole company, Expensify Travel has got you covered. + +Chat with friends and coworkers +: Whether it's collaborating with your team, supporting you client, negotiating with your vendor, or just saying Hi to a friend, Expensify Chat connects you with anyone with an email address or SMS number + +Collect invoice payments online +: Expensify Invoice allows you to collect online payments from consumers and businesses alike – anyone with an email address or SMS number. + +Approve and pay bills online +: Scan, process, and approve bills online using Expensify Billpay, then we'll pay them electronically or via check, whatever they prefer. + +If you send, receive, or spend money – or even just talk to literally anyone, about literally anything – Expensify is the tool for you. + +### Who uses Expensify? +Expensify offers something for everyone. Some people who commonly use us include: + +Individuals +: Millions of individuals use Expensify to track personal expenses to maximize their tax deductions, stay within personal budgets, or just see where their money is going. + +Friends +: Expensify is a great way to split bills with friends, whether it's monthly rent and household expenses, a big ticket bachelorette party, or just grabbing drinks with friends. + +Employees +: Road warriors and desk jockeys alike count on Expensify to reimburse expense reports they create in international airports, swanky hotels, imposing conference centers, quaint coffeeshops, and boring office supply stores around the world. + +Managers +: Bosses manage corporate spend with Expensify to empower their best (and keep tabs on their… not so best), staying ahead of schedule and under budget. + +Accountants +: Internal accountants, fractional CFOs, CAS practices – you name it, they use Expensify to Invoice customers, process vendor bills, capture eReceipts, manage corporate spend: the whole shebang. If you're an accountant, we're already best friends. + +Travel managers +: Anyone looking to manage employee travel has come to the right place. + +If you are a person online who does basically anything, you can probably do it with Expensify. + +### Why should I use Expensify? +Though we do a lot, you've got a lot of options for everything we do. But you should use us because we are: +Simple enough for individuals - We've worked extremely hard to make a product that strips out all the complex jargon and enterprise baggage, and gives you a simple tool that doesn't overwhelm you with functionality and language you don't understand. + +Powerful enough for enterprises +: We've worked extremely hard to make a product that "scales up" to reveal increasingly sophisticated features, but only to those who need it, and only when they need it. Expensify is used by public companies, multinational companies, companies with tens of thousands of employees, non-profits, investment firms, accounting firms, manufacturers, and basically every industry in every currency and in every country around the world. If you are a company, we can support your needs, no matter how big or small. + +6 products for the price of 1 +: Do you pay for an expense management system? A corporate card? A travel management platform? An enterprise chat tool? An invoicing tool? A billpay tool? Now you don't need to. Expensify's superapp design allows us to offer ALL these features on a single platform, at probably less than what you pay for any of them individually. + +Supports everyone everywhere +: Expensify works on iPhones and Androids, desktops and browsers. We support every currency, and can reimburse to almost any country. You don't need to be an IT wizard – if you can type in their email address or SMS number, you can do basically everything with them. + +You get paid to use it +: Do you spend money? Spend it on the Expensify Card and we pay you up to 2% cashback. It's your money after all. + +Revenue share for accountants +: Do you manage the books for a bunch of clients? Become an Expensify Approved Accountant and take home 0.5% revenue share. Or share it with your clients as a discount, up to you! + +You are in the driver's seat; we're here to earn your business. But we're going to work harder for you than the other guys, and you won't be disappointed. + +## Concepts +The Expensify Superapp has a lot of moving pieces, so let's break them down one by one. + +### What makes Expensify a superapp? +A "superapp" is a single app that combines multiple products into one seamlessly interconnected experience. Expensify isn't a "suite" of separate products linked through a single account – Expensify is a single app with a single core design that can perform multiple product functions. The secret to making such a seamless experience is that we build all product functions atop the same common core: + +App +: The basis of the superapp experience is the actual app itself, which runs on your mobile phone or desktop computer. (What is the Expensify app?) + +Chats +: Even if you don't plan on using Expensify Chat for enterprise-grade workspace collaboration, chat is infused through the entire product. (What is a chat?) + +Expense +: Even if you aren't actively managing your expenses, you've still got them. Every product that deals with money is ultimately dealing with expenses of some kind. (What is an expense?) + +Workspace +: Though Expensify works great for our millions of individual members, every product really shines when used between groups of members sharing a "workspace". (What is a workspace?) + +Domain +: To support more advanced security features, many products provide extra functionality to members who are on the same email "domain". (What is a domain?) + +These are the foundational concepts you'll see again and again that underpin the superapp as a whole. + +### What is the Expensify app? +Just like your eyes are a window to your soul, the Expensify App is the doorway through which you experience the entire global world of interconnected chat-centric collaborative data that comprises the Expensify network. The main tools of this app consist of: + +Inbox +: The main screen of the app is the Inbox, which highlights exactly what you should do next, consolidated across all products. (What does the Inbox do?) + +Search +: The next major screen is Search, which as you'd expect, let's you search everything across all products, from one convenient and powerful place. (What does Search do?) + +Settings +: Settings wraps up all your personal, workspace, and domain configuration options, all in one helpful space. (What are Expensify's settings?) + +Create +: Finally, the big green plus button is the Create button, which lets you create pretty much anything, across all the products. (What does the Create button do?) + +It's a deceptively simple app, with a few very familiar looking screens and buttons that unlock an incredible range of sophisticated multi-product power. + diff --git a/ios/NewApp_AdHoc.mobileprovision.gpg b/ios/NewApp_AdHoc.mobileprovision.gpg index 78fb5d53d9e9..d2f181f6b7f4 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 ac2c76a118d5..c0afa40ecb29 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.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index 768062717d4b..1a29a275b956 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -43,7 +43,7 @@ D27CE6B77196EF3EF450EEAC /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 0D3F9E814828D91464DF9D35 /* PrivacyInfo.xcprivacy */; }; DD79042B2792E76D004484B4 /* RCTBootSplash.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD79042A2792E76D004484B4 /* RCTBootSplash.mm */; }; DDCB2E57F334C143AC462B43 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D20D83B0E39BA6D21761E72 /* ExpoModulesProvider.swift */; }; - E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */ = {isa = PBXBuildFile; }; E9DF872D2525201700607FDC /* AirshipConfig.plist in Resources */ = {isa = PBXBuildFile; fileRef = E9DF872C2525201700607FDC /* AirshipConfig.plist */; }; ED222ED90E074A5481A854FA /* ExpensifyNeue-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */; }; F0C450EA2705020500FD2970 /* colors.json in Resources */ = {isa = PBXBuildFile; fileRef = F0C450E92705020500FD2970 /* colors.json */; }; @@ -131,6 +131,7 @@ 7F3784A52C7512CF00063508 /* NewExpensifyReleaseDevelopment.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = NewExpensifyReleaseDevelopment.entitlements; path = NewExpensify/NewExpensifyReleaseDevelopment.entitlements; sourceTree = ""; }; 7F3784A62C7512D900063508 /* NewExpensifyReleaseAdHoc.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = NewExpensifyReleaseAdHoc.entitlements; path = NewExpensify/NewExpensifyReleaseAdHoc.entitlements; sourceTree = ""; }; 7F3784A72C75131000063508 /* NewExpensifyReleaseProduction.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = NewExpensifyReleaseProduction.entitlements; path = NewExpensify/NewExpensifyReleaseProduction.entitlements; sourceTree = ""; }; + 7F9C91352CA5EC4900FC4DC1 /* NotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationServiceExtension.entitlements; sourceTree = ""; }; 7F9DD8D92B2A445B005E3AFA /* ExpError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpError.swift; sourceTree = ""; }; 7FD73C9B2B23CE9500420AF3 /* NotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 7FD73C9D2B23CE9500420AF3 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; @@ -175,8 +176,8 @@ buildActionMask = 2147483647; files = ( 383643682B6D4AE2005BB9AE /* DeviceCheck.framework in Frameworks */, - E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */, - E51DC681C7DEE40AEBDDFBFE /* BuildFile in Frameworks */, + E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */, + E51DC681C7DEE40AEBDDFBFE /* (null) in Frameworks */, 8744C5400E24E379441C04A4 /* libPods-NewExpensify.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -266,6 +267,7 @@ 7FD73C9C2B23CE9500420AF3 /* NotificationServiceExtension */ = { isa = PBXGroup; children = ( + 7F9C91352CA5EC4900FC4DC1 /* NotificationServiceExtension.entitlements */, 7FD73C9D2B23CE9500420AF3 /* NotificationService.swift */, 7FD73C9F2B23CE9500420AF3 /* Info.plist */, 7F9DD8D92B2A445B005E3AFA /* ExpError.swift */, @@ -1183,6 +1185,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; @@ -1347,6 +1350,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; @@ -1433,6 +1437,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; @@ -1518,8 +1523,9 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; @@ -1560,7 +1566,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat.NotificationServiceExtension; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "(NewApp) Development: Notification Service"; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "(NewApp) AppStore: Notification Service"; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; @@ -1604,6 +1610,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; @@ -1683,6 +1690,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; @@ -1761,6 +1769,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_ENTITLEMENTS = NotificationServiceExtension/NotificationServiceExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 5f6051c85745..35d71276f8ef 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 9.0.39 + 9.0.41 CFBundleSignature ???? CFBundleURLTypes @@ -40,7 +40,7 @@ CFBundleVersion - 9.0.39.4 + 9.0.41.3 FullStory OrgId diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index c29a15f26438..ca0c99bb87a2 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 9.0.39 + 9.0.41 CFBundleSignature ???? CFBundleVersion - 9.0.39.4 + 9.0.41.3 diff --git a/ios/NotificationServiceExtension/Info.plist b/ios/NotificationServiceExtension/Info.plist index 2b43cf12b38a..2d97209598e2 100644 --- a/ios/NotificationServiceExtension/Info.plist +++ b/ios/NotificationServiceExtension/Info.plist @@ -11,9 +11,9 @@ CFBundleName $(PRODUCT_NAME) CFBundleShortVersionString - 9.0.39 + 9.0.41 CFBundleVersion - 9.0.39.4 + 9.0.41.3 NSExtension NSExtensionPointIdentifier diff --git a/ios/NotificationServiceExtension/NotificationServiceExtension.entitlements b/ios/NotificationServiceExtension/NotificationServiceExtension.entitlements new file mode 100644 index 000000000000..f52d3207d6e3 --- /dev/null +++ b/ios/NotificationServiceExtension/NotificationServiceExtension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.com.expensify.new + + + diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a801a7c4de1c..beac64acd083 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2451,7 +2451,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReactNativeHapticFeedback (2.3.1): + - RNReactNativeHapticFeedback (2.3.3): - DoubleConversion - glog - hermes-engine @@ -3233,7 +3233,7 @@ SPEC CHECKSUMS: RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4 RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28 - RNReactNativeHapticFeedback: 31833c3ef341d716dbbd9d64e940f0c230db46f6 + RNReactNativeHapticFeedback: 73756a3477a5a622fa16862a3ab0d0fc5e5edff5 RNReanimated: 76901886830e1032f16bbf820153f7dc3f02d51d RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2 RNShare: bd4fe9b95d1ee89a200778cc0753ebe650154bb0 diff --git a/package-lock.json b/package-lock.json index a9569fc0a6dd..b50632923b00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "9.0.39-4", + "version": "9.0.41-3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "9.0.39-4", + "version": "9.0.41-3", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -50,7 +50,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "2.0.84", + "expensify-common": "2.0.94", "expo": "51.0.31", "expo-av": "14.0.7", "expo-image": "1.12.15", @@ -85,7 +85,7 @@ "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.18.0", "react-native-google-places-autocomplete": "2.5.6", - "react-native-haptic-feedback": "^2.3.1", + "react-native-haptic-feedback": "^2.3.3", "react-native-image-picker": "^7.0.3", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#cb392140db4953a283590d7cf93b4d0461baa2a9", "react-native-key-command": "^1.0.8", @@ -24037,9 +24037,9 @@ } }, "node_modules/expensify-common": { - "version": "2.0.84", - "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.84.tgz", - "integrity": "sha512-VistjMexRz/1u1IqjIZwGRE7aS6QOat7420Dualn+NaqMHGkfeeB4uUR3RQhCtlDbcwFBKTryIGgSrrC0N1YpA==", + "version": "2.0.94", + "resolved": "https://registry.npmjs.org/expensify-common/-/expensify-common-2.0.94.tgz", + "integrity": "sha512-Cco5X6u4IL5aQlFqa2IgGgR+vAffYLxpPN2d7bzfptW/pRLY2L2JRJohgvXEswlCcTKFVt4nIJ4bx9YIOvzxBA==", "dependencies": { "awesome-phonenumber": "^5.4.0", "classnames": "2.5.0", @@ -34543,9 +34543,9 @@ } }, "node_modules/react-native-haptic-feedback": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/react-native-haptic-feedback/-/react-native-haptic-feedback-2.3.1.tgz", - "integrity": "sha512-dPfjV4iVHfhVyfG+nRd88ygjahbdup7KFZDM5L2aNIAzqbNtKxHZn5O1pHegwSj1t15VJliu0GyTX7XpBDeXUw==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/react-native-haptic-feedback/-/react-native-haptic-feedback-2.3.3.tgz", + "integrity": "sha512-svS4D5PxfNv8o68m9ahWfwje5NqukM3qLS48+WTdhbDkNUkOhP9rDfDSRHzlhk4zq+ISjyw95EhLeh8NkKX5vQ==", "workspaces": [ "example" ], diff --git a/package.json b/package.json index 5a0d4f13b12c..249c64e5e621 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "9.0.39-4", + "version": "9.0.41-3", "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.", @@ -107,7 +107,7 @@ "date-fns-tz": "^2.0.0", "dom-serializer": "^0.2.2", "domhandler": "^4.3.0", - "expensify-common": "2.0.84", + "expensify-common": "2.0.94", "expo": "51.0.31", "expo-av": "14.0.7", "expo-image": "1.12.15", @@ -142,7 +142,7 @@ "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.18.0", "react-native-google-places-autocomplete": "2.5.6", - "react-native-haptic-feedback": "^2.3.1", + "react-native-haptic-feedback": "^2.3.3", "react-native-image-picker": "^7.0.3", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#cb392140db4953a283590d7cf93b4d0461baa2a9", "react-native-key-command": "^1.0.8", diff --git a/patches/react-native-draggable-flatlist+4.0.1.patch b/patches/react-native-draggable-flatlist+4.0.1.patch new file mode 100644 index 000000000000..348f1aa5de8a --- /dev/null +++ b/patches/react-native-draggable-flatlist+4.0.1.patch @@ -0,0 +1,94 @@ +diff --git a/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx b/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx +index d7d98c2..2f59c7a 100644 +--- a/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx ++++ b/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx +@@ -295,7 +295,7 @@ function DraggableFlatListInner(props: DraggableFlatListProps) { + const springTo = placeholderOffset.value - activeCellOffset.value; + touchTranslate.value = withSpring( + springTo, +- animationConfigRef.current, ++ animationConfigRef.value, + () => { + runOnJS(onDragEnd)({ + from: activeIndexAnim.value, +diff --git a/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx b/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx +index ea21575..66c5eed 100644 +--- a/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx ++++ b/node_modules/react-native-draggable-flatlist/src/context/refContext.tsx +@@ -1,14 +1,14 @@ + import React, { useContext } from "react"; + import { useMemo, useRef } from "react"; + import { FlatList } from "react-native-gesture-handler"; +-import Animated, { WithSpringConfig } from "react-native-reanimated"; ++import Animated, { type SharedValue, useSharedValue, WithSpringConfig } from "react-native-reanimated"; + import { DEFAULT_PROPS } from "../constants"; + import { useProps } from "./propsContext"; + import { CellData, DraggableFlatListProps } from "../types"; + + type RefContextValue = { + propsRef: React.MutableRefObject>; +- animationConfigRef: React.MutableRefObject; ++ animationConfigRef: SharedValue; + cellDataRef: React.MutableRefObject>; + keyToIndexRef: React.MutableRefObject>; + containerRef: React.RefObject; +@@ -54,8 +54,8 @@ function useSetupRefs({ + ...DEFAULT_PROPS.animationConfig, + ...animationConfig, + } as WithSpringConfig; +- const animationConfigRef = useRef(animConfig); +- animationConfigRef.current = animConfig; ++ const animationConfigRef = useSharedValue(animConfig); ++ animationConfigRef.value = animConfig; + + const cellDataRef = useRef(new Map()); + const keyToIndexRef = useRef(new Map()); +diff --git a/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx b/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx +index ce4ab68..efea240 100644 +--- a/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx ++++ b/node_modules/react-native-draggable-flatlist/src/hooks/useCellTranslate.tsx +@@ -101,7 +101,7 @@ export function useCellTranslate({ cellIndex, cellSize, cellOffset }: Params) { + ? activeCellSize.value * (isAfterActive ? -1 : 1) + : 0; + +- return withSpring(translationAmt, animationConfigRef.current); ++ return withSpring(translationAmt, animationConfigRef.value); + }, [activeKey, cellIndex]); + + return translate; +diff --git a/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts b/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts +index 7c20587..857c7d0 100644 +--- a/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts ++++ b/node_modules/react-native-draggable-flatlist/src/hooks/useOnCellActiveAnimation.ts +@@ -1,8 +1,9 @@ +-import { useRef } from "react"; +-import Animated, { ++ ++import { + useDerivedValue, + withSpring, + WithSpringConfig, ++ useSharedValue, + } from "react-native-reanimated"; + import { DEFAULT_ANIMATION_CONFIG } from "../constants"; + import { useAnimatedValues } from "../context/animatedValueContext"; +@@ -15,8 +16,8 @@ type Params = { + export function useOnCellActiveAnimation( + { animationConfig }: Params = { animationConfig: {} } + ) { +- const animationConfigRef = useRef(animationConfig); +- animationConfigRef.current = animationConfig; ++ const animationConfigRef = useSharedValue(animationConfig); ++ animationConfigRef.value = animationConfig; + + const isActive = useIsActive(); + +@@ -26,7 +27,7 @@ export function useOnCellActiveAnimation( + const toVal = isActive && isTouchActiveNative.value ? 1 : 0; + return withSpring(toVal, { + ...DEFAULT_ANIMATION_CONFIG, +- ...animationConfigRef.current, ++ ...animationConfigRef.value, + }); + }, [isActive]); + diff --git a/patches/react-native-haptic-feedback+2.3.1.patch b/patches/react-native-haptic-feedback+2.3.1.patch deleted file mode 100644 index 799bdaf7e53e..000000000000 --- a/patches/react-native-haptic-feedback+2.3.1.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h -index c1498b9..250df1f 100644 ---- a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h -+++ b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedback.h -@@ -1,5 +1,5 @@ - #ifdef RCT_NEW_ARCH_ENABLED --#import "RNHapticFeedbackSpec.h" -+#import - - @interface RNHapticFeedback : NSObject - #else -diff --git a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedbackSpec.h b/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedbackSpec.h -deleted file mode 100644 -index 6f0f81d..0000000 ---- a/node_modules/react-native-haptic-feedback/ios/RNHapticFeedback/RNHapticFeedbackSpec.h -+++ /dev/null -@@ -1,15 +0,0 @@ --// --// RNHapticFeedbackSpec.h --// RNHapticFeedback --// --// Created by Michael Kuczera on 05.08.24. --// Copyright © 2024 Facebook. All rights reserved. --// --#import -- --@protocol NativeHapticFeedbackSpec -- --// Indicates whether the device supports haptic feedback --- (Boolean)supportsHaptic; -- --@end -diff --git a/node_modules/react-native-haptic-feedback/package.json b/node_modules/react-native-haptic-feedback/package.json -index 86dfaa4..9cec8e4 100644 ---- a/node_modules/react-native-haptic-feedback/package.json -+++ b/node_modules/react-native-haptic-feedback/package.json -@@ -6,18 +6,7 @@ - "source": "src/index.ts", - "main": "./lib/commonjs/index.js", - "module": "./lib/module/index.js", -- "exports": { -- ".": { -- "import": { -- "types": "./lib/typescript/module/src/index.d.ts", -- "default": "./lib/module/index.js" -- }, -- "require": { -- "types": "./lib/typescript/commonjs/src/index.d.ts", -- "default": "./lib/commonjs/index.js" -- } -- } -- }, -+ "types": "./lib/typescript/module/src/index.d.ts", - "scripts": { - "typecheck": "tsc --noEmit --project tsconfig.test.json", - "test": "jest", diff --git a/src/App.tsx b/src/App.tsx index 35254fa29b2a..177cc00c7dee 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -50,9 +50,6 @@ LogBox.ignoreLogs([ // the timer is lost. Currently Expensify is using a 30 minutes interval to refresh personal details. // More details here: https://git.io/JJYeb 'Setting a timer for a long period of time', - // We silence this warning for now and will address all the places where it happens separately. - // Then we can remove this line so the problem does not occur in the future. - '[Reanimated] Tried to modify key `current`', ]); const fill = {flex: 1}; diff --git a/src/CONST.ts b/src/CONST.ts index 07352562838e..5af0b34c0252 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -171,7 +171,7 @@ const CONST = { }, // Note: Group and Self-DM excluded as these are not tied to a Workspace - WORKSPACE_ROOM_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL, chatTypes.POLICY_ROOM, chatTypes.POLICY_EXPENSE_CHAT], + WORKSPACE_ROOM_TYPES: [chatTypes.POLICY_ADMINS, chatTypes.POLICY_ANNOUNCE, chatTypes.DOMAIN_ALL, chatTypes.POLICY_ROOM, chatTypes.POLICY_EXPENSE_CHAT, chatTypes.INVOICE], ANDROID_PACKAGE_NAME, WORKSPACE_ENABLE_FEATURE_REDIRECT_DELAY: 100, ANIMATED_HIGHLIGHT_ENTRY_DELAY: 50, @@ -719,7 +719,9 @@ const CONST = { PRICING: `https://www.expensify.com/pricing`, COMPANY_CARDS_HELP: 'https://help.expensify.com/articles/expensify-classic/connect-credit-cards/company-cards/Commercial-Card-Feeds', CUSTOM_REPORT_NAME_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/spending-insights/Custom-Templates', + CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings', COPILOT_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Assign-or-remove-a-Copilot', + DELAYED_SUBMISSION_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports', // Use Environment.getEnvironmentURL to get the complete URL with port number DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:', OLDDOT_URLS: { @@ -1009,6 +1011,7 @@ const CONST = { MAX_PREVIEW_AVATARS: 4, MAX_ROOM_NAME_LENGTH: 99, LAST_MESSAGE_TEXT_MAX_LENGTH: 200, + MIN_LENGTH_LAST_MESSAGE_WITH_ELLIPSIS: 20, OWNER_EMAIL_FAKE: '__FAKE__', OWNER_ACCOUNT_ID_FAKE: 0, DEFAULT_REPORT_NAME: 'Chat Report', @@ -2097,6 +2100,9 @@ const CONST = { ACCESS_VARIANTS: { CREATE: 'create', }, + PAGE_INDEX: { + CONFIRM: 'confirm', + }, PAYMENT_SELECTED: { BBA: 'BBA', PBA: 'PBA', @@ -2180,7 +2186,7 @@ const CONST = { AUTO_REIMBURSEMENT_MAX_LIMIT_CENTS: 2000000, AUTO_REIMBURSEMENT_DEFAULT_LIMIT_CENTS: 10000, AUTO_APPROVE_REPORTS_UNDER_DEFAULT_CENTS: 10000, - RANDOM_AUDIT_DEFAULT_PERCENTAGE: 5, + RANDOM_AUDIT_DEFAULT_PERCENTAGE: 0.05, AUTO_REPORTING_FREQUENCIES: { INSTANT: 'instant', @@ -4556,7 +4562,7 @@ const CONST = { { type: 'setupTags', autoCompleted: false, - title: 'Set up tags (optional)', + title: 'Set up tags', description: ({workspaceMoreFeaturesLink}) => 'Tags can be used if you want more details with every expense. Use tags for projects, clients, locations, departments, and more. If you need multiple levels of tags you can upgrade to a control plan.\n' + '\n' + diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 7fcb675dc191..cb8bf2fdb5d3 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -849,7 +849,7 @@ type OnyxValuesMapping = { // ONYXKEYS.NVP_TRYNEWDOT is HybridApp onboarding data [ONYXKEYS.NVP_TRYNEWDOT]: OnyxTypes.TryNewDot; - [ONYXKEYS.SAVED_SEARCHES]: OnyxTypes.SaveSearch[]; + [ONYXKEYS.SAVED_SEARCHES]: OnyxTypes.SaveSearch; [ONYXKEYS.RECENTLY_USED_CURRENCIES]: string[]; [ONYXKEYS.ACTIVE_CLIENTS]: string[]; [ONYXKEYS.DEVICE_ID]: string; diff --git a/src/ROUTES.ts b/src/ROUTES.ts index c0ec944b71e1..dfcb42d3c4fe 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -35,7 +35,7 @@ const ROUTES = { SEARCH_CENTRAL_PANE: { route: 'search', - getRoute: ({query}: {query: SearchQueryString}) => `search?q=${encodeURIComponent(query)}` as const, + getRoute: ({query, name}: {query: SearchQueryString; name?: string}) => `search?q=${encodeURIComponent(query)}${name ? `&name=${name}` : ''}` as const, }, SEARCH_SAVED_SEARCH_RENAME: { route: 'search/saved-search/rename', @@ -59,11 +59,9 @@ const ROUTES = { SEARCH_ADVANCED_FILTERS_IN: 'search/filters/in', SEARCH_REPORT: { route: 'search/view/:reportID/:reportActionID?', - getRoute: (reportID: string, reportActionID?: string) => { - if (reportActionID) { - return `search/view/${reportID}/${reportActionID}` as const; - } - return `search/view/${reportID}` as const; + getRoute: ({reportID, reportActionID, backTo}: {reportID: string; reportActionID?: string; backTo?: string}) => { + const baseRoute = reportActionID ? (`search/view/${reportID}/${reportActionID}` as const) : (`search/view/${reportID}` as const); + return getUrlWithBackToParam(baseRoute, backTo); }, }, TRANSACTION_HOLD_REASON_RHP: 'search/hold', @@ -74,7 +72,7 @@ const ROUTES = { SUBMIT_EXPENSE: 'submit-expense', FLAG_COMMENT: { route: 'flag/:reportID/:reportActionID', - getRoute: (reportID: string, reportActionID: string) => `flag/${reportID}/${reportActionID}` as const, + getRoute: (reportID: string, reportActionID: string, backTo?: string) => getUrlWithBackToParam(`flag/${reportID}/${reportActionID}` as const, backTo), }, CHAT_FINDER: 'chat-finder', PROFILE: { @@ -287,11 +285,12 @@ const ROUTES = { }, EDIT_REPORT_FIELD_REQUEST: { route: 'r/:reportID/edit/policyField/:policyID/:fieldID', - getRoute: (reportID: string, policyID: string, fieldID: string) => `r/${reportID}/edit/policyField/${policyID}/${fieldID}` as const, + getRoute: (reportID: string, policyID: string, fieldID: string, backTo?: string) => + getUrlWithBackToParam(`r/${reportID}/edit/policyField/${policyID}/${encodeURIComponent(fieldID)}` as const, backTo), }, REPORT_WITH_ID_DETAILS_SHARE_CODE: { route: 'r/:reportID/details/shareCode', - getRoute: (reportID: string) => `r/${reportID}/details/shareCode` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/details/shareCode` as const, backTo), }, ATTACHMENTS: { route: 'attachment', @@ -300,19 +299,19 @@ const ROUTES = { }, REPORT_PARTICIPANTS: { route: 'r/:reportID/participants', - getRoute: (reportID: string) => `r/${reportID}/participants` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/participants` as const, backTo), }, REPORT_PARTICIPANTS_INVITE: { route: 'r/:reportID/participants/invite', - getRoute: (reportID: string) => `r/${reportID}/participants/invite` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/participants/invite` as const, backTo), }, REPORT_PARTICIPANTS_DETAILS: { route: 'r/:reportID/participants/:accountID', - getRoute: (reportID: string, accountID: number) => `r/${reportID}/participants/${accountID}` as const, + getRoute: (reportID: string, accountID: number, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/participants/${accountID}` as const, backTo), }, REPORT_PARTICIPANTS_ROLE_SELECTION: { route: 'r/:reportID/participants/:accountID/role', - getRoute: (reportID: string, accountID: number) => `r/${reportID}/participants/${accountID}/role` as const, + getRoute: (reportID: string, accountID: number, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/participants/${accountID}/role` as const, backTo), }, REPORT_WITH_ID_DETAILS: { route: 'r/:reportID/details', @@ -320,71 +319,75 @@ const ROUTES = { }, REPORT_WITH_ID_DETAILS_EXPORT: { route: 'r/:reportID/details/export/:connectionName', - getRoute: (reportID: string, connectionName: ConnectionName) => `r/${reportID}/details/export/${connectionName}` as const, + getRoute: (reportID: string, connectionName: ConnectionName, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/details/export/${connectionName}` as const, backTo), }, REPORT_SETTINGS: { route: 'r/:reportID/settings', - getRoute: (reportID: string) => `r/${reportID}/settings` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/settings` as const, backTo), }, REPORT_SETTINGS_NAME: { route: 'r/:reportID/settings/name', - getRoute: (reportID: string) => `r/${reportID}/settings/name` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/settings/name` as const, backTo), }, REPORT_SETTINGS_NOTIFICATION_PREFERENCES: { route: 'r/:reportID/settings/notification-preferences', - getRoute: (reportID: string) => `r/${reportID}/settings/notification-preferences` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/settings/notification-preferences` as const, backTo), }, REPORT_SETTINGS_WRITE_CAPABILITY: { route: 'r/:reportID/settings/who-can-post', - getRoute: (reportID: string) => `r/${reportID}/settings/who-can-post` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/settings/who-can-post` as const, backTo), }, REPORT_SETTINGS_VISIBILITY: { route: 'r/:reportID/settings/visibility', - getRoute: (reportID: string) => `r/${reportID}/settings/visibility` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/settings/visibility` as const, backTo), }, SPLIT_BILL_DETAILS: { route: 'r/:reportID/split/:reportActionID', - getRoute: (reportID: string, reportActionID: string) => `r/${reportID}/split/${reportActionID}` as const, + getRoute: (reportID: string, reportActionID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/split/${reportActionID}` as const, backTo), }, TASK_TITLE: { route: 'r/:reportID/title', - getRoute: (reportID: string) => `r/${reportID}/title` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/title` as const, backTo), }, REPORT_DESCRIPTION: { route: 'r/:reportID/description', - getRoute: (reportID: string) => `r/${reportID}/description` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/description` as const, backTo), }, TASK_ASSIGNEE: { route: 'r/:reportID/assignee', - getRoute: (reportID: string) => `r/${reportID}/assignee` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/assignee` as const, backTo), }, PRIVATE_NOTES_LIST: { route: 'r/:reportID/notes', - getRoute: (reportID: string) => `r/${reportID}/notes` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/notes` as const, backTo), }, PRIVATE_NOTES_EDIT: { route: 'r/:reportID/notes/:accountID/edit', - getRoute: (reportID: string, accountID: string | number) => `r/${reportID}/notes/${accountID}/edit` as const, + getRoute: (reportID: string, accountID: string | number, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/notes/${accountID}/edit` as const, backTo), }, ROOM_MEMBERS: { route: 'r/:reportID/members', - getRoute: (reportID: string) => `r/${reportID}/members` as const, + getRoute: (reportID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/members` as const, backTo), }, ROOM_MEMBER_DETAILS: { route: 'r/:reportID/members/:accountID', - getRoute: (reportID: string, accountID: string | number) => `r/${reportID}/members/${accountID}` as const, + getRoute: (reportID: string, accountID: string | number, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/members/${accountID}` as const, backTo), }, ROOM_INVITE: { route: 'r/:reportID/invite/:role?', - getRoute: (reportID: string, role?: string) => { + getRoute: (reportID: string, role?: string, backTo?: string) => { const route = role ? (`r/${reportID}/invite/${role}` as const) : (`r/${reportID}/invite` as const); - return route; + return getUrlWithBackToParam(route, backTo); }, }, MONEY_REQUEST_HOLD_REASON: { - route: ':type/edit/reason/:transactionID?', - getRoute: (type: ValueOf, transactionID: string, reportID: string, backTo: string) => - `${type}/edit/reason/${transactionID}?backTo=${backTo}&reportID=${reportID}` as const, + route: ':type/edit/reason/:transactionID?/:searchHash?', + getRoute: (type: ValueOf, transactionID: string, reportID: string, backTo: string, searchHash?: number) => { + const route = searchHash + ? (`${type}/edit/reason/${transactionID}/${searchHash}/?backTo=${backTo}&reportID=${reportID}` as const) + : (`${type}/edit/reason/${transactionID}/?backTo=${backTo}&reportID=${reportID}` as const); + return route; + }, }, MONEY_REQUEST_CREATE: { route: ':action/:iouType/start/:transactionID/:reportID', @@ -406,9 +409,9 @@ const ROUTES = { `${action as string}/${iouType as string}/confirmation/${transactionID}/${reportID}${participantsAutoAssigned ? '?participantsAutoAssigned=true' : ''}` as const, }, MONEY_REQUEST_STEP_AMOUNT: { - route: ':action/:iouType/amount/:transactionID/:reportID', - getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string, backTo = '') => - getUrlWithBackToParam(`${action as string}/${iouType as string}/amount/${transactionID}/${reportID}`, backTo), + route: ':action/:iouType/amount/:transactionID/:reportID/:pageIndex?', + getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID: string, pageIndex: string, backTo = '') => + getUrlWithBackToParam(`${action as string}/${iouType as string}/amount/${transactionID}/${reportID}/${pageIndex}`, backTo), }, MONEY_REQUEST_STEP_TAX_RATE: { route: ':action/:iouType/taxRate/:transactionID/:reportID?', @@ -495,6 +498,10 @@ const ROUTES = { getRoute: (action: IOUAction, iouType: IOUType, orderWeight: number, transactionID: string, reportID: string, backTo = '', reportActionID?: string) => getUrlWithBackToParam(`${action as string}/${iouType as string}/tag/${orderWeight}/${transactionID}/${reportID}${reportActionID ? `/${reportActionID}` : ''}`, backTo), }, + SETTINGS_TAGS_ROOT: { + route: 'settings/:policyID/tags', + getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags`, backTo), + }, MONEY_REQUEST_STEP_WAYPOINT: { route: ':action/:iouType/waypoint/:transactionID/:reportID/:pageIndex', getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID?: string, pageIndex = '', backTo = '') => @@ -536,12 +543,27 @@ const ROUTES = { IOU_SEND_ADD_DEBIT_CARD: 'pay/new/add-debit-card', IOU_SEND_ENABLE_PAYMENTS: 'pay/new/enable-payments', - NEW_TASK: 'new/task', - NEW_TASK_ASSIGNEE: 'new/task/assignee', + NEW_TASK: { + route: 'new/task', + getRoute: (backTo?: string) => getUrlWithBackToParam('new/task', backTo), + }, + NEW_TASK_ASSIGNEE: { + route: 'new/task/assignee', + getRoute: (backTo?: string) => getUrlWithBackToParam('new/task/assignee', backTo), + }, NEW_TASK_SHARE_DESTINATION: 'new/task/share-destination', - NEW_TASK_DETAILS: 'new/task/details', - NEW_TASK_TITLE: 'new/task/title', - NEW_TASK_DESCRIPTION: 'new/task/description', + NEW_TASK_DETAILS: { + route: 'new/task/details', + getRoute: (backTo?: string) => getUrlWithBackToParam('new/task/details', backTo), + }, + NEW_TASK_TITLE: { + route: 'new/task/title', + getRoute: (backTo?: string) => getUrlWithBackToParam('new/task/title', backTo), + }, + NEW_TASK_DESCRIPTION: { + route: 'new/task/description', + getRoute: (backTo?: string) => getUrlWithBackToParam('new/task/description', backTo), + }, TEACHERS_UNITE: 'settings/teachersunite', I_KNOW_A_TEACHER: 'settings/teachersunite/i-know-a-teacher', @@ -1097,7 +1119,10 @@ const ROUTES = { route: 'referral/:contentType', getRoute: (contentType: string, backTo?: string) => getUrlWithBackToParam(`referral/${contentType}`, backTo), }, - PROCESS_MONEY_REQUEST_HOLD: 'hold-expense-educational', + PROCESS_MONEY_REQUEST_HOLD: { + route: 'hold-expense-educational', + getRoute: (backTo?: string) => getUrlWithBackToParam('hold-expense-educational', backTo), + }, TRAVEL_MY_TRIPS: 'travel', TRAVEL_TCS: 'travel/terms', TRACK_TRAINING_MODAL: 'track-training', @@ -1126,39 +1151,39 @@ const ROUTES = { }, TRANSACTION_DUPLICATE_REVIEW_PAGE: { route: 'r/:threadReportID/duplicates/review', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_MERCHANT_PAGE: { route: 'r/:threadReportID/duplicates/review/merchant', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/merchant` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/merchant` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_CATEGORY_PAGE: { route: 'r/:threadReportID/duplicates/review/category', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/category` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/category` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_TAG_PAGE: { route: 'r/:threadReportID/duplicates/review/tag', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/tag` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/tag` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_TAX_CODE_PAGE: { route: 'r/:threadReportID/duplicates/review/tax-code', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/tax-code` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/tax-code` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_DESCRIPTION_PAGE: { route: 'r/:threadReportID/duplicates/review/description', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/description` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/description` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_REIMBURSABLE_PAGE: { route: 'r/:threadReportID/duplicates/review/reimbursable', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/reimbursable` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/reimbursable` as const, backTo), }, TRANSACTION_DUPLICATE_REVIEW_BILLABLE_PAGE: { route: 'r/:threadReportID/duplicates/review/billable', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/review/billable` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/review/billable` as const, backTo), }, TRANSACTION_DUPLICATE_CONFIRMATION_PAGE: { route: 'r/:threadReportID/duplicates/confirm', - getRoute: (threadReportID: string) => `r/${threadReportID}/duplicates/confirm` as const, + getRoute: (threadReportID: string, backTo?: string) => getUrlWithBackToParam(`r/${threadReportID}/duplicates/confirm` as const, backTo), }, POLICY_ACCOUNTING_XERO_IMPORT: { route: 'settings/workspaces/:policyID/accounting/xero/import', @@ -1552,6 +1577,12 @@ type Route = { type RoutesValidationError = 'Error: One or more routes defined within `ROUTES` have not correctly used `as const` in their `getRoute` function return value.'; +/** + * Represents all routes in the app as a union of literal strings. + * + * If TS throws on this line, it implies that one or more routes defined within `ROUTES` have not correctly used + * `as const` in their `getRoute` function return value. + */ // eslint-disable-next-line @typescript-eslint/no-unused-vars type RouteIsPlainString = AssertTypesNotEqual; diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 920bd48dd42e..395f1c4d5fb1 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -244,6 +244,8 @@ const SCREENS = { SETTINGS_CATEGORIES_ROOT: 'Settings_Categories', }, + SETTINGS_TAGS_ROOT: 'Settings_Tags', + REPORT_SETTINGS: { ROOT: 'Report_Settings_Root', NAME: 'Report_Settings_Name', diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx index 538009b2565e..9b5d21743bef 100644 --- a/src/components/AccountSwitcher.tsx +++ b/src/components/AccountSwitcher.tsx @@ -108,7 +108,7 @@ function AccountSwitcher() { const error = ErrorUtils.getLatestErrorField({errorFields}, 'connect'); const personalDetails = PersonalDetailsUtils.getPersonalDetailByEmail(email); return createBaseMenuItem(personalDetails, error, { - badgeText: translate('delegate.role', role), + badgeText: translate('delegate.role', {role}), onPress: () => { if (isOffline) { Modal.close(() => setShouldShowOfflineModal(true)); diff --git a/src/components/AccountSwitcherSkeletonView/index.tsx b/src/components/AccountSwitcherSkeletonView/index.tsx index 3faf7e563f3c..379a4094e032 100644 --- a/src/components/AccountSwitcherSkeletonView/index.tsx +++ b/src/components/AccountSwitcherSkeletonView/index.tsx @@ -22,7 +22,7 @@ function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.A const StyleUtils = useStyleUtils(); const avatarPlaceholderSize = StyleUtils.getAvatarSize(avatarSize); const avatarPlaceholderRadius = avatarPlaceholderSize / 2; - const startPositionX = 30; + const startPositionX = avatarPlaceholderRadius; return ( diff --git a/src/components/AccountingConnectionConfirmationModal.tsx b/src/components/AccountingConnectionConfirmationModal.tsx index c472f215b6df..bfacd8c0bf76 100644 --- a/src/components/AccountingConnectionConfirmationModal.tsx +++ b/src/components/AccountingConnectionConfirmationModal.tsx @@ -14,11 +14,11 @@ function AccountingConnectionConfirmationModal({integrationToConnect, onCancel, return ( & Pick; @@ -75,6 +78,7 @@ function AmountForm( displayAsTextInput = false, isCurrencyPressable = true, label, + fixedDecimals, ...rest }: AmountFormProps, forwardedRef: ForwardedRef, @@ -84,7 +88,7 @@ function AmountForm( const textInput = useRef(null); - const decimals = CurrencyUtils.getCurrencyDecimals(currency) + extraDecimals; + const decimals = fixedDecimals ?? CurrencyUtils.getCurrencyDecimals(currency) + extraDecimals; const currentAmount = useMemo(() => (typeof amount === 'string' ? amount : ''), [amount]); const [shouldUpdateSelection, setShouldUpdateSelection] = useState(true); diff --git a/src/components/AvatarWithDisplayName.tsx b/src/components/AvatarWithDisplayName.tsx index 04fe4fb650f5..2ee34d502521 100644 --- a/src/components/AvatarWithDisplayName.tsx +++ b/src/components/AvatarWithDisplayName.tsx @@ -79,10 +79,15 @@ function AvatarWithDisplayName({ actorAccountID.current = parentReportAction?.actorAccountID ?? -1; }, [parentReportActions, report]); + const goToDetailsPage = useCallback(() => { + ReportUtils.navigateToDetailsPage(report, Navigation.getReportRHPActiveRoute()); + }, [report]); + const showActorDetails = useCallback(() => { // We should navigate to the details page if the report is a IOU/expense report if (shouldEnableDetailPageNavigation) { - return ReportUtils.navigateToDetailsPage(report); + goToDetailsPage(); + return; } if (ReportUtils.isExpenseReport(report) && report?.ownerAccountID) { @@ -107,7 +112,7 @@ function AvatarWithDisplayName({ // Report detail route is added as fallback but based on the current implementation this route won't be executed Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(report.reportID)); } - }, [report, shouldEnableDetailPageNavigation]); + }, [report, shouldEnableDetailPageNavigation, goToDetailsPage]); const headerView = ( @@ -172,7 +177,7 @@ function AvatarWithDisplayName({ return ( ReportUtils.navigateToDetailsPage(report)} + onPress={goToDetailsPage} style={[styles.flexRow, styles.alignItemsCenter, styles.flex1]} accessibilityLabel={title} role={CONST.ROLE.BUTTON} diff --git a/src/components/Button/validateSubmitShortcut/index.ts b/src/components/Button/validateSubmitShortcut/index.ts index f8cea44f73d6..29ba071c25f2 100644 --- a/src/components/Button/validateSubmitShortcut/index.ts +++ b/src/components/Button/validateSubmitShortcut/index.ts @@ -11,7 +11,7 @@ import type ValidateSubmitShortcut from './types'; const validateSubmitShortcut: ValidateSubmitShortcut = (isDisabled, isLoading, event) => { const eventTarget = event?.target as HTMLElement; - if (isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA') { + if (isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA' || (eventTarget?.contentEditable === 'true' && eventTarget.ariaMultiLine)) { return false; } diff --git a/src/components/EmptyStateComponent/index.tsx b/src/components/EmptyStateComponent/index.tsx index 876f1a745403..8eb991b17b63 100644 --- a/src/components/EmptyStateComponent/index.tsx +++ b/src/components/EmptyStateComponent/index.tsx @@ -22,6 +22,7 @@ function EmptyStateComponent({ buttonAction, containerStyles, title, + titleStyles, subtitle, headerStyles, headerContentStyles, @@ -30,7 +31,7 @@ function EmptyStateComponent({ }: EmptyStateComponentProps) { const styles = useThemeStyles(); const [videoAspectRatio, setVideoAspectRatio] = useState(VIDEO_ASPECT_RATIO); - const {isSmallScreenWidth} = useResponsiveLayout(); + const {shouldUseNarrowLayout} = useResponsiveLayout(); const setAspectRatio = (event: VideoReadyForDisplayEvent | VideoLoadedEventType | undefined) => { if (!event) { @@ -82,7 +83,10 @@ function EmptyStateComponent({ }, [headerMedia, headerMediaType, headerContentStyles, videoAspectRatio, styles.emptyStateVideo, lottieWebViewStyles]); return ( - + {HeaderComponent} - - {title} - {subtitle} + + {title} + {typeof subtitle === 'string' ? {subtitle} : subtitle} {!!buttonText && !!buttonAction && (