fix: reload contacts on lead/deal create/update
This commit is contained in:
parent
b8c43e2391
commit
4f23fa62c0
@ -53,11 +53,13 @@ import {
|
||||
call,
|
||||
} from 'frappe-ui'
|
||||
import { usersStore } from '@/stores/users'
|
||||
import { contactsStore } from '@/stores/contacts'
|
||||
import { computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const { getUser } = usersStore()
|
||||
const { contacts } = contactsStore()
|
||||
|
||||
const props = defineProps({
|
||||
callLogId: {
|
||||
@ -139,6 +141,7 @@ async function createLead() {
|
||||
if (d.name) {
|
||||
await update_call_log(d.name)
|
||||
await update_note(d.name)
|
||||
contacts.reload()
|
||||
router.push({ name: 'Lead', params: { leadId: d.name } })
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ import LayoutHeader from '@/components/LayoutHeader.vue'
|
||||
import Breadcrumbs from '@/components/Breadcrumbs.vue'
|
||||
import SortIcon from '@/components/Icons/SortIcon.vue'
|
||||
import FilterIcon from '@/components/Icons/FilterIcon.vue'
|
||||
import { FeatherIcon, Button, Dropdown, createListResource } from 'frappe-ui'
|
||||
import { FeatherIcon, Button, Dropdown } from 'frappe-ui'
|
||||
import { ref, computed } from 'vue'
|
||||
import { contactsStore } from '@/stores/contacts.js'
|
||||
|
||||
|
||||
@ -312,6 +312,7 @@ import {
|
||||
openWebsite,
|
||||
} from '@/utils'
|
||||
import { usersStore } from '@/stores/users'
|
||||
import { contactsStore } from '@/stores/contacts'
|
||||
import {
|
||||
createResource,
|
||||
createDocumentResource,
|
||||
@ -327,6 +328,7 @@ import {
|
||||
import { ref, computed, inject } from 'vue'
|
||||
|
||||
const { getUser, users } = usersStore()
|
||||
const { contacts } = contactsStore()
|
||||
|
||||
const makeCall = inject('makeOutgoingCall')
|
||||
|
||||
@ -350,6 +352,7 @@ const uDeal = createDocumentResource({
|
||||
setValue: {
|
||||
onSuccess: () => {
|
||||
deal.reload()
|
||||
contacts.reload()
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@ -302,6 +302,7 @@ import {
|
||||
openWebsite,
|
||||
} from '@/utils'
|
||||
import { usersStore } from '@/stores/users'
|
||||
import { contactsStore } from '@/stores/contacts'
|
||||
import {
|
||||
createResource,
|
||||
createDocumentResource,
|
||||
@ -318,6 +319,7 @@ import { ref, computed, inject } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const { getUser, users } = usersStore()
|
||||
const { contacts } = contactsStore()
|
||||
const router = useRouter()
|
||||
|
||||
const makeCall = inject('makeOutgoingCall')
|
||||
@ -342,6 +344,7 @@ const uLead = createDocumentResource({
|
||||
setValue: {
|
||||
onSuccess: () => {
|
||||
lead.reload()
|
||||
contacts.reload()
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user