fleet/frontend/pages/admin
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 Update modal 'Done' buttons to say 'Close' (#41751) 2026-03-23 09:59:18 -06:00
IntegrationsPage Fix h2 heading color on Windows automatic enrollment page (#41835) 2026-03-25 11:59:50 -06:00
OrgSettingsPage Update API calls in front-end to use new, non-deprecated URLs and params (#41515) 2026-03-12 22:26:48 -05:00
TeamManagementPage [Host details > Reports] Frontend changes (#42017) 2026-03-24 10:45:34 -03:00
UserManagementPage 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
_styles.scss Fix edit labels spacing, use consistent page header class (#34350) 2025-10-16 12:57:35 -05:00
AdminWrapper.tests.tsx Rename teams and queries to fleets and reports in UI (#39572) 2026-02-17 15:19:33 -06:00
AdminWrapper.tsx Update urls to use "fleets" and "reports" instead of "teams" and "queries" (#41084) 2026-03-06 08:24:50 -06:00