-
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
Trim the value when going back on connect bank account #28305
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
183e3fe
Trim the value when going back on connect bank account
dukenv0307 99477df
use draft if the default value is empty
dukenv0307 04e7887
fix typo
dukenv0307 161abe5
save value to draft after updating data successfully
dukenv0307 15ef37f
fix merge main
dukenv0307 883db65
fix jest
dukenv0307 10f72f8
fix lint
dukenv0307 0fa5251
Merge branch 'main' into fix/25996
dukenv0307 4532a36
add comment
dukenv0307 3c4be81
create a const for fields of the step
dukenv0307 936289c
fix lint
dukenv0307 88fc114
Merge branch 'fix/25996' of https://github.com/dukenv0307/App into fi…
dukenv0307 25c2366
reuse the const
dukenv0307 6caa796
revert const
dukenv0307 270eddf
fix jest
dukenv0307 12f5f05
fix lint
dukenv0307 a58a10e
fix no update when clicking on go back
dukenv0307 f2b02f1
don't call update when unnecessary
dukenv0307 6139ff2
Merge branch 'main' into fix/25996
dukenv0307 96bf07d
Merge branch 'fix/25996' of https://github.com/dukenv0307/App into fi…
dukenv0307 0de5e86
add default value for param
dukenv0307 b4bfd76
add check for shouldUpdateDataToDraft
dukenv0307 1c1dd14
rename variable
dukenv0307 401e05d
fix lint
dukenv0307 cc35473
remove unuse field
dukenv0307 0314480
Update src/pages/ReimbursementAccount/ReimbursementAccountPage.js
dukenv0307 abb6b20
add description
dukenv0307 bec41b8
add more detail description
dukenv0307 4e75345
fix typo
dukenv0307 c0e74b9
Update src/libs/actions/BankAccounts.js
dukenv0307 0f48962
rename the variable
dukenv0307 8d692b0
Update src/pages/ReimbursementAccount/ReimbursementAccountPage.js
dukenv0307 26e9552
fix lint
dukenv0307 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
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.
It feels like we could be repeating ourselves a bit here, as if someone wanted to add/remove a field they would have to update this list too. Is there any way we could reference the fields in one place?
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.
@Ollyws Here are the list values of the step and this is only called after api update success. If we want to update the change field to draft we will need to compare draft value and
achData
, I think it will take the same amount of time when we merge all fields of the step.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.
@dukenv0307 What I mean is, in RequestorStep for example we already have a list of input IDs could we perhaps use this list instead of creating a new list here, and implement something similar for the other steps?
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.
The list here is the list that I copied in each step.
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.
Should we create a const for the list and re-use this.
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 just updated it.
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.
@dukenv0307 Thanks but I was specifically referring to this list of input IDs, which we could then perhaps get the values of using
_.values()
? Let me know what you think.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.
@Ollyws I see that we only use this in the special form like
AddressForm
, other fields doesn't use this. So I think we don't need to create the list input key like this.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.
Ok well if we're not going to implement that then I don't really see the need for a const, just to be used for the
requiredFields
. Could you revert those two commits? Thanks!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.