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): [#174863094] No payment methods available screen #2262

Merged
merged 69 commits into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
38c2808
add screens
fabriziofff Sep 29, 2020
9fd8633
add comments
fabriziofff Sep 29, 2020
f1ae7e6
Add navigation stack
fabriziofff Sep 29, 2020
caae784
Merge remote-tracking branch 'origin/master' into 174858355-iban-scre…
fabriziofff Sep 29, 2020
327dc47
Merge branch '174858355-iban-screen-placeholder' into 175013432-iban-…
fabriziofff Sep 29, 2020
5b0e6ba
add screen events layout
fabriziofff Sep 30, 2020
7e12ecd
wip
fabriziofff Sep 30, 2020
bc05180
Merge remote-tracking branch 'origin/master' into 175013470-iban-acti…
fabriziofff Sep 30, 2020
d3c494b
Merge branch 'master' into 174858355-iban-screen-placeholder
Undermaken Oct 1, 2020
74fe212
wip
fabriziofff Oct 1, 2020
7ac81fb
Merge remote-tracking branch 'origin/master' into 174858355-iban-scre…
fabriziofff Oct 1, 2020
7eb857a
Merge branch '174858355-iban-screen-placeholder' into 175013432-iban-…
fabriziofff Oct 1, 2020
37acfa6
wip
fabriziofff Oct 1, 2020
436e7a5
rework ibaninsertion
fabriziofff Oct 1, 2020
8a07cd2
clean code
fabriziofff Oct 1, 2020
8588267
Merge remote-tracking branch 'origin/master' into 174858355-iban-scre…
fabriziofff Oct 1, 2020
4bc6a1c
Merge branch '174858355-iban-screen-placeholder' into 175013432-iban-…
fabriziofff Oct 1, 2020
bab1cf2
Merge branch '175013432-iban-navigation-stack' into 175013470-iban-ac…
fabriziofff Oct 1, 2020
1066351
file mssing
fabriziofff Oct 1, 2020
279c176
cleaning
fabriziofff Oct 1, 2020
5c46b46
reorder store
fabriziofff Oct 1, 2020
9ea125e
Merge remote-tracking branch 'origin/master' into 175013470-iban-acti…
fabriziofff Oct 1, 2020
20ce109
clean code
fabriziofff Oct 1, 2020
c48c091
add comments
fabriziofff Oct 2, 2020
53d6141
comments
fabriziofff Oct 2, 2020
0ec71bf
Merge remote-tracking branch 'origin/master' into 175013470-iban-acti…
fabriziofff Oct 2, 2020
704c7a5
Merge branch 'master' into 175013470-iban-action-store-reducers
fabriziofff Oct 2, 2020
ed3a4a9
add locales and validation iban
fabriziofff Oct 2, 2020
728fe4b
revert wallet
fabriziofff Oct 2, 2020
ee639c9
fix
fabriziofff Oct 2, 2020
ed9c96c
[#174847335] add IbanKOWrong
fabriziofff Oct 4, 2020
b84cc75
create common body
fabriziofff Oct 5, 2020
fa791ef
.
fabriziofff Oct 5, 2020
73ae382
cannot verify string
fabriziofff Oct 5, 2020
54f285b
iban not owned
fabriziofff Oct 5, 2020
7b11f7f
refactoring
fabriziofff Oct 5, 2020
2e0cac9
Merge remote-tracking branch 'origin/master' into 175013470-iban-acti…
fabriziofff Oct 5, 2020
3b2e245
Merge branch '175013470-iban-action-store-reducers' into 174847319-Ib…
fabriziofff Oct 5, 2020
4d829ae
Merge branch '174847319-IbanInsertionScreen' into 174847335-IbanKOWrong
fabriziofff Oct 5, 2020
547edec
fix basetypography test
fabriziofff Oct 5, 2020
f74f3e8
Update ts/features/bonus/bpd/saga/orchestration/onboarding/enrollToBp…
fabriziofff Oct 5, 2020
6f6318b
Update ts/features/bonus/bpd/screens/iban/IbanLoadingUpsert.tsx
fabriziofff Oct 5, 2020
1faba5e
Merge branch 'master' into 175013470-iban-action-store-reducers
fabriziofff Oct 5, 2020
84d7043
Merge branch '175013470-iban-action-store-reducers' into 174847319-Ib…
fabriziofff Oct 5, 2020
f8418bc
Merge branch '174847319-IbanInsertionScreen' into 174847335-IbanKOWrong
fabriziofff Oct 5, 2020
3788dbc
[#174863094] Update NoPaymentMethodsAvailableScreen
fabriziofff Oct 5, 2020
8014825
update locales
fabriziofff Oct 5, 2020
05e5ba8
Merge remote-tracking branch 'origin/master' into 174847319-IbanInser…
fabriziofff Oct 5, 2020
86306be
Merge branch '174847319-IbanInsertionScreen' into 174847335-IbanKOWrong
fabriziofff Oct 5, 2020
a813386
Merge branch '174847335-IbanKOWrong' into 174863094-NoPaymentMethodsA…
fabriziofff Oct 5, 2020
4a29ecb
update iban loading caption
fabriziofff Oct 5, 2020
b63e1bc
Merge branch '174847335-IbanKOWrong' into 174863094-NoPaymentMethodsA…
fabriziofff Oct 5, 2020
e1f75f8
wrong caption
fabriziofff Oct 5, 2020
82dcae6
Merge branch '174847335-IbanKOWrong' into 174863094-NoPaymentMethodsA…
fabriziofff Oct 5, 2020
a442da3
Merge branch 'master' into 174847319-IbanInsertionScreen
Undermaken Oct 7, 2020
f0492ce
Update locales/it/index.yml
Undermaken Oct 7, 2020
a37b6c0
Update ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComp…
fabriziofff Oct 7, 2020
9ee5fba
Update ts/features/bonus/bpd/screens/iban/insertion/IbanInsertionComp…
fabriziofff Oct 7, 2020
f011eaf
Merge branch 'master' into 174847319-IbanInsertionScreen
fabriziofff Oct 7, 2020
5afe3e3
Merge remote-tracking branch 'origin/master' into 174847319-IbanInser…
fabriziofff Oct 7, 2020
7a4c678
Merge branch '174847319-IbanInsertionScreen' of github.com:pagopa/io-…
Undermaken Oct 7, 2020
3a98741
Merge branch '174847319-IbanInsertionScreen' into 174847335-IbanKOWrong
fabriziofff Oct 7, 2020
2bb411e
Merge remote-tracking branch 'origin/master' into 174847319-IbanInser…
fabriziofff Oct 7, 2020
27210bc
Merge branch '174847319-IbanInsertionScreen' into 174847335-IbanKOWrong
fabriziofff Oct 7, 2020
ac695bb
Merge remote-tracking branch 'origin/master' into 174847335-IbanKOWrong
fabriziofff Oct 7, 2020
e522d1b
Merge branch '174847335-IbanKOWrong' into 174863094-NoPaymentMethodsA…
fabriziofff Oct 7, 2020
517028f
Merge branch 'master' into 174863094-NoPaymentMethodsAvailableScreen
fabriziofff Oct 7, 2020
ccb3553
Merge branch 'master' into 174863094-NoPaymentMethodsAvailableScreen
fabriziofff Oct 7, 2020
a992a43
Merge branch 'master' into 174863094-NoPaymentMethodsAvailableScreen
fabriziofff Oct 7, 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
6 changes: 5 additions & 1 deletion locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ global:
exit: Exit
saveSelection: Save the selection
search: Search
skip: "Skip"
navigator:
messages: messages
wallet: payments
Expand Down Expand Up @@ -1553,8 +1554,11 @@ bonus:
loadingActivateBpd:
title: "We are activating the cashback"
body: "Please wait."
noPaymentMethod:
title: "Add at least one payment method"
body: "To start collecting points you have to add your favorite electronic payment methods to IO: today credit cards, prepaid, rechargeable cards, debit cards, bancomat and apps and other digital tools are supported.\n\n
In the future, cashback will support other tools: you can add new payment methods to IO whenever you want and activate the collection of points on each!"
iban:
skip: "Skip"
iban: "IBAN"
edit: "Change IBAN"
insertion:
Expand Down
6 changes: 5 additions & 1 deletion locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ global:
exit: Esci
saveSelection: Salva la selezione
search: Ricerca
skip: "Salta"
navigator:
messages: messaggi
wallet: pagamenti
Expand Down Expand Up @@ -1585,8 +1586,11 @@ bonus:
loadingActivateBpd:
title: "Stiamo attivando il cashback"
body: "Ti preghiamo di attendere."
noPaymentMethod:
title: "Aggiungi almeno un metodo di pagamento"
body: "Per inziare a raccogliere punti devi aggiungere su IO i tuoi metodi di pagamento elettronico preferiti: oggi sono supportate carte di credito, prepagate, ricaricabili, carte di debito, Bancomat e app e altri strumenti digitali.\n\n
In futuro il cashback supporterà altri strumenti: potrai aggiungere quando vuoi nuovi metodi di pagamento su IO e attivare su ciascuno la raccolta dei punti!"
iban:
skip: "Salta"
iban: "IBAN"
edit: "Modifica IBAN"
insertion:
Expand Down
2 changes: 1 addition & 1 deletion ts/features/bonus/bpd/navigation/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DeclarationScreen from "../screens/onboarding/declaration/DeclarationScre
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 NoPaymentMethodsAvailableScreen from "../screens/onboarding/NoPaymentMethodsAvailableScreen";
import BPD_ROUTES from "./routes";

const BpdNavigator = createStackNavigator(
Expand Down
6 changes: 3 additions & 3 deletions ts/features/bonus/bpd/saga/orchestration/insertIban.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ActionType, getType, isActionOf } from "typesafe-actions";
import { navigationHistoryPop } from "../../../../../store/actions/navigationHistory";
import { navigationCurrentRouteSelector } from "../../../../../store/reducers/navigation";
import { navigateToBpdIbanInsertion } from "../../navigation/action/iban";
import { navigateToBpdOnboardingEnrollPaymentMethod } from "../../navigation/action/onboarding";
import { navigateToBpdOnboardingNoPaymentMethods } from "../../navigation/action/onboarding";
import BPD_ROUTES from "../../navigation/routes";
import {
bpdIbanInsertionCancel,
Expand All @@ -17,7 +17,7 @@ import { isBpdOnboardingOngoing } from "../../store/reducers/onboarding/ongoing"
// which screen to display, (the user already have payment methods or not)
export const chooseContinueAction = (isOnboarding: boolean) =>
isOnboarding
? navigateToBpdOnboardingEnrollPaymentMethod
? navigateToBpdOnboardingNoPaymentMethods
: NavigationActions.back;

export const isMainScreen = (screenName: string) =>
Expand Down Expand Up @@ -51,7 +51,7 @@ export function* bpdIbanInsertionWorker() {
yield put(NavigationActions.back());
} else {
if (onboardingOngoing) {
yield put(navigateToBpdOnboardingEnrollPaymentMethod());
yield put(navigateToBpdOnboardingNoPaymentMethods());
navigationHistoryPop(1);
} else {
yield put(NavigationActions.back());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const loadLocales = () => ({
body1: I18n.t("bonus.bpd.iban.insertion.body1"),
body2: I18n.t("bonus.bpd.iban.insertion.body2"),
ibanDescription: I18n.t("bonus.bpd.iban.iban"),
skip: I18n.t("bonus.bpd.iban.skip")
skip: I18n.t("global.buttons.skip")
});

export const IbanInsertionComponent: React.FunctionComponent<Props> = props => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,57 @@
import { View } from "native-base";
import * as React from "react";
import { View } from "react-native";

/**
* This screen warns the user that he does not have any payment method already present on which it is
* possible to activate the bpd and invites him to add a new one.
*/
export const NoPaymentMethodsAvailableScreen: React.FunctionComponent = () => (
<View />
);
import { SafeAreaView } from "react-native";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import { Body } from "../../../../../components/core/typography/Body";
import { H1 } from "../../../../../components/core/typography/H1";
import { IOStyles } from "../../../../../components/core/variables/IOStyles";
import BaseScreenComponent from "../../../../../components/screens/BaseScreenComponent";
import I18n from "../../../../../i18n";
import { navigateToWalletHome } from "../../../../../store/actions/navigation";
import { GlobalState } from "../../../../../store/reducers/types";
import { FooterTwoButtons } from "../../../bonusVacanze/components/markdown/FooterTwoButtons";

export type Props = ReturnType<typeof mapDispatchToProps> &
ReturnType<typeof mapStateToProps>;

const loadLocales = () => ({
headerTitle: I18n.t("bonus.bpd.title"),
skip: I18n.t("global.buttons.skip"),
addMethod: I18n.t("wallet.newPaymentMethod.addButton"),
title: I18n.t("bonus.bpd.onboarding.noPaymentMethod.title"),
body: I18n.t("bonus.bpd.onboarding.noPaymentMethod.body")
});

const NoPaymentMethodsAvailableScreen: React.FunctionComponent<Props> = props => {
const { headerTitle, skip, addMethod, title, body } = loadLocales();
return (
<BaseScreenComponent goBack={false} headerTitle={headerTitle}>
<SafeAreaView style={IOStyles.flex}>
<View style={[IOStyles.horizontalContentPadding, IOStyles.flex]}>
<View spacer={true} large={true} />
<H1>{title}</H1>
<View spacer={true} large={true} />
<Body>{body}</Body>
</View>
<FooterTwoButtons
onRight={props.skip}
onCancel={props.skip}
rightText={addMethod}
leftText={skip}
/>
</SafeAreaView>
</BaseScreenComponent>
);
};

const mapDispatchToProps = (dispatch: Dispatch) => ({
skip: () => dispatch(navigateToWalletHome())
});

const mapStateToProps = (_: GlobalState) => ({});

export default connect(
mapStateToProps,
mapDispatchToProps
)(NoPaymentMethodsAvailableScreen);