[#Wave-Control: Add NetSuite]: Added NetSuite connect button and fixed copies#44218
Conversation
…v/App into mj-netsuite-token-input-auth
NetSuite connect button and fixed bugsNetSuite connect button and fixed copies
NetSuite connect button and fixed copiesNetSuite connect button and fixed copies
|
@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] |
|
@ishpaul777 You can ignore this PR. @yuwenmemon @shubham1206agra The PR can be reviewed after we merge the subsidiary PR. I posted a message with a question here. @Expensify/design for the copy on the disconnect modals. |
|
Visually it looks good. Might lack context, but looping in @jamesdeanexpensify for copy check :) |
|
Chatting here! |
|
Here is where we landed:
|
|
@jamesdeanexpensify Can you also share the Spanish translation? |
|
NetSuite connect button and fixed copiesNetSuite connect button and fixed copies
|
@shubham1206agra @yuwenmemon @Expensify/design @jamesdeanexpensify This is ready for review. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2024-06-28.at.12.10.43.AM.moviOS: NativeScreen.Recording.2024-06-28.at.12.30.55.AM.moviOS: mWeb SafariScreen.Recording.2024-06-28.at.12.08.05.AM.movMacOS: Chrome / SafariScreen.Recording.2024-06-28.at.12.06.44.AM.movMacOS: DesktopScreen.Recording.2024-06-28.at.12.13.09.AM.mov |
src/CONST.ts
Outdated
| XERO: 'xero', | ||
| NETSUITE: 'netsuite', | ||
| }, | ||
| NAME_MAP: { |
There was a problem hiding this comment.
| NAME_MAP: { | |
| NAME_USER_FRIENDLY: { |
This will match the constant names we use in the API and is also more intuitive.
src/languages/en.ts
Outdated
| case CONST.POLICY.CONNECTIONS.NAME.XERO: | ||
| return "Can't connect to Xero."; | ||
| case CONST.POLICY.CONNECTIONS.NAME.NETSUITE: | ||
| return "Can't connec to NetSuite"; |
There was a problem hiding this comment.
| return "Can't connec to NetSuite"; | |
| return "Can't connect to NetSuite."; |
src/languages/en.ts
Outdated
| const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integration'; | ||
| return `Disconnect ${integrationName}`; |
There was a problem hiding this comment.
Can this be simplified down to:
| const integrationName = integration && CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integration] : 'integration'; | |
| return `Disconnect ${integrationName}`; | |
| return `Disconnect ${CONST.POLICY.CONNECTIONS.NAME_MAP[integration] ?? 'integration'}`; |
There was a problem hiding this comment.
Can we just be strict with the types for the function?
disconnectPrompt: (currentIntegration: ConnectionName): string => `Are you sure you want to disconnect ${CONST.POLICY.CONNECTIONS.NAME_USER_FRIENDLY[currentIntegration] ?? 'integration'}?`},There was a problem hiding this comment.
Good point, let me check if it has any other usage. I can update. Give me a few mins.
There was a problem hiding this comment.
I was able to update it for connectTitle. For disconnectTitle, it allows undefined.
Argument of type 'PolicyConnectionName | undefined' is not assignable to parameter of type 'keyof Connections'.\n Type 'undefined' is not assignable to type 'keyof Connections'.
src/languages/en.ts
Outdated
| const integrationName = | ||
| integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'accounting integration'; | ||
| return `Connect ${integrationName}`; | ||
| }, |
src/languages/en.ts
Outdated
| const integrationName = | ||
| currentIntegration && CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] ? CONST.POLICY.CONNECTIONS.NAME_MAP[currentIntegration] : 'this integration'; | ||
| return `Are you sure you want to disconnect ${integrationName}?`; | ||
| }, | ||
| connectPrompt: (integrationToConnect?: ConnectionName): string => { | ||
| const integrationName = | ||
| integrationToConnect && CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] ? CONST.POLICY.CONNECTIONS.NAME_MAP[integrationToConnect] : 'this accounting integration'; | ||
| return `Are you sure you want to connect ${integrationName}? This will remove any existing acounting connections.`; |
src/languages/es.ts
Outdated
| case CONST.POLICY.CONNECTIONS.NAME.XERO: | ||
| return 'No se puede conectar a Xero'; | ||
| case CONST.POLICY.CONNECTIONS.NAME.NETSUITE: | ||
| return 'No se puede conectar a NetSuite'; |
There was a problem hiding this comment.
| return 'No se puede conectar a NetSuite'; | |
| return 'No se puede conectar a NetSuite.'; |
Let's also add the punctuation for the Xero copy above.
|
✋ 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/jasperhuangg in version: 9.0.3-7 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|

Details
While adding the
ConnectToNetSuiteButtoncomponent, I found several hardcoded copies for Xero and QBO. This could cause problems when we add NetSuite and other integrations. For instance, when connecting toXerowith existing NetSuite connection it would show:Are you sure you want to disconnect QuickBooks Online to set up Xero.Hence to avoid clutter in the Token input PR, I created this PR to fix all copies and add the connect button for NetSuite.
Fixed Issues
$ #43434
PROPOSAL:
Pre-requisites:
NetSuitebeta enabled for the user. You can return true in the canUseNetSuiteIntegration method.connections: {netsuite: <linkedjson>}, when we need to test disconnect NetSuite.Tests
title:
Disconnect {currentIntegrationName}subtitle:
Are you sure you want to disconnect {currentIntegrationName}?Connectfor any other integration, I'll takeXero.title:
Connect [Accounting Integration]subtitle:
Are you sure you want to connect to [Accounting Integration]? This will remove any existing accounting connections.Offline tests
N/A
QA Steps
Same as Test steps.
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: mWeb Chrome
mweb-chrome-connect-content.mov
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web-connect-button-content.mov
MacOS: Desktop
desktop-connect-button-content.mov