platelet-app / platelet

Dispatch system for emergency volunteer couriers.
https://platelet.app
Apache License 2.0
38 stars 10 forks source link

Support for longer date ranges in reports #156

Closed duckbytes closed 1 year ago

duckbytes commented 1 year ago

Adds extra control for Custom date range when exporting ALL data.

image

Pick a start and end date in any 3 month range.

image

Coordinator and Rider exports are now limited to one week. This is in anticipation of amending the archive lambda to archive all tasks that are older than one week instead of two like it is currently.

Coordinator and Rider exports still use cached local data to export data, but ALL retrieves data from graphql.

In the future this graphql function could be converted to a lambda function that runs in the cloud and saves reports to an s3 bucket.

Also added createdAt, timeRejected and timeCancelled to the export. An extra field for pick up or drop off location listed that should give a hint as to whether an address might be private or not. listed locations appear in the directory search, but unlisted locations are manually entered addresses or listed locations that have been edited on the task.

codecov-commenter commented 1 year ago

Codecov Report

Merging #156 (9da3132) into master (0c47d11) will decrease coverage by 0.63%. The diff coverage is 88.69%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
- Coverage   71.53%   70.90%   -0.63%     
==========================================
  Files         301      303       +2     
  Lines        9997    10233     +236     
  Branches     2635     2723      +88     
==========================================
+ Hits         7151     7256     +105     
- Misses       2625     2727     +102     
- Partials      221      250      +29     
Impacted Files Coverage Δ
src/components/UserRoleSelect.js 88.23% <ø> (+17.64%) :arrow_up:
src/scenes/Reports/components/ReportsControls.tsx 86.88% <86.88%> (ø)
...rc/scenes/Reports/utilities/generateReportBasic.ts 88.43% <88.43%> (ø)
src/scenes/Reports/Reports.tsx 79.26% <88.88%> (+12.60%) :arrow_up:
src/scenes/Reports/utilities/getTasksByTenantId.ts 94.44% <94.44%> (ø)
src/components/DaysSelection.tsx 100.00% <100.00%> (ø)
src/components/TaskStatusChip.tsx 66.66% <100.00%> (+1.96%) :arrow_up:

... and 3 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more