From b7c5cbac3f839df6395e4044e4956bd5be665672 Mon Sep 17 00:00:00 2001 From: Vidya Nambiar Date: Mon, 1 May 2023 17:03:51 -0400 Subject: [PATCH] Fix for 'Run on' field in frequency details --- .../ScheduleDetail/FrequencyDetails.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/awx/ui/src/components/Schedule/ScheduleDetail/FrequencyDetails.js b/awx/ui/src/components/Schedule/ScheduleDetail/FrequencyDetails.js index 4bde844499..5ace13adf5 100644 --- a/awx/ui/src/components/Schedule/ScheduleDetail/FrequencyDetails.js +++ b/awx/ui/src/components/Schedule/ScheduleDetail/FrequencyDetails.js @@ -122,6 +122,18 @@ function sortWeekday(a, b) { } function RunOnDetail({ type, options, prefix }) { + const weekdays = { + sunday: t`Sunday`, + monday: t`Monday`, + tuesday: t`Tuesday`, + wednesday: t`Wednesday`, + thursday: t`Thursday`, + friday: t`Friday`, + saturday: t`Saturday`, + day: t`day`, + weekday: t`weekday`, + weekendDay: t`weekend day`, + }; if (type === 'month') { if (options.runOn === 'day') { return ( @@ -132,16 +144,16 @@ function RunOnDetail({ type, options, prefix }) { /> ); } - const dayOfWeek = options.runOnTheDay; + const dayOfWeek = weekdays[options.runOnTheDay]; return ( ); } - const weekdays = { - sunday: t`Sunday`, - monday: t`Monday`, - tuesday: t`Tuesday`, - wednesday: t`Wednesday`, - thursday: t`Thursday`, - friday: t`Friday`, - saturday: t`Saturday`, - day: t`day`, - weekday: t`weekday`, - weekendDay: t`weekend day`, - }; const weekday = weekdays[options.runOnTheDay]; const month = months[options.runOnTheMonth]; return (