[Fix] Enrolling the student
This commit is contained in:
parent
f340e19ea7
commit
ad2dc2c747
@ -16,6 +16,7 @@ def enroll_student(source_name):
|
|||||||
|
|
||||||
:param source_name: Student Applicant.
|
:param source_name: Student Applicant.
|
||||||
"""
|
"""
|
||||||
|
frappe.publish_realtime('enroll_student_progress', {"progress": [1, 4]}, user=frappe.session.user)
|
||||||
student = get_mapped_doc("Student Applicant", source_name,
|
student = get_mapped_doc("Student Applicant", source_name,
|
||||||
{"Student Applicant": {
|
{"Student Applicant": {
|
||||||
"doctype": "Student",
|
"doctype": "Student",
|
||||||
@ -28,6 +29,7 @@ def enroll_student(source_name):
|
|||||||
program_enrollment.student = student.name
|
program_enrollment.student = student.name
|
||||||
program_enrollment.student_name = student.title
|
program_enrollment.student_name = student.title
|
||||||
program_enrollment.program = frappe.db.get_value("Student Applicant", source_name, "program")
|
program_enrollment.program = frappe.db.get_value("Student Applicant", source_name, "program")
|
||||||
|
frappe.publish_realtime('enroll_student_progress', {"progress": [4, 4]}, user=frappe.session.user)
|
||||||
return program_enrollment
|
return program_enrollment
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "GARD.####",
|
"autoname": "GARD.####",
|
||||||
@ -144,7 +145,7 @@
|
|||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Date of Birth",
|
"label": "Date of Birth",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -317,7 +318,7 @@
|
|||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Image",
|
"label": "Image",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
@ -449,18 +450,18 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-02-20 13:17:43.366116",
|
"modified": "2017-03-15 17:48:11.739730",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Guardian",
|
"name": "Guardian",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
@ -143,7 +144,7 @@
|
|||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Naming Series",
|
"label": "Naming Series",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"options": "STUD.",
|
"options": "STUD.",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -979,19 +980,19 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-02-17 17:21:51.693028",
|
"modified": "2017-03-15 17:50:09.677184",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student",
|
"name": "Student",
|
||||||
|
@ -20,7 +20,18 @@ frappe.ui.form.on("Student Applicant", {
|
|||||||
frm.add_custom_button(__("Enroll"), function() {
|
frm.add_custom_button(__("Enroll"), function() {
|
||||||
frm.events.enroll(frm)
|
frm.events.enroll(frm)
|
||||||
}).addClass("btn-primary");
|
}).addClass("btn-primary");
|
||||||
|
frm.add_custom_button(__("Reject"), function() {
|
||||||
|
frm.set_value("application_status", "Rejected");
|
||||||
|
frm.save_or_update();
|
||||||
|
}, 'Actions');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frappe.realtime.on("enroll_student_progress", function(data) {
|
||||||
|
if(data.progress) {
|
||||||
|
frappe.hide_msgprint(true);
|
||||||
|
frappe.show_progress(__("Enrolling student"), data.progress[0],data.progress[1]);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
enroll: function(frm) {
|
enroll: function(frm) {
|
||||||
@ -39,3 +50,4 @@ frappe.ui.form.on('Student Sibling', {
|
|||||||
frm.add_fetch("student", "date_of_birth", "date_of_birth");
|
frm.add_fetch("student", "date_of_birth", "date_of_birth");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
@ -203,7 +204,7 @@
|
|||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Naming Series",
|
"label": "Naming Series",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"options": "AP",
|
"options": "AP",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -851,7 +852,7 @@
|
|||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Guardians",
|
"label": "Guardians",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
"no_copy": 0,
|
"no_copy": 1,
|
||||||
"options": "Student Guardian",
|
"options": "Student Guardian",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": "",
|
"precision": "",
|
||||||
@ -1011,19 +1012,19 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"image_field": "image",
|
"image_field": "image",
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2017-02-21 01:14:59.352772",
|
"modified": "2017-03-15 17:49:15.345022",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Student Applicant",
|
"name": "Student Applicant",
|
||||||
@ -1051,10 +1052,10 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
"quick_entry": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"title_field": "title",
|
"title_field": "title",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user