add church person details to portal.

This commit is contained in:
meichthys 2025-12-19 05:18:42 +00:00
parent 65f021d7ff
commit 531c545d5f
8 changed files with 555 additions and 173 deletions

View File

@ -18,6 +18,7 @@
"photo",
"birthday",
"alergies",
"app_user",
"church_records_section",
"is_member",
"membership_date",
@ -293,6 +294,12 @@
"label": "Letters to the Church",
"options": "Church Letter",
"print_hide": 1
},
{
"fieldname": "app_user",
"fieldtype": "Link",
"label": "App User",
"options": "User"
}
],
"grid_page_length": 50,
@ -320,7 +327,7 @@
"link_fieldname": "recipient"
}
],
"modified": "2025-11-18 23:43:11.668299",
"modified": "2025-12-18 23:37:10.065945",
"modified_by": "Administrator",
"module": "Church People",
"name": "Church Person",
@ -352,9 +359,15 @@
"select": 1,
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Church User",
"write": 1
}
],
"quick_entry": 1,
"route": "church-personz",
"row_format": "Dynamic",
"search_fields": "last_name, first_name",
"show_preview_popup": 1,

View File

@ -90,3 +90,11 @@ class ChurchPerson(Document):
role.is_current_role = 1
else:
role.is_current_role = 0
def get_list_context(context):
# Only show documents related to the active user
context.filters = {"app_user": frappe.session.user}
# Sort the portal list view by status descending
context.order_by = "modified desc"
return context

View File

@ -0,0 +1,3 @@
frappe.ready(function() {
// bind events here
})

View File

@ -0,0 +1,352 @@
{
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 1,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"anonymous": 0,
"apply_document_permissions": 1,
"button_label": "Save",
"condition_json": "[]",
"creation": "2025-11-19 00:10:47.226042",
"doc_type": "Church Person",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"is_standard": 1,
"list_columns": [
{
"fieldname": "first_name",
"fieldtype": "Data",
"label": "First Name"
},
{
"fieldname": "last_name",
"fieldtype": "Data",
"label": "Last Name"
},
{
"fieldname": "gender",
"fieldtype": "Select",
"label": "Gender"
},
{
"fieldname": "birthday",
"fieldtype": "Date",
"label": "Birthday"
},
{
"fieldname": "photo",
"fieldtype": "Attach Image",
"label": "Photo"
},
{
"fieldname": "alergies",
"fieldtype": "Data",
"label": "Alergies"
},
{
"fieldname": "primary_phone",
"fieldtype": "Phone",
"label": "Primary Phone"
},
{
"fieldname": "email",
"fieldtype": "Data",
"label": "Email"
},
{
"fieldname": "home_address",
"fieldtype": "Link",
"label": "Home Address"
},
{
"fieldname": "mailing_address",
"fieldtype": "Link",
"label": "Mailing Address"
}
],
"list_title": "Your Personal Information",
"login_required": 1,
"max_attachment_size": 0,
"modified": "2025-12-18 23:45:41.183820",
"modified_by": "Administrator",
"module": "Church People",
"name": "personal-details",
"owner": "Administrator",
"published": 1,
"route": "personal-details",
"show_attachments": 0,
"show_list": 1,
"show_sidebar": 0,
"title": "Personal Details",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldname": "personal_information_section",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Personal Information",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "first_name",
"fieldtype": "Data",
"hidden": 0,
"label": "First Name",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "last_name",
"fieldtype": "Data",
"hidden": 0,
"label": "Last Name",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"default": "Unknown",
"fieldname": "gender",
"fieldtype": "Select",
"hidden": 0,
"label": "Gender",
"max_length": 0,
"max_value": 0,
"options": "Female\nMale\nUnknown",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_agva",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "photo",
"fieldtype": "Attach Image",
"hidden": 0,
"label": "Photo",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "birthday",
"fieldtype": "Date",
"hidden": 0,
"label": "Birthday",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "alergies",
"fieldtype": "Data",
"hidden": 0,
"label": "Alergies",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "contact_information_section",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Contact Information",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "home_address",
"fieldtype": "Link",
"hidden": 0,
"label": "Home Address",
"max_length": 0,
"max_value": 0,
"options": "Address",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "mailing_address",
"fieldtype": "Link",
"hidden": 0,
"label": "Mailing Address",
"max_length": 0,
"max_value": 0,
"options": "Address",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_vzrz",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "primary_phone",
"fieldtype": "Phone",
"hidden": 0,
"label": "Primary Phone",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "email",
"fieldtype": "Data",
"hidden": 0,
"label": "Email",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "section_break_eqre",
"fieldtype": "Section Break",
"hidden": 0,
"label": "Family Information",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_gwhd",
"fieldtype": "Column Break",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"default": "0",
"fieldname": "is_married",
"fieldtype": "Check",
"hidden": 0,
"label": "Is Married",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"depends_on": "eval:doc.is_married;",
"fieldname": "anniversary",
"fieldtype": "Date",
"hidden": 0,
"label": "Anniversary",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"depends_on": "eval:doc.is_married;",
"fieldname": "spouse",
"fieldtype": "Link",
"hidden": 0,
"label": "Spouse",
"max_length": 0,
"max_value": 0,
"options": "Church Person",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "relationships",
"fieldtype": "Table",
"hidden": 0,
"label": "Notable Relationships",
"max_length": 0,
"max_value": 0,
"options": "Church Person Relation",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
]
}

View File

@ -0,0 +1,5 @@
import frappe
def get_context(context):
# do your magic here
pass

View File

@ -1,173 +1,174 @@
{
"allow_comments": 1,
"allow_delete": 1,
"allow_edit": 1,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"anonymous": 0,
"apply_document_permissions": 0,
"button_label": "Save",
"condition_json": "[]",
"creation": "2025-09-13 22:28:01.939717",
"doc_type": "Church Prayer Request",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "<div class=\"ql-editor read-mode\"><blockquote>Be anxious for nothing, but in everything, by prayer and petition, with thanksgiving, present your requests to God.</blockquote><blockquote>~ Philipians 4:6 (BSB)</blockquote></div>",
"is_standard": 1,
"list_columns": [
{
"fieldname": "status",
"fieldtype": "Link",
"label": ""
},
{
"fieldname": "type",
"fieldtype": "Link",
"label": ""
},
{
"fieldname": "column_break_ynvf",
"fieldtype": "Column Break",
"label": ""
},
{
"fieldname": "related_person",
"fieldtype": "Link",
"label": ""
},
{
"fieldname": "section_break_usaz",
"fieldtype": "Section Break",
"label": ""
},
{
"fieldname": "request",
"fieldtype": "Small Text",
"label": ""
},
{
"fieldname": "is_private",
"fieldtype": "Check",
"label": ""
}
],
"list_title": "Your Prayer Requests",
"login_required": 1,
"max_attachment_size": 0,
"modified": "2025-11-16 00:10:38.455309",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "prayer-request",
"owner": "Administrator",
"published": 1,
"route": "prayer-request",
"show_attachments": 0,
"show_list": 1,
"show_sidebar": 1,
"title": "Prayer Request ",
"web_form_fields": [
{
"allow_read_on_all_link_options": 1,
"default": "Requested",
"fieldname": "status",
"fieldtype": "Link",
"hidden": 0,
"label": "Status",
"max_length": 0,
"max_value": 0,
"options": "Church Prayer Request Status",
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 1,
"default": "",
"fieldname": "type",
"fieldtype": "Link",
"hidden": 0,
"label": "Type",
"max_length": 0,
"max_value": 0,
"options": "Church Prayer Request Type",
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_ynvf",
"fieldtype": "Column Break",
"hidden": 0,
"label": "",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 1,
"default": "",
"depends_on": "eval:frappe.session.user!='Guest';",
"description": "If this request is for a specific person and the person is in this list, please select the person.",
"fieldname": "related_person",
"fieldtype": "Link",
"hidden": 0,
"label": "Related Person",
"max_length": 0,
"max_value": 0,
"options": "Church Person",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "section_break_usaz",
"fieldtype": "Section Break",
"hidden": 0,
"label": "",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "request",
"fieldtype": "Small Text",
"hidden": 0,
"label": "Request",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"default": "",
"description": "Check this if you don't want this shared with the church body.",
"fieldname": "is_private",
"fieldtype": "Check",
"hidden": 0,
"label": "Is Private",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
]
}
"allow_comments": 1,
"allow_delete": 1,
"allow_edit": 1,
"allow_incomplete": 0,
"allow_multiple": 1,
"allow_print": 1,
"anonymous": 0,
"apply_document_permissions": 1,
"button_label": "Save",
"condition_json": "[]",
"creation": "2025-09-13 22:28:01.939717",
"doc_type": "Church Prayer Request",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "<div class=\"ql-editor read-mode\"><blockquote>Be anxious for nothing, but in everything, by prayer and petition, with thanksgiving, present your requests to God.</blockquote><blockquote>~ Philipians 4:6 (BSB)</blockquote></div>",
"is_standard": 1,
"list_columns": [
{
"fieldname": "status",
"fieldtype": "Link",
"label": ""
},
{
"fieldname": "type",
"fieldtype": "Link",
"label": ""
},
{
"fieldname": "column_break_ynvf",
"fieldtype": "Column Break",
"label": ""
},
{
"fieldname": "related_person",
"fieldtype": "Link",
"label": ""
},
{
"fieldname": "section_break_usaz",
"fieldtype": "Section Break",
"label": ""
},
{
"fieldname": "request",
"fieldtype": "Small Text",
"label": ""
},
{
"fieldname": "is_private",
"fieldtype": "Check",
"label": ""
}
],
"list_title": "Your Prayer Requests",
"login_required": 1,
"max_attachment_size": 0,
"modified": "2025-12-18 23:45:59.150941",
"modified_by": "Administrator",
"module": "Church Prayers",
"name": "prayer-request",
"owner": "Administrator",
"published": 1,
"route": "prayer-request",
"show_attachments": 0,
"show_list": 1,
"show_sidebar": 1,
"title": "Prayer Request ",
"web_form_fields": [
{
"allow_read_on_all_link_options": 1,
"default": "Requested",
"fieldname": "status",
"fieldtype": "Link",
"hidden": 0,
"label": "Status",
"max_length": 0,
"max_value": 0,
"options": "Church Prayer Request Status",
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 1,
"default": "",
"fieldname": "type",
"fieldtype": "Link",
"hidden": 0,
"label": "Type",
"max_length": 0,
"max_value": 0,
"options": "Church Prayer Request Type",
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "column_break_ynvf",
"fieldtype": "Column Break",
"hidden": 0,
"label": "",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 1,
"default": "",
"depends_on": "eval:frappe.session.user!='Guest';",
"description": "If this request is for a specific person and the person is in this list, please select the person.",
"fieldname": "related_person",
"fieldtype": "Link",
"hidden": 0,
"label": "Related Person",
"max_length": 0,
"max_value": 0,
"options": "Church Person",
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "section_break_usaz",
"fieldtype": "Section Break",
"hidden": 0,
"label": "",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"fieldname": "request",
"fieldtype": "Small Text",
"hidden": 0,
"label": "Request",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 1,
"show_in_filter": 0
},
{
"allow_read_on_all_link_options": 0,
"default": "",
"description": "Check this if you don't want this shared with the church body.",
"fieldname": "is_private",
"fieldtype": "Check",
"hidden": 0,
"label": "Is Private",
"max_length": 0,
"max_value": 0,
"precision": "",
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
],
"website_sidebar": ""
}