diff --git a/crm/fcrm/doctype/crm_organization/crm_organization.py b/crm/fcrm/doctype/crm_organization/crm_organization.py index 5933eabf..1cdae09c 100644 --- a/crm/fcrm/doctype/crm_organization/crm_organization.py +++ b/crm/fcrm/doctype/crm_organization/crm_organization.py @@ -6,4 +6,59 @@ from frappe.model.document import Document class CRMOrganization(Document): - pass + @staticmethod + def sort_options(): + return [ + { "label": 'Created', "value": 'creation' }, + { "label": 'Modified', "value": 'modified' }, + { "label": 'Name', "value": 'name' }, + { "label": 'Website', "value": 'website' }, + { "label": 'Amount', "value": 'annual_revenue' }, + { "label": 'Industry', "value": 'industry' }, + ] + + @staticmethod + def default_list_data(): + columns = [ + { + 'label': 'Organization', + 'type': 'Data', + 'key': 'organization_name', + 'width': '16rem', + }, + { + 'label': 'Website', + 'type': 'Data', + 'key': 'website', + 'width': '14rem', + }, + { + 'label': 'Industry', + 'type': 'Link', + 'key': 'industry', + 'options': 'CRM Industry', + 'width': '14rem', + }, + { + 'label': 'Annual Revenue', + 'type': 'Currency', + 'key': 'annual_revenue', + 'width': '14rem', + }, + { + 'label': 'Last modified', + 'type': 'Datetime', + 'key': 'modified', + 'width': '8rem', + }, + ] + rows = [ + "name", + "organization_name", + "organization_logo", + "website", + "industry", + "annual_revenue", + "modified", + ] + return {'columns': columns, 'rows': rows} diff --git a/frontend/src/components/ListViews/OrganizationsListView.vue b/frontend/src/components/ListViews/OrganizationsListView.vue index 7beba8cc..488438e6 100644 --- a/frontend/src/components/ListViews/OrganizationsListView.vue +++ b/frontend/src/components/ListViews/OrganizationsListView.vue @@ -22,7 +22,7 @@ >