Skip to content

Commit

Permalink
Merge branch 'main' into fix-modal-shortcut-key-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Sep 26, 2024
2 parents 8477665 + 965bcf9 commit c9abc7a
Show file tree
Hide file tree
Showing 126 changed files with 2,220 additions and 1,190 deletions.
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 1009004003
versionName "9.0.40-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"
Expand Down
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
73 changes: 73 additions & 0 deletions docs/articles/new-expensify/workspaces/Add-approvals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Add approvals
description: Add approvals to your workspace to require additional approval before authorizing payments.
---
<div id="new-expensify" markdown="1">

# 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

50 changes: 50 additions & 0 deletions docs/articles/new-expensify/workspaces/Set-distance-rates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Set Distance Rates
description: Set distance rates on your Expensify workspace
---
<div id="new-expensify" markdown="1">

# 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.
Binary file modified ios/NewApp_AdHoc.mobileprovision.gpg
Binary file not shown.
Binary file modified ios/NewApp_AdHoc_Notification_Service.mobileprovision.gpg
Binary file not shown.
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>9.0.40.1</string>
<string>9.0.40.3</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>9.0.40.1</string>
<string>9.0.40.3</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>9.0.40</string>
<key>CFBundleVersion</key>
<string>9.0.40.1</string>
<string>9.0.40.3</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": "9.0.40-1",
"version": "9.0.40-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.",
Expand Down Expand Up @@ -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.88",
"expo": "51.0.31",
"expo-av": "14.0.7",
"expo-image": "1.12.15",
Expand Down
5 changes: 4 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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',
Expand Down
15 changes: 10 additions & 5 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -287,7 +287,8 @@ const ROUTES = {
},
EDIT_REPORT_FIELD_REQUEST: {
route: 'r/:reportID/edit/policyField/:policyID/:fieldID',
getRoute: (reportID: string, policyID: string, fieldID: string, backTo?: string) => getUrlWithBackToParam(`r/${reportID}/edit/policyField/${policyID}/${fieldID}` as const, backTo),
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',
Expand Down Expand Up @@ -382,9 +383,13 @@ const ROUTES = {
},
},
MONEY_REQUEST_HOLD_REASON: {
route: ':type/edit/reason/:transactionID?',
getRoute: (type: ValueOf<typeof CONST.POLICY.TYPE>, 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<typeof CONST.POLICY.TYPE>, 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',
Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions src/components/AccountingConnectionConfirmationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ function AccountingConnectionConfirmationModal({integrationToConnect, onCancel,

return (
<ConfirmModal
title={translate('workspace.accounting.connectTitle', integrationToConnect)}
title={translate('workspace.accounting.connectTitle', {connectionName: integrationToConnect})}
isVisible
onConfirm={onConfirm}
onCancel={onCancel}
prompt={translate('workspace.accounting.connectPrompt', integrationToConnect)}
prompt={translate('workspace.accounting.connectPrompt', {connectionName: integrationToConnect})}
confirmText={translate('workspace.accounting.setup')}
cancelText={translate('common.cancel')}
success
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddressForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function AddressForm({
if (countrySpecificZipRegex) {
if (!countrySpecificZipRegex.test(values.zipPostCode?.trim().toUpperCase())) {
if (ValidationUtils.isRequiredFulfilled(values.zipPostCode?.trim())) {
errors.zipPostCode = translate('privatePersonalDetails.error.incorrectZipFormat', countryZipFormat);
errors.zipPostCode = translate('privatePersonalDetails.error.incorrectZipFormat', {zipFormat: countryZipFormat});
} else {
errors.zipPostCode = translate('common.error.fieldRequired');
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderWithBackButton/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {StyleProp, ViewStyle} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import type {PopoverMenuItem} from '@components/PopoverMenu';
import type {Action} from '@hooks/useSingleExecution';
import type {StepCounterParams} from '@src/languages/types';
import type {StepCounterParams} from '@src/languages/params';
import type {AnchorPosition} from '@src/styles';
import type {Policy, Report} from '@src/types/onyx';
import type {Icon} from '@src/types/onyx/OnyxCommon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ImportColumn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function ImportColumn({column, columnName, columnRoles, columnIndex}: ImportColu
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps -- we don't want this effect to run again
}, []);

const columnHeader = containsHeader ? column[0] : translate('spreadsheet.column', columnName);
const columnHeader = containsHeader ? column[0] : translate('spreadsheet.column', {name: columnName});

return (
<View style={[styles.importColumnCard, styles.mt4]}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/LHNOptionsList/OptionRowLHN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti
shiftHorizontal={variables.gbrTooltipShiftHorizontal}
shiftVertical={variables.composerTooltipShiftVertical}
wrapperStyle={styles.quickActionTooltipWrapper}
onPressOverlay={() => User.dismissGBRTooltip()}
onHideTooltip={() => User.dismissGBRTooltip()}
>
<View>
<Hoverable>
Expand Down
Loading

0 comments on commit c9abc7a

Please sign in to comment.