Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/rezkiy37/Expensify into fea…
Browse files Browse the repository at this point in the history
…ture/45177-invoice-back-accounts-section
  • Loading branch information
rezkiy37 committed Sep 26, 2024
2 parents 46f5e1b + bc106fa commit 03b76f2
Show file tree
Hide file tree
Showing 48 changed files with 349 additions and 377 deletions.
5 changes: 5 additions & 0 deletions __mocks__/react-native-haptic-feedback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type HapticFeedback from 'react-native-haptic-feedback';

const RNHapticFeedback: typeof HapticFeedback = {trigger: jest.fn()};

export default RNHapticFeedback;
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 1009004000
versionName "9.0.40-0"
versionCode 1009004001
versionName "9.0.40-1"
// 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: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ MYAPP_UPLOAD_KEY_ALIAS=ReactNativeChat-Key-Alias
disableFrameProcessors=true

android.nonTransitiveRClass=false

org.gradle.parallel=true
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.0</string>
<string>9.0.40.1</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.0</string>
<string>9.0.40.1</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.0</string>
<string>9.0.40.1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,7 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNReactNativeHapticFeedback (2.3.1):
- RNReactNativeHapticFeedback (2.3.3):
- DoubleConversion
- glog
- hermes-engine
Expand Down Expand Up @@ -3233,7 +3233,7 @@ SPEC CHECKSUMS:
RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81
rnmapbox-maps: 460d6ff97ae49c7d5708c3212c6521697c36a0c4
RNPermissions: 0b1429b55af59d1d08b75a8be2459f65a8ac3f28
RNReactNativeHapticFeedback: 31833c3ef341d716dbbd9d64e940f0c230db46f6
RNReactNativeHapticFeedback: 73756a3477a5a622fa16862a3ab0d0fc5e5edff5
RNReanimated: 76901886830e1032f16bbf820153f7dc3f02d51d
RNScreens: de6e57426ba0e6cbc3fb5b4f496e7f08cb2773c2
RNShare: bd4fe9b95d1ee89a200778cc0753ebe650154bb0
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-0",
"version": "9.0.40-1",
"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 @@ -142,7 +142,7 @@
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "2.18.0",
"react-native-google-places-autocomplete": "2.5.6",
"react-native-haptic-feedback": "^2.3.1",
"react-native-haptic-feedback": "^2.3.3",
"react-native-image-picker": "^7.0.3",
"react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#cb392140db4953a283590d7cf93b4d0461baa2a9",
"react-native-key-command": "^1.0.8",
Expand Down
56 changes: 0 additions & 56 deletions patches/react-native-haptic-feedback+2.3.1.patch

This file was deleted.

3 changes: 2 additions & 1 deletion src/ROUTES.ts
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion src/components/AccountSwitcherSkeletonView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function AccountSwitcherSkeletonView({shouldAnimate = true, avatarSize = CONST.A
const StyleUtils = useStyleUtils();
const avatarPlaceholderSize = StyleUtils.getAvatarSize(avatarSize);
const avatarPlaceholderRadius = avatarPlaceholderSize / 2;
const startPositionX = 30;
const startPositionX = avatarPlaceholderRadius;

return (
<View style={styles.avatarSectionWrapperSkeleton}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/validateSubmitShortcut/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type ValidateSubmitShortcut from './types';

const validateSubmitShortcut: ValidateSubmitShortcut = (isDisabled, isLoading, event) => {
const eventTarget = event?.target as HTMLElement;
if (isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA') {
if (isDisabled || isLoading || eventTarget.nodeName === 'TEXTAREA' || (eventTarget?.contentEditable === 'true' && eventTarget.ariaMultiLine)) {
return false;
}

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
5 changes: 5 additions & 0 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ type MenuItemBaseProps = {

/** Should selected item be marked with checkmark */
shouldShowSelectedItemCheck?: boolean;

/** Handles what to do when hiding the tooltip */
onHideTooltip?: () => void;
};

type MenuItemProps = (IconProps | AvatarProps | NoIcon) & MenuItemBaseProps;
Expand Down Expand Up @@ -428,6 +431,7 @@ function MenuItem(
tooltipShiftVertical = 0,
renderTooltipContent,
shouldShowSelectedItemCheck = false,
onHideTooltip,
}: MenuItemProps,
ref: PressableRef,
) {
Expand Down Expand Up @@ -559,6 +563,7 @@ function MenuItem(
shiftHorizontal={tooltipShiftHorizontal}
shiftVertical={tooltipShiftVertical}
shouldAutoDismiss
onHideTooltip={onHideTooltip}
>
<View>
<Hoverable>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Tooltip/BaseGenericTooltip/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function BaseGenericTooltip({
},
wrapperStyle = {},
shouldUseOverlay = false,
onPressOverlay = () => {},
onHideTooltip = () => {},
}: BaseGenericTooltipProps) {
// The width of tooltip's inner content. Has to be undefined in the beginning
// as a width of 0 will cause the content to be rendered of a width of 0,
Expand Down Expand Up @@ -102,7 +102,7 @@ function BaseGenericTooltip({

return (
<Portal hostName={!shouldUseOverlay ? 'modal' : undefined}>
{shouldUseOverlay && <TransparentOverlay onPress={onPressOverlay} />}
{shouldUseOverlay && <TransparentOverlay onPress={onHideTooltip} />}
<Animated.View
ref={rootWrapper}
style={[rootWrapperStyle, animationStyle]}
Expand Down
Loading

0 comments on commit 03b76f2

Please sign in to comment.