-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[NetSuite] Add authentication error #48918
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
Merged
yuwenmemon
merged 14 commits into
Expensify:main
from
mananjadhav:mj-netsuite-auth-error
Sep 23, 2024
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
da9099b
feat: added last sync object to netsuite
mananjadhav 2f3099c
feat: move all auth errors to common
mananjadhav cd21a6f
feat: allow redirect for netsuite
mananjadhav 88b6d3c
feat: allow token input form
mananjadhav db3215e
refactor: rename variable
mananjadhav cc97c7a
refactor: fix ts error
mananjadhav 901483c
fix: condition when connection is empty
mananjadhav f28eb8b
fix: condition when connection is empty
mananjadhav 91c788e
Merge branch 'main' of github.com:mananjadhav/App into mj-netsuite-au…
mananjadhav 78dc8f3
refactor: remove unused props
mananjadhav 0c52433
refactor: remove comment
mananjadhav 65358d0
Merge branch 'main' of github.com:mananjadhav/App into mj-netsuite-au…
mananjadhav 4e8e84e
refactor: update lib call
mananjadhav 8953ec6
refactor: use isEmptyObject
mananjadhav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,9 +87,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { | |
| const connectedIntegration = getConnectedIntegration(policy, accountingIntegrations) ?? connectionSyncProgress?.connectionName; | ||
| const synchronizationError = connectedIntegration && getSynchronizationErrorMessage(policy, connectedIntegration, isSyncInProgress, translate, styles); | ||
|
|
||
| // Enter credentials item shouldn't be shown for SageIntacct and NetSuite integrations | ||
| const shouldShowEnterCredentials = | ||
| connectedIntegration && !!synchronizationError && isAuthenticationError(policy, connectedIntegration) && connectedIntegration !== CONST.POLICY.CONNECTIONS.NAME.NETSUITE; | ||
| const shouldShowEnterCredentials = connectedIntegration && !!synchronizationError && isAuthenticationError(policy, connectedIntegration); | ||
|
|
||
| const policyID = policy?.id ?? '-1'; | ||
| // Get the last successful date of the integration. Then, if `connectionSyncProgress` is the same integration displayed and the state is 'jobDone', get the more recent update time of the two. | ||
|
|
@@ -106,7 +104,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { | |
|
|
||
| const overflowMenu: ThreeDotsMenuProps['menuItems'] = useMemo( | ||
| () => [ | ||
| ...(shouldShowEnterCredentials | ||
| ...(shouldShowEnterCredentials && (connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT || connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.NETSUITE) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line introduced this bug (#50357). |
||
| ? [ | ||
| { | ||
| icon: Expensicons.Key, | ||
|
|
@@ -115,7 +113,6 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) { | |
| shouldCallAfterModalHide: true, | ||
| disabled: isOffline, | ||
| iconRight: Expensicons.NewWindow, | ||
| shouldShowRightIcon: connectedIntegration !== CONST.POLICY.CONNECTIONS.NAME.SAGE_INTACCT, | ||
mananjadhav marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| ] | ||
| : [ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.