Skip to content

Commit

Permalink
hide hold for archived workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodebrute committed Oct 17, 2024
1 parent 987ff1b commit 6930b50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ function prepareTransactionsList(item: TransactionListItemType, selectedTransact

return transactions;
}

return {...selectedTransactions, [item.keyForList]: {isSelected: true, canDelete: item.canDelete, canHold: item.canHold, canUnhold: item.canUnhold, action: item.action}};
const isArchivedReport = ReportUtils.isArchivedRoomWithID(item.reportID);
const canHoldtransaction = !isArchivedReport && item.canHold;
const canDeleteTransaction = !isArchivedReport && item.canDelete;
return {...selectedTransactions, [item.keyForList]: {isSelected: true, canDelete: canDeleteTransaction, canHold: canHoldtransaction, canUnhold: item.canUnhold, action: item.action}};
}

function Search({queryJSON, onSearchListScroll, contentContainerStyle}: SearchProps) {
Expand Down

0 comments on commit 6930b50

Please sign in to comment.