Skip to content

Commit

Permalink
Merge branch 'master' into IOBP-493-IOBP-491-removal-of-BV-and-BPD-en…
Browse files Browse the repository at this point in the history
…dpoints-and-scripts
  • Loading branch information
mastro993 authored Jan 31, 2024
2 parents db09fe3 + d196ef6 commit 7cbb58a
Show file tree
Hide file tree
Showing 26 changed files with 43 additions and 408 deletions.
2 changes: 0 additions & 2 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ BONUS_API_UAT_BASEURL='https://api-io.uat.cstar.pagopa.it'
LOCAL_SERVICE_WEB_URL='http://127.0.0.1:3000/services_web_view'
# EU Covid Certificate
EU_COVID_CERT_ENABLED=YES
# SiciliaVola configuration
SICILIAVOLA_ENABLED=NO
# Zendesk configuration
ZENDESK_ENABLED=YES
# CGN new merchants features
Expand Down
2 changes: 0 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ BONUS_API_UAT_BASEURL='https://api-io.uat.cstar.pagopa.it'
LOCAL_SERVICE_WEB_URL='https://io.italia.it/app-content/enti-servizi.html'
# EU Covid Certificate
EU_COVID_CERT_ENABLED=YES
# SiciliaVola configuration
SICILIAVOLA_ENABLED=NO
# Zendesk configuration
ZENDESK_ENABLED=YES
# CGN new merchants features
Expand Down
3 changes: 0 additions & 3 deletions ts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ export const isPlaygroundsEnabled: boolean =
export const euCovidCertificateEnabled: boolean =
Config.EU_COVID_CERT_ENABLED === "YES";

// SiciliaVola Feature Flag
export const svEnabled: boolean = Config.SICILIAVOLA_ENABLED === "YES";

// Zendesk Feature Flag
export const zendeskEnabled: boolean = Config.ZENDESK_ENABLED === "YES";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useNavigation } from "@react-navigation/native";
import { VSpacer } from "@pagopa/io-app-design-system";
import * as React from "react";
import { SafeAreaView, ScrollView } from "react-native";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import { VSpacer } from "@pagopa/io-app-design-system";
import {
RadioButtonList,
RadioItem
Expand All @@ -16,7 +15,6 @@ import I18n from "../../../../i18n";
import { GlobalState } from "../../../../store/reducers/types";
import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp";
import { formatNumberAmount } from "../../../../utils/stringBuilder";
import SV_ROUTES from "../navigation/routes";
import {
svGenerateVoucherCancel,
svGenerateVoucherUnderThresholdIncome
Expand Down Expand Up @@ -51,7 +49,6 @@ const CheckIncomeComponent = (props: Props): React.ReactElement => {
const [incomeUnderThreshold, setIncomeUnderThreshold] = React.useState<
boolean | undefined
>();
const navigation = useNavigation();

const handleContinue = () => {
if (incomeUnderThreshold === undefined) {
Expand All @@ -61,10 +58,7 @@ const CheckIncomeComponent = (props: Props): React.ReactElement => {

if (incomeUnderThreshold) {
props.onContinuePress();
return;
}

navigation.navigate(SV_ROUTES.VOUCHER_GENERATION.KO_CHECK_INCOME_THRESHOLD);
};

const cancelButtonProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useNavigation } from "@react-navigation/native";
import { VSpacer } from "@pagopa/io-app-design-system";
import React from "react";
import { SafeAreaView, ScrollView } from "react-native";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import { VSpacer } from "@pagopa/io-app-design-system";
import {
RadioButtonList,
RadioItem
Expand All @@ -16,7 +15,6 @@ import FooterWithButtons from "../../../../components/ui/FooterWithButtons";
import I18n from "../../../../i18n";
import { GlobalState } from "../../../../store/reducers/types";
import { emptyContextualHelp } from "../../../../utils/emptyContextualHelp";
import SV_ROUTES from "../navigation/routes";
import { svGenerateVoucherCancel } from "../store/actions/voucherGeneration";

type Props = ReturnType<typeof mapDispatchToProps> &
Expand All @@ -37,8 +35,6 @@ const CheckResidenceComponent = (props: Props): React.ReactElement => {
boolean | undefined
>();

const navigation = useNavigation();

const cancelButtonProps = {
primary: false,
bordered: true,
Expand All @@ -47,12 +43,7 @@ const CheckResidenceComponent = (props: Props): React.ReactElement => {
};
const continueButtonProps = {
bordered: false,
onPress: () =>
isResidentInSicily === true
? navigation.navigate(
SV_ROUTES.VOUCHER_GENERATION.SELECT_BENEFICIARY_CATEGORY
)
: navigation.navigate(SV_ROUTES.VOUCHER_GENERATION.KO_CHECK_RESIDENCE),
onPress: () => isResidentInSicily === true,
title: I18n.t("global.buttons.continue"),
disabled: isResidentInSicily === undefined
};
Expand Down
14 changes: 0 additions & 14 deletions ts/features/bonus/siciliaVola/navigation/actions.ts

This file was deleted.

127 changes: 0 additions & 127 deletions ts/features/bonus/siciliaVola/navigation/navigator.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions ts/features/bonus/siciliaVola/navigation/params.ts

This file was deleted.

28 changes: 0 additions & 28 deletions ts/features/bonus/siciliaVola/navigation/routes.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ import {
navigateToWorkunitGenericFailureScreen
} from "../../../../../store/actions/navigation";
import { SagaCallReturnType } from "../../../../../types/utils";
import { navigateToSvCheckStatusRouterScreen } from "../../navigation/actions";
import SV_ROUTES from "../../navigation/routes";
import {
svGenerateVoucherBack,
svGenerateVoucherCancel,
svGenerateVoucherCompleted,
svGenerateVoucherFailure
svGenerateVoucherCompleted
} from "../../store/actions/voucherGeneration";

/**
Expand All @@ -26,15 +23,9 @@ import {
* - The user aborts the voucher generation {@link svGenerateVoucherCancel}
* - The user chooses back from the first screen {@link svGenerateVoucherBack}
*/
// eslint-disable-next-line require-yield
function* svVoucherGenerationWorkUnit() {
return yield* call(executeWorkUnit, {
startScreenNavigation: navigateToSvCheckStatusRouterScreen,
startScreenName: SV_ROUTES.VOUCHER_GENERATION.CHECK_STATUS,
complete: svGenerateVoucherCompleted,
back: svGenerateVoucherBack,
cancel: svGenerateVoucherCancel,
failure: svGenerateVoucherFailure
});
return null;
}

/**
Expand All @@ -47,13 +38,13 @@ export function* handleSvVoucherGenerationStartActivationSaga(): SagaIterator {
const sagaExecution = () =>
withResetNavigationStack(svVoucherGenerationWorkUnit);

const res: SagaCallReturnType<typeof executeWorkUnit> = yield* call(
const res: SagaCallReturnType<typeof executeWorkUnit> | null = yield* call(
sagaExecution
);

if (
// if the activation started from the CTA -> go back
initialRoute === SV_ROUTES.VOUCHER_GENERATION.CHECK_STATUS
initialRoute === null
) {
yield* call(navigateBack);
}
Expand Down
Loading

0 comments on commit 7cbb58a

Please sign in to comment.