From 5a1f853b9fde1573ffb6d783192db45fcddac983 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 26 Sep 2023 15:55:59 +0530 Subject: [PATCH] fix: added icons instead of feature icons minor spacing/color fixes --- frontend/src/components/Activities.vue | 80 ++++++++++++------- frontend/src/components/Icons/DealsIcon.vue | 16 ++-- frontend/src/components/Icons/DotIcon.vue | 11 +++ frontend/src/components/Icons/EmailAtIcon.vue | 16 ++++ .../{InboundCall.vue => InboundCallIcon.vue} | 1 - ...{OutboundCall.vue => OutboundCallIcon.vue} | 1 - 6 files changed, 88 insertions(+), 37 deletions(-) create mode 100644 frontend/src/components/Icons/DotIcon.vue create mode 100644 frontend/src/components/Icons/EmailAtIcon.vue rename frontend/src/components/Icons/{InboundCall.vue => InboundCallIcon.vue} (97%) rename frontend/src/components/Icons/{OutboundCall.vue => OutboundCallIcon.vue} (97%) diff --git a/frontend/src/components/Activities.vue b/frontend/src/components/Activities.vue index e64ec633..05c0293f 100644 --- a/frontend/src/components/Activities.vue +++ b/frontend/src/components/Activities.vue @@ -18,7 +18,7 @@
@@ -75,11 +75,11 @@
-
@@ -176,14 +176,24 @@
- +
@@ -298,30 +308,30 @@
-
-
+
+
- {{ activity.owner_name }} + {{ + activity.owner_name + }} {{ activity.type }} {{ activity.data.field_label }} {{ activity.value }} {{ activity.data.old_value }} to {{ activity.data.value }} @@ -330,7 +340,7 @@
{{ timeAgo(activity.creation) }} @@ -383,6 +393,11 @@ import PhoneIcon from '@/components/Icons/PhoneIcon.vue' import NoteIcon from '@/components/Icons/NoteIcon.vue' import DurationIcon from '@/components/Icons/DurationIcon.vue' import PlayIcon from '@/components/Icons/PlayIcon.vue' +import DealsIcon from '@/components/Icons/DealsIcon.vue' +import DotIcon from '@/components/Icons/DotIcon.vue' +import EmailAtIcon from '@/components/Icons/EmailAtIcon.vue' +import InboundCallIcon from '@/components/Icons/InboundCallIcon.vue' +import OutboundCallIcon from '@/components/Icons/OutboundCallIcon.vue' import CommunicationArea from '@/components/CommunicationArea.vue' import { timeAgo, dateFormat, dateTooltipFormat } from '@/utils' import { usersStore } from '@/stores/users' @@ -394,7 +409,7 @@ import { TextEditor, Avatar, } from 'frappe-ui' -import { computed, h, defineModel } from 'vue' +import { computed, h, defineModel, markRaw } from 'vue' const { getUser } = usersStore() @@ -473,20 +488,25 @@ const emptyTextIcon = computed(() => { }) function timelineIcon(activity_type) { - if (activity_type == 'creation') { - return 'plus' - } else if (activity_type == 'removed') { - return 'trash-2' - } else if (activity_type == 'communication') { - return 'at-sign' - } else if (activity_type == 'comment') { - return 'file-text' - } else if (activity_type == 'incoming_call') { - return 'phone-incoming' - } else if (activity_type == 'outgoing_call') { - return 'phone-outgoing' + let icon + switch (activity_type) { + case 'creation': + icon = DealsIcon + break + case 'communication': + icon = EmailAtIcon + break + case 'incoming_call': + icon = InboundCallIcon + break + case 'outgoing_call': + icon = OutboundCallIcon + break + default: + icon = DotIcon } - return 'edit' + + return markRaw(icon) } diff --git a/frontend/src/components/Icons/DealsIcon.vue b/frontend/src/components/Icons/DealsIcon.vue index bde7139f..d8d75b8c 100644 --- a/frontend/src/components/Icons/DealsIcon.vue +++ b/frontend/src/components/Icons/DealsIcon.vue @@ -1,10 +1,16 @@ diff --git a/frontend/src/components/Icons/DotIcon.vue b/frontend/src/components/Icons/DotIcon.vue new file mode 100644 index 00000000..1c3b0d9a --- /dev/null +++ b/frontend/src/components/Icons/DotIcon.vue @@ -0,0 +1,11 @@ + diff --git a/frontend/src/components/Icons/EmailAtIcon.vue b/frontend/src/components/Icons/EmailAtIcon.vue new file mode 100644 index 00000000..754db46b --- /dev/null +++ b/frontend/src/components/Icons/EmailAtIcon.vue @@ -0,0 +1,16 @@ + diff --git a/frontend/src/components/Icons/InboundCall.vue b/frontend/src/components/Icons/InboundCallIcon.vue similarity index 97% rename from frontend/src/components/Icons/InboundCall.vue rename to frontend/src/components/Icons/InboundCallIcon.vue index 16e56984..cf7f92d3 100644 --- a/frontend/src/components/Icons/InboundCall.vue +++ b/frontend/src/components/Icons/InboundCallIcon.vue @@ -6,7 +6,6 @@ fill="none" xmlns="http://www.w3.org/2000/svg" > - -