fleet/frontend/components/EnrollSecrets/EnrollSecretModal
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
..
_styles.scss Fleet UI: Updates to dropdown selected states (#25635) 2025-01-22 10:22:59 -05:00
EnrollSecretModal.tsx 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
index.ts Frontend Tech Debt: Refactor enroll secrets components into own subdirectory (#7667) 2022-09-12 09:23:13 -04:00