io-app icon indicating copy to clipboard operation
io-app copied to clipboard

feat: [IOCOM-1172] Update business logic for payment reminder on a message details screen with the new DS

Open Vangaorth opened this issue 1 year ago • 3 comments
trafficstars

This PR depends on #5603

Short description

This PR updated the business logic for the message's payment reminder, with the new DS.

Loading Expiring Expired
Simulator Screenshot - iPhone 15 - 2024-03-21 at 19 04 35 Simulator Screenshot - iPhone 15 - 2024-03-21 at 19 04 36 Simulator Screenshot - iPhone 15 - 2024-03-21 at 19 11 07

List of changes proposed in this pull request

  • The reminder in the message details:
    • is hidden, if the message has no dueDate or no payment data
    • shows a loading status while the payment is updating
    • shows "expires on" if the payment is still payable (displaying the dueDate of the message)
    • shows "has expired on" if the payment update returns a PAA_PAGAMENTO_SCADUTO code (displaying the dueDate of the message)
    • is hidden if the payment update returns an error that is not PAA_PAGAMENTO_SCADUTO

How to test

Using the io-dev-api-server, generate a message with a payment. Check that the behaviour described above is true for each case.

Vangaorth avatar Mar 21 '24 09:03 Vangaorth

Affected stories

  • 🌟 IOCOM-1172: [App] Gestire l'avviso di scadenza in base allo stato del pagamento subtask of
    • IOCOM-812: Adottare il nuovo design system nel dettaglio di un messaggio di IO

Generated by :no_entry_sign: dangerJS against 50395ffd2204c9a51282d21027078f301ebb03f8

pagopa-github-bot avatar Mar 21 '24 09:03 pagopa-github-bot

Codecov Report

Attention: Patch coverage is 89.18919% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 48.19%. Comparing base (49e2fc0) to head (aba5261). Report is 25 commits behind head on master.

:exclamation: Current head aba5261 differs from pull request most recent head 50395ff. Consider uploading reports for the commit 50395ff to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5613      +/-   ##
==========================================
+ Coverage   48.16%   48.19%   +0.03%     
==========================================
  Files        1438     1445       +7     
  Lines       31041    31143     +102     
  Branches     7594     7600       +6     
==========================================
+ Hits        14951    15010      +59     
- Misses      16019    16062      +43     
  Partials       71       71              
Files Coverage Δ
...omponents/MessageDetail/MessageDetailsReminder.tsx 100.00% <100.00%> (+33.33%) :arrow_up:
...ts/MessageDetail/MessageDetailsReminderExpired.tsx 100.00% <100.00%> (ø)
...features/messages/screens/MessageDetailsScreen.tsx 83.78% <ø> (-2.27%) :arrow_down:
ts/features/messages/store/reducers/payments.ts 100.00% <100.00%> (ø)
...s/MessageDetail/MessageDetailsReminderExpiring.tsx 66.66% <66.66%> (ø)

... and 18 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 832a1a9...50395ff. Read the comment docs.

codecov[bot] avatar Mar 21 '24 18:03 codecov[bot]

:tada: All dependencies have been resolved !

dpulls[bot] avatar Mar 22 '24 15:03 dpulls[bot]