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

Add total hours to reports #804

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Add total hours to reports #804

merged 1 commit into from
Mar 11, 2024

Conversation

dmtrek14
Copy link
Collaborator

@dmtrek14 dmtrek14 commented Mar 8, 2024

This PR adds total hours to two existing report: viewUserDetails and userTaskReport.

Main changes include:

  • Add a grid footer where we will place the total
  • On store load, append data total to the footer
  • Style the footer
  • Change the grid type in the userTasksReport from simple grid panel to ExportableGridPanel
  • Update the ExportableGridPanel to export the total row to the csv if it is present in the grid

I forgot to turn on my 'format on save' in VSCodium, so it appears there are a lot of changes to userTasksReport. The actual code changes are at:

  • Lines 423-428: add function to get minutes and variable to hold the total string
  • Lines 442-454: add listener for load of store and append total hours to the footer
  • Line 524: change the type of grid panel
  • Line 550: add the style for the footer, remove the previous 'download as csv' button.

For this last change, the button is removed because I changed the grid panel type to ExportableGridPanel which already has the button in the component.

2024-03-08_09-26

@dmtrek14 dmtrek14 requested a review from anarute March 8, 2024 17:30
Copy link
Member

@anarute anarute left a comment

Choose a reason for hiding this comment

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

LGTM! I tested locally and it works fine, thanks!

@dmtrek14 dmtrek14 merged commit a99a315 into main Mar 11, 2024
2 checks passed
@dmtrek14 dmtrek14 deleted the add-report-totals branch March 11, 2024 14:04
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.

2 participants