From 69263ff68b4f5539c8d73b7a3f9ea01caefb5ff0 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 20 May 2026 14:35:14 +0100 Subject: [PATCH] Bind alert schedule form labels --- .../features/alerts/AlertCooldownSection.tsx | 27 ++-- .../alerts/AlertEscalationSection.tsx | 119 +++++++++-------- .../features/alerts/AlertGroupingSection.tsx | 17 ++- .../alerts/AlertQuietHoursSection.tsx | 16 ++- .../alerts/AlertScheduleSections.test.tsx | 126 ++++++++++++++++++ 5 files changed, 232 insertions(+), 73 deletions(-) create mode 100644 frontend-modern/src/features/alerts/AlertScheduleSections.test.tsx diff --git a/frontend-modern/src/features/alerts/AlertCooldownSection.tsx b/frontend-modern/src/features/alerts/AlertCooldownSection.tsx index cab1b86672..676176a838 100644 --- a/frontend-modern/src/features/alerts/AlertCooldownSection.tsx +++ b/frontend-modern/src/features/alerts/AlertCooldownSection.tsx @@ -1,11 +1,6 @@ -import { Show } from 'solid-js'; +import { Show, createUniqueId } from 'solid-js'; -import { - controlClass, - formHelpText, - formField, - labelClass, -} from '@/components/shared/Form'; +import { controlClass, formHelpText, formField, labelClass } from '@/components/shared/Form'; import { SettingsPanel } from '@/components/shared/SettingsPanel'; import { Toggle } from '@/components/shared/Toggle'; import { @@ -30,6 +25,12 @@ interface AlertCooldownSectionProps { } export function AlertCooldownSection(props: AlertCooldownSectionProps) { + const fieldIdPrefix = `alert-cooldown-${createUniqueId()}`; + const fieldIds = { + minutes: `${fieldIdPrefix}-minutes`, + maxAlerts: `${fieldIdPrefix}-max-alerts`, + }; + return (
-