Commit 07b9708
authored
Show teams with no members yet in the user directory (#7855)
# Description of Changes
`buildDirectory` dropped any team whose member list was empty, so
creating a team with the optional owner field blank looked like it had
failed: the form succeeded, the roster was unchanged, and there was no
row to add the first member from. The team was only reachable through
the legacy Teams settings screen and the team-selection dropdowns, which
is not where anyone goes looking for a team they just made.
Removing the filter is enough. `DataTable` already renders a group
header for an empty group, and "Add to team" is the first team action,
so a new team appears as a section with 0 people and an immediate way to
fill it. The internal system team is already excluded server-side by the
teams endpoint, so nothing unwanted surfaces.
**Before:** create a team with no owner → nothing appears in Users.
**After:** the team appears with 0 people and an Add to team action.
---
## Checklist
### General
- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] Every comment I added says something the code does not
([guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/CODE_COMMENTS.md))
- [x] My changes generate no new warnings
### Testing (if applicable)
- [x] New `directory.test.ts` covers the empty team, sort order, and
that admins/guests still stay out of team sections
- [x] New `UsersDirectory.test.tsx` case asserts the empty team renders
with its Add to team action
- [x] All three fail on `main` and pass here
- [x] `npx vitest run src/portal` passes: 91 files, 584 tests
- [x] `tsc --noEmit` (proprietary variant), `oxlint --max-warnings=0`
and `oxfmt` all clean1 parent 12043a2 commit 07b9708
3 files changed
Lines changed: 78 additions & 3 deletions
File tree
- frontend/editor/src/portal/components/users
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| |||
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
0 commit comments