From a706435902620431cbd34c24a9428b2e66041833 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 28 Sep 2023 15:06:37 +0530 Subject: [PATCH 01/10] feat: added crm task doctype --- crm/fcrm/doctype/crm_task/__init__.py | 0 crm/fcrm/doctype/crm_task/crm_task.js | 8 ++ crm/fcrm/doctype/crm_task/crm_task.json | 104 +++++++++++++++++++++ crm/fcrm/doctype/crm_task/crm_task.py | 9 ++ crm/fcrm/doctype/crm_task/test_crm_task.py | 9 ++ 5 files changed, 130 insertions(+) create mode 100644 crm/fcrm/doctype/crm_task/__init__.py create mode 100644 crm/fcrm/doctype/crm_task/crm_task.js create mode 100644 crm/fcrm/doctype/crm_task/crm_task.json create mode 100644 crm/fcrm/doctype/crm_task/crm_task.py create mode 100644 crm/fcrm/doctype/crm_task/test_crm_task.py diff --git a/crm/fcrm/doctype/crm_task/__init__.py b/crm/fcrm/doctype/crm_task/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/crm/fcrm/doctype/crm_task/crm_task.js b/crm/fcrm/doctype/crm_task/crm_task.js new file mode 100644 index 00000000..8357f6e3 --- /dev/null +++ b/crm/fcrm/doctype/crm_task/crm_task.js @@ -0,0 +1,8 @@ +// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("CRM Task", { +// refresh(frm) { + +// }, +// }); diff --git a/crm/fcrm/doctype/crm_task/crm_task.json b/crm/fcrm/doctype/crm_task/crm_task.json new file mode 100644 index 00000000..cf7dbe52 --- /dev/null +++ b/crm/fcrm/doctype/crm_task/crm_task.json @@ -0,0 +1,104 @@ +{ + "actions": [], + "autoname": "autoincrement", + "creation": "2023-09-28 15:04:28.084159", + "default_view": "List", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "priority", + "start_date", + "lead", + "column_break_cqua", + "assigned_to", + "status", + "due_date", + "section_break_bzhd", + "description" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Title", + "reqd": 1 + }, + { + "fieldname": "priority", + "fieldtype": "Select", + "label": "Priority", + "options": "Low\nMedium\nHigh" + }, + { + "fieldname": "start_date", + "fieldtype": "Date", + "label": "Start Date" + }, + { + "fieldname": "column_break_cqua", + "fieldtype": "Column Break" + }, + { + "fieldname": "assigned_to", + "fieldtype": "Link", + "label": "Assigned To", + "options": "User" + }, + { + "fieldname": "status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Status", + "options": "Backlog\nTodo\nIn Progress\nDone\nCanceled" + }, + { + "fieldname": "due_date", + "fieldtype": "Date", + "label": "Due Date" + }, + { + "fieldname": "section_break_bzhd", + "fieldtype": "Section Break" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "label": "Description" + }, + { + "fieldname": "lead", + "fieldtype": "Link", + "label": "Lead", + "options": "CRM Lead" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2023-09-28 15:05:27.986420", + "modified_by": "Administrator", + "module": "FCRM", + "name": "CRM Task", + "naming_rule": "Autoincrement", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/crm/fcrm/doctype/crm_task/crm_task.py b/crm/fcrm/doctype/crm_task/crm_task.py new file mode 100644 index 00000000..325843cc --- /dev/null +++ b/crm/fcrm/doctype/crm_task/crm_task.py @@ -0,0 +1,9 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class CRMTask(Document): + pass diff --git a/crm/fcrm/doctype/crm_task/test_crm_task.py b/crm/fcrm/doctype/crm_task/test_crm_task.py new file mode 100644 index 00000000..f8316336 --- /dev/null +++ b/crm/fcrm/doctype/crm_task/test_crm_task.py @@ -0,0 +1,9 @@ +# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCRMTask(FrappeTestCase): + pass From ca0a4e0f26174fd1f8071f0dfe2dd1a021f6175f Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 28 Sep 2023 15:13:44 +0530 Subject: [PATCH 02/10] fix: added tasks tab in lead/deal --- frontend/src/components/Activities.vue | 6 ++++++ frontend/src/pages/Deal.vue | 5 +++++ frontend/src/pages/Lead.vue | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/frontend/src/components/Activities.vue b/frontend/src/components/Activities.vue index 2ffde9a1..339e0d57 100644 --- a/frontend/src/components/Activities.vue +++ b/frontend/src/components/Activities.vue @@ -476,6 +476,7 @@ label="Send email" @click="$refs.emailBox.show = true" /> + - +
@@ -65,6 +77,28 @@
+
+
+
+
+
+ +
+
+
+ {{ task.title }} +
+
+
+
@@ -468,7 +502,7 @@ v-else-if="title == 'Notes'" variant="solid" label="Create note" - @click="showNote" + @click="showNote()" />
+ diff --git a/frontend/src/components/Icons/TaskStatusIcon.vue b/frontend/src/components/Icons/TaskStatusIcon.vue new file mode 100644 index 00000000..c7ed07b1 --- /dev/null +++ b/frontend/src/components/Icons/TaskStatusIcon.vue @@ -0,0 +1,54 @@ + + diff --git a/frontend/src/components/TaskModal.vue b/frontend/src/components/TaskModal.vue new file mode 100644 index 00000000..8c8da2d5 --- /dev/null +++ b/frontend/src/components/TaskModal.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/frontend/src/components/UserAvatar.vue b/frontend/src/components/UserAvatar.vue index 0200e15e..eb44bde4 100644 --- a/frontend/src/components/UserAvatar.vue +++ b/frontend/src/components/UserAvatar.vue @@ -1,6 +1,5 @@ diff --git a/frontend/src/components/TaskModal.vue b/frontend/src/components/TaskModal.vue index 8c8da2d5..7be749c9 100644 --- a/frontend/src/components/TaskModal.vue +++ b/frontend/src/components/TaskModal.vue @@ -37,7 +37,7 @@ />
- +