-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Allow NewDot collect customers to add one third-party card feed #56091
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
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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| import {useRoute} from '@react-navigation/native'; | ||
| import React, {useEffect, useState} from 'react'; | ||
| import {View} from 'react-native'; | ||
| import {useOnyx} from 'react-native-onyx'; | ||
|
|
@@ -11,15 +12,19 @@ | |
| import Text from '@components/Text'; | ||
| import useLocalize from '@hooks/useLocalize'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import * as CardUtils from '@libs/CardUtils'; | ||
|
Check failure on line 15 in src/pages/workspace/companyCards/addNew/SelectBankStep.tsx
|
||
| import Navigation from '@navigation/Navigation'; | ||
| import type {PlatformStackRouteProp} from '@navigation/PlatformStackNavigation/types'; | ||
| import type {FullScreenNavigatorParamList} from '@navigation/types'; | ||
| import variables from '@styles/variables'; | ||
| import * as CompanyCards from '@userActions/CompanyCards'; | ||
|
Check failure on line 20 in src/pages/workspace/companyCards/addNew/SelectBankStep.tsx
|
||
| import CONST from '@src/CONST'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
| import type SCREENS from '@src/SCREENS'; | ||
|
|
||
| function SelectBankStep() { | ||
| const {translate} = useLocalize(); | ||
| const route = useRoute<PlatformStackRouteProp<FullScreenNavigatorParamList, typeof SCREENS.WORKSPACE.COMPANY_CARDS_ADD_NEW>>(); | ||
| const styles = useThemeStyles(); | ||
| const [addNewCard] = useOnyx(ONYXKEYS.ADD_NEW_COMPANY_CARD); | ||
| const [bankSelected, setBankSelected] = useState<ValueOf<typeof CONST.COMPANY_CARDS.BANKS>>(); | ||
|
|
@@ -50,6 +55,10 @@ | |
| }, [addNewCard?.data.selectedBank]); | ||
|
|
||
| const handleBackButtonPress = () => { | ||
| if (route?.params?.backTo) { | ||
| Navigation.navigate(route.params.backTo); | ||
| return; | ||
| } | ||
| Navigation.goBack(); | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,14 +6,14 @@ | |
| import useLocalize from '@hooks/useLocalize'; | ||
| import useNetwork from '@hooks/useNetwork'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import * as QuickbooksOnline from '@libs/actions/connections/QuickbooksOnline'; | ||
|
Check failure on line 9 in src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
|
||
| import * as Xero from '@libs/actions/connections/Xero'; | ||
|
Check failure on line 10 in src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
|
||
| import Navigation from '@libs/Navigation/Navigation'; | ||
| import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; | ||
| import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; | ||
| import * as PolicyUtils from '@libs/PolicyUtils'; | ||
|
Check failure on line 14 in src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
|
||
| import NotFoundPage from '@pages/ErrorPage/NotFoundPage'; | ||
| import * as PerDiem from '@userActions/Policy/PerDiem'; | ||
|
Check failure on line 16 in src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx
|
||
| import CONST from '@src/CONST'; | ||
| import * as Policy from '@src/libs/actions/Policy/Policy'; | ||
| import ONYXKEYS from '@src/ONYXKEYS'; | ||
|
|
@@ -80,8 +80,10 @@ | |
| return; | ||
| } | ||
| } | ||
| case CONST.UPGRADE_FEATURE_INTRO_MAPPING.rules.id: | ||
| case CONST.UPGRADE_FEATURE_INTRO_MAPPING.companyCards.id: | ||
| Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_ADD_NEW.getRoute(policyID, ROUTES.WORKSPACE_COMPANY_CARDS_SELECT_FEED.getRoute(policyID))); | ||
| return; | ||
| case CONST.UPGRADE_FEATURE_INTRO_MAPPING.rules.id: | ||
| case CONST.UPGRADE_FEATURE_INTRO_MAPPING.perDiem.id: | ||
| Navigation.dismissModal(); | ||
| return Navigation.navigate(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID)); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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'm wondering if we need a
disabledhere?Since we don't need to upgrade to control plan to use company cards now
So I suppose we can turn company cards on and off at any time
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 good point - probably now we do not needed that