Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
ab43ba3
Create a draft PR with main changes
ZhenjaHorbach May 6, 2025
20afc67
Fix conflicts
ZhenjaHorbach May 6, 2025
e62b9ad
Update complete split transaction
ZhenjaHorbach May 7, 2025
cf0d759
Update isSplit function
ZhenjaHorbach May 7, 2025
a0cbae6
Update init split function and add originalTransacrionID for new spli…
ZhenjaHorbach May 7, 2025
4c47559
Refactor SplitListItem
ZhenjaHorbach May 7, 2025
ee61cde
Update translates
ZhenjaHorbach May 7, 2025
792557d
Refactor showing conditions
ZhenjaHorbach May 7, 2025
ecf8f5f
Add stateNum for transactions
ZhenjaHorbach May 7, 2025
fde4e78
Add state num in onyx data after complete split transaction
ZhenjaHorbach May 7, 2025
6faa3e2
Make minor fixes
ZhenjaHorbach May 7, 2025
2e2578f
Fix minor issues
ZhenjaHorbach May 7, 2025
ef0cfe9
Update branch
ZhenjaHorbach May 7, 2025
9d0f6d8
Revert mobile-expensify
ZhenjaHorbach May 7, 2025
24f1826
Fix ts issues
ZhenjaHorbach May 7, 2025
86e6ec4
Fix prettier issues
ZhenjaHorbach May 7, 2025
a57ed9f
Update condition for PureReportActionItem
ZhenjaHorbach May 7, 2025
0a5c2b4
Fix conflicts
ZhenjaHorbach May 7, 2025
246951c
Make some changes for hiding original transactions on reports screen
ZhenjaHorbach May 7, 2025
b1d9ca0
Fix conflicts
ZhenjaHorbach May 8, 2025
b470a74
Remove state_num to use reportID equal -2
ZhenjaHorbach May 8, 2025
b4acdf8
Remove last stateNum changes
ZhenjaHorbach May 8, 2025
b1d5c73
Add condition to hide a report item completely
ZhenjaHorbach May 8, 2025
b3fcbb5
Update tests and add expense report filters
ZhenjaHorbach May 8, 2025
2d2aec5
Fix prettier
ZhenjaHorbach May 8, 2025
cc81e96
Fix conflicts
ZhenjaHorbach May 9, 2025
413a1f1
Refactor some code
ZhenjaHorbach May 9, 2025
dc32edd
Update split expense page
ZhenjaHorbach May 9, 2025
099c69c
Update border and bottom padding
ZhenjaHorbach May 9, 2025
9a2f34d
Fix prettier issues
ZhenjaHorbach May 9, 2025
9e3b6e8
Refactor SplitListItem
ZhenjaHorbach May 9, 2025
25e8333
Make some changes from Phase 2
ZhenjaHorbach May 12, 2025
2b004d7
Add comment for code
ZhenjaHorbach May 12, 2025
44252e2
Fix tests
ZhenjaHorbach May 12, 2025
a5f08ec
Fix comments
ZhenjaHorbach May 12, 2025
46787b1
Update styles and submit behavior for android
ZhenjaHorbach May 12, 2025
c6b2644
Update request params
ZhenjaHorbach May 12, 2025
9a99be6
Update report secondary action items
ZhenjaHorbach May 12, 2025
cf8e081
Fix tests
ZhenjaHorbach May 12, 2025
5759cf1
Update styles for bottom split list items
ZhenjaHorbach May 13, 2025
8ccac89
Fix conflicts
ZhenjaHorbach May 13, 2025
d4b2700
Update Mobile-Expensify
ZhenjaHorbach May 13, 2025
7441620
Update Mobile-Expensify x2
ZhenjaHorbach May 13, 2025
46c960d
Update Mobile-Expensify x3
ZhenjaHorbach May 13, 2025
fe85b81
Fix conflicts
ZhenjaHorbach May 13, 2025
b261d93
Update Mobile-Expensify x4
ZhenjaHorbach May 13, 2025
66dd5fb
Update error message logic
ZhenjaHorbach May 13, 2025
f068819
Add edit screen and implement main logic
ZhenjaHorbach May 13, 2025
33c6ba1
Add logic for buttons on edit screen
ZhenjaHorbach May 14, 2025
6b2473b
Fix conflicts
ZhenjaHorbach May 14, 2025
dfaabfb
Update Mobile-Expensify
ZhenjaHorbach May 14, 2025
dd47d40
Update orderWeight for tags
ZhenjaHorbach May 14, 2025
45c0628
Update some conditions for edit field screens
ZhenjaHorbach May 14, 2025
a7f2164
Fix lint issues
ZhenjaHorbach May 14, 2025
58c1d3d
Add canBeMissing params
ZhenjaHorbach May 14, 2025
e9e1784
Add condition for non bill splits
ZhenjaHorbach May 14, 2025
810ea25
Fix conflicts
ZhenjaHorbach May 14, 2025
5ead591
Fix negative amount
ZhenjaHorbach May 14, 2025
d1a45a0
Fix navigation in Search flow
ZhenjaHorbach May 14, 2025
a1b71e9
Sync edit fields with policy state features
ZhenjaHorbach May 14, 2025
7468d13
Fix comments
ZhenjaHorbach May 14, 2025
06a4b3e
Update saveSplitTransactions
ZhenjaHorbach May 14, 2025
6d2e6a8
Refactor IOURequest screen conditions
ZhenjaHorbach May 14, 2025
cd56860
Merge branch 'main' into split-expense-flow
ZhenjaHorbach May 14, 2025
71c2734
Merge branch 'main' into split-expense-flow
ZhenjaHorbach May 14, 2025
9a0d970
Remove nameValuePairs
ZhenjaHorbach May 14, 2025
552b54f
Fix comments
ZhenjaHorbach May 15, 2025
cd93847
Update iou actions
ZhenjaHorbach May 15, 2025
c6aee9f
Fix conlicts
ZhenjaHorbach May 15, 2025
3d8320f
Remove getTransaction from new split actions
ZhenjaHorbach May 15, 2025
a472c2a
Fix conflicts
ZhenjaHorbach May 15, 2025
38678d5
Fix conflicts
ZhenjaHorbach May 15, 2025
7300d25
Add nameValuePairs
ZhenjaHorbach May 15, 2025
6064fd7
Refactor saveSplitTransactions function
ZhenjaHorbach May 16, 2025
5097b8f
Fix conflicts
ZhenjaHorbach May 18, 2025
068ea6e
Update CONST.REPORT.SPLIT_REPORTID to CONST.REPORT.SPLIT_REPORT_ID
ZhenjaHorbach May 19, 2025
783375f
Fix some bugs
ZhenjaHorbach May 19, 2025
fe59e75
Fix conflicts
ZhenjaHorbach May 19, 2025
c8a4692
Fix conflicts
ZhenjaHorbach May 20, 2025
ad0d27a
Merge branch 'main' into split-expense-flow
ZhenjaHorbach May 20, 2025
75494ca
Fix conflicts
ZhenjaHorbach May 21, 2025
4a68c7c
Fix TransactionPreviewContent for new UI
ZhenjaHorbach May 21, 2025
6827c0a
Update condition for step date
ZhenjaHorbach May 21, 2025
926334a
Update condition for showing split button for scan flow
ZhenjaHorbach May 21, 2025
e957bfb
Update isSplitExpenseTransaction function
ZhenjaHorbach May 21, 2025
55fa884
Refactor isSplitExpenseTransaction
ZhenjaHorbach May 21, 2025
6cdb1fa
Refactor code and disable re-split
ZhenjaHorbach May 21, 2025
eb5faa6
Disable split for split bill
ZhenjaHorbach May 21, 2025
7acf9b6
Fix conflicts
ZhenjaHorbach May 22, 2025
57b2201
Update Mobile-Expensify
ZhenjaHorbach May 22, 2025
d050490
Remove getTransaction from getOriginalTransactionIfItIsSplit
ZhenjaHorbach May 22, 2025
21b0814
Fix bugs
ZhenjaHorbach May 22, 2025
30cd6b7
Fix bug with created date
ZhenjaHorbach May 22, 2025
3a6c22a
Fix conflicts
ZhenjaHorbach May 22, 2025
6e8203f
Fix prettier issue
ZhenjaHorbach May 22, 2025
8025b3b
Refactor some code
ZhenjaHorbach May 23, 2025
68a202f
Fix conflicts
ZhenjaHorbach May 23, 2025
40fc048
Update navigation for split flow
ZhenjaHorbach May 23, 2025
70ffdf6
Fix tests
ZhenjaHorbach May 23, 2025
eb647a0
Fix conflicts
ZhenjaHorbach May 26, 2025
11ef570
Fix issue with preview
ZhenjaHorbach May 26, 2025
efe9b27
Remove nameValuePairs
ZhenjaHorbach May 26, 2025
cb8f91b
Update onyx data
ZhenjaHorbach May 26, 2025
685dcb0
Update failureData
ZhenjaHorbach May 27, 2025
8c5594a
Fix conflicts
ZhenjaHorbach May 27, 2025
b565815
Fix prettier issue
ZhenjaHorbach May 27, 2025
4e3fa3d
Fix comments
ZhenjaHorbach May 27, 2025
aeb288a
Improve updateSplitExpenseAmountField
ZhenjaHorbach May 27, 2025
d9a656a
Fix padding issue
ZhenjaHorbach May 27, 2025
74d9b13
Fix conflicts
ZhenjaHorbach May 27, 2025
40f9a59
Revert updateSplitExpenseAmountField
ZhenjaHorbach May 28, 2025
f8cded9
Fix conflicts
ZhenjaHorbach May 28, 2025
0cfa2a0
Update imports
ZhenjaHorbach May 28, 2025
cbe72bb
Update styles for MoneyRequestAmountInput
ZhenjaHorbach May 28, 2025
febdcfb
Disable eslint for getTransaction
ZhenjaHorbach May 28, 2025
f38a58f
Update navigation event for saveSplitTransactions
ZhenjaHorbach May 28, 2025
cac6502
Revert Update navigation event for saveSplitTransactions
ZhenjaHorbach May 28, 2025
833be36
Update shouldshownotfound condition in IOURequestStepDate
ZhenjaHorbach May 28, 2025
0caaa45
Fix conflicts
ZhenjaHorbach May 29, 2025
eb9c4bb
Update Mobile-Expensify
ZhenjaHorbach May 29, 2025
2971ea3
Merge branch 'main' into split-expense-flow
ZhenjaHorbach May 29, 2025
6e0a1af
Revert styles
ZhenjaHorbach May 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions assets/images/arrow-split.svg
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 src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,7 @@ const CONST = {
DELETE: 'delete',
RETRACT: 'retract',
ADD_EXPENSE: 'addExpense',
SPLIT: 'split',
REOPEN: 'reopen',
MOVE_EXPENSE: 'moveExpense',
PAY: 'pay',
Expand Down Expand Up @@ -1254,6 +1255,7 @@ const CONST = {
},
TRANSACTION_SECONDARY_ACTIONS: {
HOLD: 'hold',
SPLIT: 'split',
VIEW_DETAILS: 'viewDetails',
DELETE: 'delete',
},
Expand Down Expand Up @@ -2773,6 +2775,7 @@ const CONST = {
SEND: 'send',
PAY: 'pay',
SPLIT: 'split',
SPLIT_EXPENSE: 'split-expense',
REQUEST: 'request',
INVOICE: 'invoice',
SUBMIT: 'submit',
Expand Down
18 changes: 18 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,24 @@ const ROUTES = {
return getUrlWithBackToParam(`r/${reportID}/invite` as const, backTo);
},
},
SPLIT_EXPENSE: {
route: 'create/split-expense/overview/:reportID/:transactionID/:splitExpenseTransactionID?',
getRoute: (reportID: string | undefined, originalTransactionID: string | undefined, splitExpenseTransactionID?: string, backTo?: string) => {
if (!reportID || !originalTransactionID) {
Log.warn(`Invalid ${reportID}(reportID) or ${originalTransactionID}(transactionID) is used to build the SPLIT_EXPENSE route`);
}
return getUrlWithBackToParam(`create/split-expense/overview/${reportID}/${originalTransactionID}${splitExpenseTransactionID ? `/${splitExpenseTransactionID}` : ''}`, backTo);
},
},
SPLIT_EXPENSE_EDIT: {
route: 'edit/split-expense/overview/:reportID/:transactionID/:splitExpenseTransactionID?',
getRoute: (reportID: string | undefined, originalTransactionID: string | undefined, splitExpenseTransactionID?: string, backTo?: string) => {
if (!reportID || !originalTransactionID) {
Log.warn(`Invalid ${reportID}(reportID) or ${originalTransactionID}(transactionID) is used to build the SPLIT_EXPENSE_EDIT route`);
}
return getUrlWithBackToParam(`edit/split-expense/overview/${reportID}/${originalTransactionID}${splitExpenseTransactionID ? `/${splitExpenseTransactionID}` : ''}`, backTo);
},
},
MONEY_REQUEST_HOLD_REASON: {
route: ':type/edit/reason/:transactionID?/:searchHash?',
getRoute: (type: ValueOf<typeof CONST.POLICY.TYPE>, transactionID: string, reportID: string, backTo: string, searchHash?: number) => {
Expand Down
2 changes: 2 additions & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ const SCREENS = {
STEP_SUBRATE_EDIT: 'Money_Request_SubRate_Edit',
STEP_REPORT: 'Money_Request_Report',
EDIT_REPORT: 'Money_Request_Edit_Report',
SPLIT_EXPENSE: 'Money_Request_Split_Expense',
SPLIT_EXPENSE_EDIT: 'Money_Request_Split_Expense_Edit',
},

TRANSACTION_DUPLICATE: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AmountTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type AmountTextInputProps = {

/** Hide the focus styles on TextInput */
hideFocusedState?: boolean;
} & Pick<BaseTextInputProps, 'autoFocus' | 'autoGrowExtraSpace'>;
} & Pick<BaseTextInputProps, 'autoFocus' | 'autoGrowExtraSpace' | 'submitBehavior'>;

function AmountTextInput(
{
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ArrowCollapse from '@assets/images/arrow-collapse.svg';
import ArrowDownLong from '@assets/images/arrow-down-long.svg';
import ArrowRightLong from '@assets/images/arrow-right-long.svg';
import ArrowRight from '@assets/images/arrow-right.svg';
import ArrowSplit from '@assets/images/arrow-split.svg';
import ArrowUpLong from '@assets/images/arrow-up-long.svg';
import UpArrow from '@assets/images/arrow-up.svg';
import ArrowsLeftRight from '@assets/images/arrows-leftright.svg';
Expand Down Expand Up @@ -238,6 +239,7 @@ export {
AnnounceRoomAvatar,
Apple,
AppleLogo,
ArrowSplit,
ArrowCollapse,
ArrowRight,
ArrowRightLong,
Expand Down
14 changes: 14 additions & 0 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import {
deleteMoneyRequest,
getNavigationUrlOnMoneyRequestDelete,
getNextApproverAccountID,
initSplitExpense,
payInvoice,
payMoneyRequest,
reopenReport,
Expand Down Expand Up @@ -755,6 +756,19 @@ function MoneyReportHeader({
changeMoneyRequestHoldStatus(requestParentReportAction);
},
},
[CONST.REPORT.SECONDARY_ACTIONS.SPLIT]: {
text: translate('iou.split'),
icon: Expensicons.ArrowSplit,
value: CONST.REPORT.SECONDARY_ACTIONS.SPLIT,
onSelected: () => {
if (Number(transactions?.length) !== 1) {
return;
}

const currentTransaction = transactions.at(0);
initSplitExpense(currentTransaction, moneyRequestReport?.reportID ?? String(CONST.DEFAULT_NUMBER_ID));
},
},
[CONST.REPORT.SECONDARY_ACTIONS.CHANGE_WORKSPACE]: {
text: translate('iou.changeWorkspace'),
icon: Expensicons.Buildings,
Expand Down
4 changes: 3 additions & 1 deletion src/components/MoneyRequestAmountInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type MoneyRequestAmountInputProps = {

/** The testID of the input. Used to locate this view in end-to-end tests. */
testID?: string;
} & Pick<TextInputWithCurrencySymbolProps, 'autoGrowExtraSpace'>;
} & Pick<TextInputWithCurrencySymbolProps, 'autoGrowExtraSpace' | 'submitBehavior'>;

type Selection = {
start: number;
Expand Down Expand Up @@ -132,6 +132,7 @@ function MoneyRequestAmountInput(
autoGrowExtraSpace,
contentWidth,
testID,
submitBehavior,
...props
}: MoneyRequestAmountInputProps,
forwardedRef: ForwardedRef<BaseTextInputRef>,
Expand Down Expand Up @@ -343,6 +344,7 @@ function MoneyRequestAmountInput(
onMouseUp={handleMouseUp}
contentWidth={contentWidth}
testID={testID}
submitBehavior={submitBehavior}
/>
);
}
Expand Down
14 changes: 11 additions & 3 deletions src/components/MoneyRequestHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useTransactionViolations from '@hooks/useTransactionViolations';
import {deleteMoneyRequest} from '@libs/actions/IOU';
import {deleteMoneyRequest, initSplitExpense} from '@libs/actions/IOU';
import Navigation from '@libs/Navigation/Navigation';
import {getOriginalMessage, getReportActions, isMoneyRequestAction} from '@libs/ReportActionsUtils';
import {getTransactionThreadPrimaryAction} from '@libs/ReportPrimaryActionUtils';
Expand Down Expand Up @@ -201,8 +201,8 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
if (!transaction || !reportActions) {
return [];
}
return getSecondaryTransactionThreadActions(parentReport, transaction, Object.values(reportActions));
}, [parentReport, transaction]);
return getSecondaryTransactionThreadActions(parentReport, transaction, Object.values(reportActions), policy);
}, [parentReport, policy, transaction]);

const secondaryActionsImplementation: Record<ValueOf<typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS>, DropdownOption<ValueOf<typeof CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS>>> = {
[CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.HOLD]: {
Expand All @@ -217,6 +217,14 @@ function MoneyRequestHeader({report, parentReportAction, policy, onBackButtonPre
changeMoneyRequestHoldStatus(parentReportAction);
},
},
[CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.SPLIT]: {
text: translate('iou.split'),
icon: Expensicons.ArrowSplit,
value: CONST.REPORT.SECONDARY_ACTIONS.SPLIT,
onSelected: () => {
initSplitExpense(transaction, reportID ?? String(CONST.DEFAULT_NUMBER_ID));
},
},
[CONST.REPORT.TRANSACTION_SECONDARY_ACTIONS.VIEW_DETAILS]: {
value: CONST.REPORT.SECONDARY_ACTIONS.VIEW_DETAILS,
text: translate('iou.viewDetails'),
Expand Down
4 changes: 4 additions & 0 deletions src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import {
getBillable,
getDescription,
getDistanceInMeters,
getOriginalTransactionWithSplitInfo,
getTagForDisplay,
getTaxName,
hasMissingSmartscanFields,
Expand Down Expand Up @@ -293,6 +294,9 @@ function MoneyRequestView({report, shouldShowAnimatedBackground, readonly = fals
if (!isDistanceRequest && !isPerDiemRequest) {
amountDescription += ` ${CONST.DOT_SEPARATOR} ${translate('iou.cash')}`;
}
if (getOriginalTransactionWithSplitInfo(transaction).isExpenseSplit) {
amountDescription += ` ${CONST.DOT_SEPARATOR} ${translate('iou.split')}`;
Comment thread
ZhenjaHorbach marked this conversation as resolved.
}
if (isCancelled) {
amountDescription += ` ${CONST.DOT_SEPARATOR} ${translate('iou.canceled')}`;
} else if (isApproved) {
Expand Down
14 changes: 10 additions & 4 deletions src/components/ReportActionItem/TransactionPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {convertToDisplayString} from '@libs/CurrencyUtils';
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
import {getIOUActionForReportID, getOriginalMessage, isMoneyRequestAction as isMoneyRequestActionReportActionsUtils} from '@libs/ReportActionsUtils';
import {getTransactionDetails} from '@libs/ReportUtils';
import {getOriginalTransactionIfBillIsSplit, getReviewNavigationRoute} from '@libs/TransactionPreviewUtils';
import {isCardTransaction, removeSettledAndApprovedTransactions} from '@libs/TransactionUtils';
import {getReviewNavigationRoute} from '@libs/TransactionPreviewUtils';
import {getOriginalTransactionWithSplitInfo, isCardTransaction, removeSettledAndApprovedTransactions} from '@libs/TransactionUtils';
import Navigation from '@navigation/Navigation';
import type {PlatformStackRouteProp} from '@navigation/PlatformStackNavigation/types';
import type {TransactionDuplicateNavigatorParamList} from '@navigation/types';
Expand Down Expand Up @@ -78,7 +78,13 @@ function TransactionPreview(props: TransactionPreviewProps) {
Navigation.navigate(getReviewNavigationRoute(route, report, transaction, duplicates));
}, [duplicates, report, route, transaction]);

const {originalTransaction, isBillSplit} = getOriginalTransactionIfBillIsSplit(transaction);
let transactionPreview = transaction;

const {originalTransaction, isBillSplit} = getOriginalTransactionWithSplitInfo(transaction);

if (isBillSplit) {
transactionPreview = originalTransaction;
}

const iouAction = isBillSplit && originalTransaction ? getIOUActionForReportID(chatReportID, originalTransaction.transactionID) ?? action : action;

Expand All @@ -105,7 +111,7 @@ function TransactionPreview(props: TransactionPreviewProps) {
isBillSplit={isBillSplit}
chatReport={chatReport}
personalDetails={personalDetails}
transaction={originalTransaction}
transaction={transactionPreview}
iouReport={iouReport}
violations={violations}
offlineWithFeedbackOnClose={offlineWithFeedbackOnClose}
Expand Down
8 changes: 6 additions & 2 deletions src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ function ReportWelcomeText({report, policy}: ReportWelcomeTextProps) {
const policyName = getPolicyName({report});

const filteredOptions = moneyRequestOptions.filter(
(item): item is Exclude<IOUType, typeof CONST.IOU.TYPE.REQUEST | typeof CONST.IOU.TYPE.SEND | typeof CONST.IOU.TYPE.CREATE | typeof CONST.IOU.TYPE.INVOICE> =>
item !== CONST.IOU.TYPE.INVOICE,
(
item,
): item is Exclude<
IOUType,
typeof CONST.IOU.TYPE.REQUEST | typeof CONST.IOU.TYPE.SEND | typeof CONST.IOU.TYPE.CREATE | typeof CONST.IOU.TYPE.INVOICE | typeof CONST.IOU.TYPE.SPLIT_EXPENSE
> => item !== CONST.IOU.TYPE.INVOICE,
);
const additionalText = filteredOptions
.map(
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function mapToItemWithSelectionInfo(item: SearchListItem, selectedTransactions:
...item,
shouldAnimateInHighlight,
transactions: item.transactions?.map((transaction) => mapToTransactionItemWithSelectionInfo(transaction, selectedTransactions, canSelectMultiple, shouldAnimateInHighlight)),
isSelected: item.transactions.length > 0 && item.transactions?.every((transaction) => selectedTransactions[transaction.keyForList]?.isSelected && canSelectMultiple),
isSelected: item?.transactions?.length > 0 && item.transactions?.every((transaction) => selectedTransactions[transaction.keyForList]?.isSelected && canSelectMultiple),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,15 +407,15 @@ function TransactionListItemRow({
</View>
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.FROM)]}>
<UserInfoCell
accountID={item.from.accountID}
avatar={item.from.avatar}
accountID={item.from?.accountID}
avatar={item.from?.avatar}
displayName={item.formattedFrom}
/>
</View>
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.FROM)]}>
<UserInfoCell
accountID={item.to.accountID}
avatar={item.to.avatar}
accountID={item.to?.accountID}
avatar={item.to?.avatar}
displayName={item.formattedTo}
/>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ function UserInfoCellsWithArrow({
const styles = useThemeStyles();
const theme = useTheme();

if (!participantFrom) {
return null;
}

return (
<>
<View style={[styles.mw50, fromRecipientStyle]}>
Expand Down
Loading