Skip to content
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

chore: [IOBP-488] Refactor bonus features to remove cross feature dependencies #5397

Merged
merged 14 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ts/boot/configureStoreAndPersistor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
persistStore
} from "redux-persist";
import createSagaMiddleware from "redux-saga";
import { remoteUndefined } from "../features/bonus/bpd/model/RemoteValue";
import { remoteUndefined } from "../common/model/RemoteValue";
import { CURRENT_REDUX_LOLLIPOP_STORE_VERSION } from "../features/lollipop/store";
import {
initialLollipopState,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IOStyles } from "@pagopa/io-app-design-system";
import * as React from "react";
import { View, StyleSheet } from "react-native";
import { IOStyles } from "../../../../components/core/variables/IOStyles";
import variables from "../../../../theme/variables";
import { StyleSheet, View } from "react-native";
import variables from "../theme/variables";

// TODO: after bonus vacanze,create a common style for footer, atm duplicated in FooterWithButtons
const styles = StyleSheet.create({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Millisecond } from "@pagopa/ts-commons/lib/units";
import * as React from "react";
import { useEffect } from "react";
import { View, ActivityIndicator, SafeAreaView } from "react-native";
import { IOStyles } from "../../../../../components/core/variables/IOStyles";
import { InfoScreenComponent } from "../../../../../components/infoScreen/InfoScreenComponent";
import GenericErrorComponent from "../../../../../components/screens/GenericErrorComponent";
import { WithTestID } from "../../../../../types/WithTestID";
import { setAccessibilityFocus } from "../../../../../utils/accessibility";
import { ActivityIndicator, SafeAreaView, View } from "react-native";
import { WithTestID } from "../types/WithTestID";
import { setAccessibilityFocus } from "../utils/accessibility";
import { IOStyles } from "./core/variables/IOStyles";
import { InfoScreenComponent } from "./infoScreen/InfoScreenComponent";
import GenericErrorComponent from "./screens/GenericErrorComponent";

export type LoadingErrorProps = WithTestID<{
isLoading: boolean;
Expand Down
2 changes: 1 addition & 1 deletion ts/components/PinCreationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ButtonOutline, IOColors, VSpacer } from "@pagopa/io-app-design-system";
import * as React from "react";
import { ScrollView, StyleSheet, View } from "react-native";
import { defaultPin } from "../config";
import { confirmButtonProps } from "../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations";
import { isValidPinNumber } from "../features/fastLogin/utils/pinPolicy";
import I18n from "../i18n";
import { trackPinError } from "../screens/profile/analytics";
Expand All @@ -12,6 +11,7 @@ import { PinString } from "../types/PinString";
import { getFlowType } from "../utils/analytics";
import { PIN_LENGTH_SIX } from "../utils/constants";
import { isDevEnv } from "../utils/environment";
import { confirmButtonProps } from "./buttons/ButtonConfigurations";
import { LabelledItem } from "./LabelledItem";
import { InfoBox } from "./box/InfoBox";
import { Body } from "./core/typography/Body";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IOColors, IOIcons } from "@pagopa/io-app-design-system";
import { BlockButtonProps } from "../../../../../components/ui/BlockButtons";
import I18n from "../../../../../i18n";
import { BlockButtonProps } from "../ui/BlockButtons";
import I18n from "../../i18n";

/**
* A common configuration for all the buttons that represent a cancel/abort action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Text as NBButtonText } from "native-base";
import * as React from "react";
import { View, StyleSheet } from "react-native";
import { HSpacer, Icon, VSpacer } from "@pagopa/io-app-design-system";
import ButtonDefaultOpacity from "../../../../../components/ButtonDefaultOpacity";
import { BlockButtonProps } from "../../../../../components/ui/BlockButtons";
import ButtonDefaultOpacity from "../ButtonDefaultOpacity";
import { BlockButtonProps } from "../ui/BlockButtons";
import { FooterTopShadow } from "../FooterTopShadow";

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion ts/components/error/WorkunitGenericFailure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { SafeAreaView } from "react-native";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import image from "../../../img/servicesStatus/error-detail-icon.png";
import { cancelButtonProps } from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations";
import { cancelButtonProps } from "../buttons/ButtonConfigurations";
import I18n from "../../i18n";
import { navigateBack } from "../../store/actions/navigation";
import { IOStyles } from "../core/variables/IOStyles";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import FooterWithButtons from "../../../../../components/ui/FooterWithButtons";
import FooterWithButtons from "../ui/FooterWithButtons";
import { cancelButtonProps } from "../buttons/ButtonConfigurations";

export type OnCancelProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react";
import FooterWithButtons from "../../../../../components/ui/FooterWithButtons";
import FooterWithButtons from "../ui/FooterWithButtons";
import {
cancelButtonProps,
confirmButtonProps,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { useEffect, useState } from "react";
import * as React from "react";
import { View, StyleSheet } from "react-native";
import BaseScreenComponent from "../../../../../components/screens/BaseScreenComponent";
import { EdgeBorderComponent } from "../../../../../components/screens/EdgeBorderComponent";
import ScreenContent from "../../../../../components/screens/ScreenContent";
import Markdown from "../../../../../components/ui/Markdown";
import themeVariables from "../../../../../theme/variables";
import BaseScreenComponent from "../screens/BaseScreenComponent";
import { EdgeBorderComponent } from "../screens/EdgeBorderComponent";
import ScreenContent from "../screens/ScreenContent";
import Markdown from "../ui/Markdown";
import themeVariables from "../../theme/variables";

/**
* TODO Rename the title prop in the BaseScreenComponent to navigationTitle
Expand Down
2 changes: 1 addition & 1 deletion ts/components/screens/LogoutScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HSpacer } from "@pagopa/io-app-design-system";
import { Dispatch } from "../../store/actions/types";
import { logoutRequest } from "../../store/actions/authentication";
import I18n from "../../i18n";
import { LoadingErrorComponent } from "../../features/bonus/bonusVacanze/components/loadingErrorScreen/LoadingErrorComponent";
import { LoadingErrorComponent } from "../LoadingErrorComponent";
import BaseScreenComponent from "./BaseScreenComponent";

type Props = ReturnType<typeof mapDispatchToProps>;
Expand Down
2 changes: 1 addition & 1 deletion ts/components/wallet/OutcomeCodeMessageComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import FooterWithButtons from "../ui/FooterWithButtons";
import {
cancelButtonProps,
confirmButtonProps
} from "../../features/bonus/bonusVacanze/components/buttons/ButtonConfigurations";
} from "../buttons/ButtonConfigurations";
import { OutcomeCode } from "../../types/outcomeCode";
import { getFullLocale } from "../../utils/locale";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { BonusAvailable } from "../../../../../definitions/content/BonusAvailable";
import { BonusesAvailable } from "../../../../../definitions/content/BonusesAvailable";
import { BonusAvailable } from "../../../../definitions/content/BonusAvailable";
import { BonusesAvailable } from "../../../../definitions/content/BonusesAvailable";
import {
ID_BONUS_VACANZE_TYPE,
ID_BPD_TYPE,
ID_CGN_TYPE
} from "../utils/bonus";
import { BonusVisibilityEnum } from "../../../../../definitions/content/BonusVisibility";
} from "../common/utils";
import { BonusVisibilityEnum } from "../../../../definitions/content/BonusVisibility";

export const contentBonusVacanzeIT = `#### Chi può richiederlo?

Expand Down
Loading
Loading