fix: preserve last visited tab not working in mobile view
This commit is contained in:
parent
1fb5347b94
commit
8a6560228c
@ -36,7 +36,7 @@
|
||||
</template>
|
||||
</LayoutHeader>
|
||||
<div v-if="deal.data" class="flex h-full overflow-hidden">
|
||||
<Tabs v-model="tabIndex" v-slot="{ tab }" :tabs="tabs">
|
||||
<Tabs v-model="tabIndex" :tabs="tabs">
|
||||
<Activities
|
||||
ref="activities"
|
||||
doctype="CRM Deal"
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
<Activities
|
||||
v-else
|
||||
doctype="CRM Deal"
|
||||
:title="tab.name"
|
||||
:tabs="tabs"
|
||||
v-model:reload="reload"
|
||||
v-model:tabIndex="tabIndex"
|
||||
v-model="deal"
|
||||
@ -278,6 +278,7 @@ import {
|
||||
callEnabled,
|
||||
isMobileView,
|
||||
} from '@/composables/settings'
|
||||
import { useActiveTabManager } from '@/composables/useActiveTabManager'
|
||||
import {
|
||||
createResource,
|
||||
Dropdown,
|
||||
@ -427,7 +428,6 @@ const breadcrumbs = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
const tabIndex = ref(0)
|
||||
const tabs = computed(() => {
|
||||
let tabOptions = [
|
||||
{
|
||||
@ -476,6 +476,7 @@ const tabs = computed(() => {
|
||||
]
|
||||
return tabOptions.filter((tab) => (tab.condition ? tab.condition() : true))
|
||||
})
|
||||
const { tabIndex } = useActiveTabManager(tabs, 'lastDealTab')
|
||||
|
||||
const fieldsLayout = createResource({
|
||||
url: 'crm.api.doc.get_sidebar_fields',
|
||||
|
||||
@ -89,7 +89,6 @@
|
||||
<Activities
|
||||
v-else
|
||||
doctype="CRM Lead"
|
||||
:title="tab.name"
|
||||
:tabs="tabs"
|
||||
v-model:reload="reload"
|
||||
v-model:tabIndex="tabIndex"
|
||||
@ -203,6 +202,7 @@ import {
|
||||
callEnabled,
|
||||
isMobileView,
|
||||
} from '@/composables/settings'
|
||||
import { useActiveTabManager } from '@/composables/useActiveTabManager'
|
||||
import {
|
||||
createResource,
|
||||
Dropdown,
|
||||
@ -338,8 +338,6 @@ const breadcrumbs = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
const tabIndex = ref(0)
|
||||
|
||||
const tabs = computed(() => {
|
||||
let tabOptions = [
|
||||
{
|
||||
@ -388,6 +386,7 @@ const tabs = computed(() => {
|
||||
]
|
||||
return tabOptions.filter((tab) => (tab.condition ? tab.condition() : true))
|
||||
})
|
||||
const { tabIndex } = useActiveTabManager(tabs, 'lastLeadTab')
|
||||
|
||||
watch(tabs, (value) => {
|
||||
if (value && route.params.tabName) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user