-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add DirectDebitField Component #464
Conversation
c8c5937
to
f098189
Compare
f098189
to
de1eb6d
Compare
de1eb6d
to
4f8c58c
Compare
9790c1c
to
92263b3
Compare
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.
Thank you for splitting the commits, using very descriptive commit messages and having a well-structured explanation text in the PR. This has already helped me understand the ESLint changes and will prove very valuable in the future.
I'm approving this because my user tests did not reveal mistakes, it's more accessible and most of my comments are suggestions and questions. You can choose which ones you address and how.
34aa809
to
471f0d4
Compare
This is drop in replacement for the PaymentBankData component that is more accessible and integrated with our form fields components. - Added accountNumber and bankCode fields, as the direct debit field will accept both IBAN and account numbers making the naming confusing. - Added getters actions and mutations for the new fields. - Updated the typescript interfaces to reflect the new structure. This makes the API calls that validate the bank data more consistent with our other API resources The pattern for our form fields is that they take in model values and do not access the store directly, We then use wrapper components to manage store access. That's what this component is for. This handles visibility of labels, and formatting values when fields receive input. As we're formatting the value in the input box we need a field similar to TextField that uses a prop as the value rather than take in a model. Ticket: https://phabricator.wikimedia.org/T364953
- Swap the PaymentBankData component for the new field - Remove old store injection with key - Update tests Ticket: https://phabricator.wikimedia.org/T364953
Now the donation and membership forms use the new components the old ones can be deleted. Ticket: https://phabricator.wikimedia.org/T364953
We use try catch blocks to handle rejected promises in async await functions. Eslint forces us to have the error variable but the typescript linter throws an error that they're unused.
Now the bank data values are all part of the store we can restore them on refresh. Ticket: https://phabricator.wikimedia.org/T364953
471f0d4
to
cb47bf6
Compare
This is drop in replacement for the PaymentBankData component
that is more accessible and integrated with our form fields
components.
Refactored the bankdata store
field will accept both IBAN and account numbers making the
naming confusing.
Added an API resource
This makes the API calls that validate the bank data more
consistent with our other API resources
Added a BankFields component
The pattern for our form fields is that they take in model
values and do not access the store directly, We then use
wrapper components to manage store access. That's what this
component is for.
Added a DirectDebitField
This handles visibility of labels, and formatting values
when fields receive input.
Added TextValueField
As we're formatting the value in the input box we need
a field similar to TextField that uses a prop as the value
rather than take in a model.
Ticket: https://phabricator.wikimedia.org/T364953