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
13 changes: 13 additions & 0 deletions .changeset/bu-org-chart-tree-view.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
---
"@objectstack/platform-objects": minor
---

feat(identity): add an Org Chart tree view to `sys_business_unit`

`sys_business_unit` is already a self-referencing hierarchy
(`parent_business_unit_id`, ADR-0057 D2) but Setup only exposed flat grids. Adds
an `org_chart` list view (`type: 'tree'`) that renders the hierarchy as an
indented, expand/collapse tree-grid, listed first so it's the default tab. No
schema change — the parent pointer and graph traversal already existed; this only
surfaces them. The `active` / `inactive` / `by_kind` / `all` grids stay for
search, filter, and bulk edit.
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,24 @@ export const SysBusinessUnit = ObjectSchema.create({
compactLayout: ['name', 'kind', 'parent_business_unit_id', 'manager_user_id'],

listViews: {
// Org chart — the hierarchy view. Surfaces the self-referencing
// `parent_business_unit_id` tree (ADR-0057 D2) as an indented, expand/
// collapse tree-grid. Listed first so it's the default tab; the grids
// below stay for search / filter / bulk edit.
org_chart: {
type: 'tree',
name: 'org_chart',
label: 'Org Chart',
data: { provider: 'object', object: 'sys_business_unit' },
columns: ['name', 'kind', 'manager_user_id', 'active'],
tree: {
parentField: 'parent_business_unit_id',
labelField: 'name',
fields: ['kind', 'manager_user_id', 'active'],
defaultExpandedDepth: 1,
},
sort: [{ field: 'name', order: 'asc' }],
},
active: {
type: 'grid',
name: 'active',
Expand Down