Skip to content

Commit 2346bf6

Browse files
leshniakclaude
andcommitted
fix: show strikethrough for pending-delete feeds in Expensify card selector
Extract isFeedPendingDelete constant in toListItem for feeds with pendingAction: DELETE, matching the company card feed selector pattern (disabled + strikethrough, not filtered out). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1153c4b commit 2346bf6

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

src/pages/workspace/expensifyCard/WorkspaceExpensifyCardFeedSelectorPage.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,26 @@ function WorkspaceExpensifyCardFeedSelectorPage({route}: WorkspaceExpensifyCardF
114114
Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_BANK_ACCOUNT.getRoute(policyID));
115115
};
116116

117-
const toListItem = (entry: ExpensifyCardFeedEntry, isOtherWorkspaceSection: boolean): ExpensifyFeedListItem => ({
118-
value: entry.fundID,
119-
text: getExpensifyCardFeedDescription(entry.settings, policies),
120-
keyForList: entry.fundID.toString(),
121-
isSelected: entry.fundID === lastSelectedExpensifyCardFeedID,
122-
isDisabled: entry.settings.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || (isOtherWorkspaceSection && isOffline),
123-
pendingAction: entry.settings.pendingAction,
124-
errors: feedWithError?.fundID === entry.fundID ? feedWithError.error : undefined,
125-
leftElement: (
126-
<Icon
127-
src={illustrations.ExpensifyCardImage}
128-
height={variables.cardIconHeight}
129-
width={variables.cardIconWidth}
130-
additionalStyles={[styles.mr3, styles.cardIcon]}
131-
/>
132-
),
133-
});
117+
const toListItem = (entry: ExpensifyCardFeedEntry, isOtherWorkspaceSection: boolean): ExpensifyFeedListItem => {
118+
const isFeedPendingDelete = entry.settings.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
119+
return {
120+
value: entry.fundID,
121+
text: getExpensifyCardFeedDescription(entry.settings, policies),
122+
keyForList: entry.fundID.toString(),
123+
isSelected: entry.fundID === lastSelectedExpensifyCardFeedID,
124+
isDisabled: isFeedPendingDelete || (isOtherWorkspaceSection && isOffline),
125+
pendingAction: entry.settings.pendingAction,
126+
errors: feedWithError?.fundID === entry.fundID ? feedWithError.error : undefined,
127+
leftElement: (
128+
<Icon
129+
src={illustrations.ExpensifyCardImage}
130+
height={variables.cardIconHeight}
131+
width={variables.cardIconWidth}
132+
additionalStyles={[styles.mr3, styles.cardIcon]}
133+
/>
134+
),
135+
};
136+
};
134137

135138
const goBack = () => Navigation.goBack(ROUTES.WORKSPACE_EXPENSIFY_CARD.getRoute(policyID));
136139

0 commit comments

Comments
 (0)