dashboard and patch for lesson

This commit is contained in:
Jannat Patel
2022-03-14 19:07:02 +05:30
34 changed files with 389 additions and 218 deletions

View File

@@ -1,3 +1,5 @@
frappe.ready(function() {
// bind events here
})
frappe.web_form.after_save = () => {
window.location.href = `/courses/${frappe.web_form.doc.course}`;
}
});

View File

@@ -8,7 +8,7 @@
"allow_print": 0,
"amount": 0.0,
"amount_based_on_field": 0,
"apply_document_permissions": 0,
"apply_document_permissions": 1,
"button_label": "Save",
"creation": "2022-03-07 18:41:07.058806",
"doc_type": "Course Chapter",
@@ -19,7 +19,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2022-03-07 18:41:07.058806",
"modified": "2022-03-14 18:48:01.704325",
"modified_by": "Administrator",
"module": "LMS",
"name": "chapter",

View File

@@ -1,7 +1,5 @@
frappe.ready(function() {
frappe.web_form.after_save = () => {
setTimeout(() => {
window.location.href = `/courses/${frappe.web_form.doc.name}`;
})
}
frappe.web_form.after_save = () => {
window.location.href = `/dashboard#courses-created`;
}
});

View File

@@ -20,7 +20,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2022-03-09 10:10:30.069458",
"modified": "2022-03-11 12:32:22.512115",
"modified_by": "Administrator",
"module": "LMS",
"name": "course",
@@ -121,7 +121,7 @@
{
"allow_read_on_all_link_options": 0,
"fieldname": "description",
"fieldtype": "Data",
"fieldtype": "Text",
"hidden": 0,
"label": "Description",
"max_length": 0,

View File

@@ -1,17 +1,5 @@
frappe.ready(function() {
frappe.web_form.after_save = () => {
setTimeout(() => {
frappe.call({
method: "school.lms.doctype.course_lesson.course_lesson.get_lesson_info",
args: {
"lesson_name": frappe.web_form.doc.name
},
callback: (data) => {
window.location.href = data.message;
}
});
});
frappe.web_form.after_save = () => {
window.location.href = `/courses/`
};
});

View File

@@ -21,7 +21,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2022-03-09 09:55:58.406164",
"modified": "2022-03-14 18:49:33.526455",
"modified_by": "Administrator",
"module": "LMS",
"name": "lesson",
@@ -38,7 +38,7 @@
"title": "Lesson",
"web_form_fields": [
{
"allow_read_on_all_link_options": 1,
"allow_read_on_all_link_options": 0,
"fieldname": "chapter",
"fieldtype": "Link",
"hidden": 0,
@@ -78,7 +78,7 @@
{
"allow_read_on_all_link_options": 0,
"fieldname": "body",
"fieldtype": "Data",
"fieldtype": "Text",
"hidden": 0,
"label": "Body",
"max_length": 0,