fix: organization page
This commit is contained in:
parent
c4d8dbad88
commit
458cf78ac2
@ -21,7 +21,7 @@
|
|||||||
<div v-if="column.key === 'deal_status'">
|
<div v-if="column.key === 'deal_status'">
|
||||||
<IndicatorIcon :class="item.color" />
|
<IndicatorIcon :class="item.color" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="column.key === 'organization_name'">
|
<div v-else-if="column.key === 'organization'">
|
||||||
<Avatar
|
<Avatar
|
||||||
v-if="item.label"
|
v-if="item.label"
|
||||||
class="flex items-center"
|
class="flex items-center"
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="column.key === 'organization_name'">
|
<div v-else-if="column.key === 'organization'">
|
||||||
<Avatar
|
<Avatar
|
||||||
v-if="item.label"
|
v-if="item.label"
|
||||||
class="flex items-center"
|
class="flex items-center"
|
||||||
|
|||||||
@ -289,8 +289,7 @@ const leads = createListResource({
|
|||||||
'first_name',
|
'first_name',
|
||||||
'lead_name',
|
'lead_name',
|
||||||
'image',
|
'image',
|
||||||
'organization_name',
|
'organization',
|
||||||
'organization_logo',
|
|
||||||
'status',
|
'status',
|
||||||
'email',
|
'email',
|
||||||
'mobile_no',
|
'mobile_no',
|
||||||
@ -298,7 +297,7 @@ const leads = createListResource({
|
|||||||
'modified',
|
'modified',
|
||||||
],
|
],
|
||||||
filters: {
|
filters: {
|
||||||
organization_name: props.organization.name,
|
organization: props.organization.name,
|
||||||
is_deal: 0,
|
is_deal: 0,
|
||||||
},
|
},
|
||||||
orderBy: 'modified desc',
|
orderBy: 'modified desc',
|
||||||
@ -312,8 +311,7 @@ const deals = createListResource({
|
|||||||
cache: ['deals', props.organization.name],
|
cache: ['deals', props.organization.name],
|
||||||
fields: [
|
fields: [
|
||||||
'name',
|
'name',
|
||||||
'organization_name',
|
'organization',
|
||||||
'organization_logo',
|
|
||||||
'annual_revenue',
|
'annual_revenue',
|
||||||
'deal_status',
|
'deal_status',
|
||||||
'email',
|
'email',
|
||||||
@ -322,7 +320,7 @@ const deals = createListResource({
|
|||||||
'modified',
|
'modified',
|
||||||
],
|
],
|
||||||
filters: {
|
filters: {
|
||||||
organization_name: props.organization.name,
|
organization: props.organization.name,
|
||||||
is_deal: 1,
|
is_deal: 1,
|
||||||
},
|
},
|
||||||
orderBy: 'modified desc',
|
orderBy: 'modified desc',
|
||||||
@ -334,7 +332,15 @@ const contacts = createListResource({
|
|||||||
type: 'list',
|
type: 'list',
|
||||||
doctype: 'Contact',
|
doctype: 'Contact',
|
||||||
cache: ['contacts', props.organization.name],
|
cache: ['contacts', props.organization.name],
|
||||||
fields: ['name', 'email_id', 'mobile_no', 'company_name', 'modified'],
|
fields: [
|
||||||
|
'name',
|
||||||
|
'full_name',
|
||||||
|
'image',
|
||||||
|
'email_id',
|
||||||
|
'mobile_no',
|
||||||
|
'company_name',
|
||||||
|
'modified',
|
||||||
|
],
|
||||||
filters: {
|
filters: {
|
||||||
company_name: props.organization.name,
|
company_name: props.organization.name,
|
||||||
},
|
},
|
||||||
@ -374,9 +380,9 @@ function getLeadRowObject(lead) {
|
|||||||
image: lead.image,
|
image: lead.image,
|
||||||
image_label: lead.first_name,
|
image_label: lead.first_name,
|
||||||
},
|
},
|
||||||
organization_name: {
|
organization: {
|
||||||
label: lead.organization_name,
|
label: lead.organization,
|
||||||
logo: lead.organization_logo,
|
logo: props.organization?.organization_logo,
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
label: lead.status,
|
label: lead.status,
|
||||||
@ -398,9 +404,9 @@ function getLeadRowObject(lead) {
|
|||||||
function getDealRowObject(deal) {
|
function getDealRowObject(deal) {
|
||||||
return {
|
return {
|
||||||
name: deal.name,
|
name: deal.name,
|
||||||
organization_name: {
|
organization: {
|
||||||
label: deal.organization_name,
|
label: deal.organization,
|
||||||
logo: deal.organization_logo,
|
logo: props.organization?.organization_logo,
|
||||||
},
|
},
|
||||||
annual_revenue: formatNumberIntoCurrency(deal.annual_revenue),
|
annual_revenue: formatNumberIntoCurrency(deal.annual_revenue),
|
||||||
deal_status: {
|
deal_status: {
|
||||||
@ -449,7 +455,7 @@ const leadColumns = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Organization',
|
label: 'Organization',
|
||||||
key: 'organization_name',
|
key: 'organization',
|
||||||
width: '10rem',
|
width: '10rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -482,7 +488,7 @@ const leadColumns = [
|
|||||||
const dealColumns = [
|
const dealColumns = [
|
||||||
{
|
{
|
||||||
label: 'Organization',
|
label: 'Organization',
|
||||||
key: 'organization_name',
|
key: 'organization',
|
||||||
width: '11rem',
|
width: '11rem',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -546,8 +552,8 @@ const contactColumns = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
function reload(val) {
|
function reload(val) {
|
||||||
leads.filters.organization_name = val
|
leads.filters.organization = val
|
||||||
deals.filters.organization_name = val
|
deals.filters.organization = val
|
||||||
contacts.filters.company_name = val
|
contacts.filters.company_name = val
|
||||||
leads.reload()
|
leads.reload()
|
||||||
deals.reload()
|
deals.reload()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user