Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Expensify/App into stites-purposeFo…
Browse files Browse the repository at this point in the history
…rExpensify
  • Loading branch information
stitesExpensify committed Jan 18, 2024
2 parents 0b6bf56 + e6b0761 commit eda0fe7
Show file tree
Hide file tree
Showing 86 changed files with 2,049 additions and 1,560 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 1001042601
versionName "1.4.26-1"
versionCode 1001042701
versionName "1.4.27-1"
}

flavorDimensions "default"
Expand Down
13 changes: 13 additions & 0 deletions assets/images/chatbubble-add.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/chatbubble-unread.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Once Auto-Reconciliation is enabled, there are a few things that happen. Let’s
### How This Works
1. On the day of your first card settlement, we'll create the Expensify Card Liability account in your QuickBooks Online general ledger. If you've opted for Daily Settlement, we'll also create an Expensify Clearing Account.
2. During your QuickBooks Online auto-sync on that same day, if there are unsettled transactions, we'll generate a journal entry totaling all posted transactions since the last settlement. This entry will credit the selected bank account and debit the new Expensify Clearing Account (for Daily Settlement) or the Expensify Liability Account (for Monthly Settlement).
3. Once the transactions are posted and the expense report is approved in Expensify, the report will be exported to QuickBooks Online with each line as individual credit card expenses. For Daily Settlement, an additional journal entry will credit the Expensify Clearing Account and debit the Expensify Card Liability Account. For Monthly Settlement, the journal entry will credit the Liability account directly and debit the appropriate expense categories.
3. Once the transactions are posted and the expense report is approved in Expensify, the report will be exported to QuickBooks Online with each line as individual card expenses. For Daily Settlement, an additional journal entry will credit the Expensify Clearing Account and debit the Expensify Card Liability Account. For Monthly Settlement, the journal entry will credit the Liability account directly and debit the appropriate expense categories.

### Example
- We have card transactions for the day totaling $100, so we create the following journal entry upon sync:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ For an efficiency-focused company, we recommend setting up [Scheduled Submit](ht
4. You’ll notice *Scheduled Submit* is located directly under *Report Basics*
5. Choose *Daily*

Between Expensify's SmartScan technology, direct corporate card feed import, automatic categorization, and [DoubleCheck](https://community.expensify.com/discussion/5738/deep-dive-how-does-concierge-receipt-audit-work) features, your employees shouldn't need to do anything more than swipe their Expensify Card or scan their receipt.
Between Expensify's SmartScan technology, direct corporate card feed import, automatic categorization, and [DoubleCheck](https://community.expensify.com/discussion/5738/deep-dive-how-does-concierge-receipt-audit-work) features, your employees shouldn't need to do anything more than swipe their Expensify Visa® Commercial Card or scan their receipt.

Scheduled Submit will ensure all expenses are submitted automatically. Any expenses that do not fall within the rules you’ve set up for your policy will be escalated to you for manual review.

Expand Down Expand Up @@ -155,7 +155,7 @@ The Expensify Card has many benefits for your company. Two in particular are wor
### If you don't have a corporate card, use the Expensify Card
Expensify provides a corporate card with the following features:

- Up to 2% cash back (within the US)
- Up to 2% cash back (Applies to USD purchases only)
- [SmartLimits](https://community.expensify.com/discussion/4851/deep-dive-what-are-unapproved-expense-limits#latest)
- Unlimited Virtual Cards - single-purpose cards with a fixed or monthly limit for specific company purchases
- A stable, unbreakable connection (third-party bank feeds can run into connectivity issues)
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.26</string>
<string>1.4.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.26.1</string>
<string>1.4.27.1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.26</string>
<string>1.4.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.26.1</string>
<string>1.4.27.1</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<plist version="1.0">
<dict>
<key>CFBundleShortVersionString</key>
<string>1.4.26</string>
<string>1.4.27</string>
<key>CFBundleVersion</key>
<string>1.4.26.1</string>
<string>1.4.27.1</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.4.26-1",
"version": "1.4.27-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
19 changes: 15 additions & 4 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,9 @@ const CONST = {
},
THREAD_DISABLED: ['CREATED'],
},
CANCEL_PAYMENT_REASONS: {
ADMIN: 'CANCEL_REASON_ADMIN',
},
ACTIONABLE_MENTION_WHISPER_RESOLUTION: {
INVITE: 'invited',
NOTHING: 'nothing',
},
ARCHIVE_REASON: {
DEFAULT: 'default',
Expand Down Expand Up @@ -1292,10 +1290,15 @@ const CONST = {
TRIP: 'trip',
MANUAL: 'manual',
},
AUTO_REPORTING_OFFSET: {
LAST_BUSINESS_DAY_OF_MONTH: 'lastBusinessDayOfMonth',
LAST_DAY_OF_MONTH: 'lastDayOfMonth',
},
ROOM_PREFIX: '#',
CUSTOM_UNIT_RATE_BASE_OFFSET: 100,
OWNER_EMAIL_FAKE: '_FAKE_',
OWNER_ACCOUNT_ID_FAKE: 0,
ID_FAKE: '_FAKE_',
},

CUSTOM_UNITS: {
Expand Down Expand Up @@ -3066,7 +3069,8 @@ const CONST = {
},

/**
* Constants for maxToRenderPerBatch parameter that is used for FlatList or SectionList. This controls the amount of items rendered per batch, which is the next chunk of items rendered on every scroll.
* Constants for maxToRenderPerBatch parameter that is used for FlatList or SectionList. This controls the amount of items rendered per batch, which is the next chunk of items
* rendered on every scroll.
*/
MAX_TO_RENDER_PER_BATCH: {
DEFAULT: 5,
Expand All @@ -3078,6 +3082,11 @@ const CONST = {
RBR: 'RBR',
},

/**
* Constants for types of violations.
* Defined here because they need to be referenced by the type system to generate the
* ViolationNames type.
*/
VIOLATIONS: {
ALL_TAG_LEVELS_REQUIRED: 'allTagLevelsRequired',
AUTO_REPORTED_REJECTED_EXPENSE: 'autoReportedRejectedExpense',
Expand Down Expand Up @@ -3121,6 +3130,8 @@ const CONST = {
EMAIL: 'EMAIL',
REPORT: 'REPORT',
},

MINI_CONTEXT_MENU_MAX_ITEMS: 4,
} as const;

export default CONST;
1 change: 1 addition & 0 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ type OnyxValues = {
[ONYXKEYS.COLLECTION.TRANSACTION_DRAFT]: OnyxTypes.Transaction;
[ONYXKEYS.COLLECTION.POLICY_RECENTLY_USED_TAGS]: OnyxTypes.RecentlyUsedTags;
[ONYXKEYS.COLLECTION.SELECTED_TAB]: string;
[ONYXKEYS.COLLECTION.TRANSACTION_VIOLATIONS]: OnyxTypes.TransactionViolations;
[ONYXKEYS.COLLECTION.PRIVATE_NOTES_DRAFT]: string;
[ONYXKEYS.COLLECTION.NEXT_STEP]: OnyxTypes.ReportNextStep;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import {CONST} from 'expensify-common/lib/CONST';
import PropTypes from 'prop-types';
import React from 'react';
import _ from 'underscore';
import type {StyleProp, TextStyle} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import Text from './Text';
import TextLink from './TextLink';

const propTypes = {
text: PropTypes.string.isRequired,
style: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]),
};

const defaultProps = {
style: [],
type AutoEmailLinkProps = {
text: string;
style?: StyleProp<TextStyle>;
};

/*
Expand All @@ -21,14 +16,15 @@ const defaultProps = {
* - Else just render it inside `Text` component
*/

function AutoEmailLink(props) {
function AutoEmailLink({text, style}: AutoEmailLinkProps) {
const styles = useThemeStyles();
return (
<Text style={props.style}>
{_.map(props.text.split(CONST.REG_EXP.EXTRACT_EMAIL), (str, index) => {
<Text style={style}>
{text.split(CONST.REG_EXP.EXTRACT_EMAIL).map((str, index) => {
if (CONST.REG_EXP.EMAIL.test(str)) {
return (
<TextLink
// eslint-disable-next-line react/no-array-index-key
key={`${index}-${str}`}
href={`mailto:${str}`}
style={styles.link}
Expand All @@ -40,7 +36,8 @@ function AutoEmailLink(props) {

return (
<Text
style={props.style}
style={style}
// eslint-disable-next-line react/no-array-index-key
key={`${index}-${str}`}
>
{str}
Expand All @@ -52,6 +49,5 @@ function AutoEmailLink(props) {
}

AutoEmailLink.displayName = 'AutoEmailLink';
AutoEmailLink.propTypes = propTypes;
AutoEmailLink.defaultProps = defaultProps;

export default AutoEmailLink;
7 changes: 4 additions & 3 deletions src/components/ContextMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {ForwardedRef} from 'react';
import React, {forwardRef, useImperativeHandle} from 'react';
import type {GestureResponderEvent} from 'react-native';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import useThrottledButtonState from '@hooks/useThrottledButtonState';
Expand Down Expand Up @@ -27,7 +28,7 @@ type ContextMenuItemProps = {
isMini?: boolean;

/** Callback to fire when the item is pressed */
onPress: () => void;
onPress: (event?: GestureResponderEvent | MouseEvent | KeyboardEvent) => void;

/** A description text to show under the title */
description?: string;
Expand All @@ -52,11 +53,11 @@ function ContextMenuItem(
const {windowWidth} = useWindowDimensions();
const [isThrottledButtonActive, setThrottledButtonInactive] = useThrottledButtonState();

const triggerPressAndUpdateSuccess = () => {
const triggerPressAndUpdateSuccess = (event?: GestureResponderEvent | MouseEvent | KeyboardEvent) => {
if (!isThrottledButtonActive) {
return;
}
onPress();
onPress(event);

// We only set the success state when we have icon or text to represent the success state
// We may want to replace this check by checking the Result from OnPress Callback in future.
Expand Down
8 changes: 7 additions & 1 deletion src/components/EmojiPicker/EmojiPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ const EmojiPicker = forwardRef((props, ref) => {
if (isNavigating) {
onModalHide.current = () => {};
}
emojiPopoverAnchorRef.current = null;
const currOnModalHide = onModalHide.current;
onModalHide.current = () => {
if (currOnModalHide) {
currOnModalHide();
}
emojiPopoverAnchorRef.current = null;
};
setIsEmojiPickerVisible(false);
};

Expand Down
4 changes: 4 additions & 0 deletions src/components/Form/FormProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const propTypes = {

/** Should validate function be called when the value of the input is changed */
shouldValidateOnChange: PropTypes.bool,

/** Should fix the errors alert be displayed when there is an error in the form */
shouldHideFixErrorsAlert: PropTypes.bool,
};

// In order to prevent Checkbox focus loss when the user are focusing a TextInput and proceeds to toggle a CheckBox in web and mobile web.
Expand All @@ -94,6 +97,7 @@ const defaultProps = {
validate: () => {},
shouldValidateOnBlur: true,
shouldValidateOnChange: true,
shouldHideFixErrorsAlert: false,
};

function getInitialValueByType(valueType) {
Expand Down
Loading

0 comments on commit eda0fe7

Please sign in to comment.