From aa46eb4c6daeca5f61e034e804980b922f906705 Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Mon, 26 Jan 2026 23:08:36 -0500 Subject: [PATCH] fix: Update notification timing label and refactor notification rendering for improved clarity --- src/components/NotificationTemplate.jsx | 234 +++++++++++------------- 1 file changed, 107 insertions(+), 127 deletions(-) diff --git a/src/components/NotificationTemplate.jsx b/src/components/NotificationTemplate.jsx index 490099a..faad23d 100644 --- a/src/components/NotificationTemplate.jsx +++ b/src/components/NotificationTemplate.jsx @@ -23,7 +23,7 @@ const timeUnits = [ const timingOptions = [ { label: 'Before', value: 'before' }, - { label: 'On Due', value: 'ondue' }, + { label: 'Due', value: 'ondue' }, { label: 'After', value: 'after' }, ] @@ -490,145 +490,125 @@ const NotificationTemplate = ({ const colors = getNotificationColors(n.value) return ( - - + - - - - - - - {getRelativeLabel(n)} - - - + /> - - - handleChange(idx, 'displayValue', e.target.value) - } + - - removeNotification(idx)} - disabled={notifications.length === 1} - color={'danger'} - size={'sm'} - variant={'soft'} - sx={{ - transition: 'all 0.2s ease', - '&:hover': { - transform: 'scale(1.1)', - }, + minWidth: 0, + flex: '1', + display: { xs: 'none', md: 'flex' }, // Show only on md and up }} > - - + + {getRelativeLabel(n)} + + + + + + + handleChange(idx, 'displayValue', e.target.value) + } + sx={{ + width: 60, + opacity: uiRep.timing === 'ondue' ? 0.6 : 1, + }} + size={'sm'} + placeholder='0' + /> + + removeNotification(idx)} + disabled={notifications.length === 1} + color={'danger'} + size={'sm'} + variant={'soft'} + sx={{ + transition: 'all 0.2s ease', + '&:hover': { + transform: 'scale(1.1)', + }, + }} + > + + + - + ) })}