From 031de5b7b4c0f5770ec23ecf2ec4846c1abdc7bc Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Thu, 25 Apr 2024 17:21:36 +0300 Subject: [PATCH] feat: TaskKind enum [WTEL-4465] --- .../timeline/enums/TimelinePinType.enum.js | 29 ++++++++++++++----- .../timeline/enums/TimelineTaskKind.enum.js | 16 ++++++++++ .../chat-point-timeline-row-dropdown.vue | 4 +-- 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 src/modules/contacts/modules/timeline/enums/TimelineTaskKind.enum.js diff --git a/src/modules/contacts/modules/timeline/enums/TimelinePinType.enum.js b/src/modules/contacts/modules/timeline/enums/TimelinePinType.enum.js index 9073d44b..65db7b3a 100644 --- a/src/modules/contacts/modules/timeline/enums/TimelinePinType.enum.js +++ b/src/modules/contacts/modules/timeline/enums/TimelinePinType.enum.js @@ -1,18 +1,31 @@ +/** + * @name TimelinePinType + * @description Enumerates (ONLY!) the types of timeline pins. + */ + const TimelinePinType = Object.freeze({ - DAY: 'DAY', + // close expanded CLOSE: 'CLOSE', + + // day pin + DAY: 'DAY', + + // reusable icon pins for points inside tasks + USER: 'CONTACT', + AGENT: 'AGENT', + BOT: 'BOT', + + // chat-related pins CHAT: 'CHAT', - CHAT_GATEWAY: 'CHAT_GATEWAY', + CHAT_TRANSFER: 'CHAT_TRANSFER', + CHAT_END: 'CHAT_END', + + + // call-related pins CALL_INBOUND: 'CALL_INBOUND', - CALL_INBOUND_ON_IVR: 'CALL_INBOUND_ON_IVR', CALL_OUTBOUND: 'CALL_OUTBOUND', CALL_MISSED: 'CALL_MISSED', - CALL_MISSED_ON_QUEUE: 'CALL_MISSED_ON_QUEUE', - CALL_TRANSFER: 'CALL_TRANSFER', - CHAT_INVITE: 'CHAT_INVITE', - - // TODO ... }); export default TimelinePinType; diff --git a/src/modules/contacts/modules/timeline/enums/TimelineTaskKind.enum.js b/src/modules/contacts/modules/timeline/enums/TimelineTaskKind.enum.js new file mode 100644 index 00000000..c58520a4 --- /dev/null +++ b/src/modules/contacts/modules/timeline/enums/TimelineTaskKind.enum.js @@ -0,0 +1,16 @@ +/** + * @name TimelineTaskKind + * @description Enumerates kind of task, which is sub-category of task type, like chat, call, email, etc. + */ + +const TimelineTaskKind = Object.freeze({ + CALL_INBOUND: 'CALL_INBOUND', + CALL_OUTBOUND: 'CALL_OUTBOUND', + CALL_MISSED: 'CALL_MISSED', + + CHAT_INBOUND: 'CHAT_INBOUND', + // CHAT_OUTBOUND: 'CHAT_OUTBOUND', + CHAT_ENDED: 'CHAT_ENDED', +}); + +export default TimelineTaskKind; diff --git a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue index 0b8b21da..bd398352 100644 --- a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue +++ b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue @@ -1,7 +1,7 @@