diff --git a/church/church/doctype/church_prayer_request/__init__.py b/church/church/doctype/church_prayer_request/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/church/church/doctype/church_prayer_request/church_prayer_request.js b/church/church/doctype/church_prayer_request/church_prayer_request.js new file mode 100644 index 0000000..99ab1ed --- /dev/null +++ b/church/church/doctype/church_prayer_request/church_prayer_request.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, meichthys and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Church Prayer Request", { +// refresh(frm) { + +// }, +// }); diff --git a/church/church/doctype/church_prayer_request/church_prayer_request.json b/church/church/doctype/church_prayer_request/church_prayer_request.json new file mode 100644 index 0000000..81e0164 --- /dev/null +++ b/church/church/doctype/church_prayer_request/church_prayer_request.json @@ -0,0 +1,103 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2025-09-13 00:16:52.698863", + "description": "A request for prayer from (or for) a `Church Person`.", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "status", + "type", + "column_break_ynvf", + "related_person", + "section_break_usaz", + "request", + "is_private" + ], + "fields": [ + { + "allow_in_quick_entry": 1, + "default": "Requested", + "fieldname": "status", + "fieldtype": "Link", + "in_filter": 1, + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Status", + "options": "Church Prayer Request Status", + "reqd": 1 + }, + { + "fieldname": "column_break_ynvf", + "fieldtype": "Column Break", + "placeholder": "If this request is for a specific person, select/add the person here." + }, + { + "allow_in_quick_entry": 1, + "description": "If this request is for a specific person, select/add the person here.", + "fieldname": "related_person", + "fieldtype": "Link", + "label": "Related Person", + "options": "Church Person" + }, + { + "fieldname": "section_break_usaz", + "fieldtype": "Section Break" + }, + { + "allow_in_quick_entry": 1, + "fieldname": "request", + "fieldtype": "Small Text", + "in_standard_filter": 1, + "label": "Request", + "reqd": 1 + }, + { + "allow_in_quick_entry": 1, + "default": "1", + "description": "Check this if you don't want this request shared with the church body.", + "fieldname": "is_private", + "fieldtype": "Check", + "in_standard_filter": 1, + "label": "Is Private" + }, + { + "allow_in_quick_entry": 1, + "fieldname": "type", + "fieldtype": "Link", + "label": "Type", + "options": "Church Prayer Request Type", + "reqd": 1 + } + ], + "grid_page_length": 50, + "index_web_pages_for_search": 1, + "links": [], + "modified": "2025-09-13 01:15:44.930709", + "modified_by": "Administrator", + "module": "Church", + "name": "Church Prayer Request", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "row_format": "Dynamic", + "sort_field": "modified", + "sort_order": "DESC", + "states": [], + "track_changes": 1, + "track_seen": 1, + "track_views": 1 +} \ No newline at end of file diff --git a/church/church/doctype/church_prayer_request/church_prayer_request.py b/church/church/doctype/church_prayer_request/church_prayer_request.py new file mode 100644 index 0000000..2962c16 --- /dev/null +++ b/church/church/doctype/church_prayer_request/church_prayer_request.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, meichthys and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class ChurchPrayerRequest(Document): + pass diff --git a/church/church/doctype/church_prayer_request/test_church_prayer_request.py b/church/church/doctype/church_prayer_request/test_church_prayer_request.py new file mode 100644 index 0000000..75a4192 --- /dev/null +++ b/church/church/doctype/church_prayer_request/test_church_prayer_request.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, meichthys and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestChurchPrayerRequest(FrappeTestCase): + pass diff --git a/church/church/doctype/church_prayer_request_status/__init__.py b/church/church/doctype/church_prayer_request_status/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/church/church/doctype/church_prayer_request_status/church_prayer_request_status.js b/church/church/doctype/church_prayer_request_status/church_prayer_request_status.js new file mode 100644 index 0000000..c807cfc --- /dev/null +++ b/church/church/doctype/church_prayer_request_status/church_prayer_request_status.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, meichthys and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Church Prayer Request Status", { +// refresh(frm) { + +// }, +// }); diff --git a/church/church/doctype/church_prayer_request_status/church_prayer_request_status.json b/church/church/doctype/church_prayer_request_status/church_prayer_request_status.json new file mode 100644 index 0000000..26cd70c --- /dev/null +++ b/church/church/doctype/church_prayer_request_status/church_prayer_request_status.json @@ -0,0 +1,59 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "format:{status}", + "creation": "2025-09-13 00:46:26.348653", + "description": "The state of a prayer request. (i.e. Requested, Answered, etc)", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "status", + "description" + ], + "fields": [ + { + "allow_in_quick_entry": 1, + "fieldname": "status", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Status", + "reqd": 1, + "unique": 1 + }, + { + "allow_in_quick_entry": 1, + "fieldname": "description", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Description" + } + ], + "grid_page_length": 50, + "index_web_pages_for_search": 1, + "links": [], + "modified": "2025-09-13 00:48:55.145870", + "modified_by": "Administrator", + "module": "Church", + "name": "Church Prayer Request Status", + "naming_rule": "Expression", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "row_format": "Dynamic", + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/church/church/doctype/church_prayer_request_status/church_prayer_request_status.py b/church/church/doctype/church_prayer_request_status/church_prayer_request_status.py new file mode 100644 index 0000000..be20279 --- /dev/null +++ b/church/church/doctype/church_prayer_request_status/church_prayer_request_status.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, meichthys and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class ChurchPrayerRequestStatus(Document): + pass diff --git a/church/church/doctype/church_prayer_request_status/test_church_prayer_request_status.py b/church/church/doctype/church_prayer_request_status/test_church_prayer_request_status.py new file mode 100644 index 0000000..fae6da3 --- /dev/null +++ b/church/church/doctype/church_prayer_request_status/test_church_prayer_request_status.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, meichthys and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestChurchPrayerRequestStatus(FrappeTestCase): + pass diff --git a/church/church/doctype/church_prayer_request_type/__init__.py b/church/church/doctype/church_prayer_request_type/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/church/church/doctype/church_prayer_request_type/church_prayer_request_type.js b/church/church/doctype/church_prayer_request_type/church_prayer_request_type.js new file mode 100644 index 0000000..b164cf2 --- /dev/null +++ b/church/church/doctype/church_prayer_request_type/church_prayer_request_type.js @@ -0,0 +1,8 @@ +// Copyright (c) 2025, meichthys and contributors +// For license information, please see license.txt + +// frappe.ui.form.on("Church Prayer Request Type", { +// refresh(frm) { + +// }, +// }); diff --git a/church/church/doctype/church_prayer_request_type/church_prayer_request_type.json b/church/church/doctype/church_prayer_request_type/church_prayer_request_type.json new file mode 100644 index 0000000..42674ec --- /dev/null +++ b/church/church/doctype/church_prayer_request_type/church_prayer_request_type.json @@ -0,0 +1,60 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "format:{type}", + "creation": "2025-09-13 01:12:32.154287", + "description": "The kind of prayer request (i.e. Praise, Health, Salvation, etc.)", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "type", + "description" + ], + "fields": [ + { + "allow_in_quick_entry": 1, + "fieldname": "type", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Type", + "reqd": 1, + "unique": 1 + }, + { + "allow_in_quick_entry": 1, + "fieldname": "description", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Description" + } + ], + "grid_page_length": 50, + "index_web_pages_for_search": 1, + "links": [], + "modified": "2025-09-13 01:31:21.501494", + "modified_by": "Administrator", + "module": "Church", + "name": "Church Prayer Request Type", + "naming_rule": "Expression", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "row_format": "Dynamic", + "sort_field": "modified", + "sort_order": "DESC", + "states": [] +} \ No newline at end of file diff --git a/church/church/doctype/church_prayer_request_type/church_prayer_request_type.py b/church/church/doctype/church_prayer_request_type/church_prayer_request_type.py new file mode 100644 index 0000000..6cfd9c4 --- /dev/null +++ b/church/church/doctype/church_prayer_request_type/church_prayer_request_type.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, meichthys and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class ChurchPrayerRequestType(Document): + pass diff --git a/church/church/doctype/church_prayer_request_type/test_church_prayer_request_type.py b/church/church/doctype/church_prayer_request_type/test_church_prayer_request_type.py new file mode 100644 index 0000000..73c4225 --- /dev/null +++ b/church/church/doctype/church_prayer_request_type/test_church_prayer_request_type.py @@ -0,0 +1,9 @@ +# Copyright (c) 2025, meichthys and Contributors +# See license.txt + +# import frappe +from frappe.tests.utils import FrappeTestCase + + +class TestChurchPrayerRequestType(FrappeTestCase): + pass diff --git a/church/church/onboarding_step/church_prayer_request/church_prayer_request.json b/church/church/onboarding_step/church_prayer_request/church_prayer_request.json new file mode 100644 index 0000000..ef7ff4e --- /dev/null +++ b/church/church/onboarding_step/church_prayer_request/church_prayer_request.json @@ -0,0 +1,20 @@ +{ + "action": "Create Entry", + "action_label": "Add Prayer Request", + "creation": "2025-09-13 01:20:43.693886", + "docstatus": 0, + "doctype": "Onboarding Step", + "idx": 0, + "is_complete": 0, + "is_single": 0, + "is_skipped": 0, + "modified": "2025-09-13 01:20:43.693886", + "modified_by": "Administrator", + "name": "Church Prayer Request", + "owner": "Administrator", + "reference_document": "Church Prayer Request", + "show_form_tour": 0, + "show_full_form": 1, + "title": "Add prayer requests", + "validate_action": 1 +} \ No newline at end of file diff --git a/church/fixtures/church_prayer_request_status.json b/church/fixtures/church_prayer_request_status.json new file mode 100644 index 0000000..930c45b --- /dev/null +++ b/church/fixtures/church_prayer_request_status.json @@ -0,0 +1,26 @@ +[ + { + "description": "The prayer request has been requested", + "docstatus": 0, + "doctype": "Church Prayer Request Status", + "modified": "2025-09-13 00:49:39.116401", + "name": "Requested", + "status": "Requested" + }, + { + "description": "The prayer request has been answered", + "docstatus": 0, + "doctype": "Church Prayer Request Status", + "modified": "2025-09-13 00:49:57.973400", + "name": "Answered", + "status": "Answered" + }, + { + "description": "The prayer request is being prayed for", + "docstatus": 0, + "doctype": "Church Prayer Request Status", + "modified": "2025-09-13 00:51:54.820822", + "name": "Intercession", + "status": "Intercession" + } +] \ No newline at end of file diff --git a/church/fixtures/church_prayer_request_type.json b/church/fixtures/church_prayer_request_type.json new file mode 100644 index 0000000..c0c652e --- /dev/null +++ b/church/fixtures/church_prayer_request_type.json @@ -0,0 +1,34 @@ +[ + { + "description": "A praise (not a request for prayer)", + "docstatus": 0, + "doctype": "Church Prayer Request Type", + "modified": "2025-09-13 01:26:17.502213", + "name": "Praise", + "type": "Praise" + }, + { + "description": "Related to the health of a `Church Person`", + "docstatus": 0, + "doctype": "Church Prayer Request Type", + "modified": "2025-09-13 01:26:40.182238", + "name": "Health", + "type": "Health" + }, + { + "description": "Related to an unspecified topic", + "docstatus": 0, + "doctype": "Church Prayer Request Type", + "modified": "2025-09-13 01:27:48.604973", + "name": "Unspoken", + "type": "Unspoken" + }, + { + "description": "Related to the salvation of a `Church Person`", + "docstatus": 0, + "doctype": "Church Prayer Request Type", + "modified": "2025-09-13 01:28:48.259192", + "name": "Salvation", + "type": "Salvation" + } +] \ No newline at end of file diff --git a/church/hooks.py b/church/hooks.py index c4625f3..03be528 100644 --- a/church/hooks.py +++ b/church/hooks.py @@ -93,9 +93,19 @@ fixtures = [ "dt": "Church Member Status Type", "filters": [["status", "in", ("Inactive", "Active")]], }, + { + "dt": "Church Prayer Request Status", + "filters": [["status", "in", ("Answered", "Intercession", "Requested")]], + }, + { + "dt": "Church Prayer Request Type", + "filters": [["type", "in", ("Health", "Praise", "Salvation", "Unspoken")]], + }, { "dt": "Church Role Type", - "filters": [["role", "in", ("Deacon", "Elder", "Pastor", "Secretary", "Treasurer")]], + "filters": [ + ["role", "in", ("Deacon", "Elder", "Pastor", "Secretary", "Treasurer")] + ], }, { "dt": "Dashboard Chart",