-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Use policy achAccount instead of reimbursementAccount in WorkspaceWorkflow #38395
Conversation
af00aed
to
65fe96b
Compare
Main is currently broken, so I tested this with this fix. |
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.
Looking good and tests well. Just one small comment
We also got conflicts now. |
updated |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-03-27.at.2.33.51.in.the.afternoon.movAndroid: mWeb ChromeScreen.Recording.2024-03-27.at.1.16.16.in.the.afternoon.moviOS: NativeScreen.Recording.2024-03-27.at.1.57.54.in.the.afternoon.moviOS: mWeb SafariScreen.Recording.2024-03-27.at.1.39.22.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-03-27.at.1.07.42.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-03-27.at.3.01.54.in.the.afternoon.mov |
This is the offline behavior; is there there is anything we can do? @luacmartins @nkuoch
Screen.Recording.2024-03-27.at.3.05.49.in.the.afternoon.movScreen.Recording.2024-03-27.at.3.09.33.in.the.afternoon.movAfter returning online after disabling it offline Screen.Recording.2024-03-27.at.3.12.38.in.the.afternoon.mov |
@nkuoch lint is failing |
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.
LGTM & tests well. just one minor comment.
onPress={() => { | ||
if (isOffline || !isPolicyAdmin) { | ||
return; | ||
} |
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.
onPress={() => { | |
if (isOffline || !isPolicyAdmin) { | |
return; | |
} | |
disabled={isOffline || !isPolicyAdmin} | |
onPress={() => { |
updated |
✋ 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/luacmartins in version: 1.4.58-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.58-8 🚀
|
const hasVBA = state === BankAccount.STATE.OPEN; | ||
const bankDisplayName = bankName ? `${bankName} ${accountNumber ? `${accountNumber.slice(-5)}` : ''}` : ''; | ||
const {accountNumber, addressName, bankName} = policy?.achAccount ?? {}; | ||
const hasVBA = !!policy?.achAccount; |
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.
Hey, this PR caused a bug: Disconnected bank account is still displayed on bank account preview on Workflows page.
It has been handled but just FYI,
Whether the bank name shows up in the bank account preview on the workspace workflows page depends on the policy's achAccount
. But when we disconnect the bank account, we forget to set achAccount
to null
in optimistic data. So, even after disconnecting, the bank account preview still appears until we get response from backend.
More details here - #39439 (comment)
const hasVBA = state === BankAccount.STATE.OPEN; | ||
const bankDisplayName = bankName ? `${bankName} ${accountNumber ? `${accountNumber.slice(-5)}` : ''}` : ''; | ||
const {accountNumber, addressName, bankName} = policy?.achAccount ?? {}; | ||
const hasVBA = !!policy?.achAccount; |
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.
This change also caused issue #39947 where we don't yet have a bank account added and because the achAccount: {reimburser: reimburserEmail} is set everytime we toggle "Make or track payments", the UI ends up looking like we have a bank account added because of this check, when we don't actually have a bank account added yet.
Details
Fixed Issues
$ #38200
Tests
From oldDot:
From newDot, you should see it in your workspace workflows settings:
Toggle off "Make or Track Payments".
Settings should stick
Toggle it on again and click on Connect
Try to readd the same bank account. You shouldn't have to redo all steps, as the bank account was still attached to your personal bank account, so we automatically retreived all the info.
Click on Disconnect. Workflow should show back "Connect Bank Account"
Offline tests
N/A
QA Steps
Same as Tests
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