-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[No QA] [Workspace Feeds] Clean up for workspace feeds #48323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e53f0bf
881bc10
d2c093b
2e293ac
f34d40b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,12 +49,17 @@ function WorkspaceExpensifyCardListPage({route, cardsList}: WorkspaceExpensifyCa | |
|
|
||
| const sortedCards = useMemo(() => CardUtils.sortCardsByCardholderName(cardsList, personalDetails), [cardsList, personalDetails]); | ||
|
|
||
| const issueCard = () => { | ||
| const activeRoute = Navigation.getActiveRoute(); | ||
| Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID, activeRoute)); | ||
| }; | ||
|
Comment on lines
+52
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should have cleared the |
||
|
|
||
| const getHeaderButtons = () => ( | ||
| <View style={[styles.w100, styles.flexRow, styles.gap2, shouldUseNarrowLayout && styles.mb3]}> | ||
| <Button | ||
| medium | ||
| success | ||
| onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD_ISSUE_NEW.getRoute(policyID))} | ||
| onPress={issueCard} | ||
| icon={Expensicons.Plus} | ||
| text={translate('workspace.expensifyCard.issueCard')} | ||
| style={shouldUseNarrowLayout && styles.flex1} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,14 +19,18 @@ import * as Card from '@userActions/Card'; | |
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
| import ROUTES from '@src/ROUTES'; | ||
| import type {Route} from '@src/ROUTES'; | ||
| import type {IssueNewCardStep} from '@src/types/onyx/Card'; | ||
|
|
||
| type ConfirmationStepProps = { | ||
| // ID of the policy that the card will be issued under | ||
| /** ID of the policy that the card will be issued under */ | ||
| policyID: string; | ||
|
|
||
| /** Route to navigate to */ | ||
| backTo?: Route; | ||
| }; | ||
|
|
||
| function ConfirmationStep({policyID}: ConfirmationStepProps) { | ||
| function ConfirmationStep({policyID, backTo}: ConfirmationStepProps) { | ||
| const {translate} = useLocalize(); | ||
| const styles = useThemeStyles(); | ||
| const {isOffline} = useNetwork(); | ||
|
|
@@ -43,7 +47,7 @@ function ConfirmationStep({policyID}: ConfirmationStepProps) { | |
|
|
||
| const submit = () => { | ||
| Card.issueExpensifyCard(policyID, CONST.COUNTRY.US, data); | ||
| Navigation.navigate(ROUTES.WORKSPACE_EXPENSIFY_CARD.getRoute(policyID ?? '-1')); | ||
| Navigation.navigate(backTo ?? ROUTES.WORKSPACE_EXPENSIFY_CARD.getRoute(policyID ?? '-1')); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't navigate to the Coming from #56009 |
||
| Card.clearIssueNewCardFlow(); | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: Maybe add
disabledpropsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DylanDylann It adds the opacity, I'm not sure that it's the expected behaviour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, It's only my suggestion and also be a minor thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the disabled prop is necessary in this case