From 4240333fdf1fc43bc45b20cb947f16a7bb4ac844 Mon Sep 17 00:00:00 2001 From: Maxim Date: Fri, 4 Nov 2022 13:59:39 +0000 Subject: [PATCH] selected days minor fix --- .../src/components/ScheduleQuality/ScheduleQuality.module.css | 2 +- .../src/containers/RotationForm/RotationForm.module.css | 2 +- grafana-plugin/src/containers/RotationForm/RotationForm.tsx | 4 ++-- grafana-plugin/src/style/vars.css | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.module.css b/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.module.css index 5f9d2674..24f1ab48 100644 --- a/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.module.css +++ b/grafana-plugin/src/components/ScheduleQuality/ScheduleQuality.module.css @@ -14,7 +14,7 @@ .progress { width: 100%; height: 16px; - background-color: var(--secondary-background-shade); + background-color: var(--secondary-background); position: relative; } diff --git a/grafana-plugin/src/containers/RotationForm/RotationForm.module.css b/grafana-plugin/src/containers/RotationForm/RotationForm.module.css index b913ddb3..26042e17 100644 --- a/grafana-plugin/src/containers/RotationForm/RotationForm.module.css +++ b/grafana-plugin/src/containers/RotationForm/RotationForm.module.css @@ -45,7 +45,7 @@ .day { width: 28px; height: 28px; - background: var(--secondary-background-shade); + background: var(--secondary-background); border-radius: 2px; line-height: 28px; text-align: center; diff --git a/grafana-plugin/src/containers/RotationForm/RotationForm.tsx b/grafana-plugin/src/containers/RotationForm/RotationForm.tsx index 61be6987..da364a44 100644 --- a/grafana-plugin/src/containers/RotationForm/RotationForm.tsx +++ b/grafana-plugin/src/containers/RotationForm/RotationForm.tsx @@ -154,7 +154,7 @@ const RotationForm: FC = observer((props) => { rolling_users: userGroups, interval: repeatEveryValue, frequency: repeatEveryPeriod, - by_day: repeatEveryPeriod === 1 || repeatEveryPeriod === 0 ? selectedDays : null, + by_day: (repeatEveryPeriod === 0 && repeatEveryValue === 1) || repeatEveryPeriod === 1 ? selectedDays : null, priority_level: shiftId === 'new' ? layerPriority : shift?.priority_level, }), [ @@ -343,7 +343,7 @@ const RotationForm: FC = observer((props) => { /> - {(repeatEveryPeriod === 1 || repeatEveryPeriod === 0) && ( + {((repeatEveryPeriod === 0 && repeatEveryValue === 1) || repeatEveryPeriod === 1) && (