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
5 changes: 5 additions & 0 deletions .changeset/2060-item-5-persona-home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hotcrm': patch
---

The sidebar no longer offers a service agent pages it cannot open. **Home** (Executive Overview), **Sales Performance**, **CRM Overview** and **Pipeline Coverage** are built on opportunities, and a user who cannot read opportunities (the Service Agent and Service Manager permission sets) used to get each of them as a page of "You don't have access" tiles. Those entries are now left out for such a user; everyone who reads opportunities sees the same sidebar as before. **Sales Home**, the rep's page of pipeline figures, leads, open deals, open tasks and upcoming events, is now pinned in the sidebar under **Home**. Before, it could only be reached by typing its address. Its **Quick Create** card is gone: it drew a second copy of the sidebar's links and could create nothing, and the platform has no create-record block to put there yet. Each list page keeps its own **New** button. The app still opens on **Home** for every user, a service agent included: the console has no way to give each role its own landing page yet.
4 changes: 2 additions & 2 deletions content/docs/analytics/dashboards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Every tile listed on this page is a tile the app actually ships. The lists are c

| Dashboard | Built for | Answers |
| --- | --- | --- |
| 🏠 **CRM Overview** | Everyone | "What's going on across the business today?" |
| 🏠 **CRM Overview** | Everyone who reads opportunities | "What's going on across the business today?" |
| 📈 **Sales Performance** | Sales reps, managers | "How healthy is my pipeline, and are we winning?" |
| ☎️ **Sales Activity** | Sales managers, account teams | "Who is talking to customers, and which accounts have gone quiet?" |
| 🎧 **Customer Service** | Service agents, managers | "How are we doing on cases and SLAs?" |
| 👔 **Executive Overview** | Execs, finance | "Are we hitting the number?" |

All five respect [sharing rules](/docs/administration/sharing-and-security) — what you see depends on your role.
All five respect [sharing rules](/docs/administration/sharing-and-security) — what you see depends on your role. The three built on opportunities — CRM Overview, Sales Performance and Executive Overview — are left out of the sidebar for a role that cannot read opportunities, such as a service agent.

### No tile shows a trend arrow

Expand Down
4 changes: 2 additions & 2 deletions content/docs/analytics/dashboards.zh-Hans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ HotCRM 内置五个仪表盘。每个都为特定角色而构建,回答该角

| 仪表盘 | 面向 | 回答 |
| --- | --- | --- |
| 🏠 **CRM Overview** | 所有人 | "今天整个业务发生了什么?" |
| 🏠 **CRM Overview** | 所有能读取商机的人 | "今天整个业务发生了什么?" |
| 📈 **Sales Performance** | 销售代表、经理 | "我的管道健康状况如何?我们赢单了吗?" |
| ☎️ **Sales Activity** | 销售经理、客户团队 | "谁在和客户打交道?哪些客户已经没了动静?" |
| 🎧 **Customer Service** | 服务客服、经理 | "我们在工单和 SLA 上表现如何?" |
| 👔 **Executive Overview** | 高管、财务 | "我们达成目标了吗?" |

五者都遵守 [共享规则](/zh-Hans/docs/administration/sharing-and-security)——你看到的内容取决于你的角色。
五者都遵守 [共享规则](/zh-Hans/docs/administration/sharing-and-security)——你看到的内容取决于你的角色。建立在商机之上的三块——CRM Overview、Sales Performance 与 Executive Overview——对不能读取商机的角色(例如服务坐席)不出现在侧边栏里。

### 没有任何磁贴显示趋势箭头

Expand Down
4 changes: 2 additions & 2 deletions content/docs/analytics/dashboards.zh-Hant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ HotCRM 內建五個儀表板。每個都為特定角色而建構,回答該角

| 儀表板 | 面向 | 回答 |
| --- | --- | --- |
| 🏠 **CRM Overview** | 所有人 | "今天整個業務發生了什麼?" |
| 🏠 **CRM Overview** | 所有能讀取商機的人 | "今天整個業務發生了什麼?" |
| 📈 **Sales Performance** | 銷售代表、經理 | "我的管道健康狀況如何?我們贏單了嗎?" |
| ☎️ **Sales Activity** | 銷售經理、客戶團隊 | "誰在和客戶往來?哪些客戶已經沒了動靜?" |
| 🎧 **Customer Service** | 服務客服、經理 | "我們在工單和 SLA 上表現如何?" |
| 👔 **Executive Overview** | 高階主管、財務 | "我們達成目標了嗎?" |

五者都遵守 [共享規則](/zh-Hant/docs/administration/sharing-and-security)——你看到的內容取決於你的角色。
五者都遵守 [共享規則](/zh-Hant/docs/administration/sharing-and-security)——你看到的內容取決於你的角色。建立在商機之上的三塊——CRM Overview、Sales Performance 與 Executive Overview——對不能讀取商機的角色(例如服務專員)不出現在側邊欄裡。

### 沒有任何磁貼顯示趨勢箭頭

Expand Down
6 changes: 4 additions & 2 deletions content/docs/getting-started/quick-tour.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A guided tour through the screens you'll use every day.

## 1. The home dashboard

The left nav opens with one pinned entry, **Home**, and that is where you land. **Home** opens the **Executive Overview** dashboard — nine tiles of revenue, customer and pipeline numbers:
The left nav opens with two pinned entries, **Home** and **Sales Home**, and **Home** is where you land. **Home** opens the **Executive Overview** dashboard — nine tiles of revenue, customer and pipeline numbers:

| Tile | What it shows |
| --- | --- |
Expand Down Expand Up @@ -46,7 +46,7 @@ Click the **app launcher** (top-left grid icon) to switch between apps:
- **HotCRM** — the main app with all CRM functionality.
- **Admin** — for system administrators.

Inside HotCRM, the left nav opens with one pinned item — **Home**, which is the **Executive Overview** dashboard — and everything else sits in six groups:
Inside HotCRM, the left nav opens with two pinned items — **Home**, which is the **Executive Overview** dashboard, and **Sales Home**, a rep's own page of pipeline figures, leads, open deals, open tasks and upcoming events — and everything else sits in six groups:

| Group | Contents |
| --- | --- |
Expand All @@ -59,6 +59,8 @@ Inside HotCRM, the left nav opens with one pinned item — **Home**, which is th

**Marketing** and **Insights** are collapsed when the app loads — only **Sales**, **My Work**, **Activity** and **Service** open themselves. Click a group open before deciding something isn't there.

Five entries are built on opportunities — **Home**, **Sales Home**, **Sales Performance**, **CRM Overview** and **Pipeline Coverage** — and the sidebar leaves them out for anyone who cannot read opportunities, a service agent for one.

One sidebar row per destination is deliberate. Where an object offers several ways of looking at the same records, those live as tabs across the top of that object's list page, not as extra rows in the nav — so the sidebar stays short enough to scan.

Five group names this page used to list are not in the app at all, and several item names sit somewhere other than where it put them:
Expand Down
6 changes: 4 additions & 2 deletions content/docs/getting-started/quick-tour.zh-Hans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: HotCRM 的 5 分钟演练 —— 主页、你的第一条线索、

## 1. 主页仪表盘

左侧导航最上面只有一个固定条目 **Home**,你落地的就是它。**Home** 打开的是 **Executive Overview** 仪表盘——9 个磁贴,讲收入、客户与管道:
左侧导航最上面有两个固定条目 **Home** 与 **Sales Home**,你落地的是 **Home**。**Home** 打开的是 **Executive Overview** 仪表盘——9 个磁贴,讲收入、客户与管道:

| 磁贴 | 它显示什么 |
| --- | --- |
Expand Down Expand Up @@ -48,7 +48,7 @@ description: HotCRM 的 5 分钟演练 —— 主页、你的第一条线索、
- **HotCRM** —— 包含所有 CRM 功能的主应用。
- **Admin** —— 面向系统管理员。

在 HotCRM 内,左侧导航最上面是一个固定条目——**Home**,它打开的是 **Executive Overview** 仪表盘;其余内容分在 6 个分组里:
在 HotCRM 内,左侧导航最上面是两个固定条目——**Home**,它打开的是 **Executive Overview** 仪表盘;**Sales Home**,销售代表自己的页面,汇总管道数字、线索、未结商机、未完成任务与即将到来的活动;其余内容分在 6 个分组里:

| 分组 | 内容 |
| --- | --- |
Expand All @@ -63,6 +63,8 @@ description: HotCRM 的 5 分钟演练 —— 主页、你的第一条线索、

**Marketing**、**Insights** 这两个分组在应用加载时是折叠的——只有 **Sales**、**My Work**、**Activity**、**Service** 会自动展开。先把分组点开,再判断某样东西在不在这里。

有五个条目建立在商机之上——**Home**、**Sales Home**、**Sales Performance**、**CRM Overview** 与 **Pipeline Coverage**——不能读取商机的人(例如服务坐席)在侧边栏里看不到它们。

一个去处只占一行,这是刻意的。同一个对象如果有多种查看方式,它们是该对象列表页顶部的标签页,而不是导航里另起一行——这样侧边栏才短到能一眼扫完。

本页过去列出的 5 个分组名,应用里根本不存在;另有几个条目名,真身并不在它说的位置:
Expand Down
6 changes: 4 additions & 2 deletions content/docs/getting-started/quick-tour.zh-Hant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: HotCRM 的 5 分鐘演練 —— 主頁、你的第一條線索、

## 1. 主頁儀表板

左側導覽最上面只有一個固定條目 **Home**,你落地的就是它。**Home** 打開的是 **Executive Overview** 儀表板——9 個磁貼,講收入、客戶與管道:
左側導覽最上面有兩個固定條目 **Home** 與 **Sales Home**,你落地的是 **Home**。**Home** 打開的是 **Executive Overview** 儀表板——9 個磁貼,講收入、客戶與管道:

| 磁貼 | 它顯示什麼 |
| --- | --- |
Expand Down Expand Up @@ -48,7 +48,7 @@ description: HotCRM 的 5 分鐘演練 —— 主頁、你的第一條線索、
- **HotCRM** —— 包含所有 CRM 功能的主應用。
- **Admin** —— 面向系統管理員。

在 HotCRM 內,左側導覽最上面是一個固定條目——**Home**,它打開的是 **Executive Overview** 儀表板;其餘內容分在 6 個群組裡:
在 HotCRM 內,左側導覽最上面是兩個固定條目——**Home**,它打開的是 **Executive Overview** 儀表板;**Sales Home**,銷售代表自己的頁面,匯總管道數字、線索、未結商機、未完成任務與即將到來的活動;其餘內容分在 6 個群組裡:

| 分組 | 內容 |
| --- | --- |
Expand All @@ -63,6 +63,8 @@ description: HotCRM 的 5 分鐘演練 —— 主頁、你的第一條線索、

**Marketing**、**Insights** 這兩個群組在應用載入時是摺疊的——只有 **Sales**、**My Work**、**Activity**、**Service** 會自動展開。先把群組點開,再判斷某樣東西在不在這裡。

有五個條目建立在商機之上——**Home**、**Sales Home**、**Sales Performance**、**CRM Overview** 與 **Pipeline Coverage**——不能讀取商機的人(例如服務專員)在側邊欄裡看不到它們。

一個去處只佔一列,這是刻意的。同一個物件如果有多種檢視方式,它們是該物件列表頁頂部的標籤頁,而不是導覽裡另起一列——這樣側邊欄才短到能一眼掃完。

本頁過去列出的 5 個群組名,應用裡根本不存在;另有幾個條目名,真身並不在它說的位置:
Expand Down
2 changes: 1 addition & 1 deletion content/docs/sales/activities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Activities show up in **three** places:

1. **The task list** — **My Work › My Tasks** opens it on *My Open Tasks*. The whole book is the **All Tasks** tab beside it, along with the six other view tabs described below; there is no separate *All Tasks* entry in the sidebar.
2. **The Activity tab on the related record** — open an account, a lead, an opportunity or a case and its Activity tab gathers the tasks and events hanging off it.
3. **The Sales Home page** — its **My Open Tasks** tab embeds that same *My Open Tasks* view, so what you owe is on the page you land on. Sales Home carries no activity *metric*: the four tiles at the top are all pipeline (Revenue (Won), Deals Won, Pipeline Value, Open Leads). Activity volume is reported on the Sales Activity dashboard — see below.
3. **The Sales Home page** — its **My Open Tasks** tab embeds that same *My Open Tasks* view, so what you owe is one click from where the app opens: **Sales Home** is pinned in the sidebar right under **Home**, the app's landing page. A user who cannot read opportunities does not get the entry. Sales Home carries no activity *metric*: the four tiles at the top are all pipeline (Revenue (Won), Deals Won, Pipeline Value, Open Leads). Activity volume is reported on the Sales Activity dashboard — see below.

## Standard list views

Expand Down
2 changes: 1 addition & 1 deletion content/docs/sales/activities.zh-Hans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ description: 任务——你仍然欠客户的事,挂在任意记录上。每

1. **任务列表**——**我的工作 › 我的任务**打开它,并落在*我的待办任务*上。完整的任务清单就是旁边的 **全部任务** 标签页,连同下面描述的其余六个视图标签页;侧边栏里没有单独的*全部任务*入口。
2. **相关记录上的活动标签页**——打开一个客户、线索、商机或工单,它的活动标签页会把挂在这条记录上的任务与活动(Event)汇总在一起。
3. **销售主页**——主页上的 **My Open Tasks** 标签页内嵌的就是同一个*我的待办任务*视图,你欠下的事就摆在落地页上。销售主页上**没有**任何活动类**指标**:顶部四个磁贴全是管道指标(Revenue (Won)、Deals Won、Pipeline Value、Open Leads)。活动量的读数在 Sales Activity 仪表盘上——见下文。
3. **销售主页**——主页上的 **My Open Tasks** 标签页内嵌的就是同一个*我的待办任务*视图,你欠下的事离应用打开的页面只有一次点击:**Sales Home** 固定在侧边栏里、紧挨着应用的落地页 **Home**。不能读取商机的用户看不到这个条目。销售主页上**没有**任何活动类**指标**:顶部四个磁贴全是管道指标(Revenue (Won)、Deals Won、Pipeline Value、Open Leads)。活动量的读数在 Sales Activity 仪表盘上——见下文。

## 标准列表视图

Expand Down
2 changes: 1 addition & 1 deletion content/docs/sales/activities.zh-Hant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ description: 任務——你仍然欠客戶的事,掛在任意記錄上。每

1. **任務列表**——**My Work › My Tasks** 打開它,並落在*我的待辦任務*上。完整的任務清單就是旁邊的 **全部任務** 標籤頁,連同下面描述的其餘六個視圖標籤頁;側邊欄裡沒有單獨的*全部任務*入口。
2. **相關記錄上的活動標籤頁**——打開一個客戶、線索、商機或工單,它的活動標籤頁會把掛在這筆記錄上的任務與活動(Event)彙總在一起。
3. **銷售主頁**——主頁上的 **My Open Tasks** 標籤頁內嵌的就是同一個*我的待辦任務*視圖,你欠下的事就擺在落地頁上。銷售主頁上**沒有**任何活動類**指標**:頂部四個磁貼全是管道指標(Revenue (Won)、Deals Won、Pipeline Value、Open Leads)。活動量的讀數在 Sales Activity 儀表板上——見下文。
3. **銷售主頁**——主頁上的 **My Open Tasks** 標籤頁內嵌的就是同一個*我的待辦任務*視圖,你欠下的事離應用打開的頁面只有一次點擊:**Sales Home** 固定在側邊欄裡、緊挨著應用的落地頁 **Home**。不能讀取商機的使用者看不到這個條目。銷售主頁上**沒有**任何活動類**指標**:頂部四個磁貼全是管道指標(Revenue (Won)、Deals Won、Pipeline Value、Open Leads)。活動量的讀數在 Sales Activity 儀表板上——見下文。

## 標準列表視圖

Expand Down
43 changes: 39 additions & 4 deletions src/sales/apps/crm.app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.

import { P } from '@objectstack/spec';
import { App } from '@objectstack/spec/ui';

// The brand mark, inlined as a `data:` URI of `assets/icon.svg` (#2051), so it
Expand All @@ -20,6 +21,27 @@ const HOTCRM_ICON =
' <path d="M76 64h40v52h24V64h40v128h-40v-52h-24v52H76z" fill="%23FFFFFF"/>%0A' +
'</svg>%0A';

/**
* The read gate on the five entries built on `crm_opportunity` (#2060 item 5):
* Home (Executive Overview), Sales Home, Sales Performance, CRM Overview and
* Pipeline Coverage. A member whose permission sets do not read opportunities
* (`service_agent`, `service_manager`) got each one as a page of "You don't
* have access" tiles, one 403 per opportunity query. Object entries are pruned
* by read access already; dashboard, report and page entries are not.
*
* `visible`, not `requiredPermissions` — measured on 18.0.0-next.1: the server
* keeps an entry only when the caller's permission sets grant every
* `requiredPermissions` entry as a CAPABILITY (`systemPermissions`), so
* `['crm_opportunity:read']` hid the entry from every user, the admin
* included, and a capability of our own would be a grant change. This asks
* the effective object permission itself.
*
* Sales Activity (1 of 13 tiles) and Lead Inflow (leads) stay open: they work
* without opportunity read. The gate hides an entry, not the landing — the
* console opens the app's first served entry without reading `visible`.
*/
const READS_OPPORTUNITIES = P`current_user.can("crm_opportunity", "read")`;

/**
* HotCRM — navigation.
*
Expand Down Expand Up @@ -76,13 +98,26 @@ export const CrmApp = App.create({
},

navigation: [
// Pinned landing — single executive view, single click from launcher.
// Pinned landing — the console opens an app on its first entry, for
// every member alike (there is no per-member landing to declare).
{
id: 'nav_home',
type: 'dashboard',
dashboardName: 'executive_dashboard',
label: 'Home',
icon: 'home',
visible: READS_OPPORTUNITIES,
},
// The rep's own page (`sales_home_page`): pipeline KPIs, my leads, open
// deals and open tasks, upcoming events. It had no entry, only a typed
// URL, while the activities docs sent readers to it.
{
id: 'nav_sales_home',
type: 'page',
pageName: 'sales_home_page',
label: 'Sales Home',
icon: 'layout-grid',
visible: READS_OPPORTUNITIES,
},

{
Expand Down Expand Up @@ -116,7 +151,7 @@ export const CrmApp = App.create({
// points at — a sales object that happened to be filed next to
// campaigns.
{ id: 'nav_product', type: 'object', objectName: 'crm_product', label: 'Products', icon: 'package' },
{ id: 'nav_sales_dashboard', type: 'dashboard', dashboardName: 'sales_dashboard', label: 'Sales Performance', icon: 'chart-line' },
{ id: 'nav_sales_dashboard', type: 'dashboard', dashboardName: 'sales_dashboard', label: 'Sales Performance', icon: 'chart-line', visible: READS_OPPORTUNITIES },
],
},

Expand Down Expand Up @@ -280,9 +315,9 @@ export const CrmApp = App.create({
children: [
// Trimmed to three high-signal reports. Full report catalogue still
// ships as metadata; admins can pin more from the report picker.
{ id: 'nav_crm_dashboard', type: 'dashboard', dashboardName: 'crm_overview_dashboard', label: 'CRM Overview', icon: 'layout-dashboard' },
{ id: 'nav_crm_dashboard', type: 'dashboard', dashboardName: 'crm_overview_dashboard', label: 'CRM Overview', icon: 'layout-dashboard', visible: READS_OPPORTUNITIES },
{ id: 'nav_forecast', type: 'object', objectName: 'crm_forecast', label: 'Forecasts', icon: 'trending-up' },
{ id: 'nav_report_pipeline_coverage', type: 'report', reportName: 'pipeline_coverage_by_quarter', label: 'Pipeline Coverage', icon: 'columns-3' },
{ id: 'nav_report_pipeline_coverage', type: 'report', reportName: 'pipeline_coverage_by_quarter', label: 'Pipeline Coverage', icon: 'columns-3', visible: READS_OPPORTUNITIES },
{ id: 'nav_report_lead_inflow', type: 'report', reportName: 'lead_inflow_by_month_source', label: 'Lead Inflow', icon: 'trending-up' },
],
},
Expand Down
Loading
Loading