fix: show call details on click of call area

This commit is contained in:
Shariq Ansari 2025-01-18 18:55:36 +05:30
parent 50508cc6b0
commit e6d72146b5
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div @click="showCallLogModal = true" class="cursor-pointer">
<div class="mb-1 flex items-center justify-stretch gap-2 py-1 text-base"> <div class="mb-1 flex items-center justify-stretch gap-2 py-1 text-base">
<div class="inline-flex items-center flex-wrap gap-1 text-ink-gray-5"> <div class="inline-flex items-center flex-wrap gap-1 text-ink-gray-5">
<Avatar <Avatar
@ -70,7 +70,7 @@
v-if="activity.recording_url" v-if="activity.recording_url"
:label="activity.show_recording ? __('Hide Recording') : __('Listen')" :label="activity.show_recording ? __('Hide Recording') : __('Listen')"
class="cursor-pointer" class="cursor-pointer"
@click="activity.show_recording = !activity.show_recording" @click.stop="activity.show_recording = !activity.show_recording"
> >
<template #prefix> <template #prefix>
<PlayIcon class="size-3" /> <PlayIcon class="size-3" />
@ -84,10 +84,12 @@
<div <div
v-if="activity.show_recording && activity.recording_url" v-if="activity.show_recording && activity.recording_url"
class="flex flex-col items-center justify-between" class="flex flex-col items-center justify-between"
@click.stop
> >
<AudioPlayer :src="activity.recording_url" /> <AudioPlayer :src="activity.recording_url" />
</div> </div>
</div> </div>
<CallLogModal v-model="showCallLogModal" :name="callLogName" />
</div> </div>
</template> </template>
<script setup> <script setup>
@ -96,11 +98,16 @@ import CalendarIcon from '@/components/Icons/CalendarIcon.vue'
import DurationIcon from '@/components/Icons/DurationIcon.vue' import DurationIcon from '@/components/Icons/DurationIcon.vue'
import MultipleAvatar from '@/components/MultipleAvatar.vue' import MultipleAvatar from '@/components/MultipleAvatar.vue'
import AudioPlayer from '@/components/Activities/AudioPlayer.vue' import AudioPlayer from '@/components/Activities/AudioPlayer.vue'
import CallLogModal from '@/components/Modals/CallLogModal.vue'
import { statusLabelMap, statusColorMap } from '@/utils/callLog.js' import { statusLabelMap, statusColorMap } from '@/utils/callLog.js'
import { formatDate, timeAgo } from '@/utils' import { formatDate, timeAgo } from '@/utils'
import { Avatar, Badge, Tooltip } from 'frappe-ui' import { Avatar, Badge, Tooltip } from 'frappe-ui'
import { ref } from 'vue'
const props = defineProps({ const props = defineProps({
activity: Object, activity: Object,
}) })
const callLogName = ref(props.activity.name)
const showCallLogModal = ref(false)
</script> </script>

View File

@ -146,7 +146,7 @@ const detailFields = computed(() => {
{ {
icon: callLog.value.data._lead ? LeadsIcon : Dealsicon, icon: callLog.value.data._lead ? LeadsIcon : Dealsicon,
name: 'reference_doc', name: 'reference_doc',
value: callLog.value.data._lead == 'CRM Lead' ? 'Lead' : 'Deal', value: callLog.value.data._lead ? 'Lead' : 'Deal',
link: () => { link: () => {
if (callLog.value.data._lead) { if (callLog.value.data._lead) {
router.push({ router.push({