From d99509025f1f5410d1581daf72b070dfe9753b24 Mon Sep 17 00:00:00 2001 From: Adonis Puente <60629070+adonispuente@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:01:40 -0400 Subject: [PATCH] fix(RHINENG-8899): Update Staleness conditionals (#2170) --- .../InventoryHostStaleness/constants.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/InventoryHostStaleness/constants.js b/src/components/InventoryHostStaleness/constants.js index 9060ff491..408edaf8c 100644 --- a/src/components/InventoryHostStaleness/constants.js +++ b/src/components/InventoryHostStaleness/constants.js @@ -58,7 +58,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => { let formValue = newFormValues[apiKey]; if (apiKey === 'conventional_time_to_stale') { - if (formValue > newFormValues['conventional_time_to_stale_warning']) { + if (formValue >= newFormValues['conventional_time_to_stale_warning']) { return (
{ } } if (apiKey === 'conventional_time_to_stale_warning') { - if (formValue > newFormValues['conventional_time_to_delete']) { + if (formValue >= newFormValues['conventional_time_to_delete']) { return (
{ } if (apiKey === 'immutable_time_to_stale') { - if (formValue > newFormValues['immutable_time_to_stale_warning']) { + if (formValue >= newFormValues['immutable_time_to_stale_warning']) { return (
{ } } if (apiKey === 'immutable_time_to_stale_warning') { - if (formValue > newFormValues['immutable_time_to_delete']) { + if (formValue >= newFormValues['immutable_time_to_delete']) { return (
{ if ( apiKey === 'conventional_time_to_stale' && - formValue > newFormValues['conventional_time_to_stale_warning'] + formValue >= newFormValues['conventional_time_to_stale_warning'] ) { setIsFormValid(false); break; } if ( apiKey === 'immutable_time_to_stale' && - formValue > newFormValues['immutable_time_to_stale_warning'] + formValue >= newFormValues['immutable_time_to_stale_warning'] ) { setIsFormValid(false); break; } if ( apiKey === 'conventional_time_to_stale_warning' && - formValue > newFormValues['conventional_time_to_delete'] + formValue >= newFormValues['conventional_time_to_delete'] ) { setIsFormValid(false); break; } if ( apiKey === 'immutable_time_to_stale_warning' && - formValue > newFormValues['immutable_time_to_delete'] + formValue >= newFormValues['immutable_time_to_delete'] ) { setIsFormValid(false); break;