[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 |
|
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.
This code is repeated 3 times, in 3 different files. Can you move it to an utility function?
|
🚀 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 AccountandXero Invoice Collections Account.Offline tests
Same as Tests.
QA Steps
Same as Tests.
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-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