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