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

Feature/PN-10855 - Sender Dashboard components 1/2 #1214

Merged
merged 20 commits into from
May 21, 2024

Conversation

ghost
Copy link

@ghost ghost commented May 21, 2024

Short description

Includes the development and integration of the first 3 statistics components of the sender dashboard

List of changes proposed in this pull request

  • add formatDateSMonth and oneYearAgo helpers to common date.utility
  • add it translations for the short textual version of every month
  • add it translations into statistics.json lang file
  • change statistics.mock.ts to allow it choosing randomly between 4 different mocked data
  • change PnECharts component's style to grant statistics components on the same row will have the same height
  • add TrendStackedStatistics draft component to show data using multiple stacked lines
  • add AggregateStatistics draft component to show aggregate statistics using pie chart
  • add FiledNotificationsStatistics draft component to show accepted/refused statistics data
  • add DeliveryModeStatistics draft component to show info about the number of notifications sent through digital and analogic channels
  • add LastStateStatistics draft component to show statistics about the last state reached by notifications
  • add AggregateAndTrendStatistics draft component to manage switching between aggregate and trend statistics visualization
  • change Statistics.page adding 'last update' text
  • incorporate FiledNotifications, LastState and DeliveryMode statistics component into Statistics.page

How to test

  • add a "IS_STATISTICS_ENABLED" env variable to your pa config.json and set it to true
  • Start pn-pa-webapp and verify the statistics page loads properly and the displayed graphs change switching between "aggregate" and "trend" mode and moving from "days" to "weeks" timeframes.

ZorbaDimatteo and others added 17 commits March 22, 2024 20:21
chore: add types for echarts library
chore: some minor changes to PnEcharts component
feat: add ability to override default theme to PnEcharts component
feat: add FiledNotificationsStatistics component to test PnEcharts component
- add abstract StatisticsData class and its concrete implementations to generate parsed data for each type
- add StatisticsDataFactory responsible to create objects of type StatisticsData
- add StatisticsDataFactoryManager responsible to create and manage a single StatisticsDataFactory instance
- change statistics.mock.ts to handle DTO changes
- change Statistics.api.ts to pass the response object to the factory instance and get parsed data ready to be used by every statistics component
…sData subtypes

chore: move StatisticsParsedData and StatisticsDataTypes definitions into models/Statistics.ts
feat: add StatisticsParsedResponse type and save proper statistics data into redux store
fix: filter for digital delivery mode inside any digital-related StatisticsData subclass while parsing
…ata using multiple stacked lines

feat: add AggregateStatistics draft component to show aggregate statistics data using pie chart
feat: add FiledNotificationsStatistics draft to show statistics about accepted and refused notifications
feat: add DeliveryModeStatistics draft to show statistics about notifications sent through digital and analogic channels
feat: add LastStateStatistics draft to show statistics about the last state reached by notifications
feat: add AggregateAndTrendStatistics draft component to manage switching between aggregate and trend visualization
feat: change Statistics.page adding the 'last update' text
feat: change Statistics.page with adding the FiledNotifications, LastState and DeliveryMode Statistics component
chore: change statistics.mock.ts to load a random statistics mock choosing between 4 different of them
chore: add it translations into the statistics.json lang file
chore: add it translations into commmon.json for the text short version of every month (PA)
chore: add some style into PnECharts component to fix some issues relative to statistics component having different height
feat: add formatDateSMonth helper method and oneYearAgo constant to common date.utility
chore: add the ability to download statistics graphs as image
chore: fix react and mui unmet dependencies in pn-data-viz
@ghost ghost requested review from ZorbaDimatteo, AndreaCimini90 and a team as code owners May 21, 2024 09:34
@ghost ghost marked this pull request as draft May 21, 2024 09:36
@ghost ghost marked this pull request as ready for review May 21, 2024 10:07
@ZorbaDimatteo ZorbaDimatteo merged commit 8900b8b into develop May 21, 2024
7 checks passed
@ZorbaDimatteo ZorbaDimatteo deleted the feature/PN-10855 branch May 21, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant