Skip to content

Commit

Permalink
Merge branch 'main' into fix/49086-task-title-overflown
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Sep 26, 2024
2 parents 92e5979 + b655040 commit c3a7357
Show file tree
Hide file tree
Showing 58 changed files with 734 additions and 578 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.
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.

4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,10 @@ const ROUTES = {
getRoute: (action: IOUAction, iouType: IOUType, orderWeight: number, transactionID: string, reportID: string, backTo = '', reportActionID?: string) =>
getUrlWithBackToParam(`${action as string}/${iouType as string}/tag/${orderWeight}/${transactionID}/${reportID}${reportActionID ? `/${reportActionID}` : ''}`, backTo),
},
SETTINGS_TAGS_ROOT: {
route: 'settings/:policyID/tags',
getRoute: (policyID: string, backTo = '') => getUrlWithBackToParam(`settings/${policyID}/tags`, backTo),
},
MONEY_REQUEST_STEP_WAYPOINT: {
route: ':action/:iouType/waypoint/:transactionID/:reportID/:pageIndex',
getRoute: (action: IOUAction, iouType: IOUType, transactionID: string, reportID?: string, pageIndex = '', backTo = '') =>
Expand Down
2 changes: 2 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ const SCREENS = {
SETTINGS_CATEGORIES_ROOT: 'Settings_Categories',
},

SETTINGS_TAGS_ROOT: 'Settings_Tags',

REPORT_SETTINGS: {
ROOT: 'Report_Settings_Root',
NAME: 'Report_Settings_Name',
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
14 changes: 9 additions & 5 deletions src/components/EmptyStateComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function EmptyStateComponent({
buttonAction,
containerStyles,
title,
titleStyles,
subtitle,
headerStyles,
headerContentStyles,
Expand All @@ -30,7 +31,7 @@ function EmptyStateComponent({
}: EmptyStateComponentProps) {
const styles = useThemeStyles();
const [videoAspectRatio, setVideoAspectRatio] = useState(VIDEO_ASPECT_RATIO);
const {isSmallScreenWidth} = useResponsiveLayout();
const {shouldUseNarrowLayout} = useResponsiveLayout();

const setAspectRatio = (event: VideoReadyForDisplayEvent | VideoLoadedEventType | undefined) => {
if (!event) {
Expand Down Expand Up @@ -82,7 +83,10 @@ function EmptyStateComponent({
}, [headerMedia, headerMediaType, headerContentStyles, videoAspectRatio, styles.emptyStateVideo, lottieWebViewStyles]);

return (
<ScrollView contentContainerStyle={[styles.emptyStateScrollView, {minHeight: minModalHeight}, containerStyles]}>
<ScrollView
contentContainerStyle={[{minHeight: minModalHeight}, styles.flexGrow1, styles.flexShrink0, containerStyles]}
style={styles.flex1}
>
<View style={styles.skeletonBackground}>
<SkeletonComponent
gradientOpacityEnabled
Expand All @@ -92,9 +96,9 @@ function EmptyStateComponent({
<View style={styles.emptyStateForeground}>
<View style={styles.emptyStateContent}>
<View style={[styles.emptyStateHeader(headerMediaType === CONST.EMPTY_STATE_MEDIA.ILLUSTRATION), headerStyles]}>{HeaderComponent}</View>
<View style={isSmallScreenWidth ? styles.p5 : styles.p8}>
<Text style={[styles.textAlignCenter, styles.textHeadlineH1, styles.mb2]}>{title}</Text>
<Text style={[styles.textAlignCenter, styles.textSupporting, styles.textNormal]}>{subtitle}</Text>
<View style={shouldUseNarrowLayout ? styles.p5 : styles.p8}>
<Text style={[styles.textAlignCenter, styles.textHeadlineH1, styles.mb2, titleStyles]}>{title}</Text>
{typeof subtitle === 'string' ? <Text style={[styles.textAlignCenter, styles.textSupporting, styles.textNormal]}>{subtitle}</Text> : subtitle}
{!!buttonText && !!buttonAction && (
<Button
success
Expand Down
3 changes: 2 additions & 1 deletion src/components/EmptyStateComponent/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {ImageStyle} from 'expo-image';
import type {StyleProp, ViewStyle} from 'react-native';
import type {StyleProp, TextStyle, ViewStyle} from 'react-native';
import type {ValueOf} from 'type-fest';
import type DotLottieAnimation from '@components/LottieAnimations/types';
import type SearchRowSkeleton from '@components/Skeletons/SearchRowSkeleton';
Expand All @@ -13,6 +13,7 @@ type MediaTypes = ValueOf<typeof CONST.EMPTY_STATE_MEDIA>;
type SharedProps<T> = {
SkeletonComponent: ValidSkeletons;
title: string;
titleStyles?: StyleProp<TextStyle>;
subtitle: string | React.ReactNode;
buttonText?: string;
buttonAction?: () => void;
Expand Down
Loading

0 comments on commit c3a7357

Please sign in to comment.