Sha256: 28c059023d55d9a8a4c51565f6b08954b0fcdc73bd9d965aac93a7f44efa3ae3

Contents?: true

Size: 580 Bytes

Versions: 23

Compression:

Stored size: 580 Bytes

Contents

// Activation Keys helpers

export const validateAKField = (
  hasInteraction,
  hostGroupId,
  activationKeys,
  userKeys,
  hgKeys,
) => {
  if (hostGroupId === '') {
    return userKeys?.length > 0 ? 'success' : 'error';
  }

  if (!hasInteraction && activationKeys?.length > 0) {
    return 'default';
  }

  return userKeys?.length > 0 || hgKeys?.length > 0 ? 'success' : 'error';
};

export const akHasValidValue = (hostGroupId, userKeys, hgKeys) => {
  if (hostGroupId === '') {
    return userKeys?.length > 0;
  }

  return hgKeys?.length > 0 || userKeys?.length > 0;
};

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
katello-4.14.3 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.2 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.15.0 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.15.0.rc2 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.15.0.rc1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.0 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.0.rc3 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.0.rc2 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.0.rc1.1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.14.0.rc1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.13.1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.13.0 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.12.1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.13.0.rc1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.12.0 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.12.0.rc3 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.12.0.rc2 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.12.0.rc1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js
katello-4.11.1 webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js