From c3c91803cba6bf7f77a87a03bca7e6666bfb5392 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 22 Jan 2024 17:25:45 +0530 Subject: [PATCH] feat: added comment in activity --- crm/api/activities.py | 20 +++++++++++++ frontend/src/components/Activities.vue | 29 +++++++++++++++++++ frontend/src/components/Icons/CommentIcon.vue | 16 ++++++++++ 3 files changed, 65 insertions(+) create mode 100644 frontend/src/components/Icons/CommentIcon.vue diff --git a/crm/api/activities.py b/crm/api/activities.py index 5dd38ff2..ef42a929 100644 --- a/crm/api/activities.py +++ b/crm/api/activities.py @@ -95,6 +95,16 @@ def get_deal_activities(name): } activities.append(activity) + for comment in docinfo.comments: + activity = { + "activity_type": "comment", + "creation": comment.creation, + "owner": comment.owner, + "content": comment.content, + "is_lead": False, + } + activities.append(activity) + for communication in docinfo.communications: activity = { "activity_type": "communication", @@ -191,6 +201,16 @@ def get_lead_activities(name): } activities.append(activity) + for comment in docinfo.comments: + activity = { + "activity_type": "comment", + "creation": comment.creation, + "owner": comment.owner, + "content": comment.content, + "is_lead": True, + } + activities.append(activity) + for communication in docinfo.communications: activity = { "activity_type": "communication", diff --git a/frontend/src/components/Activities.vue b/frontend/src/components/Activities.vue index 1a42d733..433bfe67 100644 --- a/frontend/src/components/Activities.vue +++ b/frontend/src/components/Activities.vue @@ -404,6 +404,31 @@ +
+
+
+ + {{ activity.owner_name }} + + added a + + comment + +
+
+ + {{ timeAgo(activity.creation) }} + +
+
+
+
+ + +