Skip to content

[BUG] dashboard filter protocol incompatible with @objectstack/spec/ui (should use FilterCondition object, not array) #266

@hotlong

Description

@hotlong

Description

HotCRM Executive Dashboard 等 dashboard 文件中的 widgets 的 filter 字段采用了 ['field', 'op', 'value'] 数组元组格式,如 ['stage', '!=', 'closed_lost']。但 spec 协议要求必须是 MongoDB-style FilterCondition 对象格式(如 { stage: { $ne: 'closed_lost' } }),否则不能被 ObjectUI 或后端正确处理。这种格式不兼容会导致 dashboard 报错 TypeError,不能正常渲染。

Reproduction Steps

  1. 访问 hotcrm repo 下的 *.dashboard.ts
  2. 查找所有 widgets 的 filter 字段,均为数组元组格式。
  3. 参照 @objectstack/spec/ui 的 DashboardWidgetSchema, FilterConditionSchema 文档,应该改为标准对象格式。

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions