Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .changeset/1211-opportunity-empty-groups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'hotcrm': patch
---

An opportunity's Details tab now keeps Classification, Campaigns and Notes & Next Steps on screen when they are empty

A section with nothing filled in used to disappear from the Details tab. On a
new deal that carries only its required fields, that meant the tab showed
just Sales Process and Forecast & Metrics: there was no place to see, or fill
in, the deal's **Type**, **Lead Source**, **Campaign**, **Description** or
**Next Step**.

These three sections now always show, with an empty row for each field.
Campaigns still starts collapsed: click the heading to open it. Campaigns no
longer waits for a campaign to be set before it appears. A section that has
at least one value looks the same as before, with its empty fields behind
**Show N empty fields**.

Basic Information and Financials are unchanged. Every field in Financials is
already shown in the strip at the top of the page. In Basic Information, only
**Primary Contact** is not already shown in the page title or the strip.
3 changes: 1 addition & 2 deletions .changeset/806-detail-sections-group-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ Classification, Campaigns, Sales Process, Forecast & Metrics and Notes & Next
Steps. Newly visible: **Primary Contact**, **Stage Entry Date**, **Approval
Status**, **Approved Date**, **Win Reason**, **Loss Reason**, **Loss/Win
Details**, **Days in Current Stage** and **Private**. Campaigns and Forecast &
Metrics start collapsed. The Campaigns group appears once the opportunity has a
campaign; set it from **Edit**.
Metrics start collapsed.

**Cases.** The Details tab now shows Case Information, Origin & Routing, SLA &
Priority, Escalation, Resolution and System. **Escalated Date** is shown for
Expand Down
21 changes: 18 additions & 3 deletions src/sales/pages/opportunity_detail.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,29 @@ export const OpportunityDetailPage: Page = {
// `expected_revenue`, both in the strip) renders nothing
// here — it stays referenced so that a field added to the
// group reaches this tab without an edit to this file.
//
// `hideEmpty: false` keeps an ALL-empty section on screen
// (#1211). The platform default (objectui#8603 ruling A)
// renders such a section as nothing at all, so on a deal
// with only its required fields the deal's type and
// source (`classification`), its campaign (`campaign`)
// and its description and next step (`notes`) vanished —
// the very fields a seller fills in later. Kept, they
// show as labelled empty rows to fill. Measured on
// 17.6.0 on such a deal: 2 sections render without it, 5
// with it. Not on `basic` (its only member outside the
// title and the strip is `primary_contact`), nor on
// `financials`: both members sit in the strip, the
// derived list is empty, and the renderer draws nothing
// for an empty list whatever `hideEmpty` says.
sections: [
{ group: 'basic' },
{ group: 'financials' },
{ group: 'classification' },
{ group: 'campaign' },
{ group: 'classification', hideEmpty: false },
{ group: 'campaign', hideEmpty: false },
{ group: 'sales_process' },
{ group: 'crm_forecast' },
{ group: 'notes' },
{ group: 'notes', hideEmpty: false },
],
},
},
Expand Down
Loading