Draw departments as an org chart with a parent picker

Featurekamo-internal
Ya
7 Agosti 2026, 05:57 UTC
Mwandishi
kamo
Ahadi ya
6e26ebb

The departments tab was a flat list, so an org with Operations > Customer Success > Onboarding had no way to say so and no way to see it. Add/edit gets a Parent department select, placed with the name because parentage is structural rather than operational. It offers the tree in render order and disables the department itself plus everything under it -- those are exactly the choices the server rejects, and offering a choice that always fails is worse than not offering it. The list becomes an org-chart spine. One rail column per level, each exactly one icon chip wide, so a row's elbow lands on the centre of its parent's chip instead of near it; a last child's rail stops at the corner rather than running on, which is what makes the end of a branch visible without counting indents. Cells carry no vertical padding -- the rails have to reach both edges or the line breaks at every row. Depth reads through tint and type weight, not chip size, since uniform chips are what make the rail geometry exact. Column headers become Operator Labels on a frosted bar, replacing hardcoded blue-50/indigo-50/gray-900 that ignored the brand token. Tree building lives in departmentTree.ts so the awkward cases have somewhere to be tested: a parent deleted out from under a child renders at top level rather than vanishing, and a cycle that reached the table renders instead of hanging the page. Failed saves now report the server's own explanation. The 4xx body was being dropped in favour of the status line, which would have turned "a department cannot be its own parent" into "Bad Request".

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei