Skip to content

Commit

Permalink
Merge branch 'main' into fix/44379
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Oct 22, 2024
2 parents e8d7392 + 04214cd commit 0c14b7e
Show file tree
Hide file tree
Showing 285 changed files with 7,387 additions and 4,185 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ docs/assets/**
web/gtm.js
**/.expo/**
src/libs/SearchParser/searchParser.js
src/libs/SearchParser/autocompleteParser.js
help/_scripts/**
36 changes: 3 additions & 33 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,9 @@ on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, synchronize]
types: [opened, closed, synchronize]

jobs:
CLA:
runs-on: ubuntu-latest
# This job only runs for pull request comments or pull request target events (not issue comments)
# It does not run for pull requests created by OSBotify
if: ${{ github.event.issue.pull_request || (github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'OSBotify' && github.event.pull_request.user.login != 'imgbot[bot]') }}
steps:
- name: CLA comment check
uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: sign
with:
text: ${{ github.event.comment.body }}
regex: '\s*I have read the CLA Document and I hereby sign the CLA\s*'
- name: CLA comment re-check
uses: actions-ecosystem/action-regex-match@9c35fe9ac1840239939c59e5db8839422eed8a73
id: recheck
with:
text: ${{ github.event.comment.body }}
regex: '\s*recheck\s*'
- name: CLA Assistant
if: ${{ steps.recheck.outputs.match != '' || steps.sign.outputs.match != '' || github.event_name == 'pull_request_target' }}
# Version: 2.1.2-beta
uses: cla-assistant/github-action@948230deb0d44dd38957592f08c6bd934d96d0cf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_BOTIFY_TOKEN }}
with:
path-to-signatures: '${{ github.repository }}/cla.json'
path-to-document: 'https://github.com/${{ github.repository }}/blob/main/contributingGuides/CLA.md'
branch: 'main'
remote-organization-name: 'Expensify'
remote-repository-name: 'CLA'
lock-pullrequest-aftermerge: false
allowlist: OSBotify,snyk-bot
uses: Expensify/GitHub-Actions/.github/workflows/cla.yml@main
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/deployNewHelp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.15.1'
node-version: '20.18.0'

# Wil install the _help/package.js
- name: Install Node.js Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.18.0
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ lib/**

# Automatically generated files
src/libs/SearchParser/searchParser.js
src/libs/SearchParser/autocompleteParser.js
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 1009005007
versionName "9.0.50-7"
versionCode 1009005200
versionName "9.0.52-0"
// 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
263 changes: 263 additions & 0 deletions assets/images/companyCards/pending-bank.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions assets/images/gallery-not-found.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions config/webpack/webpack.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ const getCommonConfiguration = ({file = '.env', platform = 'web'}: Environment):
'react-native-config': 'react-web-config',
// eslint-disable-next-line @typescript-eslint/naming-convention
'react-native$': 'react-native-web',
// eslint-disable-next-line @typescript-eslint/naming-convention
'react-native-sound': 'react-native-web-sound',
// Module alias for web & desktop
// https://webpack.js.org/configuration/resolve/#resolvealias
// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down
4 changes: 2 additions & 2 deletions contributingGuides/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ This project and everyone participating in it is governed by the Expensify [Code
At this time, we are not hiring contractors in Crimea, North Korea, Russia, Iran, Cuba, or Syria.

## Slack channels
All contributors should be a member of a shared Slack channel called [#expensify-open-source](https://expensify.slack.com/archives/C01GTK53T8Q) -- this channel is used to ask **general questions**, facilitate **discussions**, and make **feature requests**.
We have a shared Slack channel called #expensify-open-source this channel is used to ask general questions, facilitate discussions, and make feature requests.

Before requesting an invite to Slack, please ensure your Upwork account is active, since we only pay via Upwork (see [below](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#payment-for-contributions)). To request an invite to Slack, email contributors@expensify.com with the subject `Slack Channel Invites`. We'll send you an invite!
That said, we have a small issue with adding users at the moment and we’re working with Slack to try and get this resolved. If you would like to join, [fill out this form](https://forms.gle/Q7hnhUJPnQCK7Fe56) with your email and Upwork profile link. Once resolved, we’ll add you.

Note: Do not send direct messages to the Expensify team in Slack or Expensify Chat, they will not be able to respond.

Expand Down
2 changes: 1 addition & 1 deletion contributingGuides/OFFLINE_UX.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ When the user is offline:
- In the event that `successData` and `failureData` are the same, you can use a single object `finallyData` in place of both.

**Handling errors:**
- The [OfflineWithFeedback component](https://github.com/Expensify/App/blob/main/src/components/OfflineWithFeedback.js) already handles showing errors too, as long as you pass the error field in the [errors prop](https://github.com/Expensify/App/blob/128ea378f2e1418140325c02f0b894ee60a8e53f/src/components/OfflineWithFeedback.js#L29-L31)
- The [OfflineWithFeedback component](https://github.com/Expensify/App/blob/main/src/components/OfflineWithFeedback.tsx) already handles showing errors too, as long as you pass the error field in the [errors prop](https://github.com/Expensify/App/blob/128ea378f2e1418140325c02f0b894ee60a8e53f/src/components/OfflineWithFeedback.js#L29-L31)
- The behavior for when something fails is:
- If you were adding new data, the failed to add data is displayed greyed out and with the button to dismiss the error
- If you were deleting data, the failed data is displayed regularly with the button to dismiss the error
Expand Down
25 changes: 25 additions & 0 deletions contributingGuides/STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- [Refs](#refs)
- [Other Expensify Resources on TypeScript](#other-expensify-resources-on-typescript)
- [Default value for inexistent IDs](#default-value-for-inexistent-IDs)
- [Extract complex types](#extract-complex-types)
- [Naming Conventions](#naming-conventions)
- [Type names](#type-names)
- [Prop callbacks](#prop-callbacks)
Expand Down Expand Up @@ -492,6 +493,30 @@ const foo = report?.reportID ?? '-1';
report ? report.reportID : '-1';
```

### Extract complex types

Advanced data types, such as objects within function parameters, should be separated into their own type definitions. Callbacks in function parameters should be extracted if there's a possibility they could be reused somewhere else.

```ts
// BAD
function foo(param1: string, param2: {id: string}) {...};

// BAD
function foo(param1: string, param2: (value: string) => void) {...};

// GOOD
type Data = {
id: string;
};

function foo(param1: string, param2: Data) {...};

// GOOD
type Callback = (value: string) => void

function foo(param1: string, param2: Callback) {...};
```

## Naming Conventions

### Type names
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
title: Travel Receipt Integrations
description: How to use pre-built or custom integrations to track travel expenses
---

Expensify’s receipt integrations allow a merchant to upload receipts directly to a user’s Expensify account. A merchant just has to email a receipt to an Expensify user and Cc receipts@expensify.com. This automatically creates a transaction in the Expensify account for the user whose email address is in the To field.

You can set up a receipt integration by using one of our existing pre-built integrations, or by building your own receipt integration.

## Use a pre-built travel integration

You can use our pre-built integrations to automatically import travel receipts from Bolt Work, Spot Hero, Grab, and Kayak for Business.

### Bolt Work

1. In the Bolt app, tap the menu icon in the top left and tap **Work trips**.
2. Tap **Create profile**.
3. Enter the email address that you use for Expensify, then tap **Next**.
4. Enter your company details, then tap **Next**.
5. Choose a payment method. If you don’t want to use the existing payment methods, you can create a new one by tapping **Add Payment Method**. Then tap **Next**.
6. Tap **Done**.
7. Tap Add expense provider, then tap **Expensify**.
8. Tap **Verify**.
9. Tap the menu icon on the top left and tap **Work trips** once more.
10. Tap **Add expense provider** and select **Expensify** again.

When booking a trip with Bolt Work, select your work trip profile as the payment method before booking. Then the receipt details will be automatically sent to Expensify.

### SpotHero

1. In the SpotHero app, tap the menu icon in the top left and tap **Account Settings**.
2. Tap **Set up Business Profile**.
3. Tap **Create Business Profile**.
4. Enter the email address you use for Expensify and tap **Next**.
5. Tap **Add a Payment Method** and enter your payment account details. Then tap **Next**.
6. Tap **Expensify**.

When reserving parking with SpotHero, select your business profile in the Payment Details section. Then the receipt will be automatically sent to Expensify. In your SpotHero Business Profile settings, you can also set a weekly or monthly cadence for SpotHero to send a batch of expenses to Expensify.

### Grab

1. In the Grab app, tap your profile picture in the top left.
2. Tap your user icon again at the top of the settings menu.
3. Tap **Add a business profile**.
4. Tap Next twice, then tap **Let’s Get Started**.
5. Enter the email address you use for Expensify and tap the next arrow in the bottom right.
6. Check your email and copy the verification code you receive from Grab.
7. Tap **Manage My Business Profile**.
8. Under Preferences, tap **Expense Solution**.
9. Tap **Expensify**, then tap **Save**.

When booking a trip with Grab, tap **personal** and select **business** to ensure your business profile is selected. Then the receipt will be automatically sent to Expensify.

### KAYAK for Business

**Admin Setup**

This process must be completed by a KAYAK for Business admin.

1. On your KAYAK for Business homepage, click **Company Settings**.
2. Click **Connect to Expensify**.

KAYAK for Business will now forward bookings made by each employee into Expensify.

**Traveler Setup**

1. On your KAYAK for Business homepage, click **Profile Account Settings**.
2. Enable the Expensify toggle to have your expenses automatically sent to Expensify. You also have the option to send them manually.

## Build your own receipt integration

1. Email receiptintegration@expensify.com and include:
- **Subject**: Use “Receipt Integration Request" as the subject line
- **Body**: List all email addresses the merchant sends email receipts from
2. Once you receive your email confirmation (within approximately 2 weeks) that the email addresses have been whitelisted, you’ll then be able to Cc receipts@expensify.com on receipt emails to users, and transactions will be created in the users’ Expensify account.
3. Test the integration by sending a receipt email to the email address you used to create your Expensify account and Cc receipts@expensify.com. Wait for the receipt to be SmartScanned. Then you will see the merchant, date, and amount added to the transaction.

### Using the integration

When sending an emailed receipt:

- Attachments on an email (that are not an .ics file) will be SmartScanned. We recommend including the receipt as the only attachment.
- You can only include one email address in the To field. In the Cc field, include only receipts@expensify.com.
- Reservations for hotels and car rentals cannot be sent to Expensify as an expense because they are paid at the end of usage. You can only send transaction data for purchases that have already been made.
- Use standardized three-letter currency codes (ISO 4217) where applicable.

{% include faq-begin.md %}

**In Trainline, what if I don’t have the option for Send to Expensify?**

This can happen if the native iOS Mail app is not installed on an Apple device. However, you can still use the native iOS Share to Expensify function for Trainline receipts.

**Why does it take 2 weeks to set up a custom integration?**

Receipt integrations require our engineers to manually set them up on the backend. For that reason, it can take up to 2 weeks to set it up.

**Is there a way to connect via API?**

No, at this time there are no API receipt integrations. All receipt integrations are managed via receipt emails.

**What is your Open API?**

Our Open API is a self-serve tool meant to pull information out of Expensify. Typically, this tool is used to build integrations with accounting solutions that we don’t directly integrate with. If you wish to push data into Expensify, the only way to integrate is via the receipt integration options listed above in this article.

**Are you able to split one email into separate receipts?**

The receipt integration is unable to automatically split one email into separate receipts. However, once the receipt is SmartScanned, users can [split the expense](https://help.expensify.com/articles/expensify-classic/expenses/Split-an-expense) in their Expensify account.

**Can we set up a (co-marketing) partnership?**

We currently do not offer any co-marketing partnerships.

**Can we announce or advertise our custom integration with Expensify?**

Absolutely! You can promote the integration across your social media channels (tag @expensify and use the #expensify hashtag) and you can even create your own dedicated landing page on your website for your integration. At a minimum, we recommend including a brief overview of how the integration works, the benefits of using it, an integration setup guide, and guidance for how someone can contact you for support or integration setup if necessary.

**How can I get help?**

You can contact Concierge for ongoing support any time by clicking the green chat icon in the mobile or web app, or by emailing concierge@expensify.com. Concierge is a global team of highly trained product specialists focused on making our product as easy to use as possible and answering all your questions.

{% include faq-end.md %}
Loading

0 comments on commit 0c14b7e

Please sign in to comment.