Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import useNetwork from '@hooks/useNetwork';
import useOnyx from '@hooks/useOnyx';
import usePolicyForMovingExpenses from '@hooks/usePolicyForMovingExpenses';
import usePrevious from '@hooks/usePrevious';
import useReportAttributes from '@hooks/useReportAttributes';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useSaveSortedReportIDs from '@hooks/useSaveSortedReportIDs';
import useSearchHighlightAndScroll from '@hooks/useSearchHighlightAndScroll';
Expand Down Expand Up @@ -317,6 +318,7 @@ function Search({
const [customCardNames] = useOnyx(ONYXKEYS.NVP_EXPENSIFY_COMPANY_CARDS_CUSTOM_NAMES);
const [nonPersonalAndWorkspaceCards] = useOnyx(ONYXKEYS.DERIVED.NON_PERSONAL_AND_WORKSPACE_CARD_LIST);
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
const reportAttributesDerivedValue = useReportAttributes();

const {
showPendingExpensePlaceholder,
Expand Down Expand Up @@ -576,6 +578,7 @@ function Search({
onyxPersonalDetailsList,
policyForMovingExpenses,
convertToDisplayString,
reportAttributesDerivedValue,
optimisticTransactionID: optimisticTrackingState.optimisticWatchKey?.toString().replace(ONYXKEYS.COLLECTION.TRANSACTION, ''),
});
return {
Expand Down Expand Up @@ -611,6 +614,7 @@ function Search({
onyxPersonalDetailsList,
policyForMovingExpenses,
convertToDisplayString,
reportAttributesDerivedValue,
optimisticTrackingState.optimisticWatchKey,
]);

Expand Down
3 changes: 3 additions & 0 deletions src/hooks/useSearchSections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import useCurrentUserPersonalDetails from './useCurrentUserPersonalDetails';
import useFilterPendingDeleteReports from './useFilterPendingDeleteReports';
import useLocalize from './useLocalize';
import useOnyx from './useOnyx';
import useReportAttributes from './useReportAttributes';

type UseSearchSectionsResult = {
allReports: Array<string | undefined>;
Expand All @@ -30,6 +31,7 @@ function useSearchSections(): UseSearchSectionsResult {

const archivedReportsIdSet = useArchivedReportsIdSet();
const [conciergeReportID] = useOnyx(ONYXKEYS.CONCIERGE_REPORT_ID);
const reportAttributesDerivedValue = useReportAttributes();

const {type, status, sortBy, sortOrder, groupBy} = lastSearchQuery?.queryJSON ?? {};
const searchResultsData = currentSearchResults?.data;
Expand All @@ -56,6 +58,7 @@ function useSearchSections(): UseSearchSectionsResult {
cardList: nonPersonalAndWorkspaceCards,
conciergeReportID,
convertToDisplayString,
reportAttributesDerivedValue,
});
results = getSortedSections(type, status ?? '', searchData, localeCompare, translate, sortBy, sortOrder, groupBy).map((value) => value.reportID);
}
Expand Down
1 change: 0 additions & 1 deletion src/libs/ModifiedExpenseMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {getOriginalMessage, isModifiedExpenseAction} from './ReportActionsUtils'
// ReportNameUtils imports helper functions from ReportUtils, and ReportUtils imports name generation functions from ReportNameUtils.
// eslint-disable-next-line import/no-cycle
import {buildReportNameFromParticipantNames, getPolicyExpenseChatName, getReportName} from './ReportNameUtils';
// eslint-disable-next-line import/no-cycle
import {getPolicyName, getRootParentReport, isPolicyExpenseChat, isSelfDM} from './ReportUtils';
import {getFormattedAttendees, getTagArrayFromName} from './TransactionUtils';
import {isInvalidMerchantValue} from './ValidationUtils';
Expand Down
8 changes: 0 additions & 8 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ const QBO_EXPENSES_URL = 'https://qbo.intuit.com/app/expenses';

const POLICY_CHANGE_LOG_ARRAY = new Set<ReportActionName>(Object.values(CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG));

const ROOM_CHANGE_LOG_ARRAY = new Set<ReportActionName>(Object.values(CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG));

const MEMBER_CHANGE_ARRAY = new Set<ReportActionName>([
CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM,
CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.REMOVE_FROM_ROOM,
Expand Down Expand Up @@ -698,10 +696,6 @@ function isRejectedAction(reportAction: OnyxInputOrEntry<ReportAction>): boolean
return isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.REJECTED) || isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.REJECTED_TO_SUBMITTER);
}

function isRoomChangeLogAction(reportAction: OnyxEntry<ReportAction>): reportAction is ReportAction<ValueOf<typeof CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG>> {
return reportAction?.actionName ? ROOM_CHANGE_LOG_ARRAY.has(reportAction.actionName) : false;
}

function isInviteOrRemovedAction(
reportAction: OnyxInputOrEntry<ReportAction>,
): reportAction is ReportAction<ValueOf<typeof CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG | typeof CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG>> {
Expand Down Expand Up @@ -4740,15 +4734,13 @@ export {
isPayAction,
isPendingRemove,
getModerationFlagState,
isPolicyChangeLogAction,
isReimbursementDeQueuedOrCanceledAction,
isReimbursementQueuedAction,
isRenamedAction,
isReportActionAttachment,
isReportPreviewAction,
isReversedTransaction,
getMentionedAccountIDsFromAction,
isRoomChangeLogAction,
isSentMoneyReportAction,
isSplitBillAction,
isTaskAction,
Expand Down
2 changes: 0 additions & 2 deletions src/libs/ReportNameUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,13 +1057,11 @@ function getReportName(report?: Report, reportAttributesDerivedValue?: ReportAtt
export {
computeReportName,
getReportName,
generateArchivedReportName,
getInvoiceReportName,
getMoneyRequestReportName,
buildReportNameFromParticipantNames,
getInvoicePayerName,
getGroupChatName,
getPolicyExpenseChatName,
getInvoicesChatName,
computeReportNameBasedOnReportAction,
};
Loading
Loading