-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:Expensify/App into fix/excesive-sug…
…gestion-updates-maimum-update-depth-exceeded
- Loading branch information
Showing
109 changed files
with
1,610 additions
and
699 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
docs/articles/new-expensify/expensify-card/Manage-Expensify-Cards.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Manage Expensify Cards | ||
description: How to manage the Expensify Card | ||
--- | ||
<div id="new-expensify" markdown="1"> | ||
|
||
Once your Expensify Cards have been issued, you can monitor them and check your card’s current balance, remaining limit, and earned cash back. | ||
|
||
1. Click your profile image or icon in the bottom left menu. | ||
2. Scroll down and click **Workspaces** in the left menu. | ||
3. Select the workspace that contains the desired Expensify Cards. | ||
4. Click **Expensify Card** in the left menu. Here, you’ll see a list of all of the issued cards. | ||
5. To view a card’s details or adjust the card limit, limit type, name, or deactivate it, click the card row. | ||
6. To adjust the settlement account that resolves the card’s expenses or to change the settlement frequency, click **Settings** in the top right. | ||
|
||
![Click Expensify Card in the left menu to see a list of cards]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_05.png){:width="100%"} | ||
|
||
![Click the card row to view the card details and make settings adjustments]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_06.png){:width="100%"} | ||
|
||
![Click Settings to adjust the settlement account or frequency]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_07.png){:width="100%"} | ||
|
||
</div> |
74 changes: 74 additions & 0 deletions
74
docs/articles/new-expensify/expensify-card/Set-up-the-Expensify-Card.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
title: Set up the Expensify Card | ||
description: How to set up the Expensify Card on your workspace | ||
--- | ||
<div id="new-expensify" markdown="1"> | ||
|
||
{% include info.html %} | ||
You must be a Workspace Admin to complete this process. | ||
{% include end-info.html %} | ||
|
||
The Expensify Visa® Commercial Card is available on all USD workspaces. It provides tools to manage employee spending, including: | ||
|
||
- Unlimited virtual cards | ||
- Controlled spending amounts on virtual cards to manage subscriptions | ||
- Tighter controls for managing spend across employees and merchants | ||
- Fixed or monthly spend limits for each card | ||
- Unique naming for each virtual card for simplified expense categorization | ||
|
||
To enable and issue Expensify Cards for your workspace, complete the steps below. | ||
|
||
# Step 1: Enable Expensify Cards | ||
|
||
1. Click your profile image or icon in the bottom left menu. | ||
2. Scroll down and click **Workspaces** in the left menu. | ||
3. Select the workspace you want to enable Expensify Cards for. | ||
4. Click **More features** in the left menu. | ||
5. Under the **Spend** section, enable the Expensify Card toggle. | ||
|
||
![Click the toggle next to Expensify Card]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_01.png){:width="100%"} | ||
|
||
# Step 2: Select a bank account | ||
|
||
Before you can issue your Expensify Cards, you must connect your cards with the bank account that will be used to pay balances on the cards. | ||
|
||
1. Click **Expensify Card** in the left menu. | ||
2. Click **Issue new card**. | ||
3. Select an existing bank account from the list, or follow the steps to add a new one. | ||
|
||
![Click the issue card button]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_02.png){:width="100%"} | ||
|
||
# Step 3: Issue cards | ||
|
||
You can issue an unlimited amount of physical and/or virtual cards to employees. | ||
|
||
1. Click **Issue card** in the top right. | ||
2. Select the employee that you want to issue the card to. | ||
3. Select whether you want to issue a physical or virtual card. | ||
4. Pick a smart, monthly, or fixed limit: | ||
- Smart limits allow spending up to a certain amount before requiring approval. | ||
- Monthly limits allow spending up to a certain amount per month. | ||
- Fixed limits allow spending up to a certain amount before the card is terminated. | ||
5. Enter the limit amount. | ||
6. Add a card name. | ||
7. Click **Issue card** to confirm and issue the card. | ||
|
||
![Click the issue card button in the top right]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_03.png){:width="100%"} | ||
|
||
![Click issue card to confirm and issue the card]({{site.url}}/assets/images/ExpensifyHelp-WorkspaceFeeds_04.png){:width="100%"} | ||
|
||
{% include faq-begin.md %} | ||
**Do you need a specific type of bank account to use the Expensify Card?** | ||
|
||
At this time, the Expensify Card requires a US business bank account opened in the name of a business incorporated in the US. | ||
|
||
**Can I use the Expensify Card across multiple workspaces?** | ||
|
||
You can use the Expensify Card on every workspace you create. However, a settlement account can only be used with the Expensify Card on one workspace. For example, if you’re using the Expensify Card on three workspaces, you need three settlement accounts. | ||
|
||
**Can I issue multiple cards to the same employee?** | ||
|
||
You can issue an unlimited number of both physical and virtual cards to employees. This supports a wide variety of different use cases, ranging from each employee only having one card, to employees having numerous cards for things like individual trips, specific purchases, etc. | ||
{% include faq-end.md %} | ||
|
||
</div> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
diff --git a/node_modules/expo-image-manipulator/build/ExpoImageManipulator.web.js b/node_modules/expo-image-manipulator/build/ExpoImageManipulator.web.js | ||
index 5b77ad6..a3ecdb0 100644 | ||
--- a/node_modules/expo-image-manipulator/build/ExpoImageManipulator.web.js | ||
+++ b/node_modules/expo-image-manipulator/build/ExpoImageManipulator.web.js | ||
@@ -1,5 +1,13 @@ | ||
import { crop, extent, flip, resize, rotate } from './actions/index.web'; | ||
import { getContext } from './utils/getContext.web'; | ||
+ | ||
+const SAFARI_MOBILE_CANVAS_LIMIT = 4096; | ||
+ | ||
+const isMobileIOS = () => { | ||
+ const userAgent = navigator.userAgent; | ||
+ return /iP(ad|od|hone)/i.test(userAgent) && /(WebKit|CriOS|FxiOS|OPiOS|mercury)/i.test(userAgent); | ||
+}; | ||
+ | ||
function getResults(canvas, options) { | ||
let uri; | ||
if (options) { | ||
@@ -21,16 +29,49 @@ function getResults(canvas, options) { | ||
base64: uri.replace(/^data:image\/\w+;base64,/, ''), | ||
}; | ||
} | ||
+ | ||
+function getAdjustedCanvasSize(originalWidth, originalHeight) { | ||
+ if(!isMobileIOS()) return { width: originalWidth, height: originalHeight }; | ||
+ | ||
+ const aspectRatio = originalWidth / originalHeight; | ||
+ let newWidth; | ||
+ let newHeight; | ||
+ | ||
+ if (originalWidth <= SAFARI_MOBILE_CANVAS_LIMIT && originalHeight <= SAFARI_MOBILE_CANVAS_LIMIT) { | ||
+ return { width: originalWidth, height: originalHeight }; | ||
+ } | ||
+ | ||
+ if (aspectRatio > 1) { | ||
+ newWidth = SAFARI_MOBILE_CANVAS_LIMIT; | ||
+ newHeight = Math.round(newWidth / aspectRatio); | ||
+ } else { | ||
+ newHeight = SAFARI_MOBILE_CANVAS_LIMIT; | ||
+ newWidth = Math.round(newHeight * aspectRatio); | ||
+ } | ||
+ | ||
+ if (newWidth > SAFARI_MOBILE_CANVAS_LIMIT) { | ||
+ newWidth = SAFARI_MOBILE_CANVAS_LIMIT; | ||
+ newHeight = Math.round(newWidth / aspectRatio); | ||
+ } else if (newHeight > SAFARI_MOBILE_CANVAS_LIMIT) { | ||
+ newHeight = SAFARI_MOBILE_CANVAS_LIMIT; | ||
+ newWidth = Math.round(newHeight * aspectRatio); | ||
+ } | ||
+ | ||
+ return { width: newWidth, height: newHeight }; | ||
+} | ||
+ | ||
function loadImageAsync(uri) { | ||
return new Promise((resolve, reject) => { | ||
const imageSource = new Image(); | ||
imageSource.crossOrigin = 'anonymous'; | ||
const canvas = document.createElement('canvas'); | ||
imageSource.onload = () => { | ||
- canvas.width = imageSource.naturalWidth; | ||
- canvas.height = imageSource.naturalHeight; | ||
+ const adjudstedCanvasSize = getAdjustedCanvasSize(imageSource.naturalWidth, imageSource.naturalHeight); | ||
+ | ||
+ canvas.width = adjudstedCanvasSize.width; | ||
+ canvas.height = adjudstedCanvasSize.height; | ||
const context = getContext(canvas); | ||
- context.drawImage(imageSource, 0, 0, imageSource.naturalWidth, imageSource.naturalHeight); | ||
+ context.drawImage(imageSource, 0, 0, adjudstedCanvasSize.width, adjudstedCanvasSize.height); | ||
resolve(canvas); | ||
}; | ||
imageSource.onerror = () => reject(canvas); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.