diff --git a/crm/fcrm/doctype/crm_task/crm_task.py b/crm/fcrm/doctype/crm_task/crm_task.py index 325843cc..c244ba73 100644 --- a/crm/fcrm/doctype/crm_task/crm_task.py +++ b/crm/fcrm/doctype/crm_task/crm_task.py @@ -6,4 +6,55 @@ from frappe.model.document import Document class CRMTask(Document): - pass + @staticmethod + def default_list_data(): + columns = [ + { + 'label': 'Title', + 'type': 'Data', + 'key': 'title', + 'width': '12rem', + }, + { + '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", + "modified", + ] + return {'columns': columns, 'rows': rows} diff --git a/frontend/src/components/ListViews/TasksListView.vue b/frontend/src/components/ListViews/TasksListView.vue new file mode 100644 index 00000000..b6e9f1ce --- /dev/null +++ b/frontend/src/components/ListViews/TasksListView.vue @@ -0,0 +1,164 @@ + + + + + + + + + + {{ dateFormat(item, 'D MMM') }} + + + + + + + + + + + + + + + + + {{ item.timeAgo }} + + + + + + + + + + + + + + + + diff --git a/frontend/src/pages/Tasks.vue b/frontend/src/pages/Tasks.vue new file mode 100644 index 00000000..2a5c11eb --- /dev/null +++ b/frontend/src/pages/Tasks.vue @@ -0,0 +1,106 @@ + + + + + + + + + + + + + loadMore++" + @showTask="showTask" + @reload="() => tasks.reload()" + /> + + + + No Tasks Found + + + + + +