[Internal QA]: Add additional navigation for not existing export#54433
Conversation
|
I added logic using backTo to just one connection. There are some other places which should be changed for other connections to use correct go back logic. Also needs to add util function which will return true/false based on check for valid export account (which is available for company card details page menu item). I will be back on Monday 30th and will add all these changes. For now will leave it draft |
|
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-01-03.at.17.37.21.movAndroid: mWeb ChromeScreen.Recording.2025-01-03.at.17.30.49.moviOS: NativeScreen.Recording.2025-01-03.at.17.36.02.moviOS: mWeb SafariScreen.Recording.2025-01-03.at.17.26.45.movMacOS: Chrome / SafariScreen.Recording.2025-01-03.at.16.43.35.movMacOS: DesktopScreen.Recording.2025-01-03.at.17.43.26.mov |
| const route = useRoute<PlatformStackRouteProp<SettingsNavigatorParamList, typeof SCREENS.WORKSPACE.ACCOUNTING.SAGE_INTACCT_EXPORT>>(); | ||
| const backTo = route?.params?.backTo; | ||
| const {export: exportConfig, pendingFields, errorFields} = policy?.connections?.intacct?.config ?? {}; | ||
| const isConnectionShouldBeRemovedFromCompanyCard = exportConfig?.reimbursable === CONST.SAGE_INTACCT_REIMBURSABLE_EXPENSE_TYPE.EXPENSE_REPORT && backTo; |
There was a problem hiding this comment.
I dotn really understand this variable name 😂 can you please try to explain it in plain english and maybe we can find a better name
There was a problem hiding this comment.
In menu item for company card - we have a row name Export %connection name%. And in some cases we should not show that row if connection is not supported. Sorry did not find a good name for variable
| const {canUseNetSuiteUSATax} = usePermissions(); | ||
|
|
||
| const config = policy?.connections?.netsuite?.options.config; | ||
| const isConnectionShouldBeRemovedFromCompanyCard = |
There was a problem hiding this comment.
Maybe lets name it more specifically to what it will cause/ do. It would be great to also add some comment explaining why we need it
| const isConnectionShouldBeRemovedFromCompanyCard = | |
| const shouldgoBackToSpecificRoute = |
There was a problem hiding this comment.
I discussed with @narefyev91 these changes, and he is out until Friday. These are NAB changes but we should make them for better DX. We can add it to some future fixes to the flow and not hold in this
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.81-0 🚀
|
|
Not fully working. After changing from credit card > vendor bills with QBO, you land on the "hmm not here" page when navigating backward instead of the card details page. 2025-01-07_16-33-23.mp4 |
|
Checking off on deploy checklist as this is NAB |
|
@narefyev91 something to look into when you back |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.81-6 🚀
|
Sure - will take a look |
| const card = allBankCards?.[cardID]; | ||
| const connectedIntegration = PolicyUtils.getConnectedIntegration(policy) ?? CONST.POLICY.CONNECTIONS.NAME.QBO; | ||
| const exportMenuItem = getExportMenuItem(connectedIntegration, policyID, translate, policy, card); | ||
| const exportMenuItem = getExportMenuItem(connectedIntegration, policyID, translate, policy, card, backTo); |
There was a problem hiding this comment.
We should've passed the active route here, which we fixed it here
Explanation of Change
Since you accessed the accounting integration settings from the card-level export, the nav structure tries to bring you back to the card-level export selection page. However, that page is no longer supported based on the new integration settings. I suggest that where you landed on this "no accounts found" page previously when going back, you instead land directly on the card details page, with the card-level export row gone.-->
Fixed Issues
$ #54371
PROPOSAL:
Tests
Offline tests
No changes
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov