Merge pull request #1071 from frappe/mergify/bp/main-hotfix/pr-1070

This commit is contained in:
Shariq Ansari 2025-07-24 13:16:04 +05:30 committed by GitHub
commit b555449dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 19 deletions

View File

@ -792,7 +792,7 @@ function scroll(hash) {
const callActions = computed(() => {
let actions = [
{
label: __('Create Call Log'),
label: __('Log a Call'),
onClick: () => modalRef.value.createCallLog(),
},
{

View File

@ -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(),
},

View File

@ -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),
}),
}
}) || []
)