From 779f322f620a21bd0a6799e57eb60cf818fc19cb Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Mon, 27 Jul 2026 22:11:06 +0300 Subject: [PATCH] Refactor conditionsHint function in JunctionChain component for improved readability Updated the conditionsHint function to enhance code clarity by adjusting the formatting of the conditional statement that processes dayparts. This change improves maintainability and aligns with best practices for code structure. --- .../src/features/admin/junctions/components/JunctionChain.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/features/admin/junctions/components/JunctionChain.tsx b/frontend/src/features/admin/junctions/components/JunctionChain.tsx index ed0af94..0341b89 100644 --- a/frontend/src/features/admin/junctions/components/JunctionChain.tsx +++ b/frontend/src/features/admin/junctions/components/JunctionChain.tsx @@ -46,7 +46,8 @@ function conditionsHint(element: JunctionElementDto, t: Translate) { if (c && c.minMinutesBetween > 0) parts.push(t('admin.junctions.badgeInterval', { minutes: c.minMinutesBetween })) if (c?.timeWindow) parts.push(`${c.timeWindow.from.slice(0, 5)}–${c.timeWindow.to.slice(0, 5)}`) - if (c?.dayparts?.length) parts.push(c.dayparts.map((d) => t(`admin.channels.dayparts.${d}`)).join('/')) + if (c?.dayparts?.length) + parts.push(c.dayparts.map((d) => t(`admin.channels.dayparts.${d}`)).join('/')) return parts.join(' · ') }