diff --git a/frontend/src/pages/Organization.vue b/frontend/src/pages/Organization.vue
index d9b1e15f..9d3e311f 100644
--- a/frontend/src/pages/Organization.vue
+++ b/frontend/src/pages/Organization.vue
@@ -153,16 +153,6 @@
-
@@ -189,13 +179,6 @@
-
leads.data?.length),
- },
{
label: 'Deals',
icon: h(DealsIcon, { class: 'h-4 w-4' }),
@@ -364,31 +340,6 @@ const tabs = [
const { getUser } = usersStore()
-const leads = createListResource({
- type: 'list',
- doctype: 'CRM Lead',
- cache: ['leads', props.organizationId],
- fields: [
- 'name',
- 'first_name',
- 'lead_name',
- 'image',
- 'organization',
- 'status',
- 'email',
- 'mobile_no',
- 'lead_owner',
- 'modified',
- ],
- filters: {
- organization: props.organizationId,
- converted: 0,
- },
- orderBy: 'modified desc',
- pageLength: 20,
- auto: true,
-})
-
const deals = createListResource({
type: 'list',
doctype: 'CRM Deal',
@@ -434,56 +385,19 @@ const contacts = createListResource({
const rows = computed(() => {
let list = []
- list = !tabIndex.value ? leads : tabIndex.value == 1 ? deals : contacts
+ list = !tabIndex.value ? deals : contacts
if (!list.data) return []
return list.data.map((row) => {
- return !tabIndex.value
- ? getLeadRowObject(row)
- : tabIndex.value == 1
- ? getDealRowObject(row)
- : getContactRowObject(row)
+ return !tabIndex.value ? getDealRowObject(row) : getContactRowObject(row)
})
})
const columns = computed(() => {
- return tabIndex.value === 0
- ? leadColumns
- : tabIndex.value === 1
- ? dealColumns
- : contactColumns
+ return tabIndex.value === 0 ? dealColumns : contactColumns
})
-function getLeadRowObject(lead) {
- return {
- name: lead.name,
- lead_name: {
- label: lead.lead_name,
- image: lead.image,
- image_label: lead.first_name,
- },
- organization: {
- label: lead.organization,
- logo: props.organization?.organization_logo,
- },
- status: {
- label: lead.status,
- color: getLeadStatus(lead.status)?.iconColorClass,
- },
- email: lead.email,
- mobile_no: lead.mobile_no,
- lead_owner: {
- label: lead.lead_owner && getUser(lead.lead_owner).full_name,
- ...(lead.lead_owner && getUser(lead.lead_owner)),
- },
- modified: {
- label: dateFormat(lead.modified, dateTooltipFormat),
- timeAgo: timeAgo(lead.modified),
- },
- }
-}
-
function getDealRowObject(deal) {
return {
name: deal.name,
@@ -530,44 +444,6 @@ function getContactRowObject(contact) {
}
}
-const leadColumns = [
- {
- label: 'Name',
- key: 'lead_name',
- width: '12rem',
- },
- {
- label: 'Organization',
- key: 'organization',
- width: '10rem',
- },
- {
- label: 'Status',
- key: 'status',
- width: '8rem',
- },
- {
- label: 'Email',
- key: 'email',
- width: '12rem',
- },
- {
- label: 'Mobile no',
- key: 'mobile_no',
- width: '11rem',
- },
- {
- label: 'Lead owner',
- key: 'lead_owner',
- width: '10rem',
- },
- {
- label: 'Last modified',
- key: 'modified',
- width: '8rem',
- },
-]
-
const dealColumns = [
{
label: 'Organization',
@@ -633,13 +509,4 @@ const contactColumns = [
width: '8rem',
},
]
-
-function reload(val) {
- leads.filters.organization = val
- deals.filters.organization = val
- contacts.filters.company_name = val
- leads.reload()
- deals.reload()
- contacts.reload()
-}