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.
This commit is contained in:
1 parent
ba3721eb92
commit
779f322f62
1 file changed
+2
-1
@@ -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(' · ')
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user