fix: redirect to organization & deal was not working from contact page

This commit is contained in:
Shariq Ansari 2023-11-12 14:04:05 +05:30
parent d3d9caad5d
commit c40e3073b4

View File

@ -184,7 +184,7 @@
/> />
<DealsListView <DealsListView
class="mt-4" class="mt-4"
v-if="tab.label === 'Deals' && rows.length" v-else-if="tab.label === 'Deals' && rows.length"
:rows="rows" :rows="rows"
:columns="columns" :columns="columns"
/> />
@ -357,7 +357,7 @@ const leads = createListResource({
const deals = createListResource({ const deals = createListResource({
type: 'list', type: 'list',
doctype: 'CRM Lead', doctype: 'CRM Deal',
cache: ['deals', props.contactId], cache: ['deals', props.contactId],
fields: [ fields: [
'name', 'name',
@ -366,12 +366,11 @@ const deals = createListResource({
'status', 'status',
'email', 'email',
'mobile_no', 'mobile_no',
'lead_owner', 'deal_owner',
'modified', 'modified',
], ],
filters: { filters: {
email: contact.value?.email_id, email: contact.value?.email_id,
converted: 1,
}, },
orderBy: 'modified desc', orderBy: 'modified desc',
pageLength: 20, pageLength: 20,
@ -436,9 +435,9 @@ function getDealRowObject(deal) {
}, },
email: deal.email, email: deal.email,
mobile_no: deal.mobile_no, mobile_no: deal.mobile_no,
lead_owner: { deal_owner: {
label: deal.lead_owner && getUser(deal.lead_owner).full_name, label: deal.deal_owner && getUser(deal.deal_owner).full_name,
...(deal.lead_owner && getUser(deal.lead_owner)), ...(deal.deal_owner && getUser(deal.deal_owner)),
}, },
modified: { modified: {
label: dateFormat(deal.modified, dateTooltipFormat), label: dateFormat(deal.modified, dateTooltipFormat),
@ -512,8 +511,8 @@ const dealColumns = [
width: '11rem', width: '11rem',
}, },
{ {
label: 'Lead owner', label: 'Deal owner',
key: 'lead_owner', key: 'deal_owner',
width: '10rem', width: '10rem',
}, },
{ {
@ -629,7 +628,7 @@ const details = computed(() => {
link: (data) => { link: (data) => {
router.push({ router.push({
name: 'Organization', name: 'Organization',
params: { organizationId: data.value }, params: { organizationId: data },
}) })
}, },
}, },