Skip to content

Commit

Permalink
Merge pull request #1472 from pagopa/feat/test-payments
Browse files Browse the repository at this point in the history
Add payments to notification creation
  • Loading branch information
ZorbaDimatteo authored Feb 28, 2025
2 parents 0b89e7c + eccd15a commit 7330434
Show file tree
Hide file tree
Showing 43 changed files with 3,056 additions and 1,553 deletions.
4 changes: 3 additions & 1 deletion packages/pn-commons/src/components/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type Props = {
calcSha256?: boolean;
fileUploaded?: { file: { data?: File; sha256?: { hashBase64: string; hashHex: string } } };
fileSizeLimit?: number;
showHashCode?: boolean;
};

enum UploadStatus {
Expand Down Expand Up @@ -165,6 +166,7 @@ const FileUpload = ({
calcSha256 = false,
fileUploaded,
fileSizeLimit = 209715200,
showHashCode = true,
}: Props) => {
const [fileData, dispatch] = useReducer(reducer, {
status: UploadStatus.TO_UPLOAD,
Expand Down Expand Up @@ -369,7 +371,7 @@ const FileUpload = ({
</Box>
)}
</Box>
{fileData.sha256 && (
{fileData.sha256 && showHashCode && (
<Box sx={{ marginTop: '20px' }}>
<Typography variant="body2" fontWeight={600} fontSize={'16px'} color="text.secondary">
{getLocalizedOrDefaultLabel('common', 'upload-file.hash-code', 'Codice hash')}
Expand Down
1 change: 1 addition & 0 deletions packages/pn-commons/src/utility/string.utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const dataRegex = {
// Cfr. the comment in src/utility/user.utility.ts
// ------------------------------------
// Carlos Lombardi, 2023.01.24
currency: /^\d+(?:[.,]\d+)*$/,
};

/**
Expand Down
1 change: 0 additions & 1 deletion packages/pn-data-viz/src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ beforeAll(() => {
SELFCARE_URL_FE_LOGIN: 'https://test.selfcare.pagopa.it/auth/login',
SELFCARE_BASE_URL: 'https://test.selfcare.pagopa.it',
SELFCARE_SEND_PROD_ID: 'prod-pn-test',
IS_PAYMENT_ENABLED: false,
MIXPANEL_TOKEN: 'DUMMY',
IS_MANUAL_SEND_ENABLED: true,
});
Expand Down
4 changes: 3 additions & 1 deletion packages/pn-pa-webapp/public/conf/config-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
"API_B2B_LINK": "https://developer.pagopa.it/send/api#/",
"IS_STATISTICS_ENABLED": true,
"TAXONOMY_SEND_URL": "https://docs.pagopa.it/f.a.q.-per-integratori/tassonomia-send",
"DOWNTIME_EXAMPLE_LINK": "https://www.dev.notifichedigitali.it/static/documents/LegalFactMalfunction.pdf"
"DOWNTIME_EXAMPLE_LINK": "https://www.dev.notifichedigitali.it/static/documents/LegalFactMalfunction.pdf",
"PAYMENT_INFO_LINK": "https://developer.pagopa.it/send/guides/knowledge-base/readme/pagamenti-e-spese-di-notifica/pagamenti-pagopa",
"DEVELOPER_API_DOCUMENTATION_LINK": "https://developer.pagopa.it/send/api"
}
8 changes: 2 additions & 6 deletions packages/pn-pa-webapp/public/locales/de/notifiche.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@
"simple-registered-letter": "Einschreiben mit Rückschein",
"payment-method": "Zahlungsmodell",
"pagopa-notice": "Bescheid pagoPA",
"pagopa-notice-f24-flatrate": "Bescheid pagoPA und Vordruck F24 pauschal",
"pagopa-notice-f24": "Bescheid pagoPA und Vordruck F24",
"f24": "Vordruck F24",
"nothing": "Keine"
},
"recipient": {
Expand Down Expand Up @@ -451,7 +450,6 @@
"remove-recipient": "Empfänger entfernen"
},
"attachments": {
"title": "Anhänge",
"max-attachments": "Du kannst bis zu 11 Anhänge hochladen, einschließlich des zuzustellenden Bescheids.",
"attach-for-recipients": "Anhänge",
"act-attachment": "Urkunde anhängen",
Expand All @@ -466,11 +464,9 @@
"payment-methods": {
"title": "Zahlungsmodelle",
"pagopa-notice": "Bescheid pagoPA",
"pagopa-notice-f24-flatrate": "F24 pauschal",
"pagopa-notice-f24": "F24",
"f24": "F24",
"payment-models": "Zahlungsvordrucke für",
"attach-pagopa-notice": "Bescheid pagoPA anhängen",
"attach-f24-flatrate": "Muster F24 pauschal anhängen",
"attach-f24": "Modell F24 anhängen",
"nothing": "<0>Wenn diese Zustellung eine Zahlung vorsieht, kehre zu </0><1>Vorabinformationen</1><2> zurück und wähle einen Vordruck aus. Komm dann hierher zurück, um diesen zu laden.</2>",
"back-to-attachments": "Zurück zu Anhänge"
Expand Down
8 changes: 2 additions & 6 deletions packages/pn-pa-webapp/public/locales/en/notifiche.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@
"simple-registered-letter": "Registered letter with acknowledgment of receipt",
"payment-method": "Payment form",
"pagopa-notice": "PagoPA notice",
"pagopa-notice-f24-flatrate": "pagoPA Notice and Flat-rate Form F24",
"pagopa-notice-f24": "pagoPA Notice and Form F24",
"f24": "Form F24",
"nothing": "None"
},
"recipient": {
Expand Down Expand Up @@ -451,7 +450,6 @@
"remove-recipient": "Remove recipient"
},
"attachments": {
"title": "Attachments",
"max-attachments": "You can upload up to 11 attachments, including the document to be notified.",
"attach-for-recipients": "Attachments",
"act-attachment": "Attach the deed",
Expand All @@ -466,11 +464,9 @@
"payment-methods": {
"title": "Payment forms",
"pagopa-notice": "PagoPA notice",
"pagopa-notice-f24-flatrate": "F24 flat rate",
"pagopa-notice-f24": "F24",
"f24": "F24",
"payment-models": "Payment forms for",
"attach-pagopa-notice": "Attach pagoPA Notice",
"attach-f24-flatrate": "Attach Flat-rate Form F24",
"attach-f24": "Attach Form F24",
"nothing": "<0>If this notification involves a payment, go back to </0><1>Preliminary Information</1><2> and select a form. Then, return here to upload it.</2>",
"back-to-attachments": "Back to Attachments"
Expand Down
8 changes: 2 additions & 6 deletions packages/pn-pa-webapp/public/locales/fr/notifiche.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@
"simple-registered-letter": "Lettre recommandée avec A/R",
"payment-method": "Modèle de paiement",
"pagopa-notice": "Avis de pagoPA",
"pagopa-notice-f24-flatrate": "Avis de pagoPA et modèle F24 forfaitaire",
"pagopa-notice-f24": "Avis de pagoPA et modèle F24",
"f24": "Modèle F24",
"nothing": "Aucun"
},
"recipient": {
Expand Down Expand Up @@ -451,7 +450,6 @@
"remove-recipient": "Supprimez un destinataire"
},
"attachments": {
"title": "Annexes",
"max-attachments": "Vous pouvez télécharger jusqu’à 11 pièces jointes, y compris le document à notifier.",
"attach-for-recipients": "Annexes",
"act-attachment": "Joindre l’acte",
Expand All @@ -466,11 +464,9 @@
"payment-methods": {
"title": "Modèles de paiement",
"pagopa-notice": "Avis de pagoPA",
"pagopa-notice-f24-flatrate": "F24 forfaitaire",
"pagopa-notice-f24": "F24",
"f24": "F24",
"payment-models": "Modèles de paiement pour",
"attach-pagopa-notice": "Joindre un avis de pagoPA",
"attach-f24-flatrate": "Joindre Modèle F24 forfaitaire",
"attach-f24": "Joindre Modèle F24",
"nothing": "<0>Si cette notification prévoit un paiement, revenez à <0><1>Informations préliminaires<1><2> et sélectionnez un modèle. Ensuite, revenez ici pour le charger.<2>",
"back-to-attachments": "Retour à Pièces jointes"
Expand Down
3 changes: 2 additions & 1 deletion packages/pn-pa-webapp/public/locales/it/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"send": "Invia",
"go-to-home": "Torna alla home page",
"go-to-login": "Accedi",
"close": "Chiudi"
"close": "Chiudi",
"delete": "Elimina"
},
"menu": {
"notifications": "Notifiche",
Expand Down
80 changes: 64 additions & 16 deletions packages/pn-pa-webapp/public/locales/it/notifiche.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@
},
"new-notification": {
"title": "Invia una nuova notifica",
"subtitle": "Per inviare una notifica, inserisci i dati richiesti e aggiungi i modelli di pagamento. Se devi fare un invio massivo, puoi usare le",
"subtitle": "Per inviare una notifica, inserisci i dati richiesti e aggiungi eventualmente una Posizione debitoria. Se devi fare un invio massivo,",
"how-it-works": "scopri come funziona",
"breadcrumb-root": "Notifiche",
"breadcrumb-leaf": "Nuova notifica",
"prompt": {
Expand Down Expand Up @@ -424,8 +425,7 @@
"simple-registered-letter": "Raccomandata A/R",
"payment-method": "Modello di pagamento",
"pagopa-notice": "Avviso pagoPA",
"pagopa-notice-f24-flatrate": "Avviso pagoPA e Modello F24 forfettario",
"pagopa-notice-f24": "Avviso pagoPA e Modello F24",
"f24": "Modello F24",
"nothing": "Nessuno",
"notification-language-title": "Lingua di invio",
"notification-language-subtitle": "La notifica, i documenti e le attestazioni verranno inviati secondo le preferenze di lingua selezionate.",
Expand All @@ -440,7 +440,6 @@
"title": "Destinatari",
"fiscal-code-error": "Il valore inserito non è corretto",
"identical-fiscal-codes-error": "C'è già un destinatario con questo Codice Fiscale. Inseriscine uno diverso.",
"identical-notice-codes-error": "C'è già un destinatario con questo Codice Avviso. Inseriscine uno diverso.",
"notice-code-error": "Inserisci un codice di 18 caratteri numerici",
"pec-error": "Indirizzo PEC non valido",
"forbidden-characters-denomination-error": "Hai inserito caratteri non validi",
Expand Down Expand Up @@ -473,7 +472,7 @@
"remove-recipient": "Rimuovi destinatario"
},
"attachments": {
"title": "Allegati",
"title": "Documentazione",
"max-attachments": "Questi sono i documenti che saranno notificati tramite SEND a tutti i destinatari inseriti. Puoi allegare fino a un massimo di {{maxNumber}} documenti.",
"attach-for-recipients": "Documenti allegati",
"act-attachment": "Allega documento",
Expand All @@ -483,21 +482,70 @@
"add-doc": "Aggiungi un documento",
"add-another-doc": "Aggiungi un altro documento",
"back-to-recipient": "Torna a Destinatario",
"back-to-debt-position": "Torna a Posizione debitoria",
"back-to-debt-position-detail": "Torna a Dettaglio posizione debitoria",
"remove-document": "Rimuovi documento",
"banner-additional-languages": "Hai scelto di inviare la notifica in più lingue. Ricorda di allegare i documenti in entrambe le lingue selezionate.",
"file-upload-helper": "Il documento deve essere in formato {{format}} e non deve superare le dimensioni di {{size}}"
},
"payment-methods": {
"title": "Modelli di pagamento",
"pagopa-notice": "Avviso pagoPA",
"pagopa-notice-f24-flatrate": "F24 forfettario",
"pagopa-notice-f24": "F24",
"payment-models": "Modelli di pagamento per",
"attach-pagopa-notice": "Allega Avviso pagoPA",
"attach-f24-flatrate": "Allega Modello F24 forfettario",
"attach-f24": "Allega Modello F24",
"nothing": "<0>Se questa notifica prevede un pagamento, torna a </0><1>Informazioni preliminari</1><2> e seleziona un modello. Poi, torna qui per caricarlo.</2>",
"back-to-attachments": "Torna a Allegati"
"debt-position": {
"title": "Posizione debitoria",
"debt-position": "Posizione debitoria",
"debt-position-of": "Posizione debitoria di {{fullName}}",
"which-type-of-payments": "Quale tipo di pagamento prevedi?",
"back-to-recipient": "Torna a Destinatari",
"radios": {
"pago-pa": "Avviso pagoPA",
"f24": "Modello F24",
"pago-pa-f24": "Avviso pagoPA + Modello F24",
"nothing": "Nessun pagamento"
}
},
"debt-position-detail": {
"title": "Dettaglio posizione debitoria",
"debt-position-of": "Posizione debitoria di {{fullName}}",
"notification-fee": {
"title": "Costo di notifica",
"description": "Scegli il tipo di costo di notifica: puoi scegliere fra quello già incluso nell’atto oppure inserire un costo di notifica personalizzato a carico del destinatario.",
"disclaimer": "L’IVA verrà applicata solo alle notifiche recapitate in modalità cartacea.",
"pa-fee": "Costo di notifica",
"vat": "IVA"
},
"pagopa-int-mode": {
"title": "Tecnologia del pagamento",
"description": "Nella modalità sincrona la posizione debitoria è presso il sistema dell'Ente Creditore (EC), mentre nella modalità asincrona è caricata sul sistema Gestione Posizioni Debitorie (GPD) di pagoPA. <0>Scopri di più</0>"
},
"alert": "Se non hai informazioni certe sull’integrazione pagoPA verifica con il tuo provider tecnologico: in caso di scelta non corretta l’addebito della notifica potrebbe essere errato.",
"back-to-debt-position": "Torna a Posizione debitoria",
"radios": {
"flat-rate": "Incluso nell’atto (forfettario)",
"delivery-mode": "A carico del destinatario (puntuale)",
"sync": "Sincrona",
"async": "Asincrona"
},
"identical-notice-codes-error": "C'è già un destinatario con questo Codice Avviso. Inseriscine uno diverso.",
"at-least-one-applycost": "Applica i costi di notifica almeno ad un pagamento",
"payment-methods": {
"title": "Modelli di pagamento",
"pagopa-notice": "Avviso pagoPA",
"payment-models": "Posizione debitoria di",
"nothing": "<0>Se questa notifica prevede un pagamento, torna a </0><1>Informazioni preliminari</1><2> e seleziona un modello. Poi, torna qui per caricarlo.</2>",
"back-to-attachments": "Torna a Allegati",
"apply-cost-installment": "Attenzione: se è prevista la possibilità di un pagamento rateale dovrai applicare il costo di notifica solo ad una rata.",
"pagopa": {
"attach-pagopa-notice": "Specifiche Avviso pagoPA",
"notice-code": "Codice avviso",
"creditor-taxid": "Codice fiscale ente creditore",
"apply-cost": "Applica costo di notifica",
"add-new-pagopa-notice": "Aggiungi codice di avviso pagoPA"
},
"f24": {
"attach-f24": "Specifiche Modello F24",
"document-name": "Titolo documento",
"apply-cost": "Applica costo di notifica",
"add-new-f24": "Aggiungi un altro Modello F24"
}
}
},
"sync-feedback": {
"title": "La notifica è stata creata",
Expand Down
8 changes: 2 additions & 6 deletions packages/pn-pa-webapp/public/locales/sl/notifiche.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@
"simple-registered-letter": "Priporočeno pismo s povratnico",
"payment-method": "Plačilni obrazec",
"pagopa-notice": "Opozorilo PagoPA",
"pagopa-notice-f24-flatrate": "Obvestilo pagoPA in pavšalni obrazec F24",
"pagopa-notice-f24": "Obvestilo PagoPA in obrazec F24",
"f24": "Obrazec F24",
"nothing": "Noben"
},
"recipient": {
Expand Down Expand Up @@ -451,7 +450,6 @@
"remove-recipient": "Odstrani prejemnika"
},
"attachments": {
"title": "Priloge",
"max-attachments": "Naložite lahko do 11 prilog, vključno z dokumentom, ki ga je treba obvestiti.",
"attach-for-recipients": "Priloge",
"act-attachment": "Priloži listino",
Expand All @@ -466,11 +464,9 @@
"payment-methods": {
"title": "Plačilni obrazci",
"pagopa-notice": "Opozorilo PagoPA",
"pagopa-notice-f24-flatrate": "Pavšalni F24",
"pagopa-notice-f24": "F24",
"f24": "F24",
"payment-models": "Plačilni obrazci za",
"attach-pagopa-notice": "Priložite obvestilo pagoPA",
"attach-f24-flatrate": "Priložite pavšalni obrazec F24",
"attach-f24": "Priložite obrazec F24",
"nothing": "<0>Če to obvestilo vključuje plačilo, se vrnite na </0><1>Uvodne informacije</1><2> in izberite obrazec. Nato se vrnite in ga naložite.</2>",
"back-to-attachments": "Nazaj na priloge"
Expand Down
Loading

0 comments on commit 7330434

Please sign in to comment.