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-1139] Add new IDPay initiative reward type EXPENSE #6621

Merged
merged 12 commits into from
Feb 5, 2025

Conversation

Hantex9
Copy link
Contributor

@Hantex9 Hantex9 commented Jan 21, 2025

Short description

This PR introduces a new IDPay initiative reward of type EXPENSE. This kind of initiative will enable citizens to receive refunds by submitting a fiscal receipt through a separate FIMS flow. The goal of this PR only covers the management of the initiative’s detail view and its timeline.

N.B: The Chiedi aiuto CTA will be implemented in another PR.

List of changes proposed in this pull request

  • Temporary added new definitions in local (as soon as the definitions will be deployed in production, the reference will change);
  • Adapted the BeneficiaryDetails screen for this new kind of initiative type;
  • Adapted the timeline to handle this kind of initiative;
  • Adapted the bonus screen card to manage the refunded amount and its details;

How to test

Preview

preview.mov

@Hantex9 Hantex9 added IDPay IO-Bonus e pagamenti IO - Bonus e pagamenti labels Jan 21, 2025
Copy link
Contributor

github-actions bot commented Jan 21, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 57.89474% with 8 lines in your changes missing coverage. Please review.

Project coverage is 50.04%. Comparing base (435848a) to head (dbcb8b1).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...y/details/screens/IdPayInitiativeDetailsScreen.tsx 14.28% 6 Missing ⚠️
...y/details/components/BeneficiaryDetailsContent.tsx 71.42% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6621   +/-   ##
=======================================
  Coverage   50.04%   50.04%           
=======================================
  Files        1539     1539           
  Lines       32170    32187   +17     
  Branches     7295     7251   -44     
=======================================
+ Hits        16100    16109    +9     
- Misses      16019    16040   +21     
+ Partials       51       38   -13     
Files with missing lines Coverage Δ
ts/components/BonusCard/BonusCard.tsx 93.93% <ø> (ø)
ts/components/BonusCard/BonusCardCounter.tsx 92.00% <ø> (ø)
...ls/components/IdPayInitiativeLastUpdateCounter.tsx 100.00% <100.00%> (ø)
...details/components/InitiativeTimelineComponent.tsx 78.78% <100.00%> (+1.36%) ⬆️
...y/details/components/TimelineOperationListItem.tsx 91.26% <100.00%> (+0.08%) ⬆️
...ption/screens/UnsubscriptionConfirmationScreen.tsx 6.66% <ø> (ø)
...y/details/components/BeneficiaryDetailsContent.tsx 66.66% <71.42%> (+0.59%) ⬆️
...y/details/screens/IdPayInitiativeDetailsScreen.tsx 78.26% <14.28%> (-5.27%) ⬇️

... and 13 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 a571729...dbcb8b1. Read the comment docs.

@Hantex9 Hantex9 changed the title feat: [IOBP-1139] Add new IDPay initiative reward type EXPENSE feat(IDPay): [IOBP-1139] Add new IDPay initiative reward type EXPENSE Feb 4, 2025
Copy link
Contributor

@LeleDallas LeleDallas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Hantex9 Hantex9 enabled auto-merge February 5, 2025 08:17
@Hantex9 Hantex9 added this pull request to the merge queue Feb 5, 2025
Merged via the queue into master with commit a7d95e6 Feb 5, 2025
22 checks passed
@Hantex9 Hantex9 deleted the IOBP-1139-add-idpay-expense-details branch February 5, 2025 08:54
github-merge-queue bot pushed a commit that referenced this pull request Feb 6, 2025
…ils screen (#6622)

## ⚠️ This PR depends on #6621 ⚠️

## Short description
This PR adds the "Chiedi aiuto" call-to-action within the beneficiary
details screen. By clicking this CTA, a support ticket is automatically
created with the preselected category and subcategory, so the user is
not prompted to choose them manually.

## List of changes proposed in this pull request
- Added the `assistanceForIdPay` flag that if it's true, it doesn't
prompt the user choosing the category manually but it will be
preselected;
- Created a custom hook `useIdPaySupportModal` that shows the zendesk
support modal and pre-select the category and subcategory for that
screen;

## How to test
- Checkout the dev-server from this PR:
pagopa/io-dev-api-server#457;
- Run `yarn sync`;
- Go inside the expense initiative detail and tap on the info icon on
the top right corner of the screen;
- Check that there is available a `Chiedi aiuto` call-to-action that
shows a modal with the FAQ;
- Check that if you tap on the button "Open a support request", it
doesn't prompt to the user to select the category of the topic;

## Preview


https://github.com/user-attachments/assets/7255110d-1f88-4420-b4af-01bab44030ec

---------

Co-authored-by: Emanuele Dall'Ara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDPay IO-Bonus e pagamenti IO - Bonus e pagamenti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants