fleet/frontend/pages/admin/UserManagementPage
Nico 726badaf10
Bugfix: User management table has row key collision when user and invite share the same ID (#42396)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #42311

- Fixes ID collision on Users table (causing users to not be rendered
when an existing user's ID matches an invited user's ID).
- Fixes total users count.
- Fixes `isResettingCurrentUser` check.

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [x] QA'd all new/changed functionality manually

#### Before

- ID collision caused the admin user to not be rendered on the table
(see the user with Invite pending which has id=1 as the admin does).
- Notice that we have a total of 3 users counting the response from
`users` and `invites` endpoints.

<img width="2557" height="477" alt="Screenshot 2026-03-25 at 2 46 31 PM"
src="https://github.com/user-attachments/assets/833b07f5-a0ce-4f15-94bf-79040bd03dba"
/>
<img width="2555" height="722" alt="Screenshot 2026-03-25 at 2 46 26 PM"
src="https://github.com/user-attachments/assets/5707ab37-b060-40b4-913f-864b2254076d"
/>

#### After

- All users showing.
- Updated count to reflect the sum of users + invited users above the
table.

<img width="1358" height="432" alt="Screenshot 2026-03-25 at 2 53 24 PM"
src="https://github.com/user-attachments/assets/2a995e78-0ae8-4846-a8b1-b35edd61cb02"
/>
2026-03-25 16:34:59 -03:00
..
components Bugfix: User management table has row key collision when user and invite share the same ID (#42396) 2026-03-25 16:34:59 -03:00
helpers Add new Technician role (#39564) 2026-02-11 15:00:10 -03:00
_styles.scss Feat/31914 patch policy (#41518) 2026-03-13 16:47:09 -04:00
index.ts Settings Pages Refactor: User management page & Teams > members page (#3625) 2022-01-13 18:11:45 -05:00
UserManagementPage.tsx UI - GitOps Mode: Core abstractions, first batch of applications (#26401) 2025-02-20 08:41:07 -08:00