From 4fb2241621936ae821034b9101827073780bb95a Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Fri, 13 May 2022 19:47:36 +0530 Subject: [PATCH] feat: see on website link for lms certificate --- lms/lms/doctype/lms_certificate/lms_certificate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/lms/doctype/lms_certificate/lms_certificate.js b/lms/lms/doctype/lms_certificate/lms_certificate.js index 6a341a63..8d6f5e12 100644 --- a/lms/lms/doctype/lms_certificate/lms_certificate.js +++ b/lms/lms/doctype/lms_certificate/lms_certificate.js @@ -2,7 +2,7 @@ // For license information, please see license.txt frappe.ui.form.on('LMS Certificate', { - onload: function (frm) { + onload: (frm) => { frm.set_query("member", function (doc) { return { filters: { @@ -10,5 +10,8 @@ frappe.ui.form.on('LMS Certificate', { } }; }); + }, + refresh: (frm) => { + if (frm.doc.name) frm.add_web_link(`/courses/${frm.doc.course}/${frm.doc.name}`, 'See on Website') } });