-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat(Bonus Pagamenti Digitali): [#174847319] Iban insertion screen #2259
Conversation
…on-store-reducers
…tion-store-reducers
…on-store-reducers
…on-store-reducers
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2259 +/- ##
==========================================
+ Coverage 47.83% 47.84% +0.01%
==========================================
Files 539 540 +1
Lines 15640 15656 +16
Branches 3136 3140 +4
==========================================
+ Hits 7481 7491 +10
- Misses 8118 8124 +6
Partials 41 41
Continue to review full report at Codecov.
|
…on-store-reducers
…anInsertionScreen
…d.ts Co-authored-by: Matteo Boschi <[email protected]>
Co-authored-by: Matteo Boschi <[email protected]>
…anInsertionScreen
Codecov Report
@@ Coverage Diff @@
## master #2259 +/- ##
==========================================
+ Coverage 47.83% 47.84% +0.01%
==========================================
Files 539 540 +1
Lines 15640 15656 +16
Branches 3138 2885 -253
==========================================
+ Hits 7481 7491 +10
- Misses 8118 8124 +6
Partials 41 41
Continue to review full report at Codecov.
|
|
||
export const IbanInsertionComponent: React.FunctionComponent<Props> = props => { | ||
const [iban, setIban] = useState(""); | ||
const isInvalidIban = iban.length > 0 && Iban.decode(iban).isLeft(); |
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.
const isInvalidIban = iban.length > 0 && Iban.decode(iban).isLeft(); | |
const isInvalidIban = Iban.decode(iban).isLeft(); |
Iban.decode("") -> left
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.
export const IbanInsertionComponent: React.FunctionComponent<Props> = props => { | ||
const [iban, setIban] = useState(""); | ||
const isInvalidIban = iban.length > 0 && Iban.decode(iban).isLeft(); | ||
const userCanContinue = !isInvalidIban && iban.length > 0; |
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.
const userCanContinue = !isInvalidIban && iban.length > 0; | |
const userCanContinue = !isInvalidIban; |
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.
Same reason as in the previous comment
ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComponent.tsx
Outdated
Show resolved
Hide resolved
ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComponent.tsx
Outdated
Show resolved
Hide resolved
…onent.tsx Co-authored-by: Matteo Boschi <[email protected]>
…onent.tsx Co-authored-by: Matteo Boschi <[email protected]>
This pr depends on #2252
Short description
This pr adds the
IbanInsertionScreen
.List of changes proposed in this pull request
IbanInsertionComponent
, the graphical component that allows the insertion of an IBAN.Before trying to register the Iban and have the remote result, it is checked that the text entered is decodable according to the
Iban
type. The maximum size is set to 34 (maximum length of an IBAN) although an Italian iban has a maximum length of 27FooterTwoButtons.tsx
in order to support a left text for the button.How to test
bpdIbanInsertionStart()