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

[#173148021] ISEE not eligible refinement #1873

Merged
merged 77 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
29b267c
Added IseeNotAvailableScreen
fabriziofff May 26, 2020
bfe27b7
Merge remote-tracking branch 'origin/master' into 172989356-isee-not-…
fabriziofff May 26, 2020
956ecb2
fix merge conflict
fabriziofff May 26, 2020
1dcf302
Merge remote-tracking branch 'origin/master' into 172989356-isee-not-…
fabriziofff May 26, 2020
33ced3b
reset loading when change markdown
fabriziofff May 26, 2020
82199a8
rename FooterTwoButtons
fabriziofff May 26, 2020
7d867c2
[#172989379] add screen for IseeNotEligible
fabriziofff May 26, 2020
a2ff0c9
skeleton for activate bonus screen
fabriziofff May 27, 2020
a0811d8
Merge branch '172989379-isee-not-eligible' into 172992652-activate-bo…
fabriziofff May 27, 2020
fda4425
add locales & ActivateBonusScreen refinements
fabriziofff May 27, 2020
bd96820
Merge remote-tracking branch 'origin/master' into 172992652-activate-…
fabriziofff May 27, 2020
60e1132
link with the new FamilyMember
fabriziofff May 27, 2020
69a0a2d
request pin to confirm identity when the user choose to activate bonus
fabriziofff May 28, 2020
8dc4938
Merge remote-tracking branch 'origin/master' into 172992652-activate-…
fabriziofff May 28, 2020
22d8626
add new field fiscal_code to FamilyMember mock
fabriziofff May 28, 2020
a5a55c3
Merge branch '172992652-activate-bonus-screen' into 173054348-verify-…
fabriziofff May 28, 2020
ef9adad
Merge branch 'master' into 172992652-activate-bonus-screen
fabriziofff May 28, 2020
b0faa6b
Merge branch '172992652-activate-bonus-screen' into 173054348-verify-…
fabriziofff May 28, 2020
96f7368
change checkbonuseligibilityscreen and add navigation header
fabriziofff May 28, 2020
032f758
skeleton for navigation
fabriziofff May 28, 2020
edb99b6
Merge branch 'master' into 173054348-verify-bonus-eligibility-workflow
fabriziofff May 28, 2020
26a6756
group event of "eligibility" sub-phase
fabriziofff May 28, 2020
4ffe52a
add featureflag in wallet navigator
fabriziofff May 28, 2020
047106e
first link with the business logic
fabriziofff May 28, 2020
cce33a5
Merge branch 'master' into 172992652-activate-bonus-screen
fabriziofff May 28, 2020
02cf004
fix formatting for amount and change to single mock datasource
fabriziofff May 28, 2020
0b97349
addt axBenefit placeholder
fabriziofff May 28, 2020
867f25b
add taxBenefit placeholder
fabriziofff May 28, 2020
cce395c
Merge remote-tracking branch 'origin/172992652-activate-bonus-screen'…
fabriziofff May 28, 2020
c8533a2
Merge branch '172992652-activate-bonus-screen' into 173054348-verify-…
fabriziofff May 28, 2020
3261337
[#172992652] replace hardcoded value with mocked data
Undermaken May 28, 2020
4b54c53
draft navigation between eligibility states
fabriziofff May 28, 2020
9446c24
change activatebonuscomponent to handle tax benefit
fabriziofff May 28, 2020
460447b
revert to single values for bonusamount and taxbenefit
fabriziofff May 29, 2020
eb67fac
remove unused import
fabriziofff May 29, 2020
c7db21e
Merge remote-tracking branch 'origin/master' into 172992652-activate-…
fabriziofff May 29, 2020
c060292
Merge remote-tracking branch 'origin/master' into 173054348-verify-bo…
fabriziofff May 29, 2020
36bdd5c
refactoring of EligibilityCheckStatusEnum
fabriziofff May 29, 2020
da54744
Merge remote-tracking branch 'origin/master' into 173054348-verify-bo…
fabriziofff May 29, 2020
74696ff
Merge branch '172992652-activate-bonus-screen' into 173054348-verify-…
fabriziofff May 29, 2020
10b455a
dispatch events together
fabriziofff May 29, 2020
49c7325
link activatebonusscreen with the business logic
fabriziofff May 29, 2020
367689c
Merge remote-tracking branch 'origin/master' into 173054348-verify-bo…
fabriziofff May 29, 2020
eccd335
fix lint
fabriziofff May 29, 2020
c4f2788
Merge remote-tracking branch 'origin/master' into 173054348-verify-bo…
fabriziofff May 29, 2020
5931cce
[#173054348] remove RTron logs
Undermaken May 29, 2020
2504c33
Merge branch 'master' into 173054348-verify-bonus-eligibility-workflow
Undermaken May 29, 2020
5ca90e4
[#173054348] minor change on locales
Undermaken May 29, 2020
626c331
Merge branch '173054348-verify-bonus-eligibility-workflow' of github.…
Undermaken May 29, 2020
d26100f
Merge branch 'master' into 173077316-async-eligibility-screen
fabriziofff May 29, 2020
13a15b4
draft asynceligibilitycheckinfo
fabriziofff May 29, 2020
89a4b63
group languages under section eligibility
fabriziofff Jun 1, 2020
bcf8d56
link with languages text
fabriziofff Jun 1, 2020
8412052
Merge remote-tracking branch 'origin/master' into 173077316-async-eli…
fabriziofff Jun 1, 2020
b2fd413
name refactoring
fabriziofff Jun 1, 2020
2110757
renaming screens
fabriziofff Jun 1, 2020
2fc174f
fix loadingerrorcomponent layout
fabriziofff Jun 1, 2020
51de760
add navigation when timeout
fabriziofff Jun 1, 2020
7e94f12
remove rtron log
fabriziofff Jun 1, 2020
08b6628
fix lint
fabriziofff Jun 1, 2020
63e77b8
added LoadActivateBonusScreen
fabriziofff Jun 1, 2020
480d8a3
added ActivateBonusCompletedScreen and naming refactoring
fabriziofff Jun 1, 2020
ac6212b
remove header from infoscreencomponent
fabriziofff Jun 1, 2020
e19d5f7
InfoScreen can render raster or vector image
fabriziofff Jun 1, 2020
adc5760
missing file
fabriziofff Jun 1, 2020
14939dd
Merge remote-tracking branch 'origin/master' into 173102302-load-acti…
fabriziofff Jun 1, 2020
a38bc0b
move text in rendering phase
fabriziofff Jun 1, 2020
e205ea8
Merge branch '173102302-load-activate-bonus' into 173102430-bonus-act…
fabriziofff Jun 1, 2020
ab6fa19
clean data
fabriziofff Jun 1, 2020
854c766
remove unused variable
fabriziofff Jun 1, 2020
49ef959
minor fixes
fabriziofff Jun 1, 2020
f66c296
graphical refinement for TimeoutEligibilityCheckInfoScreen
fabriziofff Jun 3, 2020
ddf9a67
fix compile errors
fabriziofff Jun 3, 2020
c01ae66
fix languages
fabriziofff Jun 3, 2020
e06d4d4
refinement for IseeNotEligible
fabriziofff Jun 3, 2020
7e60231
Merge remote-tracking branch 'origin/master' into 173148021-isee-not-…
fabriziofff Jun 4, 2020
4dcca71
[#173148021] fix NL on text definition
Undermaken Jun 4, 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
3 changes: 0 additions & 3 deletions locales/en/bonus/bonusVacanze/iseeNotEligible.md

This file was deleted.

12 changes: 7 additions & 5 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ bonus:
loading: Checking bonus eligibility
cta:
requestBonus: Request
cancelRequest: Cancel the request
eligibility:
loading: Checking bonus eligibility
iseeNotAvailable:
Expand All @@ -1255,15 +1256,16 @@ bonus:
text: !include bonus/bonusVacanze/iseeNotAvailable.md
goToINPSWebsite: Go to INPS Website
iseeNotEligible:
title: ISEE not eligible
subtitle: The ISEE submitted does not meet the requirements
text: !include bonus/bonusVacanze/iseeNotEligible.md
title: We're sorry. Your ISEE exceeds the required threshold.
text: If it is not correct, or if your family income has changed since the last ISEE created, you can update it by making a new declaration (DSU) on the INPS website.
goToNewDSU: Submit new DSU to INPS
goToNewSimulation: Online simulation
activateBonus:
title: Activate
description: You can activate a {{amount}} bonus. Your tax discount is equal to {{taxBenefit}}
timeout:
title: Eligibility request received
description: Verification of eligibility for bonus access has been recorded. You will receive a message when the outcome of your request will be available.
title: Sorry, it takes longer to verify your ISEE.
description: "We will send you a message when INPS has given us the answer related to your ISEE.\n\nWhen you receive it, if it is positive, remember to complete your application within 24 hours, otherwise it will expire and you will have to start a new one."
activate:
loading: Bonus activation
goToDetails: Show details
Expand Down
3 changes: 0 additions & 3 deletions locales/it/bonus/bonusVacanze/iseeNotEligible.md

This file was deleted.

12 changes: 7 additions & 5 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ bonus:
loading: Verifico l'idoneità per l'accesso al bonus
cta:
requestBonus: Richiedi
cancelRequest: Annulla la richiesta
eligibility:
loading: Verifico l'idoneità per l'accesso al bonus
iseeNotAvailable:
Expand All @@ -1288,15 +1289,16 @@ bonus:
text: !include bonus/bonusVacanze/iseeNotAvailable.md
goToINPSWebsite: Vai al sito INPS
iseeNotEligible:
title: ISEE non idoneo
subtitle: L'ISEE presentato non soddisfa i requisiti per il bonus vacanze
text: !include bonus/bonusVacanze/iseeNotEligible.md
title: Siamo spiacenti. Il tuo ISEE supera la soglia richiesta.
text: Se non ti risulta corretto, oppure se il tuo reddito familiare è cambiato dall’ultimo ISEE creato, puoi aggiornarlo effettuando una nuova dichiarazione sostituiva unica (DSU) sul sito di INPS.
goToNewDSU: Presenta nuova DSU a INPS
goToNewSimulation: Fai una simulazione online
activateBonus:
title: Attiva
description: Puoi attivare un bonus di {{amount}}. Il tuo sconto sulle tasse è pari a {{taxBenefit}}
timeout:
title: Verifica richiesta
description: La verifica dell'idoneità per l'accesso al bonus è stata registrata. Riceverai un messaggio quando l'esito della tua richiesta sarà disponibile.
title: Siamo spiacenti, serve più tempo per verificare il tuo ISEE.
description: "Ti invieremo un messaggio in app quando INPS ci avrà fornito la risposta relativa al tuo ISEE.\n\nQuando lo riceverai, se sarà positivo, ricordati di completare la tua domanda entro 24 ore, altrimenti scadrà e dovrai iniziarne una nuova."
activate:
loading: Attivo il bonus
goToDetails: Visualizza i dettagli
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { Text, View } from "native-base";
import * as React from "react";
import { StyleSheet } from "react-native";
import FooterWithButtons from "../../../../components/ui/FooterWithButtons";
import themeVariables from "../../../../theme/variables";
import { confirmButtonProps } from "../buttons/ButtonConfigurations";

const PropTypes = require("prop-types");

PropTypes.oneOf();

type Props = {
image: React.ReactNode;
body: string;
confirmText?: string;
onConfirm: () => void;
title?: string;
body?: string;
};

const styles = StyleSheet.create({
body: {
main: {
padding: themeVariables.contentPadding,
flex: 1,
alignItems: "center"
},
title: {
textAlign: "center",
fontSize: 20
},
body: {
textAlign: "center"
}
});

Expand All @@ -31,18 +31,22 @@ const styles = StyleSheet.create({
*/
export const InfoScreenComponent: React.FunctionComponent<Props> = props => {
return (
<>
<View style={styles.body}>
<View spacer={true} extralarge={true} />
<View spacer={true} extralarge={true} />
{props.image}
<View spacer={true} extralarge={true} />
<Text>{props.body}</Text>
</View>
<FooterWithButtons
type={"SingleButton"}
leftButton={confirmButtonProps(props.onConfirm, props.confirmText)}
/>
</>
<View style={styles.main}>
<View spacer={true} extralarge={true} />
<View spacer={true} extralarge={true} />
<View spacer={true} extralarge={true} />
{props.image}
<View spacer={true} extralarge={true} />
{props.title && (
<>
<Text style={styles.title} bold={true}>
{props.title}
</Text>
<View spacer={true} />
</>
)}

<Text style={styles.body}>{props.body}</Text>
</View>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import * as React from "react";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import I18n from "../../../../../i18n";
import { cancelButtonProps } from "../../../components/buttons/ButtonConfigurations";
import { FooterStackButton } from "../../../components/buttons/FooterStackButtons";
import { renderIconImage } from "../../../components/infoScreen/imageRendering";
import { InfoScreenComponent } from "../../../components/infoScreen/InfoScreenComponent";

Expand All @@ -24,12 +26,12 @@ const ActivateBonusCompletedScreen: React.FunctionComponent<Props> = props => {
);

return (
<InfoScreenComponent
onConfirm={props.onConfirm}
confirmText={confirmText}
image={renderIconImage("io-complete")}
body={body}
/>
<>
<InfoScreenComponent image={renderIconImage("io-complete")} body={body} />
<FooterStackButton
buttons={[cancelButtonProps(props.onConfirm, confirmText)]}
/>
</>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ const renderFamilyMembersList = (
* @param props
* @constructor
*/
const ActivateBonusComponent: React.FunctionComponent<Props> = props => {
export const ActivateBonusRequestComponent: React.FunctionComponent<
Props
> = props => {
const description = I18n.t(
"bonus.bonusVacanza.eligibility.activateBonus.description",
{
Expand All @@ -90,5 +92,3 @@ const ActivateBonusComponent: React.FunctionComponent<Props> = props => {
</BaseScreenComponent>
);
};

export default ActivateBonusComponent;
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import I18n from "../../../../../../i18n";
import { identificationRequest } from "../../../../../../store/actions/identification";
import { GlobalState } from "../../../../../../store/reducers/types";
import { eligibilityCheckResults } from "../../../../store/reducers/eligibility";
import ActivateBonusRequestComponent from "./ActivateBonusRequestComponent";
import { ActivateBonusRequestComponent } from "./ActivateBonusRequestComponent";

type Props = ReturnType<typeof mapDispatchToProps> &
ReturnType<typeof mapStateToProps>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,64 @@ import * as React from "react";
import { connect } from "react-redux";
import { Dispatch } from "redux";
import I18n from "../../../../i18n";
import { FooterSingleButton } from "../../components/markdown/FooterSingleButton";
import { MarkdownBaseScreen } from "../../components/markdown/MarkdownBaseScreen";
import {
cancelButtonProps,
confirmButtonProps
} from "../../components/buttons/ButtonConfigurations";
import { FooterStackButton } from "../../components/buttons/FooterStackButtons";
import { renderRasterImage } from "../../components/infoScreen/imageRendering";
import { InfoScreenComponent } from "../../components/infoScreen/InfoScreenComponent";

type Props = ReturnType<typeof mapDispatchToProps>;

const image = require("../../../../../img/servicesStatus/error-detail-icon.png");

/**
* This screen display some additional information when the ISEE is not eligible for the bonus vacanza.
* It provides one CTA:
* - Cancel: exit from the bonus request workflow
* The screen is tied to the business logic and is composed using {@link MarkdownBaseScreen} and {@link FooterSingleButton}
* It provides three CTA:
* - goToDsu: goto INPS website to submit a new DSU
* - goToSimulation: goto INPS website to do a simulation
* - cancelRequest: abort the request
* The screen is tied to the business logic and is composed using {@link InfoScreenComponent} and {@link FooterStackButton}
* @param props
* @constructor
*/

const IseeNotEligibleScreen: React.FunctionComponent<Props> = props => {
const markdownBody = I18n.t(
"bonus.bonusVacanza.eligibility.iseeNotEligible.text"
);
const title = I18n.t("bonus.bonusVacanza.eligibility.iseeNotEligible.title");
const subtitle = I18n.t(
"bonus.bonusVacanza.eligibility.iseeNotEligible.subtitle"
const body = I18n.t("bonus.bonusVacanza.eligibility.iseeNotEligible.text");
const goToDsu = I18n.t(
"bonus.bonusVacanza.eligibility.iseeNotEligible.goToNewDSU"
);
const goToSimulation = I18n.t(
"bonus.bonusVacanza.eligibility.iseeNotEligible.goToNewSimulation"
);

const cancelRequest = I18n.t("bonus.bonusVacanza.cta.cancelRequest");

return (
<MarkdownBaseScreen
navigationTitle={title}
title={title}
subtitle={subtitle}
markDown={markdownBody}
>
<FooterSingleButton onCancel={props.onCancel} />
</MarkdownBaseScreen>
<>
<InfoScreenComponent
image={renderRasterImage(image)}
title={title}
body={body}
/>
<FooterStackButton
buttons={[
confirmButtonProps(props.onGoToDsu, goToDsu),
confirmButtonProps(props.onGoToSimulation, goToSimulation),
cancelButtonProps(props.onCancel, cancelRequest)
]}
/>
</>
);
};

const mapDispatchToProps = (_: Dispatch) => ({
// TODO: link with the right dispatch action
onGoToDsu: () => undefined,
// TODO: link with the right dispatch action
onGoToSimulation: () => undefined,
// TODO: link with the right dispatch action
onCancel: () => undefined
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { connect } from "react-redux";
import { Dispatch } from "redux";
import I18n from "../../../../i18n";
import { navigateToWalletHome } from "../../../../store/actions/navigation";
import { cancelButtonProps } from "../../components/buttons/ButtonConfigurations";
import { FooterStackButton } from "../../components/buttons/FooterStackButtons";
import { renderRasterImage } from "../../components/infoScreen/imageRendering";
import { InfoScreenComponent } from "../../components/infoScreen/InfoScreenComponent";

type Props = ReturnType<typeof mapDispatchToProps>;

const image = require("../../../../../img/wallet/errors/invalid-amount-icon.png");
const image = require("../../../../../img/wallet/errors/payment-expired-icon.png");

/**
* This screen informs the user that the request takes longer than necessary to be completed
Expand All @@ -21,15 +23,20 @@ const image = require("../../../../../img/wallet/errors/invalid-amount-icon.png"
const TimeoutEligibilityCheckInfoScreen: React.FunctionComponent<
Props
> = props => {
const title = I18n.t("bonus.bonusVacanza.eligibility.timeout.title");
const body = I18n.t("bonus.bonusVacanza.eligibility.timeout.description");
const confirmText = I18n.t("global.buttons.close");
const confirmText = I18n.t("global.buttons.exit");
return (
<InfoScreenComponent
onConfirm={props.onConfirm}
confirmText={confirmText}
image={renderRasterImage(image)}
body={body}
/>
<>
<InfoScreenComponent
image={renderRasterImage(image)}
title={title}
body={body}
/>
<FooterStackButton
buttons={[cancelButtonProps(props.onConfirm, confirmText)]}
/>
</>
);
};

Expand Down