[new] Assessment Manager for grant Review, web portal added
This commit is contained in:
parent
7c7c3522cb
commit
1a88562ef9
@ -434,6 +434,35 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 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_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -495,6 +524,35 @@
|
|||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 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_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
@ -554,6 +612,156 @@
|
|||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 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,
|
"has_web_view": 1,
|
||||||
@ -568,7 +776,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-10-30 16:18:40.911012",
|
"modified": "2017-11-03 13:08:58.718232",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Non Profit",
|
"module": "Non Profit",
|
||||||
"name": "Grant Application",
|
"name": "Grant Application",
|
||||||
|
|||||||
@ -27,3 +27,12 @@ def get_list_context(context):
|
|||||||
context.no_breadcrumbs = True
|
context.no_breadcrumbs = True
|
||||||
context.order_by = 'creation desc'
|
context.order_by = 'creation desc'
|
||||||
context.introduction ='<div>Grant Application List</div><br><a class="btn btn-primary" href="/my-grant?new=1">Apply for new Grant Application</a>'
|
context.introduction ='<div>Grant Application List</div><br><a class="btn btn-primary" href="/my-grant?new=1">Apply for new Grant Application</a>'
|
||||||
|
|
||||||
|
@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"
|
||||||
@ -1,52 +1,95 @@
|
|||||||
{% extends "templates/web.html" %}
|
{% extends "templates/web.html" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
{% if frappe.user == owner %}
|
{% if frappe.user == owner %}
|
||||||
<p><a class='btn btn-primary btn-sm' href="/my-grant?name={{ name }}">Edit Grant</a></p>
|
<p><a class='btn btn-primary btn-sm' href="/my-grant?name={{ name }}">Edit Grant</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br>
|
<br>
|
||||||
<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
|
<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width: 38.2%'>Organization/Indvidual</td>
|
<td style='width: 38.2%'>Organization/Indvidual</td>
|
||||||
<td>{{ title }}</td>
|
<td>{{ title }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Grant Applicant Name</td>
|
<td>Grant Applicant Name</td>
|
||||||
<td>{{ grant_applicant_name }}</td>
|
<td>{{ grant_applicant_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Date</td>
|
<td>Date</td>
|
||||||
<td>{{ frappe.format_date(creation) }}</td>
|
<td>{{ frappe.format_date(creation) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Status</td>
|
<td>Status</td>
|
||||||
<td>{{ status }}</td>
|
<td>{{ status }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Email</td>
|
<td>Email</td>
|
||||||
<td>{{ email }}</td>
|
<td>{{ email }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h3>Please outline your current situation and why you are applying for a grant?</h3>
|
<h2>Q. Please outline your current situation and why you are applying for a grant?</h2>
|
||||||
<p>{{ grant_description }}</p>
|
<p> {{ grant_description }}</p>
|
||||||
<h3>Please Describe the purpose of the grant and how it will benfit your organization?</h3>
|
<h2>Q. Please Describe the purpose of the grant and how it will benfit your organization?</h2>
|
||||||
<p>{{ grant_purpose }}</p>
|
<p>{{ grant_purpose }}</p>
|
||||||
<h3>Amount Requested Details</h3>
|
<h2>Q. Amount Requested Details?</h2>
|
||||||
<p>{{ amount }}</p>
|
<p>{{ amount }}</p>
|
||||||
<h3>Have you Recevied grant from us before?</h3>
|
<h2>Q. Have you Recevied grant from us before?</h2>
|
||||||
<p>{{ grant_past_record }}</p>
|
<p>{{ grant_past_record }}</p>
|
||||||
<h3>Contact</h3>
|
<h3>Contact</h3>
|
||||||
{% if frappe.user != 'Guest' %}
|
{% if frappe.user != 'Guest' %}
|
||||||
<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
|
<table class='table table-bordered small' style='max-width: 400px; margin-bottom: 0px;'>
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width: 38.2%'>Email</td>
|
<td style='width: 38.2%'>Email</td>
|
||||||
<td>{{ email }}</td>
|
<td>{{ email }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p><a href="/login">You must register and login to view contact details</a></p>
|
<p><a href="/login">You must register and login to view contact details</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p><br><a href="/my-grant?new=1" class='btn btn-primary'>Post a New Grant</a></p>
|
<br>
|
||||||
|
{% if frappe.session.user == assessment_manager %}
|
||||||
|
{% if not assessment_scale %}
|
||||||
|
<div>
|
||||||
|
<form>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="scale">Assessment Result (0-10):</label>
|
||||||
|
<input type="text" class="form-control" id="scale">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="note">Note</label>
|
||||||
|
<input type="text" class="form-control" id="note">
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn btn-default" data-title= "{{ name }}" id="btn-grant-result">Submit</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<p> Assessment Review done </p>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<p><br><a href="/my-grant?new=1" class='btn btn-primary'>Post a New Grant</a></p>
|
||||||
|
{% endif %}
|
||||||
|
<script>
|
||||||
|
frappe.ready(function(title) {
|
||||||
|
$(".btn-default").on("click", function() {
|
||||||
|
var scale = $("#scale").val();
|
||||||
|
var note = $("#note").val();
|
||||||
|
var title = $(this).attr("data-title");
|
||||||
|
console.log(scale, note, title);
|
||||||
|
frappe.call({
|
||||||
|
method: 'erpnext.non_profit.doctype.grant_application.grant_application.assessment_result',
|
||||||
|
args: {
|
||||||
|
assessment_scale: scale,
|
||||||
|
note: note,
|
||||||
|
title: title
|
||||||
|
},
|
||||||
|
callback: function(r) {
|
||||||
|
if(r.message) {
|
||||||
|
frappe.msgprint(r.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
<div style='margin-bottom: 30px; max-width: 600px;'
|
<div style='margin-bottom: 30px; max-width: 600px;'
|
||||||
class='with-border clickable'>
|
class='with-border clickable'>
|
||||||
<a href="/{{ doc.route }}">
|
<a href="/{{ doc.route }}">
|
||||||
<h3 style='margin-top: 0px;'>{{ doc.title }}</h3>
|
<h3 style='margin-top: 0px;'>{{ doc.title }}</h3>
|
||||||
<p>
|
<p>
|
||||||
<span class='label'>{{ frappe.format_date(doc.creation) }}</span>
|
<span class='label'>{{ frappe.format_date(doc.creation) }}</span>
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user