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

On-demand report generation #223

Open
4 tasks
parthpandey1 opened this issue May 1, 2023 · 3 comments · May be fixed by #226
Open
4 tasks

On-demand report generation #223

parthpandey1 opened this issue May 1, 2023 · 3 comments · May be fixed by #226
Assignees
Labels
feature New feature or request Urgent Need everyone's attention

Comments

@parthpandey1
Copy link
Contributor

parthpandey1 commented May 1, 2023

Based on the original requirements #65

Implement on-demand report generation for:

  • total amount of food donated measured by quantity/weight
  • total amount of food checked-out by students
  • total number of different students who checked out food
  • total number of checkouts
@parthpandey1 parthpandey1 self-assigned this May 1, 2023
@jayrevolinskyjr
Copy link
Contributor

jayrevolinskyjr commented May 1, 2023

Update - 05/05/2023

The Summary page is very similar to what we planned for option F3.) meaning that we can hitch the backend for the on-demand report feature to the Summary frontend.

I will keep the rest of the plan intact (shown below) for posterity, but it is likely that all we will need to do is stitch the On-Demand Report backend to Summary's frontend.

The above tasks can be broken-down into sub-tasks:

  1. Total amount of food donated measured by quantity/weight
    a. Sequelize function to findAll on Items in inventory and calculate total items
  2. Total amount of food checked-out by students
    a. Sequelize function to findAll on Transactions with type 'purchase' and calculate total items
  3. Total number of different students who checked out food
    a. Sequelize function to findAll on Transactions with type 'purchase' and unique 'person_id' values and then calculate total unique people found.
  4. Total number of checkouts
    a. Sequelize function to findAll on Transactions with type 'purchase'

All of these functions will be very similar to one another, so I see the frontend and backend implementation going two ways.

Possible backend implementations:

B1.) Filtering the results from sub-task 1a. to generate different final reports.
B2.) Creating four separate functions to handle the separate functionalities.

Possible frontend implementations:

F1.) Creating a 'Report' page that is updated with the results found from the filtered/separate functions.
F2.) Creating four separate pages for each function that generates a report.
F3.) Potentially mixing F1. and F2. by loading a report in a component that is all on the same page?

Thoughts:

Personally, I am leaning towards B2. and F2. and then building the functionality from there. What are other's thoughts on this? I'll start working on a design tomorrow depending on what people think.

@parthpandey1
Copy link
Contributor Author

@jayrevolinskyjr I think building B2 and F2 first sounds reasonable. We can always add new features on the FE like charts and visualizations later.

@jayrevolinskyjr jayrevolinskyjr self-assigned this May 1, 2023
@jayrevolinskyjr jayrevolinskyjr added Urgent Need everyone's attention feature New feature or request labels May 2, 2023
@jayrevolinskyjr jayrevolinskyjr linked a pull request May 2, 2023 that will close this issue
@jayrevolinskyjr jayrevolinskyjr linked a pull request May 2, 2023 that will close this issue
@jayrevolinskyjr
Copy link
Contributor

jayrevolinskyjr commented May 2, 2023

@jayrevolinskyjr I think building B2 and F2 first sounds reasonable. We can always add new features on the FE like charts and visualizations later.

Looks like there is a massive amount of overlap between this issue and #152. So, option F3 seems mostly finished, all that really needs to be done is update/implement the backend. Updating and implementing the frontend can be a separate issue with it's own tasks.

@jayrevolinskyjr jayrevolinskyjr changed the title On-demand report generation On-demand report generation Backend May 4, 2023
@jayrevolinskyjr jayrevolinskyjr changed the title On-demand report generation Backend On-demand report generation May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Urgent Need everyone's attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants