Skip to content

Commit

Permalink
Merge pull request #110 from harshtandiya/daily-visit
Browse files Browse the repository at this point in the history
feat: daily visit doctype added
  • Loading branch information
harshtandiya authored Jul 13, 2023
2 parents 71527b2 + 352e994 commit 7201d63
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@
"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 @@ -382,7 +387,7 @@
"link_fieldname": "beneficiary"
}
],
"modified": "2023-07-12 12:19:27.711778",
"modified": "2023-07-12 23:38:50.889079",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Beneficiary",
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
"in_preview": 1,
"in_standard_filter": 1,
"label": "Language",
"options": "Languages Known"
"options": "Languages Known",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2023-07-12 12:20:57.205539",
"modified": "2023-07-13 00:33:06.838655",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Language Multiselect",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-07-12 12:15:03.640146",
"modified": "2023-07-13 00:33:45.657027",
"modified_by": "Administrator",
"module": "Frappe Changemakers",
"name": "Languages Known",
Expand All @@ -42,6 +42,7 @@
"write": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
Expand Down
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 7201d63

Please sign in to comment.