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
37 changes: 37 additions & 0 deletions .changeset/revenue-approvals-where-to-find-real.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'hotcrm': patch
---

Write the approvals page's *Where to find pending approvals* section to the app's
real navigation, so it stops contradicting the overview page next door.

`content/docs/revenue/approvals.mdx` carried the same phantom sidebar the revenue
overview carried until #943: an **Approval Requests** item with three filter views
and an **Action History** item. The **Approvals** group in `src/apps/crm.app.ts`
holds exactly one child, labelled **Inbox** (待我审批 in Simplified Chinese), and
the group is collapsed by default. Each wrong name is now recorded rather than
quietly deleted, because they were wrong in three different ways:

- ***Approval Requests*** is not a navigation entry — but the name is not
invented either: it is what the approvals plugin calls the **object**
(`sys_approval_request`, plural label *Approval Requests*). The section says
where the name really lives instead of claiming nothing carries it.
- ***Pending My Approval***, ***Submitted by Me*** and ***Recently Approved***
match nothing in `src/` and nothing in the installed approvals plugin, under
any spelling — they never existed. What does exist are the four built-in list
views the plugin ships on the request object, which the **Inbox** item pins
none of and therefore opens all of: **My Pending**, **I Submitted**,
**Completed** and **All**. The section now names those, so a reader looking for
"requests waiting on me" finds the tab that does it.
- ***Action History*** names no sidebar item anywhere in the app. The audit trail
itself is real — every action is stored as `sys_approval_action`, with its own
**Recent** / **By Actor** / **All** views and a `request_id` lookup back to its
request — so what is missing is only the way in.

All three locales updated; `src/` untouched. `test/docs-revenue-approvals-navigation.test.ts`
pins both halves: the section must name every list view the plugin ships (so a new
view cannot land while the prose goes stale) and must keep all five wrong names
with their denial, while the source side pins the single **Inbox** child, its
absent `viewName`, the zh-CN label, and the zero-hit status of the three phantom
view names — so a future plugin release that ships a view by one of those names
fails a test instead of silently making the page right again by accident.
18 changes: 15 additions & 3 deletions content/docs/revenue/approvals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,22 @@ This history is permanent and surfaces in deal-review reports.

## Where to find pending approvals

In the Enterprise CRM app, the **Approvals** group:
In the Enterprise CRM app, the **Approvals** group holds exactly one item, and the group is **collapsed by default** — click it open before deciding something isn't there.

- **Approval Requests** — everything pending, with views *Pending My Approval*, *Submitted by Me*, *Recently Approved*.
- **Action History** — the full audit trail across all approvals.
- **Inbox** — the approval requests waiting on you (`sys_approval_request`). **Inbox** is the label on the sidebar item; *Approval Requests* is not a navigation entry anywhere in this app. The name is not invented — it is what the approvals plugin calls the **object** (*Approval Request* / *Approval Requests*) — but this page had it standing where a sidebar item should be.

That item pins no view of its own, so it opens the object's list with the four built-in views the approvals plugin ships:

| View | What it shows |
| --- | --- |
| **My Pending** | Requests still pending where you are one of the approvers |
| **I Submitted** | Everything you submitted, in any state |
| **Completed** | Requests that ended — approved, rejected or recalled |
| **All** | Every request, most recently updated first |

Those four are the real filters. The three names this page used to list — *Pending My Approval*, *Submitted by Me* and *Recently Approved* — exist nowhere: neither `src/` nor the installed approvals plugin carries any of them, under any spelling. **My Pending**, **I Submitted** and **Completed** are the views they were describing.

**Action History** is not in the group either, and no sidebar item anywhere in this app carries that name. The audit trail is real data — the approvals plugin stores every action as `sys_approval_action`, ships **Recent** / **By Actor** / **All** views for it, and each action points back at its request through a `request_id` lookup. What is missing is only the way in: no navigation entry in this app opens that object.

## Tips for sales reps

Expand Down
18 changes: 15 additions & 3 deletions content/docs/revenue/approvals.zh-Hans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,22 @@ approval 节点使用**首次响应**(`first_response`)行为——在每个

## 在哪里找到待处理的审批

Enterprise CRM 应用中,**审批**分组:
Enterprise CRM 应用里的 **Approvals**(审批)分组只有一项,而且这个分组**默认折叠**——先把分组点开,再判断某样东西在不在这里。

- **审批请求**——所有待处理项,带视图 *Pending My Approval*、*Submitted by Me*、*Recently Approved*。
- **操作历史**——跨所有审批的完整审计跟踪。
- **Inbox**——等着你处理的审批请求(`sys_approval_request`)。侧边栏上的 label 就是 **Inbox**,简体中文界面下这一项显示为**待我审批**;应用里没有任何导航条目叫 *Approval Requests*(审批请求)。这个名字不是凭空捏造:它是审批插件给**对象**起的名字(*Approval Request* / *Approval Requests*,简体界面为「审批请求」)——只是本页把它摆在了侧边栏条目的位置上。

该条目没有绑定自己的视图,所以点开后落在对象的列表页上,带着审批插件内置的四个视图:

| 视图 | 内容 |
| --- | --- |
| **My Pending**(我的待办) | 仍在待批、且你是审批人之一的请求 |
| **I Submitted**(我提交的) | 你提交过的全部请求,不分状态 |
| **Completed**(已完成) | 已结束的请求——已批准、已拒绝或已撤回 |
| **All**(全部) | 全部请求,按最近更新排序 |

这四个才是真实的过滤视图。本页过去列出的三个名字——*Pending My Approval*、*Submitted by Me*、*Recently Approved*——**哪里都不存在**:`src/` 与已安装的审批插件双面零命中,换任何拼写都一样。它们想描述的其实就是 **My Pending**、**I Submitted** 和 **Completed**。

**Action History**(操作历史)同样不在这个分组里,本应用侧边栏上也没有任何条目叫这个名字。审批的操作留痕本身是真实数据——审批插件把每一次操作存为 `sys_approval_action`,还为它内置了 **Recent**(最近)/ **By Actor**(按执行人)/ **All**(全部)三个视图,每条操作都通过 `request_id` 指回它所属的请求。缺的只是入口:本应用里没有任何导航条目能打开这个对象。

## 给销售代表的提示

Expand Down
18 changes: 15 additions & 3 deletions content/docs/revenue/approvals.zh-Hant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,22 @@ approval 節點使用**首次回應**(`first_response`)行為——在每個

## 在哪裡找到待處理的審批

Enterprise CRM 應用中,**審批**分組:
Enterprise CRM 應用裡的 **Approvals**(審批)群組只有一項,而且這個群組**預設摺疊**——先把群組點開,再判斷某樣東西在不在這裡。

- **審批請求**——所有待處理項,帶視圖 *Pending My Approval*、*Submitted by Me*、*Recently Approved*。
- **操作歷史**——跨所有審批的完整稽核軌跡。
- **Inbox**——等著你處理的審批請求(`sys_approval_request`)。側邊欄上的 label 就是 **Inbox**(本應用提供 en / zh-CN / ja-JP / es-ES 四種介面語言,簡體中文介面下這一項顯示為「待我审批」);應用裡沒有任何導覽條目叫 *Approval Requests*(審批請求)。這個名字不是憑空捏造:它是審批外掛給**物件**取的名字(*Approval Request* / *Approval Requests*)——只是本頁把它擺在了側邊欄條目的位置上。

該條目沒有綁定自己的檢視,所以點開後落在物件的列表頁上,帶著審批外掛內建的四個檢視:

| 檢視 | 內容 |
| --- | --- |
| **My Pending**(簡體介面「我的待办」) | 仍在待批、且你是審批人之一的請求 |
| **I Submitted**(簡體介面「我提交的」) | 你提交過的全部請求,不分狀態 |
| **Completed**(簡體介面「已完成」) | 已結束的請求——已批准、已拒絕或已撤回 |
| **All**(簡體介面「全部」) | 全部請求,按最近更新排序 |

這四個才是真實的過濾檢視。本頁過去列出的三個名字——*Pending My Approval*、*Submitted by Me*、*Recently Approved*——**哪裡都不存在**:`src/` 與已安裝的審批外掛雙面零命中,換任何拼寫都一樣。它們想描述的其實就是 **My Pending**、**I Submitted** 和 **Completed**。

**Action History**(操作歷史)同樣不在這個群組裡,本應用側邊欄上也沒有任何條目叫這個名字。審批的操作留痕本身是真實資料——審批外掛把每一次操作存為 `sys_approval_action`,還為它內建了 **Recent**(最近)/ **By Actor**(按執行人)/ **All**(全部)三個檢視,每條操作都透過 `request_id` 指回它所屬的請求。缺的只是入口:本應用裡沒有任何導覽條目能打開這個物件。

## 給銷售代表的提示

Expand Down
Loading
Loading