Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge develop to main #392

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/pages/Deal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/pages/MobileDeal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -278,6 +278,7 @@ import {
callEnabled,
isMobileView,
} from '@/composables/settings'
import { useActiveTabManager } from '@/composables/useActiveTabManager'
import {
createResource,
Dropdown,
Expand Down Expand Up @@ -427,7 +428,6 @@ const breadcrumbs = computed(() => {
return items
})

const tabIndex = ref(0)
const tabs = computed(() => {
let tabOptions = [
{
Expand Down Expand Up @@ -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',
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/pages/MobileLead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<Activities
v-else
doctype="CRM Lead"
:title="tab.name"
:tabs="tabs"
v-model:reload="reload"
v-model:tabIndex="tabIndex"
Expand Down Expand Up @@ -203,6 +202,7 @@ import {
callEnabled,
isMobileView,
} from '@/composables/settings'
import { useActiveTabManager } from '@/composables/useActiveTabManager'
import {
createResource,
Dropdown,
Expand Down Expand Up @@ -338,8 +338,6 @@ const breadcrumbs = computed(() => {
return items
})

const tabIndex = ref(0)

const tabs = computed(() => {
let tabOptions = [
{
Expand Down Expand Up @@ -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) {
Expand Down
Loading