fix: dashboard links, web form redirects and patch for status
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
frappe.ready(function() {
|
||||
frappe.web_form.after_save = () => {
|
||||
window.location.href = `/dashboard#courses-created`;
|
||||
let route = frappe.web_form.doc.name ? `/courses/${frappe.web_form.doc.name}` : `/course`;
|
||||
window.location.href = route;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
frappe.ready(function() {
|
||||
frappe.web_form.after_save = () => {
|
||||
window.location.href = `/courses/`
|
||||
frappe.web_form.after_save = () => {
|
||||
setTimeout(() => {
|
||||
frappe.call({
|
||||
method: "school.lms.doctype.course_lesson.course_lesson.get_lesson_info",
|
||||
args: {
|
||||
"chapter": frappe.web_form.doc.chapter
|
||||
},
|
||||
callback: (data) => {
|
||||
window.location.href = `/courses/${data.message}`;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user