Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: beneficiary name in case export #125

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
"personal_information_section",
"first_name",
"last_name",
"phone_number",
"full_name",
"column_break_3",
"phone_number",
"gender",
"age",
"languages_known",
"column_break_4",
"religion",
"social_category",
"languages_known",
"location_section",
"state",
"district",
Expand Down Expand Up @@ -364,6 +365,11 @@
"fieldtype": "Data",
"label": "Created By",
"read_only": 1
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Full Name"
}
],
"image_field": "image",
Expand All @@ -390,7 +396,7 @@
"link_fieldname": "beneficiary"
}
],
"modified": "2023-09-06 19:31:11.618589",
"modified": "2023-09-06 21:25:52.624848",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Beneficiary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
class Beneficiary(Document):
def before_save(self):
self.set_created_by()
self.full_name = f"{self.first_name} {self.last_name or ''}"

def validate(self):
self.validate_age()
Expand Down
16 changes: 9 additions & 7 deletions changemakers/frappe_changemakers/doctype/case/case.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
"beneficiary_details_section",
"is_beneficiary_traced",
"beneficiary",
"gender",
"full_name",
"column_break_jywm",
"gender",
"age",
"contact_number",
"updates_section",
Expand All @@ -44,7 +45,6 @@
"follow_up_details_section",
"family_meeting_outcome",
"followups",
"data_cjaa",
"section_break_seoz",
"created_by",
"section_break_yuho",
Expand Down Expand Up @@ -299,10 +299,6 @@
"fieldname": "column_break_qfjk",
"fieldtype": "Column Break"
},
{
"fieldname": "data_cjaa",
"fieldtype": "Data"
},
{
"fieldname": "section_break_seoz",
"fieldtype": "Section Break"
Expand All @@ -316,11 +312,17 @@
{
"fieldname": "section_break_grcq",
"fieldtype": "Section Break"
},
{
"fetch_from": "beneficiary.full_name",
"fieldname": "full_name",
"fieldtype": "Data",
"label": "Name"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-09-06 14:05:10.045885",
"modified": "2023-09-06 21:55:35.529923",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Case",
Expand Down
Loading