Skip to content

enhance supplier dashboard with drill-down KPIs, sortable tables#47

Open
dipenp495 wants to merge 2 commits into
mainfrom
feat-supplier-dashboard
Open

enhance supplier dashboard with drill-down KPIs, sortable tables#47
dipenp495 wants to merge 2 commits into
mainfrom
feat-supplier-dashboard

Conversation

@dipenp495
Copy link
Copy Markdown
Contributor

Changed the supplier dashboard to be more interactive and visually consistent with the admin dashboard.

• KPI tiles are now clickable, each opens a detail view with a filtered product table (sortable, searchable) and a color-coded bar chart by food type, plus mini stat cards with sparkline trends
• Restyled the My Products page with new form styling, replaced AG Grid with a custom table, and cleaned up the Copy/Delete modals
• Added full dark mode support across all supplier components using the same CSS theme variables as the admin dashboard so palettes stay in sync

Screenshots below.

Dark Mode DM-A DM-CP DM-FC DM-MP LM-A LM-CP LM-FC LM-MP

@dipenp495 dipenp495 requested a review from a team April 12, 2026 13:56
@mrysav
Copy link
Copy Markdown
Contributor

mrysav commented Apr 12, 2026

@dipenp495 Please stop bulk-opening PRs. Are you using an automated tool to do this? If so, please stop and focus your human efforts on a single PR and branch.

@dipenp495
Copy link
Copy Markdown
Contributor Author

@mrysav I’m not using any automated tools. The multiple PRs are coming from my attempt to reconcile changes that were already merged into main but are still appearing in my branch. To address this cleanly, I created a new branch and opened PRs targeting staging and main so the differences can be validated through the pipeline. Once the staging pipeline passes, I will remove the old branch to avoid further noise.

@dipenp495 dipenp495 force-pushed the feat-supplier-dashboard branch 2 times, most recently from 8c5ac48 to 2bc282a Compare April 12, 2026 16:39
@mrysav
Copy link
Copy Markdown
Contributor

mrysav commented Apr 15, 2026

@dipenp495 Thank you and thanks for the update. Please have one of your teammates do a review on the PR here first and then I'll take a look.

Copy link
Copy Markdown
Contributor

@whao37 whao37 left a comment

Choose a reason for hiding this comment

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

I couldn't find many issues besides some accessibility nice-to-haves. Overall, solid implementation!

Comment on lines +265 to +266
onClick={() => onSort(sortKey)}
className='cursor-pointer select-none px-4 py-2.5 text-xs font-semibold uppercase tracking-wide text-slate-500 transition-colors hover:text-slate-800 dark:text-foreground'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sorting wired to onClick on <th> with no tabIndex, no role, and no keyboard handler. Not too big of an issue, but it'll be helpful to have these accessibility options for the users.

Comment on lines +35 to +36
onClick={() => onSort(sortKey)}
className='cursor-pointer select-none px-4 py-2.5 text-xs font-semibold uppercase tracking-wide text-slate-500 transition-colors hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

similar to previous

Comment on lines 29 to +38
return (
<div className='rounded-lg border border-slate-200 bg-white p-4 shadow-md transition-all hover:shadow-lg sm:p-6'>
<div
onClick={onClick}
className={`rounded-lg border p-4 shadow-md transition-all sm:p-6 ${
onClick ? 'cursor-pointer' : ''
} ${
active
? 'border-blue-500 bg-blue-50 ring-2 ring-blue-200 dark:border-blue-400 dark:bg-blue-950 dark:ring-blue-800'
: 'border-slate-200 bg-white hover:shadow-lg dark:border-border dark:bg-card'
}`}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

another accessibility option, again not too big of an issue. It might be nice if enter and space could activate it like a button.

@whao37
Copy link
Copy Markdown
Contributor

whao37 commented Apr 19, 2026

(L717-723 and L52-58 in src/app/supplier/_components/OverviewTab.tsx) I'm really debating whether this is really an issue or not (could be a big nitpick). Probably isn't but if the API's within24h is computed differently then the number on card/rows could diverge and users could assume the drill-down count matches the KPI. If the formula ever changes for some reason by future implementers, there could be sync issues. Not blocking but worth keeping in mind.

- Add tabIndex, onKeyDown (Enter/Space), and aria-sort to SortableHeader
  in OverviewTab and PickupRequestTable
- Restore active/onClick props in KPICard that were dropped in merge,
  and add role=button + keyboard handler for Enter/Space activation
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.

3 participants