-
Notifications
You must be signed in to change notification settings - Fork 3k
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
FIX the logic to check if there is an accounting connection in the workspace #42613
Conversation
@aimane-chnaif 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] |
Confirming that we want to hide the |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-05-28.at.11.56.07.AM.movScreen.Recording.2024-05-29.at.10.37.08.PM.movMacOS: Desktop |
There's conflict |
You're talking about imported tax rates, yeah? If so, yes, you shouldn't be able to add or delete tax rates when connected to an accounting solution. You have to manage the rates in the accounting solution directly. |
src/libs/PolicyUtils.ts
Outdated
@@ -290,7 +290,7 @@ function extractPolicyIDFromPath(path: string) { | |||
* Whether the policy has active accounting integration connections | |||
*/ | |||
function hasAccountingConnections(policy: OnyxEntry<Policy>) { | |||
return Boolean(policy?.connections); | |||
return Object.keys(policy?.connections ?? {}).length !== 0; |
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.
return Object.keys(policy?.connections ?? {}).length !== 0; | |
return !isEmptyObject(policy?.connections); |
Example usage:
if (isEmptyObject(policy?.connections) && !isSyncInProgress) { |
"Add rate" button still shows after "Enable Tax import on the Import page once you connect to QBO" Screen.Recording.2024-05-28.at.12.02.05.PM.mov |
Tested well on my end Screen.Recording.2024-05-29.at.5.54.27.PM.mov |
@aimane-chnaif, this is ready for another review 🙇 |
Looks good. Testing shortly |
@aimane-chnaif on this:
We should have fixed this here and merged it into the the Xero merge freeze branch. CC: @mananjadhav @lakchote |
On this one: Is it specifically that |
Yes, this is fixed in the freeze branch. |
@trjExpensify please check this video for repro step. Screen.Recording.2024-05-30.at.11.01.13.AM.mov@hayata-suenaga there's conflict |
Okay yes, that confirms that the Here's the diff |
Disable tax deletion if connected to accounting
conflicts! |
@marcaaron 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] |
@marcaaron I'm proceeding with the review and the merge as I have context on this and we need to get this deployed as soon as possible (context). |
✋ 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 production by https://github.com/Julesssss in version: 1.4.79-11 🚀
|
Details
This PR:
Delete rate
button on Taxes page if there is an accounting connectionFixed Issues
$ #42565
PROPOSAL: N/A
Tests / QA Steps
Offline tests
N/A
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop