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