Skip to content

Commit

Permalink
Next (#621)
Browse files Browse the repository at this point in the history
* [VAS-418] feat: Align tos page with design (#579)

* Bump to version 1.26.0-1-next

* merge

* fix: PaymentNoticesDetailPage.tsx posteAuth (#577)

* Bump to version 1.26.0-2-next

* fix github.head_ref in the action

* feat: Review channel flow (#573)

* [VAS-998] feat: introducing ops review from channel

* [VAS-998] feat: Updated ops review modal management for channels

* [VAS-997] changed channels page structured and integrated new getChannels API

* [VAS-997] updated tests

* [VAS-998] feat: Updated addEdit, details and tests

* [VAS-998] feat: Updated tests, introduced common header to avoid duplicates

* [VAS-998] feat: temporary rollback test

* [VAS-998] feat: Update GetChannelAlert.test.tsx

* [VAS-998] feat: Update ci_code_review.yml

* [VAS-998] feat: Updated GetChannelAlert.test.tsx

* [VAS-997] fix after merge with VAS-998

* fix client after merge

* [VAS-997] fix: Width row station name

* [VAS-997] fix: Improve createdBy/modifiedBy station detail

* [VAS-997] fix: Handle change page channels table

* [VAS-997] feat: Add alert channels details

* [VAS-997] chore: Refactor detail button station detail

* [VAS-997] feat: Refactor ChannelDetail component & improve UI

* [VAS-997] feat: New translations

* [VAS-997] fix: Refactor & format + fix translations

* [VAS-997] feat: Delete unused component

* [VAS-997] fix: Wrapper status chip translation for operators

* [VAS-997] chore: Clean code

* fixed client

* [VAS-997] fixed unit tests

* [VAS-997] add unit tests

* [VAS-997] improve tests

* [VAS-997] improve coverage

---------

Co-authored-by: Alessio Cialini <alessio.cialini@emeal.nttdata.com>
Co-authored-by: svariant <samuele.varianti@nttdata.com>
Co-authored-by: Samuele Varianti <128470180+svariant@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.26.0-3-next

* [VAS-1123] feat: Remove unused Station and Channel API (#574)

* [VAS-998] feat: introducing ops review from channel

* [VAS-998] feat: Updated ops review modal management for channels

* [VAS-997] changed channels page structured and integrated new getChannels API

* [VAS-997] updated tests

* [VAS-998] feat: Updated addEdit, details and tests

* [VAS-998] feat: Updated tests, introduced common header to avoid duplicates

* [VAS-998] feat: temporary rollback test

* [VAS-998] feat: Update GetChannelAlert.test.tsx

* [VAS-998] feat: Update ci_code_review.yml

* [VAS-998] feat: Updated GetChannelAlert.test.tsx

* [VAS-997] fix after merge with VAS-998

* fix client after merge

* [VAS-1123] replace old merged API with new get Stations and Channels

* [VAS-1123] fixed tests

* [VAS-1123] fix after merge

* [VAS-1123] fix test after merge

* [VAS-1123] removed useless file and added tests

* improve coverage

* improve for coverage

---------

Co-authored-by: Alessio Cialini <alessio.cialini@emeal.nttdata.com>
Co-authored-by: Samuele Varianti <128470180+svariant@users.noreply.github.com>

* Bump to version 1.26.0-4-next

* [VAS-1104] feat: New bundle status for available but expired bundles (#580)

* [VAS-1104] feat: New bundle status for available but expired bundles

* [VAS-1104] feat: Add alert bundle expired

* [VAS-1104] chore: BE openapi

* [VAS-1104] feat: Changes after UI designer advice

* [VAS-1104] chore: Fix unit tests

* Bump to version 1.26.0-5-next

* [VAS-1103] feat: Add new field pspBusinessName to bundle details (#583)

* [VAS-1103] feat: Add new field pspBusinessName to bundle details

* Update src/locale/it.json

Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* [VAS-1103] fix: Unit tests

---------

Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.26.0-6-next

* [VAS-1095] feat: e2e PSP's & CI's actions on private bundle (#570)

* [VAS-1096] feat: Define publicBundles e2e tests

* [VAS-1096] feat: e2e validate bundle api

* [VAS-1096] feat: Implement temporary new state for ci bundles + uniform code

* [VAS-1096] feat: Conclude publicBundles e2e tests

* [VAS-1095] feat: e2e private bundles

* [VAS-1096] chore: fix unit tests

* [VAS-1096] feat: Re-enable e2e paraller workers

* [VAS-1095] fix: Click on popup

* [VAS-1095] feat: Add control on login page

* [VAS-1095] feat: Improve e2e tests

* [VAS-1095] fix: Public bundles e2e

* [VAS-1095] chore: Max number of failures e2e

* [VAS-1095] fix: e2e subkey env name

* {VAS-1095] fix: e2e Added condition

* [VAS-1095] fix: Added timeout e2e

* [VAS-1095] fix: Increase timeout

* [VAS-1095] fix: Changed timeouts

* [VAS-1095] fix: Increase timeout

* [VAS-1095] chore: Delete obsolete puppeteer int test

* [VAS-1095] fix: Improved check return homepage

* [VAS-1095] timeout

* [VAS-1095] fix: e2e change browser driver to firefox + timeout fixes

* [VAS-1095] feat: Add delete bundle api to cleanup

* [VAS-1095] chore: Add log response

* [VAS-1095] feat: Add subkey int test keyvault

* [VAS-1095] notify

* [VAS-1095] fix: e2e clean up

* [VAS-1095] special secret

* [VAS-1095] debug

* [VAS-1095] secret

* [VAS-1095] create jwt

* [VAS-1095] gitignore

* [VAS-1095] github pages

* [VAS-1095] chore: Re commit tsconfig

* [VAS-1095] fix: e2e static analysis

* [VAS-1095] chore: Sonar cpd exclusion e2e

---------

Co-authored-by: Jacopo <jacopo.carlini@gmail.com>

* Bump to version 1.26.0-7-next

* chore: Merge main into next (#585)

* build(deps-dev): Bump eslint-plugin-react from 7.30.0 to 7.34.3

Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.30.0 to 7.34.3.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](jsx-eslint/eslint-plugin-react@v7.30.0...v7.34.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): Bump react-use-scrollspy from 3.0.2 to 3.1.1 (#565)

* build(deps): Bump react-use-scrollspy from 3.0.2 to 3.1.1

Bumps [react-use-scrollspy](https://github.com/Purii/react-use-scrollspy) from 3.0.2 to 3.1.1.
- [Release notes](https://github.com/Purii/react-use-scrollspy/releases)
- [Changelog](https://github.com/Purii/react-use-scrollspy/blob/main/CHANGELOG.md)
- [Commits](Purii/react-use-scrollspy@v3.0.2...v3.1.1)

---
updated-dependencies:
- dependency-name: react-use-scrollspy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): Bump react-use-scrollspy from 3.0.2 to 3.1.1

Bumps [react-use-scrollspy](https://github.com/Purii/react-use-scrollspy) from 3.0.2 to 3.1.1.
- [Release notes](https://github.com/Purii/react-use-scrollspy/releases)
- [Changelog](https://github.com/Purii/react-use-scrollspy/blob/main/CHANGELOG.md)
- [Commits](Purii/react-use-scrollspy@v3.0.2...v3.1.1)

---
updated-dependencies:
- dependency-name: react-use-scrollspy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [react-use-scrollspy-3] delete branch

* [react-use-scrollspy-3] if condition delete branch

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo <jacopo.carlini@gmail.com>

* build(deps-dev): Bump @babel/core from 7.24.4 to 7.24.7 (#567)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.24.4 to 7.24.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.24.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* build(deps): Bump @mui/system from 5.15.15 to 5.15.20 (#566)

Bumps [@mui/system](https://github.com/mui/material-ui/tree/HEAD/packages/mui-system) from 5.15.15 to 5.15.20.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/v5.15.20/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.15.20/packages/mui-system)

---
updated-dependencies:
- dependency-name: "@mui/system"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* added missing call for station in status TO_FIX_UPDATE (#581)

Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.26.1 [skip ci]

* Pin actions/checkout action to ee0669b (#582)

Co-authored-by: renovate-pagopa[bot] <164534245+renovate-pagopa[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* fix delete branch

* Update README.md

* Update README.md

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>
Co-authored-by: gioelemella <128155546+gioelemella@users.noreply.github.com>
Co-authored-by: pagopa-github-bot <github-bot@pagopa.it>
Co-authored-by: renovate-pagopa[bot] <164534245+renovate-pagopa[bot]@users.noreply.github.com>

* Bump to version 1.26.1-1-next

* [VAS-1133] feat: Add new api key for printPaymentsNotice product (#584)

* [VAS-1133] feat: Introduce print notice api key list element

* [VAS-1133] fix: Api key products psp

* [VAS-1133] feat: Refactor api key products

* [VAS-1133] feat: Introduce flag print notice for api keys

* [VAS-1133] chore: Api key unit test coverage

* Bump to version 1.26.1-2-next

* fix: Updated AddEditCommissionBundleForm.tsx to call brokerDelegation as an institution (#587)

* Bump to version 1.26.1-3-next

* [VAS-1070] feat; Change station and channel detail view on pending update (#586)

* [VAS-1070] improved station API and removed wrapper status value from body

* [VAS-1070] integrated new station and channel detail API and removed unused ones.

* [VAS-1070] fix unit tests

* [VAS-1070] handled station and channel with pending update

* [VAS-1070] added common component for alert in station and channel detail page

* [VAS-1070] removed created by when undefined

* [VAS-1070] fix unit tests

* [VAS-1070] fix title

* [VAS-1070] rename variable

* Bump to version 1.26.3-1-next

* notify

* fix missing translate (#596)

* Bump to version 1.26.4-1-next

* fix: Bugs found before release (#597)

* fix: Bundle -> hide delete & disable invite EC buttons if bundle is expired

* fix: Newconnectivity select channels

* fix: Margin top checkbox channels edit page

* fix: Unit tests

* empty commit

* Bump to version 1.26.4-2-next

* [VAS-1146] feat: Implement new boolean "cart" for bundles (#605)

* [VAS-1146] feat: Implement new switch for cart bool in bundle add/edit page

* [VAS-1146] chore: Unit tests

* [VAS-1146] chore: Update packagejson openapi command

* empty commit

* [VAS-1146] fix: Unit tests

* [VAS-1146] feat: Swap api call getChannelsDetails with primitive version check on list elements

* [VAS-1146] feat: Improve unit test

* [VAS-1146] fix: Unit tests

* [VAS-1146] fix: Unit tests

* [VAS-1146] feat: Add cart bool to bundle details drawer

* fix unit test

* [VAS-1146] feat: Improve code

* Bump to version 1.26.4-3-next

* build(deps): Bump axios from 0.28.1 to 1.7.2 (#599)

Bumps [axios](https://github.com/axios/axios) from 0.28.1 to 1.7.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.28.1...v1.7.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.27.0-1-next

* build(deps): Bump @types/node from 20.10.1 to 20.14.10 (#600)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.10.1 to 20.14.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.27.0-2-next

* build(deps): Bump @mui/icons-material from 5.15.9 to 5.16.1 (#608)

Bumps [@mui/icons-material](https://github.com/mui/material-ui/tree/HEAD/packages/mui-icons-material) from 5.15.9 to 5.16.1.
- [Release notes](https://github.com/mui/material-ui/releases)
- [Changelog](https://github.com/mui/material-ui/blob/v5.16.1/CHANGELOG.md)
- [Commits](https://github.com/mui/material-ui/commits/v5.16.1/packages/mui-icons-material)

---
updated-dependencies:
- dependency-name: "@mui/icons-material"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.27.0-3-next

* [VAS-1166] feat: add tos and privacy pages (#607)

* [VAS-1116] feat: add privacy and tos pages

* [VAS-1116] feat: Updated footer config, and management for the snippet pages

* [VAS-1116] feat: Updated tests

* [VAS-1116] feat: Updated Snippet.tsx

* [VAS-1116] feat: Updated Snippet.tsx and tests

* [VAS-1116] feat: Updated App.test.tsx

* [VAS-1116] feat: Updated App.test.tsx

* Bump to version 1.26.4-4-VAS-1166-feat-add-tos-and-privacy-pages [skip ci]

* [VAS-1116] feat: Updated App.test

* Bump to version 1.26.4-5-VAS-1166-feat-add-tos-and-privacy-pages [skip ci]

---------

Co-authored-by: pagopa-github-bot <github-bot@pagopa.it>
Co-authored-by: Jacopo Carlini <jacopo.carlini@gmail.com>

* Bump to version 1.27.0-4-next

* fix: errorBoundary labels (#619)

* Bump to version 1.28.1-1-next

* [VAS-785] feat: Introduce new flags "standIn" & "aca" for CI-station relation (#606)

* [VAS-785] fix: Bug disable assosiate ec to station button

* [VAS-785] chore: Change openapi pr pointer

* [VAS-785] feat: Define new redux state for stationCi relationships

* [VAS-785] feat: Implement API to update CI-station relation

* [VAS-785] feat: Improve routing to stationEC associate page to implement edit mode

* [VAS-785] feat: Define new action columns stationEC table

* [VAS-785] feat: Define new paper section with standIn and ACA flags and edit mode for StationAssociateEcPage

* [VAS-785] feat: Complete implementation standIn & aca flags

* [VAS-785] feat: Add new columns aca & standin to ectable

* [VAS-785] chore: Unit test ec table columns

* [VAS-785] chore: Station ec table coverage

* [VAS-785] chore: Unit test station associate ec page

* [VAS-785] fix: Hook problems

* [VAS-785] fix: Hook with redirect

* [VAS-785] chore: coverage

* [VAS-1116] feat: Updated creditorInstitutionService.ts

* [VAS-1116] feat: Updated creditorInstitutionService.ts

* [VAS-785] feat: Updated stations mock

* [VAS-785] feat: Updated StationECTableColumns.test.tsx and StationECTableColumns.tsx

* [VAS-785] feat: Updated StationECTableColumns.test.tsx and StationECTableColumns.tsx

---------

Co-authored-by: Alessio Cialini <alessio.cialini@emeal.nttdata.com>

* Bump to version 1.28.1-2-next

* [VAS-1204] feat: Change "I miei enti" to "Enti gestiti" (#625)

* Bump to version 1.28.1-3-next

* [PPANTT-41] feat: Station's maintenance list page (#627)

* fix: Default values associate-EC form

* [PPANTT-41] chore: Generate api PR name

* [PPANTT-41] feat: Station Maintenance page & table

* [PPANTT-41] feat: Station Maintenance route & sidenav

* [PPANTT-41] chore: Cleaned code & minor fixes

* [PPANTT-41] feat: Station Maintenance translations

* [PPANTT-41] feat: Improvements year filter

* [PPANTT-41] feat: Remove sortable column headers

* [PPANTT-41] feat: Implement getStationMaintenances API

* [PPANTT-41] feat: Add button and subtitle station maintenance page

* [PPANTT-41] chore: Improve placeholder code

* [PPANTT-41] feat: Changed maximum year filter

* [PPANTT-41] fix: Station maintenance table properties

* [PPANTT-41] fix: Error boundary page translation

* [PPANTT-41] feat: Trigger search when reset filters

* [PPANTT-41] fix: Remove empty state link when maintenance finished

* [PPANTT-41] feat: Hours summary section & clean code

* [PPANTT-41] feat: Implement maintenance row actions

* [PPANTT-41] feat: Add alert message row action

* [PPANTT-41] feat: New loading const

* [PPANTT-41] chore: Update generate openapi command

* [PPANTT-41] feat: Implement get hours summary & delete maintenance & terminate maintenance APIs

* [PPANTT-41] feat: Change maintenance table format date with minutes

* [PPANTT-41] chore: Unit test maintenance service & columns

* [PPANTT-41] fix: Unit test

* [PPANTT-41] chore: Improve comments future developments

* [PPANTT-41] chore: Station maintenances components unit tests

* chore: Fix smell

* Bump to version 1.28.1-4-next

* Bump to version 1.28.1-5-next [skip ci]

* [PPANTT-42] feat: Station maintenances create/edit/details page (#628)

* fix: Default values associate-EC form

* [PPANTT-41] chore: Generate api PR name

* [PPANTT-41] feat: Station Maintenance page & table

* [PPANTT-41] feat: Station Maintenance route & sidenav

* [PPANTT-41] chore: Cleaned code & minor fixes

* [PPANTT-41] feat: Station Maintenance translations

* [PPANTT-41] feat: Improvements year filter

* [PPANTT-41] feat: Remove sortable column headers

* [PPANTT-41] feat: Implement getStationMaintenances API

* [PPANTT-41] feat: Add button and subtitle station maintenance page

* [PPANTT-41] chore: Improve placeholder code

* [PPANTT-41] feat: Changed maximum year filter

* [PPANTT-41] fix: Station maintenance table properties

* [PPANTT-41] fix: Error boundary page translation

* [PPANTT-41] feat: Trigger search when reset filters

* [PPANTT-41] fix: Remove empty state link when maintenance finished

* [PPANTT-41] feat: Hours summary section & clean code

* [PPANTT-41] feat: Implement maintenance row actions

* [PPANTT-41] feat: Add alert message row action

* [PPANTT-41] feat: New loading const

* [PPANTT-41] chore: Update generate openapi command

* [PPANTT-41] feat: Implement get hours summary & delete maintenance & terminate maintenance APIs

* [PPANTT-41] feat: Change maintenance table format date with minutes

* [PPANTT-41] chore: Unit test maintenance service & columns

* [PPANTT-41] fix: Unit test

* [PPANTT-41] chore: Improve comments future developments

* [PPANTT-41] chore: Station maintenances components unit tests

* chore: Fix smell

* [PPANTT-42] feat: Implement new page to create/edit/view station's maintenance

* fix: Unit tests

* [PPANTT-42] feat: Implement create & edit APIs + redux store + general improvements & validation

* [PPANTT-42] feat: Major improvements to station maintenances pages

* [PPANTT-42] feat: Add error minDate

* [PPANTT-42] feat: Datepickers disabled text input

* [PPANTT-42] fix: Init input date

* Bump to version 1.28.1-4-PPANTT-42-station-maintenances-create-edit-detail-page [skip ci]

* [PPANTT-42] fix: Hours formatter

* Bump to version 1.28.1-5-PPANTT-42-station-maintenances-create-edit-detail-page [skip ci]

* [PPANTT-42] feat: New loading task constant

* Bump to version 1.28.1-6-PPANTT-42-station-maintenances-create-edit-detail-page [skip ci]

* [PPANTT-42] fix: Unit tests

* [PPANTT-42] fix: Error messages

* Bump to version 1.28.1-7-PPANTT-42-station-maintenances-create-edit-detail-page [skip ci]

* [PPANTT-42] chore: Unit tests

* [PPANTT-42] feat: Add success alert layout

* [PPANTT-42] chore: Unit test

* [PPANTT-42] chore: Coverage

---------

Co-authored-by: pagopa-github-bot <github-bot@pagopa.it>

* Bump to version 1.28.1-8-next

* Merge main next 1.29.3 (#635)

* Merge branch 'main' into next

* empty commit

* Bump to version 1.29.3-1-next

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Samuele Varianti <128470180+svariant@users.noreply.github.com>
Co-authored-by: pagopa-github-bot <github-bot@pagopa.it>
Co-authored-by: Alessio Cialini <63233981+alessio-cialini@users.noreply.github.com>
Co-authored-by: gioelemella <128155546+gioelemella@users.noreply.github.com>
Co-authored-by: Alessio Cialini <alessio.cialini@emeal.nttdata.com>
Co-authored-by: svariant <samuele.varianti@nttdata.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate-pagopa[bot] <164534245+renovate-pagopa[bot]@users.noreply.github.com>
  • Loading branch information
9 people authored Aug 6, 2024
1 parent a1ca35e commit 8d15d44
Show file tree
Hide file tree
Showing 47 changed files with 5,451 additions and 1,577 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pagopa-selfcare-backoffice-frontend",
"version": "1.29.3",
"version": "1.29.3-1-next",
"homepage": "ui",
"private": true,
"scripts": {
Expand Down Expand Up @@ -28,7 +28,7 @@
"clean:api-portal": "rimraf src/api/generated/portal && rimraf openApi/generated",
"generate:api-portal": "wget https://raw.githubusercontent.com/pagopa/pagopa-selfcare-ms-backoffice-backend/main/openapi/openapi.json -O ./openApi/portal-api-docs.json && npm run generate:client",
"generate:api-portal-next": "wget https://raw.githubusercontent.com/pagopa/pagopa-selfcare-ms-backoffice-backend/next/openapi/openapi.json -O ./openApi/portal-api-docs.json && npm run generate:client",
"generate:api-portal-pr": "wget https://raw.githubusercontent.com/pagopa/pagopa-selfcare-ms-backoffice-backend/next/openapi/openapi.json -O ./openApi/portal-api-docs.json && npm run generate:client",
"generate:api-portal-pr": "wget https://raw.githubusercontent.com/pagopa/pagopa-selfcare-ms-backoffice-backend/PPANTT-48-add-finish-maintenance-api/openapi/openapi.json -O ./openApi/portal-api-docs.json && npm run generate:client",
"generate:api-portal-local": "npm run generate:client",
"generate:client": "jq 'walk(if type == \"object\" and has(\"parameters\") then .parameters |= map(select(.name != \"X-Request-Id\")) else . end)' ./openApi/portal-api-docs.json > ./openApi/portal-api-docs.json.temp && mv ./openApi/portal-api-docs.json.temp ./openApi/portal-api-docs.json && yarn run clean:api-portal && mkdirp openApi/generated && gen-api-models --api-spec openApi/portal-api-docs.json --out-dir src/api/generated/portal --no-strict --request-types --response-decoders --client && node openApi/scripts/api-portal_fixPostGen.js"
},
Expand Down
60 changes: 44 additions & 16 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import StationsPage from './pages/stations/list/StationsPage';
import StationAssociateECPage from './pages/stations/stationAssociateEC/StationAssociateECPage';
import StationECListPage from './pages/stations/stationECList/StationECPage';
import PaymentNoticesPage from './pages/notices/PaymentNoticesPage';
import { TOS_AND_PRIVACY } from './pages/tos_and_privacy/TOS_AND_PRIVACY';
import { TosAndPrivacy } from './pages/tosAndPrivacy/TosAndPrivacy';
import routes from './routes';
import CommissionBundleDetailActivationPage from './pages/commisionalBundles/detail/CommissionBundleDetailActivationPage';
import { getMaintenanceMessage } from './services/maintenanceService';
Expand All @@ -58,7 +58,8 @@ import PaymentNoticesAddEditPage from './pages/notices/addEdit/PaymentNoticesAdd
import { rewriteLinks } from './utils/onetrust-utils';
import tosJson from './data/tos.json';
import privacyJson from './data/privacy.json';

import StationMaintenancesPage from './pages/stationMaintenances/list/StationMaintenancesPage';
import StationMaintenanceAddEditDetail from './pages/stationMaintenances/addEditDetail/StationMaintenanceAddEditDetail';

const SecuredRoutes = withLogin(
withFeatureFlags(
Expand Down Expand Up @@ -91,7 +92,11 @@ const SecuredRoutes = withLogin(
);
}

if (!isTOSAccepted && location.pathname !== routes.TOS && location.pathname !== routes.PRIVACY) {
if (
!isTOSAccepted &&
location.pathname !== routes.TOS &&
location.pathname !== routes.PRIVACY
) {
return (
<Layout>
<TOSWall acceptTOS={acceptTOS} tosRoute={routes.TOS} privacyRoute={routes.PRIVACY} />
Expand Down Expand Up @@ -288,7 +293,7 @@ const SecuredRoutes = withLogin(
<OperationTableListPage />
</ProtectedRoute>
</Route>

<Route path={routes.DELEGATIONS_LIST} exact={true}>
<ProtectedRoute permission="delegations-list" flagValue="delegations-list">
<DelegationsPage />
Expand Down Expand Up @@ -318,22 +323,45 @@ const SecuredRoutes = withLogin(
</ProtectedRoute>
</Route>

<Route path={routes.TOS} exact={true}>
<TOS_AND_PRIVACY html={tosJson.html}
waitForElementCondition={'.otnotice-content'}
waitForElementFunction={() => {
rewriteLinks(routes.TOS, '.otnotice-content a');}}
/>
<Route path={routes.STATION_MAINTENANCES_LIST} exact={true}>
<ProtectedRoute
permission="station-maintenances"
flagValue="station-maintenances"
>
<StationMaintenancesPage />
</ProtectedRoute>
</Route>

<Route path={routes.PRIVACY} exact={true}>
<TOS_AND_PRIVACY html={privacyJson.html}
waitForElementCondition={'.otnotice-content'}
waitForElementFunction={() => {
rewriteLinks(routes.PRIVACY, '.otnotice-content a');}}
/>
<Route path={routes.STATION_MAINTENANCES_ADD_EDIT_DETAIL} exact={true}>
<ProtectedRoute
permission="station-maintenances"
flagValue="station-maintenances"
>
<StationMaintenanceAddEditDetail />
</ProtectedRoute>
</Route>

<Route path={routes.TOS} exact={true}>
<TosAndPrivacy
html={tosJson.html}
waitForElementCondition={'.otnotice-content'}
waitForElementFunction={() => {
rewriteLinks(routes.TOS, '.otnotice-content a');
}}
/>
</Route>


<Route path={routes.PRIVACY} exact={true}>
<TosAndPrivacy
html={privacyJson.html}
waitForElementCondition={'.otnotice-content'}
waitForElementFunction={() => {
rewriteLinks(routes.PRIVACY, '.otnotice-content a');
}}
/>
</Route>

<Route path="*">
<Redirect to={routes.HOME} />
</Route>
Expand Down
120 changes: 120 additions & 0 deletions src/api/BackofficeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
PaymentsReceiptsListRequestBody,
} from '../model/PaymentsReceipts';
import { ConfigurationStatus, StationOnCreation } from '../model/Station';
import { StationMaintenanceState } from '../model/StationMaintenance';
import { store } from '../redux/store';
import { extractResponse } from '../utils/client-utils';
import { ENV } from '../utils/env';
Expand Down Expand Up @@ -99,6 +100,9 @@ import { WrapperEntities } from './generated/portal/WrapperEntities';
import { WrapperStationDetailsDto } from './generated/portal/WrapperStationDetailsDto';
import { WrapperStationsResource } from './generated/portal/WrapperStationsResource';
import { WithDefaultsT, createClient } from './generated/portal/client';
import { StationMaintenanceListResource } from './generated/portal/StationMaintenanceListResource';
import { MaintenanceHoursSummaryResource } from './generated/portal/MaintenanceHoursSummaryResource';
import { CreateStationMaintenance } from './generated/portal/CreateStationMaintenance';

// eslint-disable-next-line functional/immutable-data, @typescript-eslint/no-var-requires
window.Buffer = window.Buffer || require('buffer').Buffer;
Expand Down Expand Up @@ -605,11 +609,31 @@ export const BackofficeApi = {
segregationCode: station.segregationCode,
stationCode: station.stationCode,
broadcast: station.broadcast,
aca: station.aca,
stand_in: station.stand_in,
},
});
return extractResponse(result, 201, onRedirectToLogin);
},

updateEcAssociationToStation: async (
ecCode: string,
station: CreditorInstitutionStationDto
): Promise<CreditorInstitutionStationEditResource | ProblemJson> => {
const result = await backofficeClient.updateStationAssociationToCreditorInstitution({
'ci-tax-code': ecCode,
body: {
auxDigit: station.auxDigit,
segregationCode: station.segregationCode,
stationCode: station.stationCode,
broadcast: station.broadcast,
aca: station.aca,
stand_in: station.stand_in,
},
});
return extractResponse(result, 200, onRedirectToLogin);
},

dissociateECfromStation: async (ecCode: string, stationcode: string): Promise<void> => {
const result = await backofficeClient.deleteCreditorInstitutionStationRelationship({
'ci-tax-code': ecCode,
Expand Down Expand Up @@ -1451,4 +1475,100 @@ export const BackofficeApi = {
});
return extractResponse(result, 200, onRedirectToLogin);
},

stationMaintenances: {
getStationMaintenances: async ({
brokerTaxCode,
stationCode,
state,
year,
limit,
page,
}: {
brokerTaxCode: string;
stationCode: string;
state: StationMaintenanceState;
year: number;
limit: number;
page: number;
}): Promise<StationMaintenanceListResource> => {
const result = await backofficeClient.getStationMaintenances({
'broker-tax-code': brokerTaxCode,
stationCode,
state,
year,
limit,
page,
});
return extractResponse(result, 200, onRedirectToLogin);
},
getBrokerMaintenancesSummary: async ({
brokerTaxCode,
maintenanceYear,
}: {
brokerTaxCode: string;
maintenanceYear: string;
}): Promise<MaintenanceHoursSummaryResource> => {
const result = await backofficeClient.getBrokerMaintenancesSummary({
'broker-tax-code': brokerTaxCode,
maintenanceYear,
});
return extractResponse(result, 200, onRedirectToLogin);
},
deleteStationMaintenance: async ({
brokerTaxCode,
maintenanceId,
}: {
brokerTaxCode: string;
maintenanceId: number;
}): Promise<void> => {
const result = await backofficeClient.deleteStationMaintenance({
'broker-tax-code': brokerTaxCode,
'maintenance-id': maintenanceId,
});
return extractResponse(result, 200, onRedirectToLogin);
},
finishStationMaintenance: async ({
brokerTaxCode,
maintenanceId,
}: {
brokerTaxCode: string;
maintenanceId: number;
}): Promise<void> => {
const result = await backofficeClient.finishStationMaintenance({
'broker-tax-code': brokerTaxCode,
'maintenance-id': maintenanceId,
});
return extractResponse(result, 200, onRedirectToLogin);
},
createStationMaintenance: async ({
brokerTaxCode,
createStationMaintenance,
}: {
brokerTaxCode: string;
createStationMaintenance: CreateStationMaintenance;
}): Promise<void> => {
const result = await backofficeClient.createStationMaintenance({
'broker-tax-code': brokerTaxCode,
body: createStationMaintenance,
});
return extractResponse(result, 201, onRedirectToLogin);
},
updateStationMaintenance: async ({
brokerTaxCode,
maintenanceId,
createStationMaintenance,
}: {
brokerTaxCode: string;
maintenanceId: number;
createStationMaintenance: CreateStationMaintenance;
}): Promise<void> => {
const result = await backofficeClient.updateStationMaintenance({
'broker-tax-code': brokerTaxCode,
'maintenance-id': maintenanceId,
body: createStationMaintenance,
});
return extractResponse(result, 200, onRedirectToLogin);
},
},
};
26 changes: 15 additions & 11 deletions src/components/Form/ECSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type Props = {
onChangeInput?: (event: any) => void;
serverSide?: boolean;
errorMessage?: string;
disabled?: boolean;
};

export default function ECSelection({
Expand All @@ -34,6 +35,7 @@ export default function ECSelection({
onChangeInput,
serverSide,
errorMessage,
disabled,
}: Readonly<Props>) {
const { t } = useTranslation();

Expand All @@ -45,7 +47,7 @@ export default function ECSelection({
loadingText={t('general.loading')}
id="ec-selection"
data-testid="ec-selection-id-test"
disabled={serverSide ? false : availableEC.length === 0}
disabled={disabled || (serverSide ? false : availableEC.length === 0)}
value={selectedEC}
loading={loading}
onChange={(event, newSelecteCI: CreditorInstitutionGeneric | null) => {
Expand Down Expand Up @@ -110,16 +112,18 @@ export default function ECSelection({
noWrap={false}
/>
</Box>
<Box display="flex" alignItems="center">
<IconButton
onClick={() => onECSelectionChange(undefined)}
id="clearIcon"
aria-label="removeSelectionIcon"
data-testid="remove-selected-ec-btn-id-test"
>
<ClearOutlinedIcon />
</IconButton>
</Box>
{!disabled && (
<Box display="flex" alignItems="center">
<IconButton
onClick={() => onECSelectionChange(undefined)}
id="clearIcon"
aria-label="removeSelectionIcon"
data-testid="remove-selected-ec-btn-id-test"
>
<ClearOutlinedIcon />
</IconButton>
</Box>
)}
</Box>
)}
</Grid>
Expand Down
29 changes: 29 additions & 0 deletions src/components/Layout/SuccessAlertLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Alert } from '@mui/material';
import { useState } from 'react';
import { useHistory } from 'react-router-dom';

export default function SuccessAlertLayout({ children }: { children: React.ReactNode }) {
const history = useHistory();

const [alert, setAlert] = useState<string | undefined>(
history.location.state && (history.location.state as any).alertSuccessMessage
);

return (
<>
{alert && (
<div style={{ position: 'fixed', bottom: 25, right: 25, zIndex: 999, maxWidth: '300px' }}>
<Alert
severity="success"
variant="outlined"
data-testid="alert-test"
onClose={() => setAlert(undefined)}
>
{alert}
</Alert>
</div>
)}
{children}
</>
);
}
22 changes: 22 additions & 0 deletions src/components/Layout/__tests__/SuccessAlertLayout.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { render } from '@testing-library/react';
import { MemoryRouter, Route} from 'react-router-dom';
import {Provider} from 'react-redux';
import SuccessAlertLayout from '../SuccessAlertLayout';
import { store } from '../../../redux/store';

describe('<SuccessAlertLayout/>', () => {
test('Render component', () => {
render(
<Provider store={store}>
<MemoryRouter initialEntries={[``]}>
<Route path="">
<SuccessAlertLayout>
<></>
</SuccessAlertLayout>
</Route>
</MemoryRouter>
</Provider>
);
});
});
Loading

0 comments on commit 8d15d44

Please sign in to comment.