Skip to content

Commit

Permalink
feat: daily visit doctype added
Browse files Browse the repository at this point in the history
  • Loading branch information
harshtandiya committed Jul 12, 2023
1 parent eb7dd29 commit 79ba4cc
Show file tree
Hide file tree
Showing 15 changed files with 243 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"column_break_3",
"gender",
"age",
"languages_known",
"column_break_4",
"religion",
"social_category",
Expand Down Expand Up @@ -59,9 +60,7 @@
"employment_type",
"other_employment_type",
"section_break_uwdz",
"bottom_save_button",
"column_break_veps",
"health_camp_record"
"bottom_save_button"
],
"fields": [
{
Expand Down Expand Up @@ -92,6 +91,7 @@
{
"fieldname": "habitation",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Hotspot Name/Habitation",
"options": "Habitation"
},
Expand Down Expand Up @@ -357,20 +357,20 @@
"label": "Save"
},
{
"fieldname": "column_break_veps",
"fieldtype": "Column Break"
},
{
"fieldname": "health_camp_record",
"fieldtype": "Link",
"hidden": 1,
"label": "Health Camp Record",
"options": "Health Camp Attendee"
"fieldname": "languages_known",
"fieldtype": "Table MultiSelect",
"label": "Languages Known",
"options": "Language Multiselect"
}
],
"image_field": "image",
"index_web_pages_for_search": 1,
"links": [
{
"group": "General",
"link_doctype": "Daily Visit Update",
"link_fieldname": "beneficiary"
},
{
"group": "General",
"link_doctype": "Entitlement Request",
Expand All @@ -387,7 +387,7 @@
"link_fieldname": "beneficiary"
}
],
"modified": "2023-06-30 22:41:53.380509",
"modified": "2023-07-12 23:38:50.889079",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Beneficiary",
Expand Down Expand Up @@ -506,7 +506,7 @@
}
],
"quick_entry": 1,
"search_fields": "age,zone,ward",
"search_fields": "age,zone,ward,habitation",
"show_title_field_in_link": 1,
"sort_field": "modified",
"sort_order": "DESC",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright (c) 2023, [email protected] and contributors
// For license information, please see license.txt

frappe.ui.form.on("Daily Visit Update", {
refresh(frm) {},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "format:{date}-DVU{###}",
"creation": "2023-07-12 21:45:41.479782",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"beneficiary",
"date",
"daily_update"
],
"fields": [
{
"fieldname": "beneficiary",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Beneficiary",
"options": "Beneficiary",
"reqd": 1
},
{
"fieldname": "date",
"fieldtype": "Date",
"in_filter": 1,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Date"
},
{
"fieldname": "daily_update",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Daily Update"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-07-13 01:07:38.374716",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Daily Visit Update",
"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
}
],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) 2023, [email protected] and contributors
# For license information, please see license.txt

from frappe.model.document import Document
from frappe.utils import today


class DailyVisitUpdate(Document):
def before_naming(self):
if not self.date:
self.date = today()
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2023, [email protected] and Contributors
# See license.txt

# import frappe
from frappe.tests.utils import FrappeTestCase


class TestDailyVisitUpdate(FrappeTestCase):
pass
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2023-07-12 12:16:08.744820",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"language"
],
"fields": [
{
"fieldname": "language",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"in_preview": 1,
"in_standard_filter": 1,
"label": "Language",
"options": "Languages Known",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2023-07-13 00:33:06.838655",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Language Multiselect",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2023, [email protected] and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class LanguageMultiselect(Document):
pass
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright (c) 2023, [email protected] and contributors
// For license information, please see license.txt

// frappe.ui.form.on("Languages Known", {
// refresh(frm) {

// },
// });
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:language",
"creation": "2023-07-12 12:09:50.910956",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"language"
],
"fields": [
{
"fieldname": "language",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Language",
"reqd": 1,
"unique": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-07-13 00:33:45.657027",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Languages Known",
"naming_rule": "By fieldname",
"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,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2023, [email protected] and contributors
# For license information, please see license.txt

# import frappe
from frappe.model.document import Document


class LanguagesKnown(Document):
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2023, [email protected] and Contributors
# See license.txt

# import frappe
from frappe.tests.utils import FrappeTestCase


class TestLanguagesKnown(FrappeTestCase):
pass
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"charts": [],
"content": "[{\"id\":\"CecwNbV5Aq\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\">Frappe Changemakers</span>\",\"col\":12}},{\"id\":\"I9e4OurK7Y\",\"type\":\"paragraph\",\"data\":{\"text\":\"&nbsp;Manage Beneficiaries\",\"col\":12}},{\"id\":\"JhoJIvxYwo\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Beneficiary\",\"col\":3}},{\"id\":\"PMA7sL0zHl\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Beneficiaries\",\"col\":3}},{\"id\":\"GlS-4ygjkT\",\"type\":\"paragraph\",\"data\":{\"text\":\"Rescues\",\"col\":12}},{\"id\":\"W7ZBgFg0CJ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Rescue\",\"col\":3}},{\"id\":\"TEcaVdnIhr\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Rescues\",\"col\":3}},{\"id\":\"g2frCR54Gw\",\"type\":\"paragraph\",\"data\":{\"text\":\"Cases\",\"col\":12}},{\"id\":\"YY4UpDO22w\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"My Cases\",\"col\":3}},{\"id\":\"o-NQxJOqB9\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Case\",\"col\":3}},{\"id\":\"1X_H_JUulh\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Open Cases\",\"col\":3}},{\"id\":\"2faOuV0vIj\",\"type\":\"paragraph\",\"data\":{\"text\":\"Entitlements\",\"col\":12}},{\"id\":\"xllISW0jRt\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Entitlements\",\"col\":3}},{\"id\":\"wjYeZ-C3Yj\",\"type\":\"paragraph\",\"data\":{\"text\":\"Food\",\"col\":12}},{\"id\":\"mB90BbrugG\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Distribution\",\"col\":3}},{\"id\":\"2Dxn3AA-OY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Distributions\",\"col\":3}},{\"id\":\"2qZW9NgrCQ\",\"type\":\"paragraph\",\"data\":{\"text\":\"Healthcare\",\"col\":12}},{\"id\":\"JYx1hK5EYf\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Hospitalisation Record\",\"col\":3}},{\"id\":\"aGZflLrU8F\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Healthcare Providers\",\"col\":3}},{\"id\":\"SMiDbH7oHO\",\"type\":\"paragraph\",\"data\":{\"text\":\"Shelter Services\",\"col\":12}},{\"id\":\"_zTFcA698A\",\"type\":\"quick_list\",\"data\":{\"quick_list_name\":\"Shelter Homes\",\"col\":4}},{\"id\":\"ZMLz_em53Q\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Create Entry Record\",\"col\":3}},{\"id\":\"j51o5hQMDV\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Create Exit Record\",\"col\":3}},{\"id\":\"hIEZu5hDaF\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"2QJ1oA29Tv\",\"type\":\"paragraph\",\"data\":{\"text\":\"Others\",\"col\":12}},{\"id\":\"a3oRewN8WJ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Family Reintegrations\",\"col\":3}},{\"id\":\"AtcrGpwYkn\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Awareness Camps\",\"col\":3}},{\"id\":\"vOv18I4R0A\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Health Camps\",\"col\":3}}]",
"content": "[{\"id\":\"CecwNbV5Aq\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\">Frappe Changemakers</span>\",\"col\":12}},{\"id\":\"I9e4OurK7Y\",\"type\":\"paragraph\",\"data\":{\"text\":\"&nbsp;Manage Beneficiaries\",\"col\":12}},{\"id\":\"JhoJIvxYwo\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Beneficiary\",\"col\":3}},{\"id\":\"PMA7sL0zHl\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Beneficiaries\",\"col\":3}},{\"id\":\"j_2-NL3927\",\"type\":\"paragraph\",\"data\":{\"text\":\"Daily Visit Update\",\"col\":12}},{\"id\":\"arnB4anEZl\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Daily Visit Update\",\"col\":3}},{\"id\":\"lB7YAlkP4m\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Daily Visit Update List\",\"col\":4}},{\"id\":\"GlS-4ygjkT\",\"type\":\"paragraph\",\"data\":{\"text\":\"Rescues\",\"col\":12}},{\"id\":\"W7ZBgFg0CJ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Rescue\",\"col\":3}},{\"id\":\"TEcaVdnIhr\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Rescues\",\"col\":3}},{\"id\":\"g2frCR54Gw\",\"type\":\"paragraph\",\"data\":{\"text\":\"Cases\",\"col\":12}},{\"id\":\"YY4UpDO22w\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"My Cases\",\"col\":3}},{\"id\":\"o-NQxJOqB9\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Case\",\"col\":3}},{\"id\":\"1X_H_JUulh\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Open Cases\",\"col\":3}},{\"id\":\"2faOuV0vIj\",\"type\":\"paragraph\",\"data\":{\"text\":\"Entitlements\",\"col\":12}},{\"id\":\"xllISW0jRt\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Entitlements\",\"col\":3}},{\"id\":\"wjYeZ-C3Yj\",\"type\":\"paragraph\",\"data\":{\"text\":\"Food\",\"col\":12}},{\"id\":\"mB90BbrugG\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Distribution\",\"col\":3}},{\"id\":\"2Dxn3AA-OY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Distributions\",\"col\":3}},{\"id\":\"2qZW9NgrCQ\",\"type\":\"paragraph\",\"data\":{\"text\":\"Healthcare\",\"col\":12}},{\"id\":\"JYx1hK5EYf\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Hospitalisation Record\",\"col\":3}},{\"id\":\"aGZflLrU8F\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Healthcare Providers\",\"col\":3}},{\"id\":\"SMiDbH7oHO\",\"type\":\"paragraph\",\"data\":{\"text\":\"Shelter Services\",\"col\":12}},{\"id\":\"_zTFcA698A\",\"type\":\"quick_list\",\"data\":{\"quick_list_name\":\"Shelter Homes\",\"col\":4}},{\"id\":\"ZMLz_em53Q\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Create Entry Record\",\"col\":3}},{\"id\":\"j51o5hQMDV\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Create Exit Record\",\"col\":3}},{\"id\":\"hIEZu5hDaF\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"2QJ1oA29Tv\",\"type\":\"paragraph\",\"data\":{\"text\":\"Others\",\"col\":12}},{\"id\":\"a3oRewN8WJ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Family Reintegrations\",\"col\":3}},{\"id\":\"AtcrGpwYkn\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Awareness Camps\",\"col\":3}},{\"id\":\"vOv18I4R0A\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Health Camps\",\"col\":3}}]",
"creation": "2022-10-13 13:51:43.725589",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"for_user": "",
Expand All @@ -11,7 +12,7 @@
"is_hidden": 0,
"label": "Changemakers",
"links": [],
"modified": "2023-03-11 19:45:22.159458",
"modified": "2023-07-13 01:10:23.842165",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Changemakers",
Expand All @@ -28,13 +29,27 @@
"roles": [],
"sequence_id": 1.0,
"shortcuts": [
{
"color": "Grey",
"doc_view": "New",
"label": "New Daily Visit Update",
"link_to": "Daily Visit Update",
"type": "DocType"
},
{
"color": "Grey",
"doc_view": "New",
"label": "New Case",
"link_to": "Case",
"type": "DocType"
},
{
"color": "Grey",
"doc_view": "List",
"label": "All Daily Visit Update List",
"link_to": "Daily Visit Update",
"type": "DocType"
},
{
"color": "Grey",
"doc_view": "New",
Expand Down

0 comments on commit 79ba4cc

Please sign in to comment.