Conversation
Adds a date range section at the top of the Sales Portal so sales and leadership can separate pipeline generation, analysed by Created Date, from revenue realization, analysed by Close Date. The Filter type dropdown lists the report's own date columns rather than hard-coded Salesforce field IDs, and opens on Created Date. From and To are inclusive and either may be left empty. The range applies on Apply filter, Reset filter clears it without disturbing search, column filters or sorting, and clearing the report filters leaves the range intact. An inverted range is reported inline and never sent. Summary tiles show the metrics the active filters produce: opportunity count, a total per numeric column, and a per-stage breakdown. The Reports API computes these over every matching record, so they describe the filtered result rather than the page on screen, and a cross-currency total is rendered as a plain number and labelled as mixed. The tiles are hidden when the API returns no summary, so the page still works against an API that predates it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PM-6363 landed the Salesforce opportunity popup in the same app. The two features touch different parts of SalesPage, so only the README heading and the appended test blocks conflicted, and both sides are kept. The shared fixture now carries PM-6364's stage, amount and date columns, which the opportunity tests tolerate because they override rows with their own cells and none of the added values match the 006 opportunity key prefix. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Implements PM-6364.
Adds a date range section at the top of the Sales Portal so sales and leadership can separate pipeline generation (Created Date) from revenue realization (Close Date), and shows the metrics each filter produces.
Pairs with reports-api-v6#PM-6364, which adds the server-side date range and aggregates. The UI degrades safely against an API that predates it, but needs it deployed for the filter and tiles to do anything.
Why the API had to change
GET {REPORTS_API}/salespaginates server-side over the Salesforce snapshot, so the browser only ever holds one page of rows. Filtering by date in the UI would have produced a record count and totals describing the visible page rather than the result, which is the opposite of what the ticket asks for. The range and the aggregates are therefore computed over the whole received snapshot before pagination.Date range filter
date/datetimecolumns, read from live report metadata rather than hard-coded Salesforce field IDs, and opens on Created Date when the report has one.Filtered totals
Tiles above the report show opportunity count, a total per numeric column (pipeline value and revenue projections), and a per-category breakdown such as Stage. A total that sums different currencies renders as a plain number and is labelled as mixed, rather than being presented as one currency. Tiles are hidden when the API returns no
summary.Not included
Requirement 3 lists charts and visualisations under "if possible". This PR delivers the counts, totals and stage/category summaries as numbers; no charting library is introduced into an app that currently has none.
Verification
yarn lintonsrc/apps/sales— cleanLOGICAL_ENV=dev yarn run build— succeedsCI=true yarn test:no-watch --runInBand --watch=false sales— 16 passed, including new coverage for date field discovery and defaulting, inclusive and open-ended ranges, inverted-range rejection, reset vs. clear independence, and totals describing the result rather than the page🤖 Generated with Claude Code