-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: timeline chat points [WTEL-4465]
- Loading branch information
Showing
14 changed files
with
283 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 60 additions & 6 deletions
66
.../contacts/modules/timeline/modules/calls/components/point-row/call-point-timeline-row.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,76 @@ | ||
<template> | ||
<timeline-row> | ||
<template #content> | ||
{{ point }} | ||
</template> | ||
</timeline-row> | ||
<timeline-row width-fit-content> | ||
<template #before-content> | ||
<timeline-row-info | ||
:timestamp="point.createdAt" | ||
> | ||
<template #title="{ time }"> | ||
{{ time }} | ||
</template> | ||
|
||
<template #subtitle> | ||
<timeline-task-status | ||
:status="pointStatus" | ||
/> | ||
</template> | ||
</timeline-row-info> | ||
</template> | ||
|
||
<template #pin> | ||
<timeline-pin | ||
:type="pinType" | ||
/> | ||
</template> | ||
|
||
<template #content> | ||
<task-timeline-row-content-wrapper> | ||
<timeline-row-initiator | ||
:text="initiator" | ||
:type="initiatorType" | ||
/> | ||
|
||
<timeline-row-duration | ||
:duration="point.duration" | ||
/> | ||
</task-timeline-row-content-wrapper> | ||
</template> | ||
</timeline-row> | ||
</template> | ||
|
||
<script setup> | ||
import { computed } from 'vue'; | ||
import TaskTimelineRowContentWrapper from '../../../../components/task-row/task-timeline-row-content-wrapper.vue'; | ||
import TimelinePin from '../../../../components/utils/timeline-pin.vue'; | ||
import TimelineRowDuration from '../../../../components/utils/timeline-row-duration.vue'; | ||
import TimelineRowInfo from '../../../../components/utils/timeline-row-info.vue'; | ||
import TimelineRowInitiator from '../../../../components/utils/timeline-row-initiator.vue'; | ||
import TimelineRow from '../../../../components/utils/timeline-row.vue'; | ||
import TimelineTaskStatus from '../../../../components/utils/timeline-task-status.vue'; | ||
import TimelinePinType from '../../../../enums/TimelinePinType.enum.js'; | ||
import TimelineTaskStatusEnum from '../../../../enums/TimelineTaskStatus.enum.js'; | ||
const props = defineProps({ | ||
point: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}); | ||
const pointType = computed(() => {}); | ||
const pointStatus = computed(() => { | ||
return TimelineTaskStatusEnum.TRANSFERRED; | ||
}); | ||
const pinType = computed(() => { | ||
return TimelinePinType.CALL_TRANSFER; | ||
}); | ||
const initiatorType = computed(() => {}); | ||
const initiator = computed(() => {}); | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
<style lang="scss" scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...cts/modules/timeline/modules/chats/components/point-row/chat-ended-point-timeline-row.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<timeline-row> | ||
<template #before-content> | ||
<timeline-row-info | ||
:timestamp="point.date" | ||
> | ||
<template #title="{ time }"> | ||
{{ time }} | ||
</template> | ||
<template #subtitle> | ||
<timeline-task-status | ||
:status="TimelineTaskStatusEnum.ENDED" | ||
/> | ||
</template> | ||
</timeline-row-info> | ||
</template> | ||
|
||
<template #pin> | ||
<timeline-pin | ||
:type="TimelinePinType.CHAT_END" | ||
collapsed | ||
/> | ||
</template> | ||
</timeline-row> | ||
</template> | ||
|
||
<script setup> | ||
import TimelineTaskStatus from '../../../../components/utils/timeline-task-status.vue'; | ||
import TimelinePinType from '../../../../enums/TimelinePinType.enum.js'; | ||
import TimelinePin from '../../../../components/utils/timeline-pin.vue'; | ||
import TimelineRowInfo from '../../../../components/utils/timeline-row-info.vue'; | ||
import TimelineRow from '../../../../components/utils/timeline-row.vue'; | ||
import TimelineTaskStatusEnum from '../../../../enums/TimelineTaskStatus.enum.js'; | ||
const props = defineProps({ | ||
point: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}); | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
</style> |
89 changes: 89 additions & 0 deletions
89
...s/modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-content.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<template> | ||
<section class="chat-point-row-content"> | ||
<header class="chat-point-row-content-header"> | ||
<wt-icon-btn | ||
:icon="collapsed ? 'arrow-right' : 'arrow-down'" | ||
@click="toggle" | ||
/> | ||
<timeline-row-initiator | ||
:text="initiator" | ||
:type="isInitiatorBot ? TimelineInitiatorType.BOT : TimelineInitiatorType.CONTACT" | ||
/> | ||
</header> | ||
|
||
<article | ||
v-if="point.text" | ||
class="chat-point-row-content-text" | ||
:class="{ 'chat-point-row-content-text--collapsed': collapsed }" | ||
> | ||
{{ point.text }} | ||
</article> | ||
|
||
<footer | ||
v-if="showFooter" | ||
class="chat-point-row-content-footer" | ||
> | ||
<chat-point-timeline-row-file | ||
v-for="(file) of point.files" | ||
:key="file.id" | ||
:file="file" | ||
/> | ||
</footer> | ||
</section> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, ref } from 'vue'; | ||
import ChatPointTimelineRowFile from './chat-point-timeline-row-file.vue'; | ||
import TimelineRowInitiator from '../../../../components/utils/timeline-row-initiator.vue'; | ||
import TimelineInitiatorType from '../../../../enums/TimelineInitiatorType.enum.js'; | ||
const props = defineProps({ | ||
point: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}); | ||
const collapsed = ref(true); | ||
const toggle = () => { | ||
collapsed.value = !collapsed.value; | ||
}; | ||
const initiator = computed(() => { | ||
return props.point.peer?.name || ''; | ||
}); | ||
const isInitiatorBot = computed(() => { | ||
return props.point.peer?.type === 'bot'; | ||
}); | ||
const showFooter = computed(() => { | ||
return !!props.point.files; | ||
}); | ||
</script> | ||
<style scoped lang="scss"> | ||
.chat-point-row-content { | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--spacing-xs); | ||
} | ||
.chat-point-row-content-header, | ||
.chat-point-row-content-footer { | ||
display: flex; | ||
align-items: center; | ||
gap: var(--spacing-xs); | ||
} | ||
.chat-point-row-content-text { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
&--collapsed { | ||
height: 24px; | ||
} | ||
} | ||
</style> |
13 changes: 0 additions & 13 deletions
13
.../modules/timeline/modules/chats/components/point-row/chat-point-timeline-row-dropdown.vue
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.