feat: add new batch and mentor course mapping

This commit is contained in:
pateljannat
2021-04-21 10:47:10 +05:30
parent a2fe314420
commit b09ec1e29d
8 changed files with 71 additions and 64 deletions

View File

@@ -1,3 +1,17 @@
frappe.ready(function() {
// bind events here
frappe.web_form.after_save = () => {
let data = frappe.web_form.get_values();
frappe.call({
"method": "community.lms.doctype.lms_batch_membership.lms_batch_membership.create_membership",
"args": {
"batch": data.title,
"member_type": "Mentor"
},
"callback": (data) => {
if (data.message == "OK") {
window.location.href = "/courses"
}
}
})
}
})

View File

@@ -18,7 +18,7 @@
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-04-20 11:51:35.815876",
"modified": "2021-04-21 10:22:38.461088",
"modified_by": "Administrator",
"module": "LMS",
"name": "add-a-new-batch",
@@ -64,7 +64,7 @@
"fieldname": "start_time",
"fieldtype": "Data",
"hidden": 0,
"label": "Start Time",
"label": "Start Time (HH:MM:SS)",
"max_length": 0,
"max_value": 0,
"read_only": 0,
@@ -96,11 +96,11 @@
},
{
"allow_read_on_all_link_options": 0,
"description": "Enter Days of the week comma separated.",
"description": "",
"fieldname": "sessions_on",
"fieldtype": "Data",
"hidden": 0,
"label": "Sessions On",
"label": "Sessions On Days",
"max_length": 0,
"max_value": 0,
"options": "",
@@ -113,7 +113,7 @@
"fieldname": "end_time",
"fieldtype": "Data",
"hidden": 0,
"label": "End Time",
"label": "End Time (HH:MM:SS)",
"max_length": 0,
"max_value": 0,
"read_only": 0,