commit
02bb3d9413
@ -287,7 +287,13 @@ import { globalStore } from '@/stores/global'
|
||||
import { viewsStore } from '@/stores/views'
|
||||
import { usersStore } from '@/stores/users'
|
||||
import { isEmoji } from '@/utils'
|
||||
import { createResource, Dropdown, call, FeatherIcon } from 'frappe-ui'
|
||||
import {
|
||||
createResource,
|
||||
Dropdown,
|
||||
call,
|
||||
FeatherIcon,
|
||||
usePageMeta,
|
||||
} from 'frappe-ui'
|
||||
import { computed, ref, onMounted, watch, h, markRaw } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useDebounceFn } from '@vueuse/core'
|
||||
@ -356,6 +362,19 @@ const currentView = computed(() => {
|
||||
label:
|
||||
_view?.label || props.options?.defaultViewName || getViewType().label,
|
||||
icon: _view?.icon || getViewType().icon,
|
||||
is_default: !_view || _view.is_default,
|
||||
}
|
||||
})
|
||||
|
||||
usePageMeta(() => {
|
||||
let label = currentView.value.label
|
||||
if (currentView.value.is_default) {
|
||||
let routeName = route.name
|
||||
label = `${routeName} - ${label}`
|
||||
}
|
||||
return {
|
||||
title: label,
|
||||
emoji: isEmoji(currentView.value.icon) ? currentView.value.icon : '',
|
||||
}
|
||||
})
|
||||
|
||||
@ -799,7 +818,7 @@ async function updateKanbanSettings(data) {
|
||||
}
|
||||
|
||||
function loadMoreKanban(columnName) {
|
||||
let columns = list.value.data.kanban_columns || "[]"
|
||||
let columns = list.value.data.kanban_columns || '[]'
|
||||
|
||||
if (typeof columns === 'string') {
|
||||
columns = JSON.parse(columns)
|
||||
|
||||
@ -224,6 +224,7 @@ import {
|
||||
Tabs,
|
||||
call,
|
||||
createResource,
|
||||
usePageMeta,
|
||||
} from 'frappe-ui'
|
||||
import Dropdown from '@/components/frappe-ui/Dropdown.vue'
|
||||
import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||
@ -268,6 +269,22 @@ const showContactModal = ref(false)
|
||||
const showQuickEntryModal = ref(false)
|
||||
const detailMode = ref(false)
|
||||
|
||||
const contact = createResource({
|
||||
url: 'crm.api.contact.get_contact',
|
||||
cache: ['contact', props.contactId],
|
||||
params: {
|
||||
name: props.contactId,
|
||||
},
|
||||
auto: true,
|
||||
transform: (data) => {
|
||||
return {
|
||||
...data,
|
||||
actual_mobile_no: data.mobile_no,
|
||||
mobile_no: data.mobile_no,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const breadcrumbs = computed(() => {
|
||||
let items = [{ label: __('Contacts'), route: { name: 'Contacts' } }]
|
||||
items.push({
|
||||
@ -277,6 +294,13 @@ const breadcrumbs = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
usePageMeta(() => {
|
||||
return {
|
||||
title: contact.data?.full_name || contact.data?.name,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function validateFile(file) {
|
||||
let extn = file.name.split('.').pop().toLowerCase()
|
||||
if (!['png', 'jpg', 'jpeg'].includes(extn)) {
|
||||
@ -325,22 +349,6 @@ const tabs = [
|
||||
},
|
||||
]
|
||||
|
||||
const contact = createResource({
|
||||
url: 'crm.api.contact.get_contact',
|
||||
cache: ['contact', props.contactId],
|
||||
params: {
|
||||
name: props.contactId,
|
||||
},
|
||||
auto: true,
|
||||
transform: (data) => {
|
||||
return {
|
||||
...data,
|
||||
actual_mobile_no: data.mobile_no,
|
||||
mobile_no: data.mobile_no,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const deals = createResource({
|
||||
url: 'crm.api.contact.get_linked_deals',
|
||||
cache: ['deals', props.contactId],
|
||||
|
||||
@ -350,6 +350,7 @@ import {
|
||||
Tabs,
|
||||
Breadcrumbs,
|
||||
call,
|
||||
usePageMeta,
|
||||
} from 'frappe-ui'
|
||||
import { ref, computed, h, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
@ -458,6 +459,12 @@ const breadcrumbs = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
usePageMeta(() => {
|
||||
return {
|
||||
title: organization.value?.name || deal.data?.name,
|
||||
}
|
||||
})
|
||||
|
||||
const tabIndex = ref(0)
|
||||
const tabs = computed(() => {
|
||||
let tabOptions = [
|
||||
|
||||
@ -322,6 +322,7 @@ import {
|
||||
Switch,
|
||||
Breadcrumbs,
|
||||
call,
|
||||
usePageMeta,
|
||||
} from 'frappe-ui'
|
||||
import { ref, computed, onMounted, watch } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
@ -426,6 +427,12 @@ const breadcrumbs = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
usePageMeta(() => {
|
||||
return {
|
||||
title: lead.data?.lead_name || lead.data?.name,
|
||||
}
|
||||
})
|
||||
|
||||
const tabIndex = ref(0)
|
||||
|
||||
const tabs = computed(() => {
|
||||
|
||||
@ -235,6 +235,7 @@ import {
|
||||
call,
|
||||
createListResource,
|
||||
createDocumentResource,
|
||||
usePageMeta,
|
||||
} from 'frappe-ui'
|
||||
import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||
import OrganizationModal from '@/components/Modals/OrganizationModal.vue'
|
||||
@ -295,6 +296,12 @@ const breadcrumbs = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
usePageMeta(() => {
|
||||
return {
|
||||
title: props.organizationId,
|
||||
}
|
||||
})
|
||||
|
||||
function validateFile(file) {
|
||||
let extn = file.name.split('.').pop().toLowerCase()
|
||||
if (!['png', 'jpg', 'jpeg'].includes(extn)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user