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

chore: [IOBP-1143] add mock idpay expense type #457

Merged
merged 9 commits into from
Feb 4, 2025

Conversation

Hantex9
Copy link
Contributor

@Hantex9 Hantex9 commented Jan 21, 2025

Short description

This PR adds the new IDPay discount type: EXPENSE with its data mocked.

List of changes proposed in this pull request

  • Added temporary swagger definitions until it's available in production from the BE;
  • Added the random generation of the new discount of type EXPENSE;
  • Added a mock function to generate a random transaction of expense type;

How to test

Checkout the PR on the io-app and check that everything is as expected in the designed design flow.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.89%. Comparing base (e1c1bac) to head (0bf4af3).
Report is 8 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #457      +/-   ##
==========================================
+ Coverage   63.75%   63.89%   +0.14%     
==========================================
  Files         166      166              
  Lines        5410     5432      +22     
  Branches      750      772      +22     
==========================================
+ Hits         3449     3471      +22     
+ Misses       1960     1817     -143     
- Partials        1      144     +143     
Files with missing lines Coverage Δ
src/config.ts 96.15% <ø> (ø)
src/persistence/idpay.ts 73.29% <100.00%> (+1.60%) ⬆️
src/types/config.ts 100.00% <ø> (ø)

... and 32 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 febcdc7...0bf4af3. Read the comment docs.

@Hantex9 Hantex9 marked this pull request as ready for review February 4, 2025 08:58
@Hantex9 Hantex9 requested review from ChrisMattew, gispada, freddi301 and a team as code owners February 4, 2025 08:58
@Hantex9 Hantex9 merged commit a9158e4 into master Feb 4, 2025
8 checks passed
github-merge-queue bot pushed a commit to pagopa/io-app that referenced this pull request Feb 5, 2025
…E` (#6621)

## 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
- Checkout the dev-server from this PR
pagopa/io-dev-api-server#457;
- Run `yarn sync`;
- Run the app and check that in the Wallet screen there is available an
initiative with the suffix `[E]` that indicates an initiative of type
`EXPENSE`;
- Go inside the detail page of that initiative and check that the
details screen and the timeline is as expected [from the designed screen
flow](https://www.figma.com/design/z9AtCNkheEW93sVDnvrGci/PoC---Comune-di-Guidonia?node-id=181-8623&t=0I3hMvznDwQhqCrg-4)

## Preview


https://github.com/user-attachments/assets/8fc79204-cbcb-4d94-b73e-e845d492a791
github-merge-queue bot pushed a commit to pagopa/io-app 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 <71103219+LeleDallas@users.noreply.github.com>
@Vangaorth Vangaorth deleted the IOBP-1143-add-mock-idpay-expense-type branch February 13, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants