diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleItem/ruleItem.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleItem/ruleItem.jsx index d39ca0142c..238a3cc6a1 100644 --- a/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleItem/ruleItem.jsx +++ b/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleItem/ruleItem.jsx @@ -32,9 +32,7 @@ export const RuleItem = ({ item, actions, onToggle, disabled, content, onClick } const onClickHandler = () => { setShown(!shown); - if (!shown && onClick) { - onClick(); - } + onClick(shown); }; return ( @@ -79,12 +77,12 @@ RuleItem.propTypes = { onToggle: PropTypes.func, disabled: PropTypes.bool, content: PropTypes.node, - onClick: PropTypes.oneOfType([PropTypes.func, PropTypes.instanceOf(null)]), + onClick: PropTypes.func, }; RuleItem.defaultProps = { actions: [], onToggle: () => {}, disabled: false, content: null, - onClick: null, + onClick: () => {}, }; diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleList.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleList.jsx index 51258427bf..1f7c91c787 100644 --- a/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleList.jsx +++ b/app/src/pages/inside/projectSettingsPageContainer/content/elements/ruleList/ruleList.jsx @@ -53,12 +53,12 @@ RuleList.propTypes = { onToggle: PropTypes.func, disabled: PropTypes.bool, ruleItemContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), - handleRuleItemClick: PropTypes.oneOfType([PropTypes.func, PropTypes.instanceOf(null)]), + handleRuleItemClick: PropTypes.func, }; RuleList.defaultProps = { actions: [], onToggle: () => {}, disabled: true, ruleItemContent: null, - handleRuleItemClick: null, + handleRuleItemClick: () => {}, }; diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx index 8d850f49a4..487b9f1fce 100644 --- a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx +++ b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/modals/addEditNotificationModal/addEditNotificationModal.jsx @@ -260,7 +260,7 @@ const AddEditNotificationModal = ({ PROJECT_SETTINGS_NOTIFICATIONS_EVENTS.CLICK_SAVE_BUTTON_IN_MODAL( modalName, informOwner, - attributesValue.length, + isEditorShown ? attributesValue.length : undefined, messages[sendCase].defaultMessage, switcher, ), diff --git a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx index ac23bffbc7..c24b9bd146 100644 --- a/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx +++ b/app/src/pages/inside/projectSettingsPageContainer/content/notifications/notifications.jsx @@ -209,8 +209,10 @@ export const Notifications = ({ setHeaderTitleNode }) => { }, ]; - const handleRuleItemClick = () => { - trackEvent(PROJECT_SETTINGS_NOTIFICATIONS_EVENTS.CLICK_TO_EXPAND_NOTIFICATIONS_DETAILS); + const handleRuleItemClick = (isShown) => { + if (isShown) { + trackEvent(PROJECT_SETTINGS_NOTIFICATIONS_EVENTS.CLICK_TO_EXPAND_NOTIFICATIONS_DETAILS); + } }; const handleDocumentationClick = () => { @@ -243,7 +245,7 @@ export const Notifications = ({ setHeaderTitleNode }) => { actions={actions} onToggle={onToggleHandler} ruleItemContent={NotificationRuleContent} - onClick={handleRuleItemClick} + handleRuleItemClick={handleRuleItemClick} />