feat: check no of attempts

This commit is contained in:
Jannat Patel
2022-04-26 13:17:09 +05:30
parent 430a2bc08d
commit e91237ec05
2 changed files with 14 additions and 9 deletions

View File

@@ -3,12 +3,15 @@
frappe.ui.form.on('LMS Certificate Request', {
refresh: function(frm) {
frm.add_custom_button(__("Create LMS Certificate Evaluation"), () => {
frappe.model.open_mapped_doc({
method: "lms.lms.doctype.lms_certificate_request.lms_certificate_request.create_lms_certificate_evaluation",
frm: frm
console.log(frm)
if (frm.doc.status == "Pass") {
frm.add_custom_button(__("Create LMS Certificate Evaluation"), () => {
frappe.model.open_mapped_doc({
method: "lms.lms.doctype.lms_certificate_request.lms_certificate_request.create_lms_certificate_evaluation",
frm: frm
});
});
});
}
},
onload: function(frm) {