From d83e2175c284fd2b9aeb870a9864a1593aee9f7c Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Wed, 1 May 2024 23:38:22 +0300 Subject: [PATCH] feat: timeline chat points [WTEL-4465] --- .../components/utils/timeline-pin.vue | 4 +- .../components/utils/timeline-row.vue | 27 ++---- .../timeline/modules/calls/api/HistoryAPI.js | 2 +- .../point-row/call-point-timeline-row.vue | 66 ++++++++++++-- .../call-points-timeline-row-section.vue | 19 +--- .../task-row/call-task-timeline-actions.vue | 4 +- .../modules/chats/api/MessageHistoryAPI.js | 11 +-- .../chat-ended-point-timeline-row.vue | 45 ++++++++++ .../chat-point-timeline-row-content.vue | 89 +++++++++++++++++++ .../chat-point-timeline-row-dropdown.vue | 13 --- .../chat-point-timeline-row-file.vue | 35 ++++++++ .../point-row/chat-point-timeline-row.vue | 46 ++++------ .../chat-points-timeline-row-section.vue | 14 +++ .../task-row/chat-task-timeline-row.vue | 1 + 14 files changed, 283 insertions(+), 93 deletions(-) create mode 100644 src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-ended-point-timeline-row.vue create mode 100644 src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-content.vue delete mode 100644 src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue create mode 100644 src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-file.vue diff --git a/src/modules/contacts/modules/timeline/components/utils/timeline-pin.vue b/src/modules/contacts/modules/timeline/components/utils/timeline-pin.vue index 78fe4e29..afd49dc2 100644 --- a/src/modules/contacts/modules/timeline/components/utils/timeline-pin.vue +++ b/src/modules/contacts/modules/timeline/components/utils/timeline-pin.vue @@ -62,12 +62,12 @@ const stateMap = { [TimelinePinType.USER]: { component: 'wt-icon', color: 'default', - icon: 'account', + icon: 'contacts', }, [TimelinePinType.AGENT]: { component: 'wt-icon', color: 'default', - icon: 'edit', + icon: 'agent', }, [TimelinePinType.BOT]: { component: 'wt-icon', diff --git a/src/modules/contacts/modules/timeline/components/utils/timeline-row.vue b/src/modules/contacts/modules/timeline/components/utils/timeline-row.vue index 413b80f0..92b12765 100644 --- a/src/modules/contacts/modules/timeline/components/utils/timeline-row.vue +++ b/src/modules/contacts/modules/timeline/components/utils/timeline-row.vue @@ -13,20 +13,7 @@
-
- -
- - -
- -
-
+
@@ -82,8 +69,8 @@ onUnmounted(() => eventBus.$off('timeline/rows/collapse-all', collapseRow)); .timeline-row-self-content { display: flex; align-items: flex-start; - gap: var(--spacing-sm); min-height: 56px; + gap: var(--spacing-sm); } .timeline-row-before-content { @@ -91,15 +78,19 @@ onUnmounted(() => eventBus.$off('timeline/rows/collapse-all', collapseRow)); } .timeline-row-pin { - flex: 0 0 90px; // wt-button min width align-self: stretch; + flex: 0 0 90px; // wt-button min width } .timeline-row-main-content { - flex: 1; display: flex; + flex: 1; flex-direction: column; - gap: var(--spacing-xs); margin-bottom: var(--spacing-xs); + gap: var(--spacing-xs); +} + +.timeline-row--width-fit-content .timeline-row-main-content { + flex: 0; } diff --git a/src/modules/contacts/modules/timeline/modules/calls/api/HistoryAPI.js b/src/modules/contacts/modules/timeline/modules/calls/api/HistoryAPI.js index 0ef53804..2511e959 100644 --- a/src/modules/contacts/modules/timeline/modules/calls/api/HistoryAPI.js +++ b/src/modules/contacts/modules/timeline/modules/calls/api/HistoryAPI.js @@ -194,7 +194,7 @@ const getHistory = getList({ merge(getDefaultGetListResponse()), ], responseItemsTransformers: [ - transformResponseItems, + // transformResponseItems, ], }); diff --git a/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-point-timeline-row.vue b/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-point-timeline-row.vue index 7d57f76b..1d9724f3 100644 --- a/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-point-timeline-row.vue +++ b/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-point-timeline-row.vue @@ -1,13 +1,53 @@ - diff --git a/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-points-timeline-row-section.vue b/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-points-timeline-row-section.vue index 6d58e3b4..e28e997f 100644 --- a/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-points-timeline-row-section.vue +++ b/src/modules/contacts/modules/timeline/modules/calls/components/point-row/call-points-timeline-row-section.vue @@ -9,8 +9,8 @@ diff --git a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-content.vue b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-content.vue new file mode 100644 index 00000000..042c1346 --- /dev/null +++ b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-content.vue @@ -0,0 +1,89 @@ + + + + + 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 deleted file mode 100644 index bd398352..00000000 --- a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-file.vue b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-file.vue new file mode 100644 index 00000000..b1fa4222 --- /dev/null +++ b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-file.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row.vue b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row.vue index 615b642a..36921d51 100644 --- a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row.vue +++ b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row.vue @@ -14,9 +14,9 @@ + /> - +
@@ -29,33 +29,26 @@ /> - - - diff --git a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-points-timeline-row-section.vue b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-points-timeline-row-section.vue index cf733278..a4fa3d6e 100644 --- a/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-points-timeline-row-section.vue +++ b/src/modules/contacts/modules/timeline/modules/chats/components/point-row/chat-points-timeline-row-section.vue @@ -5,12 +5,17 @@ :key="point.id" :point="point" /> +