[SSF 178] Pantry Dashboard Aggregate Stats Service Function#146
[SSF 178] Pantry Dashboard Aggregate Stats Service Function#146dburkhart07 wants to merge 4 commits intomainfrom
Conversation
| 'Food Requests': String(result.foodrequests), | ||
| Orders: String(result.orders), | ||
| 'Items Received': String(result.totalitems), | ||
| 'Value Received': `$${Number(result.totalvalue)}`, |
There was a problem hiding this comment.
thinking maybe this formatting should happen in the frontend?
There was a problem hiding this comment.
this is instructions based on the ticket, following the same pattern as the manufacturer service function equivalent. @Yurika-Kan @sam-schu can you guys explain the rationale as to why we are making these as strings on the backend?
There was a problem hiding this comment.
These service functions will be delegated to by an endpoint that will get stats for frontend display. since we're only using the service functions for that purpose and the endpoint will return 4 different types of stats for each of 4 different user types that can all be formatted differently, it's easiest to return the data directly in the format expected by the reusable dashboard stats component Justin added
ℹ️ Issue
Closes #178
📝 Description
✔️ Verification
🏕️ (Optional) Future Work / Notes
n/a