Skip to content

Commit

Permalink
Merge branch 'main' of github.com:teneeto/Expensify into fix/41042/ha…
Browse files Browse the repository at this point in the history
…ndle-the-error-with-journal-entry
  • Loading branch information
teneeto committed May 6, 2024
2 parents 38f7484 + 942cad9 commit 54dbdf5
Show file tree
Hide file tree
Showing 134 changed files with 2,731 additions and 845 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001047001
versionName "1.4.70-1"
versionCode 1001047002
versionName "1.4.70-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
Binary file added assets/animations/Plane.lottie
Binary file not shown.
15 changes: 15 additions & 0 deletions assets/images/simple-illustrations/simple-illustration__alert.svg
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.
3 changes: 3 additions & 0 deletions assets/images/suitcase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions assets/images/x-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions desktop/ELECTRON_EVENTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const ELECTRON_EVENTS = {
KEYBOARD_SHORTCUTS_PAGE: 'keyboard-shortcuts-page',
START_UPDATE: 'start-update',
UPDATE_DOWNLOADED: 'update-downloaded',
SILENT_UPDATE: 'silent-update',
} as const;

export default ELECTRON_EVENTS;
1 change: 1 addition & 0 deletions desktop/contextBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const WHITELIST_CHANNELS_RENDERER_TO_MAIN = [
ELECTRON_EVENTS.REQUEST_VISIBILITY,
ELECTRON_EVENTS.START_UPDATE,
ELECTRON_EVENTS.LOCALE_UPDATED,
ELECTRON_EVENTS.SILENT_UPDATE,
] as const;

const WHITELIST_CHANNELS_MAIN_TO_RENDERER = [ELECTRON_EVENTS.KEYBOARD_SHORTCUTS_PAGE, ELECTRON_EVENTS.UPDATE_DOWNLOADED, ELECTRON_EVENTS.FOCUS, ELECTRON_EVENTS.BLUR] as const;
Expand Down
36 changes: 27 additions & 9 deletions desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ process.argv.forEach((arg) => {
// happens correctly.
let hasUpdate = false;
let downloadedVersion: string;
let isSilentUpdating = false;

// Note that we have to subscribe to this separately and cannot use Localize.translateLocal,
// because the only way code can be shared between the main and renderer processes at runtime is via the context bridge
Expand All @@ -127,16 +128,20 @@ const quitAndInstallWithUpdate = () => {
autoUpdater.quitAndInstall();
};

/** Menu Item callback to triggers an update check */
const manuallyCheckForUpdates = (menuItem: MenuItem, browserWindow?: BrowserWindow) => {
// Disable item until the check (and download) is complete
// eslint: menu item flags like enabled or visible can be dynamically toggled by mutating the object
// eslint-disable-next-line no-param-reassign
menuItem.enabled = false;
/** Menu Item callback to trigger an update check */
const manuallyCheckForUpdates = (menuItem?: MenuItem, browserWindow?: BrowserWindow) => {
if (menuItem) {
// Disable item until the check (and download) is complete
// eslint-disable-next-line no-param-reassign -- menu item flags like enabled or visible can be dynamically toggled by mutating the object
menuItem.enabled = false;
}

autoUpdater
.checkForUpdates()
.catch((error) => ({error}))
.catch((error) => {
isSilentUpdating = false;
return {error};
})
.then((result) => {
const downloadPromise = result && 'downloadPromise' in result ? result.downloadPromise : undefined;

Expand All @@ -148,7 +153,7 @@ const manuallyCheckForUpdates = (menuItem: MenuItem, browserWindow?: BrowserWind
dialog.showMessageBox(browserWindow, {
type: 'info',
message: Localize.translate(preferredLocale, 'checkForUpdatesModal.available.title'),
detail: Localize.translate(preferredLocale, 'checkForUpdatesModal.available.message'),
detail: Localize.translate(preferredLocale, 'checkForUpdatesModal.available.message', {isSilentUpdating}),
buttons: [Localize.translate(preferredLocale, 'checkForUpdatesModal.available.soundsGood')],
});
} else if (result && 'error' in result && result.error) {
Expand All @@ -172,6 +177,10 @@ const manuallyCheckForUpdates = (menuItem: MenuItem, browserWindow?: BrowserWind
return downloadPromise;
})
.finally(() => {
isSilentUpdating = false;
if (!menuItem) {
return;
}
// eslint-disable-next-line no-param-reassign
menuItem.enabled = true;
});
Expand Down Expand Up @@ -201,7 +210,7 @@ const electronUpdater = (browserWindow: BrowserWindow): PlatformSpecificUpdater
if (checkForUpdatesMenuItem) {
checkForUpdatesMenuItem.visible = false;
}
if (browserWindow.isVisible()) {
if (browserWindow.isVisible() && !isSilentUpdating) {
browserWindow.webContents.send(ELECTRON_EVENTS.UPDATE_DOWNLOADED, info.version);
} else {
quitAndInstallWithUpdate();
Expand Down Expand Up @@ -604,6 +613,15 @@ const mainWindow = (): Promise<void> => {
}
});

// Automatically check for and install the latest version in the background
ipcMain.on(ELECTRON_EVENTS.SILENT_UPDATE, () => {
if (isSilentUpdating) {
return;
}
isSilentUpdating = true;
manuallyCheckForUpdates(undefined, browserWindow);
});

return browserWindow;
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Bundling the Expensify Card with an annual subscription ensures you pay the lowe

If at least 50% of your approved USD spend in a given month is on your company’s Expensify Cards, you will receive an additional 50% discount on the price per member. This additional 50% discount, when coupled with an annual subscription, brings the price per member to $5 on a Collect plan and $9 on a Control plan.

Additionally, every month, you receive 1% cash back on all Expensify Card purchases, and 2% if the spend across your Expensify Cards is $250k or more (_applies to USD purchases only_). Any cash back from the Expensify Card is first applied to your Expensify bill, further reducing your price per member. Any leftover cash back is deposited directly into your connected bank account.
Additionally, every month, you receive 1% cash back on all Expensify Card purchases, and 2% if the spend across your Expensify Cards is $250k or more (_applies to US purchases only_). Any cash back from the Expensify Card is first applied to your Expensify bill, further reducing your price per member. Any leftover cash back is deposited directly into your connected bank account.
## Savings calculator
To see how much money you can save (and even earn!) by using the Expensify Card, check out our [savings calculator](https://use.expensify.com/price-savings-calculator). Just enter a few details and see how much you’ll save!

Expand All @@ -34,11 +34,9 @@ If less than 50% of your total USD spend is on the Expensify Card, the bill is d

**Example:**
- Annual subscription discount: 50%
- % of Expensify Card spend (USD) across all workspaces: 20%
- % of Expensify Card spend (US purchases only) across all workspaces: 20%
- Expensify Card discount: 20%

In that case, you'd save 70% on the price per member for that month's bill.

Note: USD spend refers to approved USD transactions on the Expensify Card in any given month.

{% include faq-end.md %}
33 changes: 33 additions & 0 deletions docs/articles/expensify-classic/workspaces/Remove-Members.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Remove a Workspace Member
description: How to remove a member from a Workspace in Expensify
---

Removing a member from a workspace prevents them from submitting reports to or accessing the workspace. Please note that it does not delete their account or deactivate their Expensify Card.

## Remove a Workspace Member
Important: Make sure the employee has submitted all reports, and the reports have been approved and reimbursed, and are in the final approval state.
1. Go to Settings > Workspaces > Group > [Workspace Name] > Members > Workspace Members
2. Select the member you'd like to remove and click the **Remove** button at the top of the Members table
3. If this member was an approver, update the approval workflow so that reports are no longer routed to them

![image of members table in a workspace]({{site.url}}/assets/images/ExpensifyHelp_RemovingMembers.png){:width="100%"}

{% include faq-begin.md %}

## Will reports from this member on this workspace still be available?
Yes, as long as the reports have been submitted. You can navigate to the Reports page and enter the member's email in the search field to find them. However, Draft reports will be removed from the workspace, so these will no longer be visible to the Workspace Admin.

## Can members still access their reports on a workspace after they have been removed?
Yes. Any report that has been approved will now show the workspace as “(not shared)” in their account. If it is a Draft Report they will still be able to edit it and add it to a new workspace. If the report is Approved or Reimbursed they will not be able to edit it further.

## Who can remove members from a workspace?
Only Workspace Admins. It is not possible for a member to add or remove themselves from a workspace. It is not possible for a Domain Admin who is not also a Workspace Admin to remove a member from a workspace.

## How do I remove a member from a workspace if I am seeing an error message?
If a member is a **preferred exporter, billing owner, report approver** or has **processing reports**, to remove them from the workspace you will first need to:

* **Preferred Exporter**: Go to Settings > Workspaces > Group > [Workspace Name] > Connections > Configure and select a different Workspace Admin in the dropdown for **Preferred Exporter**.
* **Billing Owner**: Take over billing on the Settings > Workspaces > Group > [Workspace Name] > Overview page.
* **Processing reports**: Approve or reject the member’s reports on your Reports page.
* **Approval Workflow**: Remove them as a workflow approver on your Settings > Workspaces > Group > [Workspace Name] > Members > Approval Mode > page by changing the "**Submit reports to**" field.
1 change: 1 addition & 0 deletions docs/redirects.csv
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,4 @@ https://help.expensify.com/articles/new-expensify/expenses/Referral-Program,http
https://help.expensify.com/articles/expensify-classic/reports/Report-Audit-Log-and-Comments,https://help.expensify.com/articles/expensify-classic/reports/Print-or-download-a-report
https://help.expensify.com/articles/expensify-classic/reports/The-Reports-Page,https://help.expensify.com/articles/expensify-classic/reports/Report-statuses
https://help.expensify.com/articles/new-expensify/getting-started/Free-plan-upgrade-to-collect-plan,https://help.expensify.com/articles/new-expensify/getting-started/Upgrade-to-a-Collect-Plan
https://help.expensify.com/articles/new-expensify/bank-accounts-and-payments/Connect-a-Bank-Account,https://help.expensify.com/new-expensify/hubs/expenses/Connect-a-Bank-Account
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.70.1</string>
<string>1.4.70.2</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.70.1</string>
<string>1.4.70.2</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>1.4.70</string>
<key>CFBundleVersion</key>
<string>1.4.70.1</string>
<string>1.4.70.2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.4.70-1",
"version": "1.4.70-2",
"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.",
Expand Down Expand Up @@ -152,7 +152,7 @@
"react-native-linear-gradient": "^2.8.1",
"react-native-localize": "^2.2.6",
"react-native-modal": "^13.0.0",
"react-native-onyx": "2.0.35",
"react-native-onyx": "2.0.32",
"react-native-pager-view": "6.2.3",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt
index dbd6d0b..1d043f2 100644
index 0d876a7..cceed39 100644
--- a/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt
+++ b/node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt
@@ -188,7 +188,7 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
Expand Down
Loading

0 comments on commit 54dbdf5

Please sign in to comment.