fix: add contact/delete contact in deal only reflect on refresh
This commit is contained in:
parent
ff9f5fdd91
commit
76b7890ecc
@ -425,13 +425,15 @@ function getParsedFields(sections) {
|
|||||||
let contactSection = {
|
let contactSection = {
|
||||||
label: 'Contacts',
|
label: 'Contacts',
|
||||||
opened: true,
|
opened: true,
|
||||||
contacts: deal.data?.contacts.map((contact) => {
|
contacts: computed(() =>
|
||||||
return {
|
deal.data?.contacts.map((contact) => {
|
||||||
name: contact.contact,
|
return {
|
||||||
is_primary: contact.is_primary,
|
name: contact.contact,
|
||||||
opened: false,
|
is_primary: contact.is_primary,
|
||||||
}
|
opened: false,
|
||||||
}),
|
}
|
||||||
|
})
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
return [...sections, contactSection]
|
return [...sections, contactSection]
|
||||||
@ -466,7 +468,6 @@ async function addContact(contact) {
|
|||||||
contact,
|
contact,
|
||||||
})
|
})
|
||||||
if (d) {
|
if (d) {
|
||||||
await contacts.reload()
|
|
||||||
deal.reload()
|
deal.reload()
|
||||||
createToast({
|
createToast({
|
||||||
title: 'Contact added',
|
title: 'Contact added',
|
||||||
@ -483,7 +484,6 @@ async function removeContact(contact) {
|
|||||||
})
|
})
|
||||||
if (d) {
|
if (d) {
|
||||||
deal.reload()
|
deal.reload()
|
||||||
contacts.reload()
|
|
||||||
createToast({
|
createToast({
|
||||||
title: 'Contact removed',
|
title: 'Contact removed',
|
||||||
icon: 'check',
|
icon: 'check',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user