Skip to content

Commit

Permalink
fix: get feed cards
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Feb 19, 2025
1 parent 68b813c commit 6e7c0b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Mobile-Expensify
7 changes: 5 additions & 2 deletions src/pages/workspace/members/WorkspaceMemberNewCardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import RadioListItem from '@components/SelectionList/RadioListItem';
import type {ListItem} from '@components/SelectionList/types';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {getCardFeedIcon, getCompanyFeeds, getCustomOrFormattedFeedName, getFilteredCardList, hasOnlyOneCardToAssign, isSelectedFeedExpired} from '@libs/CardUtils';
import {getCardFeedIcon, getCompanyFeeds, getCustomOrFormattedFeedName, getFilteredCardList, hasOnlyOneCardToAssign, isCustomFeed, isSelectedFeedExpired} from '@libs/CardUtils';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
import {getPolicy, getWorkspaceAccountID} from '@libs/PolicyUtils';
Expand All @@ -20,7 +20,7 @@ import type {WithPolicyAndFullscreenLoadingProps} from '@pages/workspace/withPol
import withPolicyAndFullscreenLoading from '@pages/workspace/withPolicyAndFullscreenLoading';
import variables from '@styles/variables';
import {setIssueNewCardStepAndData} from '@userActions/Card';
import {setAssignCardStepAndData} from '@userActions/CompanyCards';
import {openPolicyCompanyCardsFeed, setAssignCardStepAndData} from '@userActions/CompanyCards';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -99,6 +99,9 @@ function WorkspaceMemberNewCardPage({route, personalDetails}: WorkspaceMemberNew

const handleSelectFeed = (feed: CardFeedListItem) => {
setSelectedFeed(feed.value);
if (isCustomFeed(feed.value as CompanyCardFeed)) {
openPolicyCompanyCardsFeed(policyID, feed.value as CompanyCardFeed);
}
setShouldShowError(false);
};

Expand Down

0 comments on commit 6e7c0b5

Please sign in to comment.