From d95aa9ee0744b5394f62a53091e2c5258755fd43 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 29 Jan 2024 19:37:41 +0530 Subject: [PATCH] feat: added notification doctype --- crm/fcrm/doctype/crm_notification/__init__.py | 0 .../crm_notification/crm_notification.js | 8 ++ .../crm_notification/crm_notification.json | 115 ++++++++++++++++++ .../crm_notification/crm_notification.py | 9 ++ .../crm_notification/test_crm_notification.py | 9 ++ 5 files changed, 141 insertions(+) create mode 100644 crm/fcrm/doctype/crm_notification/__init__.py create mode 100644 crm/fcrm/doctype/crm_notification/crm_notification.js create mode 100644 crm/fcrm/doctype/crm_notification/crm_notification.json create mode 100644 crm/fcrm/doctype/crm_notification/crm_notification.py create mode 100644 crm/fcrm/doctype/crm_notification/test_crm_notification.py diff --git a/crm/fcrm/doctype/crm_notification/__init__.py b/crm/fcrm/doctype/crm_notification/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/crm/fcrm/doctype/crm_notification/crm_notification.js b/crm/fcrm/doctype/crm_notification/crm_notification.js new file mode 100644 index 00000000..5df45561 --- /dev/null +++ b/crm/fcrm/doctype/crm_notification/crm_notification.js @@ -0,0 +1,8 @@ +// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("CRM Notification", { +// refresh(frm) { + +// }, +// }); diff --git a/crm/fcrm/doctype/crm_notification/crm_notification.json b/crm/fcrm/doctype/crm_notification/crm_notification.json new file mode 100644 index 00000000..9ddb2cff --- /dev/null +++ b/crm/fcrm/doctype/crm_notification/crm_notification.json @@ -0,0 +1,115 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2024-01-29 19:31:13.613929", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "from_user", + "type", + "column_break_dduu", + "to_user", + "comment", + "read", + "section_break_vpwa", + "message" + ], + "fields": [ + { + "fieldname": "from_user", + "fieldtype": "Link", + "label": "From User", + "options": "User" + }, + { + "fieldname": "type", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Type", + "options": "Mention", + "reqd": 1 + }, + { + "fieldname": "column_break_dduu", + "fieldtype": "Column Break" + }, + { + "fieldname": "to_user", + "fieldtype": "Link", + "in_list_view": 1, + "label": "To User", + "options": "User", + "reqd": 1 + }, + { + "fieldname": "comment", + "fieldtype": "Link", + "label": "Comment", + "link_filters": "[[{\"fieldname\":\"comment\",\"field_option\":\"Comment\"},\"comment_type\",\"=\",\"Comment\"]]", + "options": "Comment" + }, + { + "default": "0", + "fieldname": "read", + "fieldtype": "Check", + "label": "Read" + }, + { + "fieldname": "section_break_vpwa", + "fieldtype": "Section Break" + }, + { + "fieldname": "message", + "fieldtype": "Text Editor", + "label": "Message" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2024-01-29 19:36:19.466742", + "modified_by": "Administrator", + "module": "FCRM", + "name": "CRM Notification", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/crm/fcrm/doctype/crm_notification/crm_notification.py b/crm/fcrm/doctype/crm_notification/crm_notification.py new file mode 100644 index 00000000..9470101f --- /dev/null +++ b/crm/fcrm/doctype/crm_notification/crm_notification.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class CRMNotification(Document): + pass diff --git a/crm/fcrm/doctype/crm_notification/test_crm_notification.py b/crm/fcrm/doctype/crm_notification/test_crm_notification.py new file mode 100644 index 00000000..e643a91d --- /dev/null +++ b/crm/fcrm/doctype/crm_notification/test_crm_notification.py @@ -0,0 +1,9 @@ +# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestCRMNotification(FrappeTestCase): + pass