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(IDPay): [IOBP-1131] input text for onboarding #458

Merged
merged 8 commits into from
Feb 4, 2025
Merged
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"api_cdc": "./assets/CdcSwagger.yml",
"api_fci": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_io_sign.yaml",
"api_pn": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_pn.yaml",
"api_idpay": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v8.25.1/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml",
"api_idpay": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v11.7.1/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml",
"api_fast_login": "https://raw.githubusercontent.com/pagopa/io-auth-n-identity-domain/io-session-manager@1.0.0/apps/io-session-manager/api/fast-login.yaml",
"api_trial_system": "https://raw.githubusercontent.com/pagopa/io-backend/v16.4.0-RELEASE/api_trial_system.yaml",
"api_pagopa_walletv3": "https://raw.githubusercontent.com/pagopa/pagopa-infra/v1.202.0/src/domains/pay-wallet-app/api/io-payment-wallet/v1/_openapi.json.tpl",
@@ -144,4 +144,4 @@
"eslint -c .eslintrc.js --fix"
]
}
}
}
36 changes: 36 additions & 0 deletions src/payloads/features/idpay/check-prerequisites.ts
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import {
SelfDeclarationMultiDTO,
_typeEnum as SelfDeclarationMultiType
} from "../../../../generated/definitions/idpay/SelfDeclarationMultiDTO";
import { _typeEnum as SelfDeclarationTextDTO } from "../../../../generated/definitions/idpay/SelfDeclarationTextDTO";
import { getRandomEnumValue } from "../../utils/random";
import { IDPayInitiativeID } from "./types";

@@ -73,6 +74,15 @@ const selfDeclarationMulti: ReadonlyArray<SelfDeclarationMultiDTO> = [
}
];

const guidoniaSelfDeclarationMulti: ReadonlyArray<SelfDeclarationMultiDTO> = [
{
_type: SelfDeclarationMultiType.multi,
code: ulid(),
description: "Costituire una famiglia monogenitoriale:",
value: ["Sì", "No"]
}
];

const selfDeclarationBool: ReadonlyArray<SelfDeclarationBoolDTO> = [
{
_type: SelfDeclarationBoolType.boolean,
@@ -101,6 +111,32 @@ const checkPrerequisites: {
pdndCriteria,
selfDeclarationList: [...selfDeclarationMulti, ...selfDeclarationBool]
},
[IDPayInitiativeID.OK_GUIDONIA]: {
pdndCriteria,
selfDeclarationList: [
...guidoniaSelfDeclarationMulti,
{
_type: SelfDeclarationTextDTO.text,
code: ulid(),
description:
"Avere un ISEE valido al 31\\12\\2024 con un valore pari a:",
value: "valore ISEE"
},
{
_type: SelfDeclarationTextDTO.text,
code: ulid(),
description:
"Aver già presentato una Dichiarazione Sostitutive Unica (DSU) con numero di protocollo:",
value: "Numero di protocollo DSU"
},
{
_type: SelfDeclarationTextDTO.text,
code: ulid(),
description: "Voler ricevere il rimborso al seguente IBAN:",
value: "IBAN"
}
]
},
[IDPayInitiativeID.OK_PDND_ONLY]: {
pdndCriteria,
selfDeclarationList: []
5 changes: 5 additions & 0 deletions src/payloads/features/idpay/get-initiative-data.ts
Original file line number Diff line number Diff line change
@@ -44,6 +44,11 @@ const initiativeData: {
initiativeId: initiativeIdToString(IDPayInitiativeID.OK_SELF_ONLY),
initiativeName: "Iniziativa - Solo auto dichiarazioni"
},
[IDPayServiceID.OK_GUIDONIA]: {
...createRandomInitiativeDataDTO(),
initiativeId: initiativeIdToString(IDPayInitiativeID.OK_GUIDONIA),
initiativeName: "Iniziativa GUIDONIA"
},
[IDPayServiceID.KO_STATUS_NOT_ELIGIBLE]: {
...createRandomInitiativeDataDTO(),
initiativeId: initiativeIdToString(
2 changes: 2 additions & 0 deletions src/payloads/features/idpay/types.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ export enum IDPayServiceID {
OK_NO_PREREQUISITES,
OK_PDND_ONLY,
OK_SELF_ONLY,
OK_GUIDONIA,

KO_GENERIC,
KO_NOT_STARTED,
@@ -26,6 +27,7 @@ export enum IDPayInitiativeID {
OK_NO_PREREQUISITES,
OK_PDND_ONLY,
OK_SELF_ONLY,
OK_GUIDONIA,

KO_GENERIC,
KO_NOT_STARTED,