link the different doctype in the school module (#8844)
This commit is contained in:
parent
9283377f87
commit
c320537e4c
@ -1,18 +1,30 @@
|
||||
frappe.ui.form.on("Course", "refresh", function(frm) {
|
||||
if(!cur_frm.doc.__islocal) {
|
||||
frm.add_custom_button(__("Program"), function() {
|
||||
frappe.route_options = {
|
||||
"Program Course.course": frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Program");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Student Group"), function() {
|
||||
frappe.route_options = {
|
||||
course: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Student Group");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Course Schedule"), function() {
|
||||
frappe.route_options = {
|
||||
course: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Course Schedule");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Assessment Plan"), function() {
|
||||
frappe.route_options = {
|
||||
course: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Assessment Plan");
|
||||
});
|
||||
}
|
||||
|
@ -6,22 +6,37 @@ cur_frm.add_fetch('fee_structure', 'total_amount', 'amount');
|
||||
frappe.ui.form.on("Program", "refresh", function(frm) {
|
||||
if(!frm.doc.__islocal) {
|
||||
frm.add_custom_button(__("Student Applicant"), function() {
|
||||
frappe.route_options = {
|
||||
program: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Student Applicant");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Program Enrollment"), function() {
|
||||
frappe.route_options = {
|
||||
program: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Program Enrollment");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Student Group"), function() {
|
||||
frappe.route_options = {
|
||||
program: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Student Group");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Fee Structure"), function() {
|
||||
frappe.route_options = {
|
||||
program: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Fee Structure");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Fees"), function() {
|
||||
frappe.route_options = {
|
||||
program: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Fees");
|
||||
});
|
||||
}
|
||||
|
@ -4,6 +4,12 @@ frappe.provide("schools")
|
||||
|
||||
frappe.ui.form.on('Student Attendance Tool', {
|
||||
refresh: function(frm) {
|
||||
if (frappe.route_options) {
|
||||
frm.set_value("based_on", frappe.route_options.based_on);
|
||||
frm.set_value("student_group", frappe.route_options.student_group);
|
||||
frm.set_value("course_schedule", frappe.route_options.course_schedule);
|
||||
frappe.route_options = null;
|
||||
}
|
||||
frm.disable_save();
|
||||
},
|
||||
|
||||
|
@ -13,11 +13,23 @@ frappe.ui.form.on("Student Group", {
|
||||
|
||||
refresh: function(frm) {
|
||||
if (!frm.doc.__islocal) {
|
||||
frm.add_custom_button(__("Attendance"), function() {
|
||||
frappe.route_options = {
|
||||
based_on: "Student Group",
|
||||
student_group: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Student Attendance Tool");
|
||||
});
|
||||
frm.add_custom_button(__("Course Schedule"), function() {
|
||||
frappe.route_options = {
|
||||
student_group: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Course Schedule");
|
||||
});
|
||||
|
||||
frm.add_custom_button(__("Assessment Plan"), function() {
|
||||
frappe.route_options = {
|
||||
student_group: frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Assessment Plan");
|
||||
});
|
||||
frm.add_custom_button(__("Update Email Group"), function() {
|
||||
@ -30,6 +42,9 @@ frappe.ui.form.on("Student Group", {
|
||||
});
|
||||
});
|
||||
frm.add_custom_button(__("Newsletter"), function() {
|
||||
frappe.route_options = {
|
||||
"Newsletter Email Group.email_group": frm.doc.name
|
||||
}
|
||||
frappe.set_route("List", "Newsletter");
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user