diff --git a/frontend/src/components/Activities.vue b/frontend/src/components/Activities.vue index a5c441da..c0157e95 100644 --- a/frontend/src/components/Activities.vue +++ b/frontend/src/components/Activities.vue @@ -15,6 +15,16 @@ {{ __('New Email') }} + + + + + {{ __('New Comment') }} + + + + + + + + + + + + + + {{ comment.owner_name }} + + {{ __('added a') }} + + {{ __('comment') }} + + + + + + {{ __(timeAgo(comment.creation)) }} + + + + + + + + + + + + + + + { label: __('New Email'), onClick: () => (emailBox.value.show = true), }, + { + icon: h(CommentIcon, { class: 'h-4 w-4' }), + label: __('New Comment'), + onClick: () => (emailBox.value.showComment = true), + }, { icon: h(PhoneIcon, { class: 'h-4 w-4' }), label: __('Make a Call'), @@ -1027,6 +1103,11 @@ const activities = computed(() => { activities = all_activities.data.versions.filter( (activity) => activity.activity_type === 'communication' ) + } else if (props.title == 'Comments') { + if (!all_activities.data?.versions) return [] + activities = all_activities.data.versions.filter( + (activity) => activity.activity_type === 'comment' + ) } else if (props.title == 'Calls') { if (!all_activities.data?.calls) return [] return sortByCreation(all_activities.data.calls) @@ -1089,6 +1170,8 @@ const emptyText = computed(() => { let text = 'No Activities' if (props.title == 'Emails') { text = 'No Email Communications' + } else if (props.title == 'Comments') { + text = 'No Comments' } else if (props.title == 'Calls') { text = 'No Call Logs' } else if (props.title == 'Notes') { @@ -1105,6 +1188,8 @@ const emptyTextIcon = computed(() => { let icon = ActivityIcon if (props.title == 'Emails') { icon = EmailIcon + } else if (props.title == 'Comments') { + icon = CommentIcon } else if (props.title == 'Calls') { icon = PhoneIcon } else if (props.title == 'Notes') { diff --git a/frontend/src/components/CommunicationArea.vue b/frontend/src/components/CommunicationArea.vue index dc18f3d3..07d3676f 100644 --- a/frontend/src/components/CommunicationArea.vue +++ b/frontend/src/components/CommunicationArea.vue @@ -248,5 +248,5 @@ function toggleCommentBox() { showCommentBox.value = !showCommentBox.value } -defineExpose({ show: showEmailBox, editor: newEmailEditor }) +defineExpose({ show: showEmailBox, showComment: showCommentBox, editor: newEmailEditor })