feat(dashboard): total sales by department #58
Loading…
Reference in a new issue
No description provided.
Delete branch "007-000-000-total-sales-by-department"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec 7.0.0
Changes
Testing
@addison I haven't added print page as it was not mentioned in spec, Please do let me know if it's needed in this page too.
Please use convention commit format for PR titles
007-000-000-total-sales-by-departmentto feat(dashboard): total sales by department)feat(dashboard): total sales by department)to feat(dashboard): total sales by department@addison wrote in #58 (comment):
My bad, don't know how i missed this
@ -0,0 +1,25 @@// "YYYY-MM" -> e.g. "Sep 26", for compact X-axis ticks.export const formatMonthLabel = (month: string) => {These functions don't seem specific to sales dashboards, shouldn't they be in
frontend/src/lib?Everywhere else we aren't showing months in such format, that's why added this. We can move it to global place somewhere if any other component or file needs it too
@ -0,0 +138,4 @@var subtotal float64if err := rows.Scan(&date, &department, &subtotal, &number, &memo); err != nil {s.logger.Error("failed to scan department sales row", slog.Any("error", err))continueIt seems better to return a 500 error here.
Rather than drop data from the dashboard without telling the user.
Let me update this
Return 500 error when failing to scan DB row