fix: cannot delete contact, acivity & organization
This commit is contained in:
parent
59f537a037
commit
ff9f5fdd91
@ -1 +1 @@
|
||||
Subproject commit 2898a0bdd1a07433e5f6adedb42786177c473d50
|
||||
Subproject commit 36c449dc9acb676f2e6afd2b8af48e936bcdde8d
|
||||
@ -138,7 +138,7 @@
|
||||
label: 'Delete',
|
||||
theme: 'red',
|
||||
variant: 'solid',
|
||||
onClick({ close }) {
|
||||
onClick(close) {
|
||||
deleteTask(task.name)
|
||||
close()
|
||||
},
|
||||
|
||||
@ -299,12 +299,11 @@ async function deleteContact() {
|
||||
label: 'Delete',
|
||||
theme: 'red',
|
||||
variant: 'solid',
|
||||
async onClick({ close }) {
|
||||
async onClick(close) {
|
||||
await call('frappe.client.delete', {
|
||||
doctype: 'Contact',
|
||||
name: props.contactId,
|
||||
})
|
||||
contacts.reload()
|
||||
close()
|
||||
router.push({ name: 'Contacts' })
|
||||
},
|
||||
|
||||
@ -258,6 +258,7 @@ import {
|
||||
formatNumberIntoCurrency,
|
||||
} from '@/utils'
|
||||
import { h, computed, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const props = defineProps({
|
||||
organizationId: {
|
||||
@ -271,6 +272,8 @@ const { getLeadStatus, getDealStatus } = statusesStore()
|
||||
const showOrganizationModal = ref(false)
|
||||
const detailMode = ref(false)
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const organization = computed(() => getOrganization(props.organizationId))
|
||||
|
||||
const breadcrumbs = computed(() => {
|
||||
@ -311,13 +314,13 @@ async function deleteOrganization() {
|
||||
label: 'Delete',
|
||||
theme: 'red',
|
||||
variant: 'solid',
|
||||
async onClick({ close }) {
|
||||
async onClick(close) {
|
||||
await call('frappe.client.delete', {
|
||||
doctype: 'CRM Organization',
|
||||
name: props.organizationId,
|
||||
})
|
||||
organizations.reload()
|
||||
close()
|
||||
router.push({ name: 'Organizations' })
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user