File tree Expand file tree Collapse file tree 11 files changed +66
-5
lines changed
ts/features/idpay/onboarding Expand file tree Collapse file tree 11 files changed +66
-5
lines changed Original file line number Diff line number Diff line change 41304130 "deny" : " Non attivare" ,
41314131 "success" : " Sie aktivierten Push -Benachrichtigungen" ,
41324132 "advice" : " Consigliato"
4133+ },
4134+ "loading" : {
4135+ "subtitle" : " Attendi qualche secondo" ,
4136+ "title" : " Stiamo elaborando la tua richiesta"
41334137 }
41344138 }
41354139 }
Original file line number Diff line number Diff line change 58195819 "deny" : " Non attivare" ,
58205820 "success" : " You activated Push notifications" ,
58215821 "advice" : " Consigliato"
5822+ },
5823+ "loading" : {
5824+ "subtitle" : " Attendi qualche secondo" ,
5825+ "title" : " Stiamo elaborando la tua richiesta"
58225826 }
58235827 },
58245828 "configuration" : {
Original file line number Diff line number Diff line change 58195819 "deny" : " Non attivare" ,
58205820 "success" : " Hai attivato le notifiche push" ,
58215821 "advice" : " Consigliato"
5822+ },
5823+ "loading" : {
5824+ "subtitle" : " Attendi qualche secondo" ,
5825+ "title" : " Stiamo elaborando la tua richiesta"
58225826 }
58235827 },
58245828 "configuration" : {
Original file line number Diff line number Diff line change @@ -75,6 +75,11 @@ export const createActionsImplementation = (
7575 const closeOnboardingSuccess = ( ) =>
7676 navigation . navigate ( SERVICES_ROUTES . SERVICES_HOME ) ;
7777
78+ const navigateToLoadingScreen = ( ) =>
79+ navigation . navigate ( IdPayOnboardingRoutes . IDPAY_ONBOARDING_MAIN , {
80+ screen : IdPayOnboardingRoutes . IDPAY_ONBOARDING_LOADING
81+ } ) ;
82+
7883 const handleSessionExpired = ( ) => {
7984 dispatch (
8085 refreshSessionToken . request ( {
@@ -96,6 +101,7 @@ export const createActionsImplementation = (
96101 navigateToInputFormScreen,
97102 navigateToEnableNotificationScreen,
98103 navigateToEnableMessageScreen,
104+ navigateToLoadingScreen,
99105 closeOnboarding,
100106 closeOnboardingSuccess,
101107 handleSessionExpired
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ export type UpdatePushNotificationSetting = {
4040 readonly isPushNotificationEnabled : boolean ;
4141} ;
4242
43+ export type CheckDetails = {
44+ readonly type : "check-details" ;
45+ } ;
46+
4347export type IdPayOnboardingEvents =
4448 | StartOnboarding
4549 | SelectMultiConsent
@@ -48,4 +52,5 @@ export type IdPayOnboardingEvents =
4852 | Next
4953 | Back
5054 | Close
51- | UpdatePushNotificationSetting ;
55+ | UpdatePushNotificationSetting
56+ | CheckDetails ;
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ export const idPayOnboardingMachine = setup({
3838 handleSessionExpired : notImplementedStub ,
3939 navigateToInputFormScreen : notImplementedStub ,
4040 navigateToEnableNotificationScreen : notImplementedStub ,
41- navigateToEnableMessageScreen : notImplementedStub
41+ navigateToEnableMessageScreen : notImplementedStub ,
42+ navigateToLoadingScreen : notImplementedStub
4243 } ,
4344 actors : {
4445 getInitiativeInfo : fromPromise < InitiativeDataDTO , string > (
@@ -512,6 +513,7 @@ export const idPayOnboardingMachine = setup({
512513 } ,
513514
514515 AcceptingCriteria : {
516+ entry : "navigateToLoadingScreen" ,
515517 tags : [ IdPayTags . Loading ] ,
516518 invoke : {
517519 src : "acceptRequiredCriteria" ,
@@ -576,7 +578,7 @@ export const idPayOnboardingMachine = setup({
576578 OnboardingFailure : {
577579 entry : "navigateToFailureScreen" ,
578580 on : {
579- next : {
581+ "check-details" : {
580582 actions : "navigateToInitiativeMonitoringScreen"
581583 }
582584 }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import IdPayEnableNotificationScreen from "../screens/IdPayEnableNotificationScr
1111import IdPayFailureScreen from "../screens/IdPayFailureScreen" ;
1212import { IdPayInitiativeDetailsScreen } from "../screens/IdPayInitiativeDetailsScreen" ;
1313import IdPayInputFormVerificationScreen from "../screens/IdPayInputFormVerificationScreen" ;
14+ import IdPayLoadingScreen from "../screens/IdPayLoadingScreen" ;
1415import IdPayMultiValuePrerequisitesScreen from "../screens/IdPayMultiValuePrerequisitesScreen" ;
1516import IdPayPDNDPrerequisitesScreen from "../screens/IdPayPDNDPrerequisitesScreen" ;
1617import { IdPayOnboardingParamsList } from "./params" ;
@@ -82,6 +83,12 @@ export const InnerNavigator = () => {
8283 component = { IdPayFailureScreen }
8384 options = { { gestureEnabled : false , headerShown : false } }
8485 />
86+
87+ < Stack . Screen
88+ name = { IdPayOnboardingRoutes . IDPAY_ONBOARDING_LOADING }
89+ component = { IdPayLoadingScreen }
90+ options = { { gestureEnabled : false , headerShown : false } }
91+ />
8592 </ Stack . Navigator >
8693 ) ;
8794} ;
Original file line number Diff line number Diff line change @@ -11,4 +11,5 @@ export type IdPayOnboardingParamsList = {
1111 [ IdPayOnboardingRoutes . IDPAY_ONBOARDING_MULTI_SELF_DECLARATIONS ] : undefined ;
1212 [ IdPayOnboardingRoutes . IDPAY_ONBOARDING_INPUT_FORM ] : undefined ;
1313 [ IdPayOnboardingRoutes . IDPAY_ONBOARDING_ENABLE_NOTIFICATIONS ] : undefined ;
14+ [ IdPayOnboardingRoutes . IDPAY_ONBOARDING_LOADING ] : undefined ;
1415} ;
Original file line number Diff line number Diff line change @@ -9,5 +9,7 @@ export const IdPayOnboardingRoutes = {
99 IDPAY_ONBOARDING_MULTI_SELF_DECLARATIONS :
1010 "IDPAY_ONBOARDING_MULTI_SELF_DECLARATIONS" ,
1111 IDPAY_ONBOARDING_INPUT_FORM : "IDPAY_ONBOARDING_INPUT_FORM" ,
12- IDPAY_ONBOARDING_ENABLE_NOTIFICATIONS : "IDPAY_ONBOARDING_ENABLE_NOTIFICATIONS"
12+ IDPAY_ONBOARDING_ENABLE_NOTIFICATIONS :
13+ "IDPAY_ONBOARDING_ENABLE_NOTIFICATIONS" ,
14+ IDPAY_ONBOARDING_LOADING : "IDPAY_ONBOARDING_LOADING"
1315} as const ;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const IdPayFailureScreen = () => {
3131 accessibilityLabel : I18n . t (
3232 "idpay.onboarding.failure.button.goToInitiative"
3333 ) ,
34- onPress : ( ) => machine . send ( { type : "next " } )
34+ onPress : ( ) => machine . send ( { type : "check-details " } )
3535 } ) ,
3636 [ machine ]
3737 ) ;
You can’t perform that action at this time.
0 commit comments