Merge pull request #1070 from shariquerik/log-call-fix
This commit is contained in:
commit
d53b503805
@ -792,7 +792,7 @@ function scroll(hash) {
|
||||
const callActions = computed(() => {
|
||||
let actions = [
|
||||
{
|
||||
label: __('Create Call Log'),
|
||||
label: __('Log a Call'),
|
||||
onClick: () => modalRef.value.createCallLog(),
|
||||
},
|
||||
{
|
||||
|
||||
@ -134,7 +134,7 @@ const defaultActions = computed(() => {
|
||||
},
|
||||
{
|
||||
icon: h(PhoneIcon, { class: 'h-4 w-4' }),
|
||||
label: __('Create Call Log'),
|
||||
label: __('Log a Call'),
|
||||
onClick: () => props.modalRef.createCallLog(),
|
||||
},
|
||||
{
|
||||
@ -177,7 +177,7 @@ function getTabIndex(name) {
|
||||
const callActions = computed(() => {
|
||||
let actions = [
|
||||
{
|
||||
label: __('Create Call Log'),
|
||||
label: __('Log a Call'),
|
||||
icon: 'plus',
|
||||
onClick: () => props.modalRef.createCallLog(),
|
||||
},
|
||||
|
||||
@ -25,25 +25,22 @@
|
||||
</template>
|
||||
</Button>
|
||||
<Dropdown
|
||||
v-show="showDropdown"
|
||||
v-if="showDropdown"
|
||||
:options="parsedOptions"
|
||||
size="sm"
|
||||
class="flex-1 [&>div>div>div]:w-full"
|
||||
placement="right"
|
||||
>
|
||||
<template v-slot="{ togglePopover }">
|
||||
<Button
|
||||
:variant="$attrs.variant"
|
||||
@click="togglePopover"
|
||||
icon="chevron-down"
|
||||
class="!w-6 justify-start rounded-bl-none rounded-tl-none border-0 pr-0 text-xs"
|
||||
/>
|
||||
</template>
|
||||
</Dropdown>
|
||||
:button="{
|
||||
icon: 'chevron-down',
|
||||
variant: $attrs.variant,
|
||||
size: $attrs.size,
|
||||
class:
|
||||
'!w-6 justify-start rounded-bl-none rounded-tl-none border-0 pr-0 text-xs',
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Dropdown } from 'frappe-ui'
|
||||
import { DropdownOption } from '@/utils'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
@ -57,13 +54,18 @@ const showDropdown = ref(props.options?.length > 1)
|
||||
const activeButton = ref(props.options?.[0] || {})
|
||||
|
||||
const parsedOptions = computed(() => {
|
||||
debugger
|
||||
return (
|
||||
props.options?.map((option) => {
|
||||
return {
|
||||
label: option.label,
|
||||
onClick: () => {
|
||||
activeButton.value = option
|
||||
},
|
||||
component: (props) =>
|
||||
DropdownOption({
|
||||
option: option.label,
|
||||
active: props.active,
|
||||
selected: option.label === activeButton.value.label,
|
||||
onClick: () => (activeButton.value = option),
|
||||
}),
|
||||
}
|
||||
}) || []
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user