diff --git a/src/CONST.ts b/src/CONST.ts index d93eb230f779..c38329924a16 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -5852,9 +5852,6 @@ const CONST = { ACTION_TYPES: { VIEW: 'view', REVIEW: 'review', - SUBMIT: 'submit', - APPROVE: 'approve', - PAY: 'pay', DONE: 'done', PAID: 'paid', }, diff --git a/src/components/Search/SearchPageHeader.tsx b/src/components/Search/SearchPageHeader.tsx index d73937aeadd9..a330be3d5ff6 100644 --- a/src/components/Search/SearchPageHeader.tsx +++ b/src/components/Search/SearchPageHeader.tsx @@ -182,7 +182,7 @@ function SearchPageHeader({queryJSON, hash}: SearchPageHeaderProps) { return; } - const reportIDList = selectedReports?.filter((report) => !!report) ?? []; + const reportIDList = (selectedReports?.filter((report) => !!report) as string[]) ?? []; SearchActions.exportSearchItemsToCSV( {query: status, jsonQuery: JSON.stringify(queryJSON), reportIDList, transactionIDList: selectedTransactionsKeys, policyIDs: [activeWorkspaceID ?? '']}, () => { diff --git a/src/components/Search/types.ts b/src/components/Search/types.ts index 130ad7ae6f6e..74bf7b16d020 100644 --- a/src/components/Search/types.ts +++ b/src/components/Search/types.ts @@ -24,13 +24,6 @@ type SelectedTransactionInfo = { /** Model of selected results */ type SelectedTransactions = Record; -/** Model of payment data used by Search bulk actions */ -type PaymentData = { - reportID: string; - amount: number; - paymentType: ValueOf; -}; - type SortOrder = ValueOf; type SearchColumnType = ValueOf; type ExpenseSearchStatus = ValueOf; @@ -124,6 +117,5 @@ export type { TripSearchStatus, ChatSearchStatus, SearchAutocompleteResult, - PaymentData, SearchAutocompleteQueryRange, }; diff --git a/src/components/SelectionList/Search/ActionCell.tsx b/src/components/SelectionList/Search/ActionCell.tsx index 55e2cf6f849d..faafa6159dc1 100644 --- a/src/components/SelectionList/Search/ActionCell.tsx +++ b/src/components/SelectionList/Search/ActionCell.tsx @@ -15,9 +15,6 @@ import type {SearchTransactionAction} from '@src/types/onyx/SearchResults'; const actionTranslationsMap: Record = { view: 'common.view', review: 'common.review', - submit: 'common.submit', - approve: 'iou.approve', - pay: 'iou.pay', done: 'common.done', paid: 'iou.settledExpensify', }; @@ -29,18 +26,9 @@ type ActionCellProps = { goToItem: () => void; isChildListItem?: boolean; parentAction?: string; - isLoading?: boolean; }; -function ActionCell({ - action = CONST.SEARCH.ACTION_TYPES.VIEW, - isLargeScreenWidth = true, - isSelected = false, - goToItem, - isChildListItem = false, - parentAction = '', - isLoading = false, -}: ActionCellProps) { +function ActionCell({action = CONST.SEARCH.ACTION_TYPES.VIEW, isLargeScreenWidth = true, isSelected = false, goToItem, isChildListItem = false, parentAction = ''}: ActionCellProps) { const {translate} = useLocalize(); const theme = useTheme(); const styles = useThemeStyles(); @@ -73,8 +61,9 @@ function ActionCell({ ); } + const buttonInnerStyles = isSelected ? styles.buttonDefaultHovered : {}; + if (action === CONST.SEARCH.ACTION_TYPES.VIEW || shouldUseViewAction) { - const buttonInnerStyles = isSelected ? styles.buttonDefaultHovered : {}; return isLargeScreenWidth ? (