diff --git a/crm/api/doc.py b/crm/api/doc.py index bbafda0f7..e3c8acc42 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -41,6 +41,7 @@ def get_filterable_fields(doctype: str): "Float", "Int", "Currency", + "Dynamic Link", "Link", "Long Text", "Select", diff --git a/crm/fcrm/doctype/crm_task/crm_task.py b/crm/fcrm/doctype/crm_task/crm_task.py index 325843cc0..1559ff3e0 100644 --- a/crm/fcrm/doctype/crm_task/crm_task.py +++ b/crm/fcrm/doctype/crm_task/crm_task.py @@ -6,4 +6,57 @@ class CRMTask(Document): - pass + @staticmethod + def default_list_data(): + columns = [ + { + 'label': 'Title', + 'type': 'Data', + 'key': 'title', + 'width': '16rem', + }, + { + 'label': 'Status', + 'type': 'Select', + 'key': 'status', + 'width': '8rem', + }, + { + 'label': 'Priority', + 'type': 'Select', + 'key': 'priority', + 'width': '8rem', + }, + { + 'label': 'Due Date', + 'type': 'Date', + 'key': 'due_date', + 'width': '8rem', + }, + { + 'label': 'Assigned To', + 'type': 'Link', + 'key': 'assigned_to', + 'width': '10rem', + }, + { + 'label': 'Last Modified', + 'type': 'Datetime', + 'key': 'modified', + 'width': '8rem', + }, + ] + + rows = [ + "name", + "title", + "description", + "assigned_to", + "due_date", + "status", + "priority", + "reference_doctype", + "reference_docname", + "modified", + ] + return {'columns': columns, 'rows': rows} diff --git a/frontend/src/components/Filter.vue b/frontend/src/components/Filter.vue index f643d8885..d9a6ea38e 100644 --- a/frontend/src/components/Filter.vue +++ b/frontend/src/components/Filter.vue @@ -103,7 +103,7 @@ import { FormControl, Autocomplete, createResource } from 'frappe-ui' import { h, defineModel, computed } from 'vue' const typeCheck = ['Check'] -const typeLink = ['Link'] +const typeLink = ['Link', 'Dynamic Link'] const typeNumber = ['Float', 'Int', 'Currency', 'Percent'] const typeSelect = ['Select'] const typeString = ['Data', 'Long Text', 'Small Text', 'Text Editor', 'Text'] @@ -324,6 +324,9 @@ function getValSelect(f) { })), }) } else if (typeLink.includes(fieldtype)) { + if (field.fieldtype === 'Dynamic Link') { + return h(FormControl, { type: 'text' }) + } return h(Link, { class: 'form-control', doctype: options }) } else if (typeNumber.includes(fieldtype)) { return h(FormControl, { type: 'number' }) diff --git a/frontend/src/components/Layouts/AppSidebar.vue b/frontend/src/components/Layouts/AppSidebar.vue index aff93339a..615823ac8 100644 --- a/frontend/src/components/Layouts/AppSidebar.vue +++ b/frontend/src/components/Layouts/AppSidebar.vue @@ -105,6 +105,7 @@ import DealsIcon from '@/components/Icons/DealsIcon.vue' import ContactsIcon from '@/components/Icons/ContactsIcon.vue' import OrganizationsIcon from '@/components/Icons/OrganizationsIcon.vue' import NoteIcon from '@/components/Icons/NoteIcon.vue' +import TaskIcon from '@/components/Icons/TaskIcon.vue' import PhoneIcon from '@/components/Icons/PhoneIcon.vue' import CollapseSidebar from '@/components/Icons/CollapseSidebar.vue' import NotificationsIcon from '@/components/Icons/NotificationsIcon.vue' @@ -146,6 +147,11 @@ const links = [ icon: NoteIcon, to: 'Notes', }, + { + label: 'Tasks', + icon: TaskIcon, + to: 'Tasks', + }, { label: 'Call Logs', icon: PhoneIcon, diff --git a/frontend/src/components/ListViews/TasksListView.vue b/frontend/src/components/ListViews/TasksListView.vue new file mode 100644 index 000000000..b6e9f1ced --- /dev/null +++ b/frontend/src/components/ListViews/TasksListView.vue @@ -0,0 +1,164 @@ + + diff --git a/frontend/src/components/Modals/TaskModal.vue b/frontend/src/components/Modals/TaskModal.vue index e5439860a..ee6326814 100644 --- a/frontend/src/components/Modals/TaskModal.vue +++ b/frontend/src/components/Modals/TaskModal.vue @@ -13,6 +13,24 @@ ], }" > +