-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: [IOBP-617] Add expired state to payment card component (#5674)
> [!WARNING] > This PR depends on #5663, pagopa/io-dev-api-server#361 ## Short description This PR adds the error state to payment cards which are expired. ## List of changes proposed in this pull request - Removed `isError` from `PaymentCardSmallProps`, which is now based on payment expiry date. ## How to test With the` io-dev-api-server`, checkout this PR pagopa/io-dev-api-server#361, enable the **New wallet section** FF from the profile screen in the IO app. Check that in the payments landing screen you can see an error card. ## Preview <img src="https://github.com/pagopa/io-app/assets/6160324/4888a16a-1ce5-4b83-a440-41f73908c593" width="250" /> --------- Co-authored-by: Martino Cesari Tomba <[email protected]> Co-authored-by: Mario Perrotta <[email protected]>
- Loading branch information
1 parent
880c2a0
commit dc9b146
Showing
10 changed files
with
105 additions
and
63 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,13 +32,13 @@ const cardsDataForCarousel: PaymentCardsCarouselProps = { | |
cards: [ | ||
{ | ||
hpan: "9999", | ||
isError: false, | ||
expireDate: new Date(2021, 10), | ||
brand: "maestro", | ||
onPress | ||
}, | ||
{ | ||
holderEmail: "[email protected]", | ||
isError: true, | ||
expireDate: new Date(2021, 10), | ||
onPress | ||
}, | ||
{ | ||
|
@@ -52,7 +52,7 @@ const cardsDataForCarousel: PaymentCardsCarouselProps = { | |
}, | ||
{ | ||
hpan: "9999", | ||
isError: true, | ||
expireDate: new Date(2021, 10), | ||
onPress | ||
}, | ||
{ | ||
|
@@ -146,7 +146,11 @@ export const DSCards = () => ( | |
<View style={styles.content}> | ||
<PaymentCardSmall hpan="9900" brand="maestro" onPress={onPress} /> | ||
<HSpacer size={16} /> | ||
<PaymentCardSmall hpan="9900" brand="maestro" isError /> | ||
<PaymentCardSmall | ||
hpan="9900" | ||
brand="maestro" | ||
expireDate={new Date(2021, 10)} | ||
/> | ||
</View> | ||
</DSComponentViewerBox> | ||
<DSComponentViewerBox name="PagoBANCOMAT"> | ||
|
@@ -163,7 +167,7 @@ export const DSCards = () => ( | |
brand="pagoBancomat" | ||
bankName="Intesa San Paolo" | ||
onPress={onPress} | ||
isError | ||
expireDate={new Date(2021, 10)} | ||
/> | ||
</View> | ||
</DSComponentViewerBox> | ||
|
@@ -177,7 +181,7 @@ export const DSCards = () => ( | |
<PaymentCardSmall | ||
holderEmail="anna_v********@**hoo.it" | ||
onPress={onPress} | ||
isError | ||
expireDate={new Date(2021, 10)} | ||
/> | ||
</View> | ||
</DSComponentViewerBox> | ||
|
@@ -193,7 +197,7 @@ export const DSCards = () => ( | |
bankName="Intesa San Paolo" | ||
brand="maestro" | ||
onPress={onPress} | ||
isError | ||
expireDate={new Date(2021, 10)} | ||
/> | ||
</View> | ||
</DSComponentViewerBox> | ||
|
@@ -209,7 +213,7 @@ export const DSCards = () => ( | |
holderName="Anna Verdi" | ||
holderPhone="+39 340 *** **62" | ||
onPress={onPress} | ||
isError | ||
expireDate={new Date(2021, 10)} | ||
/> | ||
</View> | ||
</DSComponentViewerBox> | ||
|
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
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 |
---|---|---|
|
@@ -17,14 +17,13 @@ const cardsDataForCarousel: PaymentCardsCarouselProps = { | |
cards: [ | ||
{ | ||
hpan: "9900", | ||
isError: false, | ||
brand: "maestro", | ||
onPress, | ||
testID: "card-1" | ||
}, | ||
{ | ||
holderEmail: "[email protected]", | ||
isError: true, | ||
expireDate: new Date(2023, 10), | ||
onPress, | ||
testID: "card-2" | ||
}, | ||
|
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