The deal dashboard¶
The deal dashboard is the read-only landing view of a single deal (agreement/PSA internally). It summarizes the deal's contacts, key terms, documents, prices, promotions, tasks, and rebate progress in three columns. It is a display surface only — all editing happens on the deal edit screen (Editing deal core details, Editing deal content).
What the dashboard shows¶
Column 1 — deal info and contacts. The supplier company (logo linking to the company page), the deal's supplier Main contact, the deal's tags, the Negotiator and Administrator contacts, and then one collapsible panel per section of the deal content. Within each panel, an element appears only if its Show on dashboard flag is on and the viewer passes the element's permissions (see below). The rebates section is excluded from this column — rebates get column 3.
Column 2 — products, documents, prices, promotions, tasks.
-
Products & prices completeness — supplier product-data completeness bars; shown only when the site has products enabled.
-
Key documents — the deal's starred documents, with expiry status and download.
- Prices — the deal's "Prices" documents, split into current (valid now, green) and pending (valid from a future date, red).
-
Promotions — a carousel of the deal's "Promotions" documents.
-
Tasks — open tasks related to this deal, with an open-only/all toggle and a create-task shortcut.
Column 3 — rebates. One card per rebate element of the deal (subject to Show on dashboard and element permissions). Each card shows the rebate description, a permission shield icon (colored by which roles can see the rebate), two badges, and — for stepped rebates with bands — a Table view (the step bands, with the current band highlighted) and a Chart view.
Where the rebate numbers come from¶
The dashboard requests a summary of the deal's stepped rebates whose accrual period is active right now (period start in the past, period end in the future). For each:
- Current (accrual) badge — the step band the deal's actual turnover currently falls in, with the accrued spend figure. Badge is green when an accrual band is hit.
- OTE badge — "on-target earnings": the band the projected throughput lands in. Badge is amber when on target, red when neither applies.
- Chart view — cumulative Actual spend (from monthly turnover aggregations of the rebate's input streams) against a Projected line (from stored projections when present, otherwise a seasonal moving average when the deal has seasonality data, otherwise linear). Red dashed lines mark each step threshold with its percentage.
Because only currently-active rebate periods are summarized, rebate cards show no chart or badges outside their accrual window.
What controls whether a term or rebate appears¶
Two independent switches, both set per element on the deal edit screen:
- Show on dashboard — an element flagged off never renders here (it may still show on the PDF, which has its own flag).
- Element permissions — evaluated in the browser against the
viewer's roles: all
mustroles required, anymustnotrole denies, anyanyrole grants; if permission rules exist and none grant, the element is hidden; with no rules, rebate elements default to requiring therebatesrole and other elements are visible. A rebate whose details are "none"/"n/a"/empty with no steps is hidden regardless.
Two important caveats, confirmed in code:
- When the site setting
categorySecurityis enabled, rebate visibility is decided solely by whether the viewer holds a role matching one of the deal's category IDs — the element's own permission lists are bypassed for rebates. - This filtering is client-side presentation only: the backend summary endpoint returns the rebate earnings data for a deal without any server-side role filtering (unlike the deal earnings report endpoint, which does filter by element permissions).
The front-end permission check has no superuser bypass — superusers see elements only if their roles match, unlike the server-side element check used by the PDF, which always grants superusers.
Why does the dashboard change unexpectedly¶
- A rebate card appeared or lost its chart/badges — its accrual period started or ended; only currently-active periods are summarized.
- Badges or the chart moved without anyone editing the deal — figures were entered or re-imported and the rebate index recalculated; the Actual/Projected lines and current-band highlighting follow the data, not the deal document.
- A term vanished for some users — its Show on dashboard flag or
element permissions changed, the viewer's roles/groups changed, or (for
rebates)
categorySecuritycategory roles changed. - The projection line changed shape — seasonality data was set or removed for the deal (linear vs seasonal projection), or stored projections became available.
- A price moved from Pending to Current — its valid-from date passed.
- The products column disappeared — the site's products feature was disabled.
What the deal dashboard is not¶
- Not the site dashboard (the cross-deal landing page) — this page is scoped to one deal.
- Not the deal edit screen — nothing here is editable; the create-task shortcut is the only write action.
- Not the deal browser/search — it does not list or compare deals.
- Not the deal earnings report — that is a separate, role-filtered calculation view; the dashboard shows only currently-active stepped rebate progress.
- Not figures entry — turnover is entered elsewhere; the dashboard only visualizes it.
Related pages¶
- Editing deal content — the Show on dashboard flag, element permissions, and rebate element fields
- Editing deal core details — contacts, term, turnover streams shown on this view
- Permissions matrix — role tokens referenced by element permissions