-
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-Control: Add NetSuite]: Settings Configuration in NewDot: Import List #44663
[#Wave-Control: Add NetSuite]: Settings Configuration in NewDot: Import List #44663
Conversation
src/libs/API/parameters/UpdateNetSuiteSyncTaxConfigurationParams.ts
Outdated
Show resolved
Hide resolved
syncOptions: { | ||
syncTax: isSyncTaxEnabled, | ||
}, | ||
// pendingFields: { |
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 is throwing type errors due to nesting. Will fix this in upcoming PRs.
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.
Sounds good, but then can we make the comment more descriptive than simply "Fixing in the future PR"?
src/pages/workspace/accounting/netsuite/import/NetSuiteImportPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/accounting/netsuite/import/NetSuiteImportPage.tsx
Outdated
Show resolved
Hide resolved
@abdulrahuman5196 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] |
@abdulrahuman5196 Please ignore this PR. @shubham1206agra @yuwenmemon Will take care of this. cc - @Expensify/design for your review. Only list of options as a part of this PR. |
@mananjadhav while I agree we should just reuse styles here to make all the integrations similar, why do the NetSuite and QBO push rows have more padding on the right? Why don't those right carets |
Honestly I haven't applied any specific styling for the list. I've just implemented the default components. Can you give me an example of other places where they're aligned to right? |
Dang, maybe that's just how we have them implemented then? Like a big hit box with padding around the actual icon or something? |
Yeah I went cruising through the app to get an example of a "regular" one in the RHP, and I believe this is just how they're implemented in the product right now. @mananjadhav so let's not customize anything for these. @shawnborton we should maybe consider trying to update these globally to match what we have in Figma. Some current, in-product examples (these are all in various RHPs): |
Noted. Thanks @dannymcclain. Can you and @shawnborton help with rest of the design review? |
|
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2024-07-02.at.6.33.17.PM.moviOS: NativeScreen.Recording.2024-07-02.at.6.38.54.PM.moviOS: mWeb SafariScreen.Recording.2024-07-02.at.6.28.16.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-02.at.6.27.04.PM.movMacOS: DesktopScreen.Recording.2024-07-02.at.6.35.39.PM.mov |
src/ROUTES.ts
Outdated
@@ -940,6 +940,10 @@ const ROUTES = { | |||
route: 'settings/workspaces/:policyID/accounting/net-suite/subsidiary-selector', |
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.
NAB: We should update these to be consistent at some point:
route: 'settings/workspaces/:policyID/accounting/net-suite/subsidiary-selector', | |
route: 'settings/workspaces/:policyID/accounting/netsuite/subsidiary-selector', |
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.
In fact this is broken looking at the line below: https://github.com/Expensify/App/pull/44663/files#diff-6bf4223547606b393fe6164e58be4ce31148526f088e3710737115ba4c256f3cR322
So maybe let's just fix it here.
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.
Fixed.
src/languages/en.ts
Outdated
expenseCategories: `Expense categories`, | ||
expenseCategoriesDescription: `NetSuite expense categories import into Expensify as categories.`, |
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.
expenseCategories: `Expense categories`, | |
expenseCategoriesDescription: `NetSuite expense categories import into Expensify as categories.`, | |
expenseCategories: 'Expense categories', | |
expenseCategoriesDescription: 'NetSuite expense categories import into Expensify as categories.', |
src/SCREENS.ts
Outdated
@@ -273,6 +273,7 @@ const SCREENS = { | |||
XERO_BILL_PAYMENT_ACCOUNT_SELECTOR: 'Policy_Accounting_Xero_Bill_Payment_Account_Selector', | |||
XERO_EXPORT_BANK_ACCOUNT_SELECT: 'Policy_Accounting_Xero_Export_Bank_Account_Select', | |||
NETSUITE_SUBSIDIARY_SELECTOR: 'Policy_Accounting_Net_Suite_Subsidiary_Selector', | |||
NETSUITE_IMPORT: 'Policy_Accounting_Net_Suite_Import', |
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.
NETSUITE_IMPORT: 'Policy_Accounting_Net_Suite_Import', | |
NETSUITE_IMPORT: 'Policy_Accounting_NetSuite_Import', |
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.
Updated.
src/libs/PolicyUtils.ts
Outdated
@@ -528,6 +528,17 @@ function getNetSuiteTaxAccountOptions(policy: Policy | undefined, subsidiaryCoun | |||
})); | |||
} | |||
|
|||
function isSyncTaxEnabled(policy: Policy | undefined): boolean { |
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 is trying to do the same thing as canUseTaxNetSuite
below - can we just reuse that method instead? Also the name is misleading here.
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.
Okay I received the same feedback from @shubham1206agra. This method is not dependent on canUseNetSuiteUSATax
(!!betas?.includes(CONST.BETAS.NETSUITE_USA_TAX)
). Hence I created a new one. If the logic is the same I'll use that.
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.
I've updated to use canUseNetSuiteUSATax
syncOptions: { | ||
syncTax: isSyncTaxEnabled, | ||
}, | ||
// pendingFields: { |
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.
Sounds good, but then can we make the comment more descriptive than simply "Fixing in the future PR"?
|
||
const policyID = policy?.id ?? '-1'; | ||
const config = policy?.connections?.netsuite?.options.config; | ||
const importFields = CONST.NETSUITE_CONFIG.IMPORT_FIELDS; |
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.
NAB: Can we just use the constant directly in the code? Especially because I see we use this just once.
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.
done.
const policyID = policy?.id ?? '-1'; | ||
const config = policy?.connections?.netsuite?.options.config; | ||
const importFields = CONST.NETSUITE_CONFIG.IMPORT_FIELDS; | ||
const importCustomFields = CONST.NETSUITE_CONFIG.IMPORT_CUSTOM_FIELDS; |
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.
NAB: Same as above.
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.
Done.
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.
Thanks!
✋ 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/yuwenmemon in version: 9.0.4-0 🚀
|
🚀 Cherry-picked to staging by https://github.com/tgolen in version: 9.0.4-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
Details
Covers the implementation of Import options page.
This is one of the FE PRs for NetSuite without the proper auth flow integrated. Hence, to get this working we'll need to have a few pre-requisites:
NetSuite
beta enabled for the user. You can return true in the canUseNetSuiteIntegration method.connections: {netsuite: <linkedjson>}
.Fixed Issues
$ #43437
PROPOSAL:
Tests
Accounting
from the LHSNet Suite
in the active connections along with theOracle NetSuite
logo.Import
button.a. Selected subsidiary shows up as the subtitle of the page
b.
Expense categories
is locked switchedc. For each of the fields
departments
,locations
, etc. the title along with the selected value shows up.d. For point c, if the value is not set then it should show
NetSuite employee default
.e. Tax switch shows up based on the
syncTax
field.f.
Custom segments/records
andCustom lists
button show up. (won't have any action linked to it).Tax
switch and verify thatsyncTax
is updated based on the switch value.Offline tests
Same as Test Steps. The optimistic update shows up, but it won't be greyed out as that logic is pending.
QA Steps
Same as Test steps.
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-netsuite-import-options.mov
Android: mWeb Chrome
mweb-chrome-netsuite-import-options.mov
iOS: Native
ios-netsuite-import-options.mov
iOS: mWeb Safari
mweb-safari-netsuite-import-options.mov
MacOS: Chrome / Safari
Video
web-netsuite-import-options-video.mov
Screenshot
Tax Error RBR
Sync Tax Condition
web-sync-tax-condition.mov
MacOS: Desktop
desktop-netsuite-import-options.mov