From 18ac423c477efc9fcc92862097901d3a41b2689d Mon Sep 17 00:00:00 2001 From: Vishal Date: Wed, 20 Sep 2017 15:49:31 +0530 Subject: [PATCH] [new] Volunteer skills and Availability Added --- .../doctype/volunteer/volunteer.json | 94 ++++++++++++++++++- .../volunteer_availability/__init__.py | 0 .../test_volunteer_availability.js | 23 +++++ .../test_volunteer_availability.py | 10 ++ .../volunteer_availability.js | 8 ++ .../volunteer_availability.json | 72 ++++++++++++++ .../volunteer_availability.py | 10 ++ .../doctype/volunteer_skills/__init__.py | 0 .../volunteer_skills/volunteer_skills.json | 72 ++++++++++++++ .../volunteer_skills/volunteer_skills.py | 10 ++ 10 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 erpnext/non_profit/doctype/volunteer_availability/__init__.py create mode 100644 erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js create mode 100644 erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py create mode 100644 erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js create mode 100644 erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json create mode 100644 erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py create mode 100644 erpnext/non_profit/doctype/volunteer_skills/__init__.py create mode 100644 erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json create mode 100644 erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py diff --git a/erpnext/non_profit/doctype/volunteer/volunteer.json b/erpnext/non_profit/doctype/volunteer/volunteer.json index 23546ba390d..1f3555f0fbc 100644 --- a/erpnext/non_profit/doctype/volunteer/volunteer.json +++ b/erpnext/non_profit/doctype/volunteer/volunteer.json @@ -373,6 +373,98 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "volunteer_availability_table", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Volunteer Availability", + "length": 0, + "no_copy": 0, + "options": "Volunteer Availability", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "volunteer_skills_table", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Volunteer Skills", + "length": 0, + "no_copy": 0, + "options": "Volunteer Skills", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "note", + "fieldtype": "Long Text", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Note", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 } ], "has_web_view": 0, @@ -385,7 +477,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-09-19 16:20:42.099435", + "modified": "2017-09-20 15:30:34.874289", "modified_by": "Administrator", "module": "Non Profit", "name": "Volunteer", diff --git a/erpnext/non_profit/doctype/volunteer_availability/__init__.py b/erpnext/non_profit/doctype/volunteer_availability/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js b/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js new file mode 100644 index 00000000000..77b2dcf24c3 --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Volunteer Availability", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Volunteer Availability + () => frappe.tests.make('Volunteer Availability', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py b/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py new file mode 100644 index 00000000000..5502194e9b0 --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_availability/test_volunteer_availability.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt +from __future__ import unicode_literals + +import frappe +import unittest + +class TestVolunteerAvailability(unittest.TestCase): + pass diff --git a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js new file mode 100644 index 00000000000..a19e9a067d1 --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.js @@ -0,0 +1,8 @@ +// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Volunteer Availability', { + refresh: function(frm) { + + } +}); diff --git a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json new file mode 100644 index 00000000000..08981c2e87e --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.json @@ -0,0 +1,72 @@ +{ + "allow_copy": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2017-09-20 15:16:09.175826", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "volunteer_availability", + "fieldtype": "Select", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Volunteer Availability", + "length": 0, + "no_copy": 0, + "options": "\nWeekly\nWeekdays\nWeekends\nMorning\nAfternoon\nEvening", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2017-09-20 15:28:45.962398", + "modified_by": "Administrator", + "module": "Non Profit", + "name": "Volunteer Availability", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py new file mode 100644 index 00000000000..a159e49e82a --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_availability/volunteer_availability.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class VolunteerAvailability(Document): + pass diff --git a/erpnext/non_profit/doctype/volunteer_skills/__init__.py b/erpnext/non_profit/doctype/volunteer_skills/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json b/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json new file mode 100644 index 00000000000..bae484fb730 --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.json @@ -0,0 +1,72 @@ +{ + "allow_copy": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2017-09-20 15:26:26.453435", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "volunteer_skills", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Volunteer Skills", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2017-09-20 15:28:53.203725", + "modified_by": "Administrator", + "module": "Non Profit", + "name": "Volunteer Skills", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py b/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py new file mode 100644 index 00000000000..9909f9fda59 --- /dev/null +++ b/erpnext/non_profit/doctype/volunteer_skills/volunteer_skills.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class VolunteerSkills(Document): + pass