-
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: [PE-803] CGN discount outcome screen (#6470)
## Short description This pull request introduces functionality for generating a new discount code when the previous one has expired with error handling ## List of changes proposed in this pull request - Added new routes for the expired discount code screen in the navigation files - Updated `CgnDiscountCodeScreen` to include logic for generating new discount codes and handling expired codes - Replace legacy `FooterActions` with `io-app-design-system` component - Reset discount code value at timer expiration ## How to test (From dev, for better test experience, ensure `discountTypes` is a single array containing only the value `api`) - Try to get a discount code with expiration - After the timer expires, ensure the appropriate outcome screen is displayed correctly - Verify if a new discount code is generated pressing on `Usa un nuovo codice` - Confirm the system navigates to the correct error screen when a discount code cannot be generated pressing `Usa un nuovo codice` ## Preview https://github.com/user-attachments/assets/6ec8010a-654c-445d-ba1e-782d8a8b8b1b
- Loading branch information
1 parent
e005566
commit 876403a
Showing
14 changed files
with
2,327 additions
and
47 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
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
23 changes: 23 additions & 0 deletions
23
ts/features/bonus/cgn/screens/discount/CGNDiscountExpiredScreen.tsx
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import { OperationResultScreenContent } from "../../../../../components/screens/OperationResultScreenContent"; | ||
import { useIONavigation } from "../../../../../navigation/params/AppParamsList"; | ||
import I18n from "../../../../../i18n"; | ||
|
||
const CGNDiscountExpiredScreen = () => { | ||
const navigate = useIONavigation(); | ||
const onPress = () => navigate.pop(); | ||
return ( | ||
<OperationResultScreenContent | ||
pictogram="umbrellaNew" | ||
title={I18n.t("bonus.cgn.merchantDetail.discount.error")} | ||
isHeaderVisible={false} | ||
action={{ | ||
label: I18n.t("global.buttons.close"), | ||
onPress, | ||
testID: "close-button" | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default CGNDiscountExpiredScreen; |
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.