Skip to content

Commit

Permalink
Merge branch 'main' into baseTextInputMarkdown
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa321 committed Sep 29, 2024
2 parents 2aa079e + 3047c1b commit e347f35
Show file tree
Hide file tree
Showing 220 changed files with 3,722 additions and 2,054 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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'],
Expand Down
34 changes: 34 additions & 0 deletions .github/scripts/verifyDeploy.sh
Original file line number Diff line number Diff line change
@@ -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
30 changes: 11 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }} \
Expand Down Expand Up @@ -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')"
Expand All @@ -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 }} \
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/deployNewHelp.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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) }}

2 changes: 1 addition & 1 deletion .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sendReassurePerfData.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009004001
versionName "9.0.40-1"
versionCode 1009004102
versionName "9.0.41-2"
// 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"
Expand Down
2 changes: 1 addition & 1 deletion assets/images/table.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.

<ol type="a">
<li>Under the Accounting settings for your workspace, click Import under the QuickBooks Online connection.</li>
<li>Review each of the following import settings:</li>
<ul>
<li><b>Chart of accounts</b>: The chart of accounts are automatically imported from QuickBooks Online as categories. This cannot be amended.</li>
<li><b>Classes</b>: Choose whether to import classes, which will be shown in Expensify as tags for expense-level coding.</li>
<li><b>Customers/projects</b>: Choose whether to import customers/projects, which will be shown in Expensify as tags for expense-level coding.</li>
<li><b>Locations</b>: Choose whether to import locations, which will be shown in Expensify as tags for expense-level coding.</li>
{% include info.html %}
As Locations are only configurable as tags, you cannot export expense reports as vendor bills or checks to QuickBooks Online. To unlock these export options, either disable locations import or upgrade to the Control Plan to export locations encoded as a report field.
{% include end-info.html %}
<li><b>Taxes</b>: Choose whether to import tax rates and defaults.</li>
</ul>
</ol>

# Step 2: Configure export settings

The following steps help you determine how data will be exported from Expensify to QuickBooks Online.

<ol type="a">
<li>Under the Accounting settings for your workspace, click Export under the QuickBooks Online connection.</li>
<li>Review each of the following export settings:</li>
<ul>
<li><b>Preferred Exporter</b>: Choose whether to assign a Workspace Admin as the Preferred Exporter. Once selected, the Preferred Exporter automatically receives reports for export in their account to help automate the exporting process.</li>

{% include info.html %}
* Other Workspace Admins will still be able to export to QuickBooks Online.
* If you set different export accounts for individual company cards under your domain settings, then your Preferred Exporter must be a Domain Admin.
{% include end-info.html %}

<li><b>Date</b>: Choose whether to use the date of last expense, export date, or submitted date.</li>
<li><b>Export Out-of-Pocket Expenses as</b>: Select whether out-of-pocket expenses will be exported as a check, journal entry, or vendor bill.</li>

{% include info.html %}
These settings may vary based on whether tax is enabled for your workspace.
* If tax is not enabled on the workspace, you’ll also select the Accounts Payable/AP.
* If tax is enabled on the workspace, journal entry will not be available as an option. If you select the journal entries option first and later enable tax on the workspace, you will see a red dot and an error message under the “Export Out-of-Pocket Expenses as” options. To resolve this error, you must change your export option to vendor bill or check to successfully code and export expense reports.
{% include end-info.html %}

<li><b>Invoices</b>: Select the QuickBooks Online invoice account that invoices will be exported to.</li>
<li><b>Export as</b>: Select whether company cards export to QuickBooks Online as a credit card (the default), debit card, or vendor bill. Then select the account they will export to.</li>
<li>If you select vendor bill, you’ll also select the accounts payable account that vendor bills will be created from, as well as whether to set a default vendor for credit card transactions upon export. If this option is enabled, you will select the vendor that all credit card transactions will be applied to.</li>
</ul>
</ol>

# Step 3: Configure advanced settings

The following steps help you determine the advanced settings for your connection, like auto-sync and employee invitation settings.

<ol type="a">
<li>Under the Accounting settings for your workspace, click Advanced under the QuickBooks Online connection.</li>
<li>Select an option for each of the following settings:</li>
<ul>
<li><b>Auto-sync</b>: Choose whether to enable QuickBooks Online to automatically communicate changes with Expensify to ensure that the data shared between the two systems is up-to-date. New report approvals/reimbursements will be synced during the next auto-sync period.</li>
<li><b>Invite Employees</b>: Choose whether to enable Expensify to import employee records from QuickBooks Online and invite them to this workspace.</li>
<li><b>Automatically Create Entities</b>: Choose whether to enable Expensify to automatically create vendors and customers in QuickBooks Online if a matching vendor or customer does not exist.</li>
<li><b>Sync Reimbursed Reports</b>: Choose whether to enable report syncing for reimbursed expenses. If enabled, all reports that are marked as Paid in QuickBooks Online will also show in Expensify as Paid. If enabled, you must also select the QuickBooks Online account that reimbursements are coming out of, and Expensify will automatically create the payment in QuickBooks Online.</li>
<li><b>Invoice Collection Account</b>: Select the invoice collection account that you want invoices to appear under once the invoice is marked as paid.</li>
</ul>
</ol>

{% include faq-begin.md %}

## How do I know if a report is successfully exported to QuickBooks Online?

Expand All @@ -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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -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?**
Expand Down
Loading

0 comments on commit e347f35

Please sign in to comment.