Wizard: register-later for non-RHEL images

This sets registration type to `register-later` when a non-RHEL distribution is selected.
This commit is contained in:
regexowl 2025-02-17 11:42:14 +01:00 committed by Klara Simickova
parent 03294389b1
commit 609397d411
5 changed files with 37 additions and 9 deletions

View file

@ -23,6 +23,7 @@ import { useAppDispatch, useAppSelector } from '../../../../store/hooks';
import { Distributions } from '../../../../store/imageBuilderApi';
import {
changeDistribution,
changeRegistrationType,
selectDistribution,
} from '../../../../store/wizardSlice';
import isRhel from '../../../../Utilities/isRhel';
@ -44,6 +45,11 @@ const ReleaseSelect = () => {
const releases = process.env.IS_ON_PREMISE ? ON_PREM_RELEASES : RELEASES;
const handleSelect = (_event: React.MouseEvent, selection: Distributions) => {
if (!isRhel(selection)) {
dispatch(changeRegistrationType('register-later'));
} else {
dispatch(changeRegistrationType('register-now-rhc'));
}
dispatch(changeDistribution(selection));
setIsOpen(false);
};