fix: send email button on empty state email tab
This commit is contained in:
parent
4f23fa62c0
commit
f0514f1a21
@ -244,6 +244,12 @@
|
|||||||
label="Create note"
|
label="Create note"
|
||||||
@click="emit('makeNote')"
|
@click="emit('makeNote')"
|
||||||
/>
|
/>
|
||||||
|
<Button
|
||||||
|
v-else-if="title == 'Emails'"
|
||||||
|
variant="solid"
|
||||||
|
label="Send email"
|
||||||
|
@click="emit('setFocusOnEmail')"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
@ -271,7 +277,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['makeCall', 'makeNote', 'deleteNote'])
|
const emit = defineEmits(['makeCall', 'makeNote', 'deleteNote', 'setFocusOnEmail'])
|
||||||
|
|
||||||
const activities = computed(() => {
|
const activities = computed(() => {
|
||||||
if (props.title == 'Calls') {
|
if (props.title == 'Calls') {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="max-w-[81.7%] pl-16 p-4 pt-2">
|
<div class="max-w-[81.7%] pl-16 p-4 pt-2">
|
||||||
<button
|
<button
|
||||||
|
ref="sendEmailRef"
|
||||||
class="flex gap-2 w-full items-center rounded-lg p-2 bg-gray-100 hover:bg-gray-200"
|
class="flex gap-2 w-full items-center rounded-lg p-2 bg-gray-100 hover:bg-gray-200"
|
||||||
@click="showCommunicationBox = true"
|
@click="showCommunicationBox = true"
|
||||||
v-show="!showCommunicationBox"
|
v-show="!showCommunicationBox"
|
||||||
@ -58,6 +59,7 @@ const { getUser } = usersStore()
|
|||||||
const showCommunicationBox = ref(false)
|
const showCommunicationBox = ref(false)
|
||||||
const newEmail = ref('')
|
const newEmail = ref('')
|
||||||
const newEmailEditor = ref(null)
|
const newEmailEditor = ref(null)
|
||||||
|
const sendEmailRef = ref(null)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => showCommunicationBox.value,
|
() => showCommunicationBox.value,
|
||||||
@ -99,7 +101,5 @@ async function submitComment() {
|
|||||||
modelValue.value.reload()
|
modelValue.value.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
function openPhoneCallDialog() {
|
defineExpose({ el: sendEmailRef })
|
||||||
//
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -76,10 +76,12 @@
|
|||||||
@makeCall="makeCall(deal.data.mobile_no)"
|
@makeCall="makeCall(deal.data.mobile_no)"
|
||||||
@makeNote="(e) => showNote(e)"
|
@makeNote="(e) => showNote(e)"
|
||||||
@deleteNote="(e) => deleteNote(e)"
|
@deleteNote="(e) => deleteNote(e)"
|
||||||
|
@setFocusOnEmail="() => $refs.sendEmailRef.el.click()"
|
||||||
/>
|
/>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</TabPanels>
|
</TabPanels>
|
||||||
<CommunicationArea
|
<CommunicationArea
|
||||||
|
ref="sendEmailRef"
|
||||||
v-if="[0, 1].includes(selectedIndex)"
|
v-if="[0, 1].includes(selectedIndex)"
|
||||||
v-model="deal"
|
v-model="deal"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -79,10 +79,12 @@
|
|||||||
@makeCall="makeCall(lead.data.mobile_no)"
|
@makeCall="makeCall(lead.data.mobile_no)"
|
||||||
@makeNote="(e) => showNote(e)"
|
@makeNote="(e) => showNote(e)"
|
||||||
@deleteNote="(e) => deleteNote(e)"
|
@deleteNote="(e) => deleteNote(e)"
|
||||||
|
@setFocusOnEmail="() => $refs.sendEmailRef.el.click()"
|
||||||
/>
|
/>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</TabPanels>
|
</TabPanels>
|
||||||
<CommunicationArea
|
<CommunicationArea
|
||||||
|
ref="sendEmailRef"
|
||||||
v-if="[0, 1].includes(selectedIndex)"
|
v-if="[0, 1].includes(selectedIndex)"
|
||||||
v-model="lead"
|
v-model="lead"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user