fleet/frontend/hooks
jacobshandling e74e30105b
UI: In Primo mode, enforce No team or All teams, depending on the page, to preserve premium functionality (#30291)
## #30198 

[Video
demo](https://drive.google.com/file/d/1RBk5QNQdQvXTHJveCNkIeMXj5hWFA5Ft/view?usp=sharing)

- Implement the following logic for `teamId` in the UI when in Primo
mode:
<img width="870" alt="Screenshot 2025-06-24 at 12 47 48 PM"
src="https://github.com/user-attachments/assets/8ae81c3f-223f-4dda-954d-c42c7008de45"
/>
- Above logic is enforced - if trying to change/add/remove `team_id`,
automatically pushed to appropriate team

- Fixes originally reported issue - user in Primo mode can access
installable software (on the hidden "No team" which is now enforced):
  - Software page on No team
    - Update header help text 

![ezgif-49ce1977ab6474](https://github.com/user-attachments/assets/0d011f94-7c90-4d42-92ec-135baafe7927)


- Handle UI edge cases the above surfaces:
  - Queries page on All teams (No team not supported):
<img width="1624" alt="Screenshot 2025-06-24 at 1 10 40 PM"
src="https://github.com/user-attachments/assets/84bb2ca0-b8e7-44e8-9bf5-9f8f243d5584"
/>

  - Policies page on No team:
<img width="1624" alt="Screenshot 2025-06-24 at 1 10 53 PM"
src="https://github.com/user-attachments/assets/144d745f-e9b0-4933-be45-2db4fe428cfe"
/>

- update `useTeamIdParam` hook's strip query params on change team logic
to optionally also consider the current team

**Important notes**
- Software page: Software automations are only accessible via All teams,
while Add software is only accessible on a team, including No team. In
lieu of specs around this, I decided to favor Add software functionality
over Software automations functionality, aka, push to "No team" on this
page. Enabling _both_ functionalities would be a very large ticket and
need to go through a proper drafting process, since Fleet doesn't
currently support both in any state.
- Policies page:
- "Other workflows" (tickets and webhooks) is available on All Teams and
specific teams, but not on No Team, so "Other workflows" is currently
unavailable in Primo mode
- If any of the Primo customers have created policies on All Teams
already, they won't be able to manage automations on them anymore. All
Teams policies can only have ticket/webhook workflows


- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-06-25 09:26:36 -07:00
..
useCheckboxListStateManagement.tsx 17445 calendar events modal (#17717) 2024-03-26 13:39:37 -05:00
useCheckTruncatedElement.ts UI: Improve TooltipTruncatedText and now underlying useCheckTruncatedElement (#29232) 2025-05-20 15:41:53 -07:00
useDeepEffect.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
usePlatformCompatibility.tsx 21855 – Paginate and filter Queries on the server, update platform filtering from compatible to targeted platforms (#24446) 2024-12-11 10:50:28 -08:00
usePlatformSelector.tsx Fleet UI: VPP auto install software on failed policies, filter software compatible to policy's target platform, etc (#25202) 2025-01-13 16:45:16 -08:00
useQueryTargets.ts Fleet UI: Fix new query bugs introduced (#14309) 2023-10-06 10:03:19 -07:00
useTeamIdParam.ts UI: In Primo mode, enforce No team or All teams, depending on the page, to preserve premium functionality (#30291) 2025-06-25 09:26:36 -07:00
useToggleSidePanel.ts Fleet UI: Fix bug with label sidebar not collapsing (#7402) 2022-09-01 17:42:25 -04:00