Add dashboard and vendors view controls#58
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original request
Add an Expand all button to the vendors and dashboard views, plus a small settings menu near Add that lets the user display all costs in the default or one of their favorite currencies. Follow-up: put Expand all / Collapse all under the new settings menu and make currencies second-level submenu items.
What changed
currencyquery support to the contracts, API cache keys, API handlers, and dashboard window helper.Reasoning
The currency selector needs API-backed conversion because dashboard totals are aggregated before rendering. A client-only relabel would misstate totals, so the API now converts transaction original amounts to the selected reporting currency only when a non-default currency is requested. Keeping Expand all / Collapse all in the same View settings menu as Display currency makes the header control the place for view-level options, while row-level disclosure buttons still handle individual groups.
Screenshots / preview evidence
Preview URL: https://xpenser-pr-058.cleverbrush.com
Manual preview QA completed against the seeded preview account:
Expand allandDisplay currency USD.Collapse all.Expand allandDisplay currency USD.Validation
npm run lintpassed.npm run typecheckpassed.npm testpassed: 81 files, 438 tests.npx vitest --run apps/web/components/dashboard-view-settings-menu.test.tsx apps/web/components/dashboard-explorer.test.tsx apps/web/components/vendor-analytics-panel.test.tsx.29696d2:Lint and testDeploy PR environmentPlaywright e2expenser-web-pr-58andxpenser-api-pr-58over the preview QA window:httporrequestmetrics were listed for these PR services in that window, so no metric query was applicable.