-
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
[Wave Collect] [Xero] Default select options #42360
[Wave Collect] [Xero] Default select options #42360
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] |
You can ignore this one @ishpaul777. @rushatgabhane @hungvu193 @lakchote This one is for default option select. |
Reviewer Checklist
Screenshots/VideosiOS: mWeb Safari |
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.
@lakchote LGTM
We did not find an internal engineer to review this PR, trying to assign a random engineer to #42378 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
const xeroSelectorOptions = useMemo<SelectorType[]>(() => { | ||
const isMatchFound = bankAccounts?.some(({id}) => id === reimbursementAccountID); | ||
|
||
return (bankAccounts ?? []).map(({id, name}, index) => ({ | ||
value: id, | ||
text: name, | ||
keyForList: id, | ||
isSelected: isMatchFound ? reimbursementAccountID === id : index === 0, | ||
})); | ||
}, [reimbursementAccountID, bankAccounts]); |
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 code is repeated 3 times, in 3 different files. Can you move it to an utility function?
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.
Left a comment
🚀 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 🚀
|
For Xero Integration, some of settings didn't have default option selected. If the mappings are not set, we should be selecting the first option from the data list.
Details
Fixed Issues
$ #42378
PROPOSAL:
Tests
Pre-requisite:
Steps
Xero bank account
, the first option is shown in the MenuItem. For the Demo company it'sBusiness Bank Account
.Xero Bill Payment Account
andXero Invoice Collections Account
.Offline tests
Same as Tests.
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-xero-default-option.mov
Android: mWeb Chrome
mweb-chrome-xero-default-option.mov
iOS: Native
ios-xero-default-option.mov
iOS: mWeb Safari
mweb-safari-xero-default-option.mov
MacOS: Chrome / Safari
web-xero-default-option.mov
MacOS: Desktop
desktop-xero-default-option.mov