From aa572dcca4cb00cd6def8a1a20f6ef4cb3816d64 Mon Sep 17 00:00:00 2001 From: Rajendra Kadam Date: Fri, 24 Jul 2026 13:30:57 +0530 Subject: [PATCH] Show ABM organization name in edit-fleets success toast (#49877) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Related issue:** Resolves #48914 ## Description The success toast shown after editing fleet assignments for an Apple Business Manager (ABM) organization read: > Successfully updated fleets for AB token. The trailing "AB token" made the message unclear. It now names the organization instead, matching the modal's title: > Successfully updated fleets for ``. The organization name (`token.org_name`) was already available in the component (it's used as the modal title), so this is a copy-only change with no new data plumbing. Note: the issue's expected behavior left the exact wording to Product ("TODO — Product to decide"). This implements Product's written suggestion (`Successfully updated fleets for {org name}`) so the awkward wording isn't blocking; the string is trivial to adjust if Product/design prefer different phrasing in review. ## Testing - Manually QA'd in the UI: with a configured ABM organization, edited a fleet assignment and confirmed the toast now shows the org name. - Existing unit tests for the modal's helpers (`getOptions`, `getSelectedTeamIds`) still pass; no test asserts the toast string. - `eslint` and `prettier` pass on the changed file (added `token.org_name` to the `useCallback` dependency array to satisfy `react-hooks/exhaustive-deps`). # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. ## Testing - [x] QA'd all new/changed functionality manually ## Summary by CodeRabbit * **Bug Fixes** * Updated the success notification shown after fleet teams are saved to include the associated organization name. * Ensured the notification always reflects the currently selected organization. --- changes/48914-ab-toast-org-name.md | 1 + .../EditTeamsAbmModal/EditTeamsAbmModal.tsx | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changes/48914-ab-toast-org-name.md diff --git a/changes/48914-ab-toast-org-name.md b/changes/48914-ab-toast-org-name.md new file mode 100644 index 0000000000..300b983c18 --- /dev/null +++ b/changes/48914-ab-toast-org-name.md @@ -0,0 +1 @@ +- Improved the Apple Business success toast shown after editing fleet assignments to name the organization. diff --git a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/EditTeamsAbmModal/EditTeamsAbmModal.tsx b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/EditTeamsAbmModal/EditTeamsAbmModal.tsx index 440f8ad875..0c824046b7 100644 --- a/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/EditTeamsAbmModal/EditTeamsAbmModal.tsx +++ b/frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/EditTeamsAbmModal/EditTeamsAbmModal.tsx @@ -111,14 +111,21 @@ const EditTeamsAbmModal = ({ tokenId: token.id, teams: getSelectedTeamIds(selectedTeamNames, availableTeams), }); - notify.success("Successfully updated fleets for AB token."); + notify.success(`Successfully updated fleets for ${token.org_name}`); onSuccess(); } catch (e) { notify.error("Couldn’t edit. Please try again.", { response: e }); onCancel(); } }, - [token.id, selectedTeamNames, availableTeams, onSuccess, onCancel] + [ + token.id, + token.org_name, + selectedTeamNames, + availableTeams, + onSuccess, + onCancel, + ] ); return (