Browse Source

procedure code comment

master
venkataakhil 1 year ago
parent
commit
5f1dce5164
  1. 46
      smart_service/transactions/doctype/procedure/procedure.js

46
smart_service/transactions/doctype/procedure/procedure.js

@ -60,29 +60,29 @@ frappe.ui.form.on('Procedure', {
// frm.refresh(); // frm.refresh();
}, },
refresh: function (frm) { refresh: function (frm) {
if (frm.doc.procedure_details) { // if (frm.doc.procedure_details) {
frappe.call({ // frappe.call({
"method": "smart_service.transactions.doctype.procedure.procedure.update_system_id", // "method": "smart_service.transactions.doctype.procedure.procedure.update_system_id",
"args": { // "args": {
"name": frm.doc.name, // "name": frm.doc.name,
}, // },
callback: function (r) { // callback: function (r) {
} // }
}) // })
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) => {
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>';
frm.doc.procedure_details[i].content = x // frm.doc.procedure_details[i].content = x
} // }
} // }
cur_frm.refresh_fields('procedure_details'); // cur_frm.refresh_fields('procedure_details');
}) // })
} // }
// select_row(frm); // select_row(frm);
// if (frm.doc.procedure_filter == "All") { // if (frm.doc.procedure_filter == "All") {
// frm.get_field('procedure_details').grid.static_rows = false; // frm.get_field('procedure_details').grid.static_rows = false;

Loading…
Cancel
Save