Browse Source

procedure code comment

master
venkataakhil 1 year ago
parent
commit
82a195ba09
  1. 3
      smart_service/transactions/doctype/procedure/procedure.js

3
smart_service/transactions/doctype/procedure/procedure.js

@ -73,7 +73,8 @@ frappe.ui.form.on('Procedure', {
var url = window.location.host; var url = window.location.host;
var regex = /[://]+/; var regex = /[://]+/;
frappe.db.get_value('Fish', { name: "Fish" }, 'path', (r) => { // frappe.db.get_value('Fish', { name: "Fish" }, 'path', (r) => {
frappe.db.get_single_value("Fish", "path").then((r) => {
for (var i = 0; i < frm.doc.procedure_details.length; i++) { for (var i = 0; i < frm.doc.procedure_details.length; i++) {
if (frm.doc.procedure_details[i].content && r.path && frm.doc.procedure_details[i].content_type == "Link"){// && !(frm.doc.procedure_details[i].content).includes('</a>')){ if (frm.doc.procedure_details[i].content && r.path && frm.doc.procedure_details[i].content_type == "Link"){// && !(frm.doc.procedure_details[i].content).includes('</a>')){
var x = "<a href=" + '"' + r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+ '"' + 'target="_blank"' + ' role="link"' +' onclick="window.open('+r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+')"'+'>' + frm.doc.procedure_details[i].temp_cnt + '</a>'; var x = "<a href=" + '"' + r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+ '"' + 'target="_blank"' + ' role="link"' +' onclick="window.open('+r.path + "://" + url + "/app/procedure/" + frm.doc.procedure_details[i].temp_cnt+')"'+'>' + frm.doc.procedure_details[i].temp_cnt + '</a>';

Loading…
Cancel
Save