1
0
forked from test/crm

fix: show company logo in listview

This commit is contained in:
Shariq Ansari 2023-07-25 16:32:45 +05:30
parent d346247e57
commit 99d0f682d5
3 changed files with 15 additions and 4 deletions

View File

@ -30,6 +30,7 @@
"section_break_uixv",
"organization_name",
"no_of_employees",
"organization_logo",
"column_break_dbsv",
"annual_revenue",
"industry"
@ -167,11 +168,16 @@
"fieldtype": "Link",
"label": "Industry",
"options": "CRM Industry"
},
{
"fieldname": "organization_logo",
"fieldtype": "Attach Image",
"label": "Organization Logo"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-07-24 19:43:16.008607",
"modified": "2023-07-25 16:20:30.468169",
"modified_by": "Administrator",
"module": "CRM",
"name": "CRM Lead",

View File

@ -78,6 +78,7 @@
<div v-else-if="column.type === 'logo'">
<Avatar
class="flex items-center"
:image="getValue(row[column.key]).logo"
:label="getValue(row[column.key]).label"
size="md"
shape="square"
@ -167,8 +168,8 @@ const viewsDropdownOptions = [
function getValue(value) {
if (typeof value === 'object') {
value.label = value.full_name
value.image = value.user_image
value.label = value.full_name || value.label
value.image = value.user_image || value.logo
return value
}
return {

View File

@ -19,6 +19,7 @@ const leads = createListResource({
'first_name',
'last_name',
'organization_name',
'organization_logo',
'status',
'email',
'mobile_no',
@ -74,7 +75,10 @@ const rows = computed(() => {
return leads.data?.map((lead) => {
return {
full_name: lead.first_name + ' ' + lead.last_name,
organization_name: lead.organization_name,
organization_name: {
label: lead.organization_name,
logo: lead.organization_logo,
},
status: {
label: lead.status,
color: indicatorColor[lead.status],