Skip to content

Commit

Permalink
chore: [IOBP-455] Removal of BonusVacanze references across the app (#…
Browse files Browse the repository at this point in the history
…5408)

## Short description
removal the major references of BonusVacanze from the app

## List of changes proposed in this pull request
- removed navigation
- removed the specific map entries and feature flags
- extracted shared logic where needed

after this PR, the full removal of BonusVacanze should come much easier,
although still with some hassle.

## How to test
run the app, and with the `dev-server` open:
- make sure it correctly runs
- make sure that CGN can onboard and work as intended
- make sure you can add cards as if you were in the `master` branch

overall, nothing should have changed from the `master` branch from an
user's perspective.

---------

Co-authored-by: Federico Mastrini <[email protected]>
  • Loading branch information
forrest57 and mastro993 authored Jan 18, 2024
1 parent c6b4d95 commit 3a476ba
Show file tree
Hide file tree
Showing 28 changed files with 235 additions and 679 deletions.
6 changes: 3 additions & 3 deletions ts/components/wallet/WalletHomeHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { HSpacer, IOColors, Icon, VSpacer } from "@pagopa/io-app-design-system";
import * as O from "fp-ts/lib/Option";
import * as React from "react";
import { FlatList, StyleSheet, View } from "react-native";
import { IOColors, Icon, HSpacer, VSpacer } from "@pagopa/io-app-design-system";
import { navigateToAvailableBonusScreen } from "../../features/bonus/bonusVacanze/navigation/action";
import { navigateToAvailableBonusListScreen } from "../../features/bonus/common/navigation/actions";
import I18n from "../../i18n";
import NavigationService from "../../navigation/NavigationService";
import { navigateToWalletAddPaymentMethod } from "../../store/actions/navigation";
Expand Down Expand Up @@ -59,7 +59,7 @@ export const useWalletHomeHeaderBottomSheet = (): IOBottomSheetModal => {
title: I18n.t("wallet.methods.bonus.name"),
subtitle: I18n.t("wallet.methods.bonus.description"),
testId: "bonusNameTestId",
onPress: navigateToAvailableBonusScreen
onPress: navigateToAvailableBonusListScreen
}
];

Expand Down
3 changes: 0 additions & 3 deletions ts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ export const mixpanelToken: string = Config.MIXPANEL_TOKEN;
export const isDebugBiometricIdentificationEnabled =
Config.DEBUG_BIOMETRIC_IDENTIFICATION === "YES";

export const bonusVacanzeEnabled: boolean =
Config.BONUS_VACANZE_ENABLED === "YES";

export const myPortalEnabled: boolean = Config.MYPORTAL_ENABLED === "YES";

export const bpdEnabled: boolean = Config.BPD_ENABLED === "YES";
Expand Down
39 changes: 1 addition & 38 deletions ts/features/bonus/__mock__/availableBonuses.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { BonusAvailable } from "../../../../definitions/content/BonusAvailable";
import { BonusesAvailable } from "../../../../definitions/content/BonusesAvailable";
import {
ID_BONUS_VACANZE_TYPE,
ID_BPD_TYPE,
ID_CGN_TYPE
} from "../common/utils";
import { ID_BPD_TYPE, ID_CGN_TYPE } from "../common/utils";
import { BonusVisibilityEnum } from "../../../../definitions/content/BonusVisibility";

export const contentBonusVacanzeIT = `#### Chi può richiederlo?
Expand Down Expand Up @@ -107,39 +103,6 @@ export const bpdBonus: BonusAvailable = {
};

export const availableBonuses: BonusesAvailable = [
{
id_type: ID_BONUS_VACANZE_TYPE,
it: {
name: "Bonus Vacanze",
description:
"Fino a 500€ a nucleo familiare per andare in vacanza in Italia",
subtitle:
"L'incentivo per supportare il settore del turismo dopo il lockdown richiesto dal COVID-19",
title: "Richiesta Bonus Vacanze",
content: contentBonusVacanzeIT,
tos_url: "https://io.italia.it/app-content/bonus_vacanze_tos.html"
},
en: {
name: "Bonus Vacanze",
description: "Up to € 500 per family to go on holiday in Italy",
subtitle:
"The incentive established to support tourism after the lockdown due to the Coronavirus emergency.",
title: "Bonus Vacanze Request",
content: contentBonusVacanzeEN,
tos_url: "https://io.italia.it/app-content/bonus_vacanze_tos.html"
},
service_id: "01EB8AXKNV6NMSP2R25KSGF743",
is_active: false,
hidden: true,
visibility: BonusVisibilityEnum.hidden,
valid_from: new Date("2020-07-01T00:00:00.000Z"),
valid_to: new Date("2020-12-31T00:00:00.000Z"),
cover:
"https://raw.githubusercontent.com/pagopa/io-services-metadata/master/bonus/vacanze/logo/logo_BonusVacanze.png",
sponsorship_description: "Agenzia delle Entrate",
sponsorship_cover:
"https://raw.githubusercontent.com/pagopa/io-services-metadata/master/bonus/vacanze/logo/logo_AgenziaEntrate.png"
},
bpdBonus,
{
id_type: ID_CGN_TYPE,
Expand Down
5 changes: 1 addition & 4 deletions ts/features/bonus/bonusVacanze/components/RequestBonus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import SectionCardComponent, {
SectionCardStatus
} from "../../../../components/wallet/card/SectionCardComponent";
import I18n from "../../../../i18n";
import { ID_BONUS_VACANZE_TYPE } from "../../common/utils";
import BonusCardComponent from "./BonusCardComponent";

type OwnProps = {
Expand Down Expand Up @@ -49,9 +48,7 @@ const RequestBonus: React.FunctionComponent<OwnProps> = (props: OwnProps) => {
const { onButtonPress, activeBonuses, onBonusPress, availableBonusesList } =
props;
const maybeBonusVacanzeCategory = pipe(
O.fromNullable(
availableBonusesList.find(bi => bi.id_type === ID_BONUS_VACANZE_TYPE)
)
O.fromNullable(availableBonusesList.find(bi => bi.id_type === undefined))
);

const validFrom = pipe(
Expand Down
219 changes: 0 additions & 219 deletions ts/features/bonus/bonusVacanze/navigation/action.ts

This file was deleted.

Loading

0 comments on commit 3a476ba

Please sign in to comment.