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

feat(Bonus Pagamenti Digitali): [#175949561] Display cashback future periods ("Inactive") in wallet #2470

Merged
merged 17 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
3bd3b42
[#175949561] add inactive periods in the wallet
fabriziofff Dec 1, 2020
593fcd4
[#175949561] Merge remote-tracking branch 'origin/master' into 175949…
fabriziofff Dec 1, 2020
a801417
Merge branch 'master' into 175949561-dispay-cashback-future-periods-i…
fabriziofff Dec 1, 2020
7d90e04
[#175949561] Merge remote-tracking branch 'origin/master' into 175949…
fabriziofff Dec 1, 2020
9de0775
[#175949561] Merge remote-tracking branch 'origin/175949561-dispay-ca…
fabriziofff Dec 1, 2020
61fa820
[#175949561] change logic
fabriziofff Dec 1, 2020
2639647
[#175949561] add test
fabriziofff Dec 1, 2020
afcc135
[#175949561] add comments
fabriziofff Dec 1, 2020
f721535
[#175949561] Merge remote-tracking branch 'origin/master' into 175949…
fabriziofff Dec 1, 2020
612970e
[#175949561] add preview badge in bpd card preview
fabriziofff Dec 1, 2020
37d9307
Merge branch 'master' into 175949561-dispay-cashback-future-periods-i…
fabriziofff Dec 1, 2020
8312861
Update ts/features/bonus/bpd/store/reducers/__test__/combiner.test.ts
fabriziofff Dec 2, 2020
617b6bb
Update ts/features/bonus/bpd/store/reducers/__test__/combiner.test.ts
fabriziofff Dec 2, 2020
1d3bf74
Update ts/features/bonus/bpd/store/reducers/__test__/combiner.test.ts
fabriziofff Dec 2, 2020
7e1bc2b
Update ts/features/bonus/bpd/store/reducers/__test__/combiner.test.ts
fabriziofff Dec 2, 2020
cf0044f
Update ts/features/bonus/bpd/store/reducers/__test__/combiner.test.ts
fabriziofff Dec 2, 2020
7752c86
Merge branch 'master' into 175949561-dispay-cashback-future-periods-i…
Undermaken Dec 2, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ export const BpdCardComponent: React.FunctionComponent<Props> = (
} = calculateGraphicalState(props);

const isPeriodClosed = props.period.status === "Closed";
const isPeriodInactive = props.period.status === "Inactive";

const FullCard = () => (
<View style={[styles.row, styles.spaced]}>
Expand Down Expand Up @@ -351,10 +352,10 @@ export const BpdCardComponent: React.FunctionComponent<Props> = (
<IconFont name="io-lucchetto" size={16} color={IOColors.white} />
)}
<View hspacer={true} small={true} />
{isInGracePeriod ? (
{isInGracePeriod || isPeriodInactive ? (
<Badge style={styles.badgePreview}>
<Text semibold={true} style={styles.badgeTextBase} dark={true}>
{I18n.t("profile.preferences.list.wip")}
{statusBadge.label}
</Text>
</Badge>
) : (
Expand Down
6 changes: 0 additions & 6 deletions ts/features/bonus/bpd/navigation/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ export const navigateToBpdIbanInsertion = () =>
routeName: BPD_ROUTES.IBAN
});

// TODO: remove after the introduction of the bpd detail screen
export const navigateToBpdTestScreen = () =>
NavigationActions.navigate({
routeName: BPD_ROUTES.TEST
});

// Details

export const navigateToBpdDetails = (specificPeriod?: BpdPeriod) =>
Expand Down
7 changes: 1 addition & 6 deletions ts/features/bonus/bpd/navigation/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import { createStackNavigator } from "react-navigation";
import BpdDetailsScreen from "../screens/details/BpdDetailsScreen";
import BpdTransactionsScreen from "../screens/details/transaction/BpdTransactionsScreen";
import MainIbanScreen from "../screens/iban/MainIbanScreen";
import CtaLandingScreen from "../screens/onboarding/BpdCTAStartOnboardingScreen";
import BpdInformationScreen from "../screens/onboarding/BpdInformationScreen";
import DeclarationScreen from "../screens/onboarding/declaration/DeclarationScreen";
import EnrollPaymentMethodsScreen from "../screens/onboarding/EnrollPaymentMethodsScreen";
import LoadActivateBpdScreen from "../screens/onboarding/LoadActivateBpdScreen";
import LoadBpdActivationStatus from "../screens/onboarding/LoadBpdActivationStatus";
import NoPaymentMethodsAvailableScreen from "../screens/onboarding/NoPaymentMethodsAvailableScreen";
import TMPBpdScreen from "../screens/test/TMPBpdScreen";
import CtaLandingScreen from "../screens/onboarding/BpdCTAStartOnboardingScreen";
import BPD_ROUTES from "./routes";

const BpdNavigator = createStackNavigator(
Expand Down Expand Up @@ -41,10 +40,6 @@ const BpdNavigator = createStackNavigator(
[BPD_ROUTES.TRANSACTIONS]: {
screen: BpdTransactionsScreen
},
// TODO: remove after the introduction of the bpd detail screen
[BPD_ROUTES.TEST]: {
screen: TMPBpdScreen
},
[BPD_ROUTES.CTA_START_BPD]: {
screen: CtaLandingScreen
}
Expand Down
2 changes: 0 additions & 2 deletions ts/features/bonus/bpd/navigation/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const BPD_ROUTES = {
IBAN: "BPD_IBAN",
DETAILS: "BPD_DETAILS",
TRANSACTIONS: "BPD_TRANSACTIONS",
// TODO: remove after the introduction of the bpd detail screen
TEST: "BPD_TEST",
// used from message CTA
CTA_START_BPD: "CTA_START_BPD"
};
Expand Down
5 changes: 3 additions & 2 deletions ts/features/bonus/bpd/screens/details/BpdPeriodSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { BpdCardComponent } from "../../components/bpdCardComponent/BpdCardCompo
import { BpdPeriod } from "../../store/actions/periods";
import { bpdSelectPeriod } from "../../store/actions/selectedPeriod";
import { bpdAmountForSelectedPeriod } from "../../store/reducers/details/amounts";
import { bpdPeriodsAmountSnappedListSelector } from "../../store/reducers/details/combiner";
import { bpdPeriodsAmountWalletVisibleSelector } from "../../store/reducers/details/combiner";
import { bpdSelectedPeriodSelector } from "../../store/reducers/details/selectedPeriod";

export type Props = ReturnType<typeof mapDispatchToProps> &
Expand Down Expand Up @@ -82,7 +82,8 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
});

const mapStateToProps = (state: GlobalState) => ({
periodsWithAmount: bpdPeriodsAmountSnappedListSelector(state),
// ATM the rules of visualization of a period in the selector is the same of the wallet
periodsWithAmount: bpdPeriodsAmountWalletVisibleSelector(state),
selectedPeriod: bpdSelectedPeriodSelector(state),
selectedAmount: bpdAmountForSelectedPeriod(state)
});
Expand Down
135 changes: 0 additions & 135 deletions ts/features/bonus/bpd/screens/test/TMPBpdScreen.tsx

This file was deleted.

93 changes: 0 additions & 93 deletions ts/features/bonus/bpd/screens/test/TMPPeriods.tsx

This file was deleted.

Loading