From 1a88562ef983f6d58e92254d86209e2df6185f84 Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 3 Nov 2017 14:57:27 +0530 Subject: [PATCH] [new] Assessment Manager for grant Review, web portal added --- .../grant_application/grant_application.json | 210 +++++++++++++++++- .../grant_application/grant_application.py | 9 + .../templates/grant_application.html | 139 ++++++++---- .../templates/grant_application_row.html | 14 +- 4 files changed, 316 insertions(+), 56 deletions(-) diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.json b/erpnext/non_profit/doctype/grant_application/grant_application.json index 509f67b631..8ada0166d0 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.json +++ b/erpnext/non_profit/doctype/grant_application/grant_application.json @@ -434,6 +434,35 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_15", + "fieldtype": "Section Break", + "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, + "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 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -495,6 +524,35 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_17", + "fieldtype": "Column Break", + "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, + "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 + }, { "allow_bulk_edit": 0, "allow_on_submit": 0, @@ -554,6 +612,156 @@ "search_index": 0, "set_only_once": 0, "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "assessment_result", + "fieldtype": "Section Break", + "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": "assessment Result", + "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 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "assessment_scale", + "fieldtype": "Int", + "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": "assessment Scale", + "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 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "note", + "fieldtype": "Small 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 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_24", + "fieldtype": "Column Break", + "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, + "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 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "assessment_manager", + "fieldtype": "Link", + "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": "assessment Manager", + "length": 0, + "no_copy": 0, + "options": "User", + "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": 1, @@ -568,7 +776,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-10-30 16:18:40.911012", + "modified": "2017-11-03 13:08:58.718232", "modified_by": "Administrator", "module": "Non Profit", "name": "Grant Application", diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py index 0634c8a824..44127f95a0 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/grant_application.py @@ -27,3 +27,12 @@ def get_list_context(context): context.no_breadcrumbs = True context.order_by = 'creation desc' context.introduction ='
Grant Application List

Apply for new Grant Application' + +@frappe.whitelist(allow_guest=True) +def assessment_result(title, assessment_scale, note): + vote = frappe.get_doc("Grant Application", title) + vote.assessment_scale = assessment_scale + vote.note = note + vote.save() + frappe.db.commit() + return "Thank you for Assessment Review" \ No newline at end of file diff --git a/erpnext/non_profit/doctype/grant_application/templates/grant_application.html b/erpnext/non_profit/doctype/grant_application/templates/grant_application.html index 8532ea78b3..5d415e9216 100644 --- a/erpnext/non_profit/doctype/grant_application/templates/grant_application.html +++ b/erpnext/non_profit/doctype/grant_application/templates/grant_application.html @@ -1,52 +1,95 @@ {% extends "templates/web.html" %} {% block page_content %} -

{{ title }}

-{% if frappe.user == owner %} -

Edit Grant

-{% endif %} -
- - - - - - - - - - - - - - - - - - - - - -
Organization/Indvidual{{ title }}
Grant Applicant Name{{ grant_applicant_name }}
Date{{ frappe.format_date(creation) }}
Status{{ status }}
Email{{ email }}
-

Please outline your current situation and why you are applying for a grant?

-

{{ grant_description }}

-

Please Describe the purpose of the grant and how it will benfit your organization?

-

{{ grant_purpose }}

-

Amount Requested Details

-

{{ amount }}

-

Have you Recevied grant from us before?

-

{{ grant_past_record }}

-

Contact

-{% if frappe.user != 'Guest' %} - - - - - -
Email{{ email }}
-{% else %} -

You must register and login to view contact details

-{% endif %} -


Post a New Grant

- +

{{ title }}

+ {% if frappe.user == owner %} +

Edit Grant

+ {% endif %} +
+ + + + + + + + + + + + + + + + + + + + + +
Organization/Indvidual{{ title }}
Grant Applicant Name{{ grant_applicant_name }}
Date{{ frappe.format_date(creation) }}
Status{{ status }}
Email{{ email }}
+

Q. Please outline your current situation and why you are applying for a grant?

+

{{ grant_description }}

+

Q. Please Describe the purpose of the grant and how it will benfit your organization?

+

{{ grant_purpose }}

+

Q. Amount Requested Details?

+

{{ amount }}

+

Q. Have you Recevied grant from us before?

+

{{ grant_past_record }}

+

Contact

+ {% if frappe.user != 'Guest' %} + + + + + +
Email{{ email }}
+ {% else %} +

You must register and login to view contact details

+ {% endif %} +
+ {% if frappe.session.user == assessment_manager %} + {% if not assessment_scale %} +
+
+
+ + +
+
+ + +
+ +
+
+ {% else %} +

Assessment Review done

+ {% endif %} + {% else %} +


Post a New Grant

+ {% endif %} + {% endblock %} \ No newline at end of file diff --git a/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html b/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html index 18c1ffec6f..64ef869097 100644 --- a/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html +++ b/erpnext/non_profit/doctype/grant_application/templates/grant_application_row.html @@ -1,9 +1,9 @@
- -

{{ doc.title }}

-

- {{ frappe.format_date(doc.creation) }} -

-
+ class='with-border clickable'> + +

{{ doc.title }}

+

+ {{ frappe.format_date(doc.creation) }} +

+