From dfe89b499f525f1e49c8791059c5b2215364f7bb Mon Sep 17 00:00:00 2001 From: Mo Tarbin Date: Tue, 16 Jul 2024 23:08:03 -0400 Subject: Add Support for Group Notification --- src/views/ChoreEdit/ChoreEdit.jsx | 61 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/views/ChoreEdit/ChoreEdit.jsx b/src/views/ChoreEdit/ChoreEdit.jsx index 968da24..9a61d9d 100644 --- a/src/views/ChoreEdit/ChoreEdit.jsx +++ b/src/views/ChoreEdit/ChoreEdit.jsx @@ -595,7 +595,7 @@ const ChoreEdit = () => { opacity: !isPlusAccount(userProfile) ? 0.5 : 1, }} > - Receive notifications for this task + When should receive notifications for this task @@ -658,6 +658,65 @@ const ChoreEdit = () => { {item.description} ))} + + + What things should trigger the notification? + + + + Notify all assignees + + + + { + if (notificationMetadata['circleGroup']) { + delete notificationMetadata['circleGroupID'] + } + + setNotificationMetadata({ + ...notificationMetadata, + ['circleGroup']: !notificationMetadata['circleGroup'], + }) + }} + checked={ + notificationMetadata + ? notificationMetadata['circleGroup'] + : false + } + label='Specific Group' + /> + Notify a specific group + + + {notificationMetadata['circleGroup'] && ( + + Telegram Group ID: + + { + setNotificationMetadata({ + ...notificationMetadata, + ['circleGroupID']: parseInt(e.target.value), + }) + }} + /> + + )} )} -- cgit