[Wave collect] [Xero] Block Xero screens if Xero is not connected.#42619
[Wave collect] [Xero] Block Xero screens if Xero is not connected.#42619lakchote merged 10 commits intoExpensify:xero-merge-freezefrom
Conversation
|
@ishpaul777 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] |
|
@ishpaul777 You can ignore this PR. @rushatgabhane @hungvu193 @lakchote This is ready for review. |
|
I'm thinking about the way we handle it in our |
hungvu193
left a comment
There was a problem hiding this comment.
Here's my idea. Let's me know what you think
src/components/ConnectionLayout.tsx
Outdated
| shouldBeBlocked?: boolean; | ||
| }; |
There was a problem hiding this comment.
| shouldBeBlocked?: boolean; | |
| }; | |
| shouldBeBlocked?: boolean; | |
| /** Name of the current connection **/ | |
| connectionName: 'xero' | 'quickbooksOnline'; | |
| }; |
| shouldBeBlocked = false, | ||
| }: ConnectionLayoutProps) { | ||
| const {translate} = useLocalize(); | ||
|
|
There was a problem hiding this comment.
| const policy = PolicyUtils.getPolicy(policyID ?? ''); | |
| const isConnectionEmpty = isEmpty(policy.connections?.[connectionName]); |
src/components/ConnectionLayout.tsx
Outdated
| policyID={policyID} | ||
| accessVariants={accessVariants} | ||
| featureName={featureName} | ||
| shouldBeBlocked={shouldBeBlocked} |
There was a problem hiding this comment.
| shouldBeBlocked={shouldBeBlocked} | |
| shouldBeBlocked={shouldBeBlocked || isConnectionEmpty} |
I like that idea, to prevent repeating code and adhere to the DRY principle. |
|
I think the amount of changes in the files is still the same. But I have updated the code anyway. I've also refactored the @hungvu193 @lakchote All yours. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeissue with current Android studio. Android: mWeb ChromeUploading mAndroid.mov… iOS: NativeiOS.moviOS: mWeb SafarimSafari.movMacOS: Chrome / Safarichrome.movMacOS: Desktopdesktop.mov |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 1.4.77-11 🚀
|
|
🚀 Deployed to staging by https://github.com/lakchote in version: 1.4.77-11 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.78-5 🚀
|
Provide access to Xero related screens only if the integration connected is Xero.
Details
Fixed Issues
$ #41726
PROPOSAL:
Tests
Pre-requisite:
Test Steps
{policyID}with your workspace's policyID and try to access the page.Xero URLs
Offline tests
N/A
QA Steps
Same as Test Steps all the links are for staging.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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-xero-pages.mov
Android: mWeb Chrome
mweb-chrome-xero-pages.mov
iOS: Native
ios-xero-pages.mov
iOS: mWeb Safari
mweb-safari-xero-pages.mov
MacOS: Chrome / Safari
web-xero-pages-access.mp4
MacOS: Desktop
desktop-xero-pages.mov