Windows Migration: leave checkbox disabled if non premium (#24272)

This commit is contained in:
Martin Angers 2024-12-02 12:24:28 -05:00 committed by GitHub
parent f399a90901
commit 1677a0ae29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,7 @@ interface IWindowsMdmPageProps {
}
const WindowsMdmPage = ({ router }: IWindowsMdmPageProps) => {
const { config } = useContext(AppContext);
const { config, isPremiumTier } = useContext(AppContext);
const [mdmOn, setMdmOn] = useState(
config?.mdm?.windows_enabled_and_configured ?? false
@ -124,9 +124,12 @@ const WindowsMdmPage = ({ router }: IWindowsMdmPageProps) => {
/>
<p>{descriptionText}</p>
<Checkbox
disabled={!mdmOn}
disabled={!isPremiumTier || !mdmOn}
value={autoMigration}
onChange={onChangeAutoMigration}
tooltipContent={
isPremiumTier ? "" : "This feature is included in Fleet Premium."
}
>
Automatically migrate hosts connected to another MDM solution
</Checkbox>