-
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
Fix company's website step is skipped #46940
Merged
neil-marcellini
merged 7 commits into
Expensify:main
from
bernhardoj:fix/45283-company-step-is-skipped
Aug 8, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f525a3e
fix website step is skipped
bernhardoj 9e530a0
only checks for undefined
bernhardoj 297c05a
reset website to undefined
bernhardoj 0628d37
linter
bernhardoj 60a5bdd
remove unnecessary checks
bernhardoj bf68bbb
Merge branch 'main' into fix/45283-company-step-is-skipped
bernhardoj e4f0616
use ?? back
bernhardoj 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 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 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 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 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 | ||
---|---|---|---|---|
|
@@ -13,17 +13,14 @@ import type * as OnyxTypes from '@src/types/onyx'; | |||
type WorkspaceResetBankAccountModalOnyxProps = { | ||||
/** Session info for the currently logged in user. */ | ||||
session: OnyxEntry<OnyxTypes.Session>; | ||||
|
||||
/** The user's data */ | ||||
user: OnyxEntry<OnyxTypes.User>; | ||||
}; | ||||
|
||||
type WorkspaceResetBankAccountModalProps = WorkspaceResetBankAccountModalOnyxProps & { | ||||
/** Reimbursement account data */ | ||||
reimbursementAccount: OnyxEntry<OnyxTypes.ReimbursementAccount>; | ||||
}; | ||||
|
||||
function WorkspaceResetBankAccountModal({reimbursementAccount, session, user}: WorkspaceResetBankAccountModalProps) { | ||||
function WorkspaceResetBankAccountModal({reimbursementAccount, session}: WorkspaceResetBankAccountModalProps) { | ||||
const styles = useThemeStyles(); | ||||
const {translate} = useLocalize(); | ||||
const achData = reimbursementAccount?.achData; | ||||
|
@@ -49,7 +46,7 @@ function WorkspaceResetBankAccountModal({reimbursementAccount, session, user}: W | |||
} | ||||
danger | ||||
onCancel={BankAccounts.cancelResetFreePlanBankAccount} | ||||
onConfirm={() => BankAccounts.resetFreePlanBankAccount(bankAccountID, session, achData?.policyID ?? '-1', user)} | ||||
onConfirm={() => BankAccounts.resetFreePlanBankAccount(bankAccountID, session, achData?.policyID ?? '-1')} | ||||
Comment on lines
-52
to
+49
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. Could you please explain this change? 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. The
|
||||
shouldShowCancelButton | ||||
isVisible | ||||
/> | ||||
|
@@ -62,7 +59,4 @@ export default withOnyx<WorkspaceResetBankAccountModalProps, WorkspaceResetBankA | |||
session: { | ||||
key: ONYXKEYS.SESSION, | ||||
}, | ||||
user: { | ||||
key: ONYXKEYS.USER, | ||||
}, | ||||
})(WorkspaceResetBankAccountModal); |
Oops, something went wrong.
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.
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: The defaultCompanyWebsite has changed from
??
to||
so we can use empty string for that caseThere 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.
The value reset here is for the form draft, so it does have no effect on
defaultCompanyWebsite
. If we use an empty string, then the default value won't be applied.App/src/components/Form/FormProvider.tsx
Lines 252 to 255 in 53eee53
I updated the
defaultCompanyWebsite
from??
to||
becausereimbursementAccount?.achData?.website
is a string, so I think it's safer to use||
. Do you think we should just revert 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.
@bernhardoj I got it, we can revert change the
defaultCompanyWebsite
from??
to||
and keep this changeThere 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.
NAB: Would null be better to remove the key from Onyx?