Skip to content

Commit

Permalink
Merge pull request #142 from webitel/fix/small-refactor-in-timeline
Browse files Browse the repository at this point in the history
fix: add new param in API, change size and add total duration[WTEL-4932]
  • Loading branch information
Lera24 authored Oct 3, 2024
2 parents 59a06be + a58be8d commit c11438a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
collapseAll: 'Collapse all',
timeline: {
timeline: 'Timeline',
totalDuration: 'Total duration',
actions: {
openInHistory: 'Open in history',
playRecording: 'Play recording',
Expand Down
1 change: 1 addition & 0 deletions src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
collapseAll: 'Свернуть все',
timeline: {
timeline: 'Хронология',
totalDuration: 'Общая длительность',
actions: {
openInHistory: 'Открыть в истории',
playRecording: 'Проиграть запись',
Expand Down
1 change: 1 addition & 0 deletions src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
collapseAll: 'Згорнути все',
timeline: {
timeline: 'Хронологія',
totalDuration: 'Загальна тривалість',
actions: {
openInHistory: 'Відкрити в історії',
playRecording: 'Програти запис',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/contacts/modules/timeline/api/TimelineAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const listHandler = (items) => {
const response = await timeline.getTimeline(
parentId,
`${page || 1}`,
`${size || 100}`,
`${size || 10}`,
undefined,
undefined,
undefined,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="timeline-row-duration">
<p class="timeline-row-duration__title">
{{ t('vocabulary.duration') }}:
{{ isTotalDuration ? t('contacts.timeline.totalDuration') : t('vocabulary.duration') }}:
</p>
<span class="timeline-row-duration__value">
{{ convertedDuration }}
Expand All @@ -19,6 +19,10 @@ const props = defineProps({
type: Number,
required: true,
},
isTotalDuration: {
type: Boolean,
default: false,
},
});
const { t } = useI18n();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const getList = ({
score_required: score,
variables,
contact_id: contact,
timeline: 'true',
});
const {
items,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
:duration="duration"
/>

<timeline-row-duration
v-if="totalDuration"
is-total-duration
:duration="totalDuration"
/>

<call-task-timeline-actions
:task="task"
/>
Expand Down Expand Up @@ -104,6 +110,7 @@ const {
isInbound,
isMissed,
duration,
totalDuration,
flowScheme,
queue,
id: taskId,
Expand Down

0 comments on commit c11438a

Please sign in to comment.