* shows confirm dialog when user clicks cancel * indentation and frm as per review
This commit is contained in:
parent
eaf0abedd4
commit
7f9d75521e
@ -183,16 +183,20 @@ var btn_create_vital_signs = function (frm) {
|
|||||||
|
|
||||||
var btn_update_status = function(frm, status){
|
var btn_update_status = function(frm, status){
|
||||||
var doc = frm.doc;
|
var doc = frm.doc;
|
||||||
|
frappe.confirm(__('Are you sure you want to cancel this appointment?'),
|
||||||
|
function() {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method:
|
method:
|
||||||
"erpnext.healthcare.doctype.patient_appointment.patient_appointment.update_status",
|
"erpnext.healthcare.doctype.patient_appointment.patient_appointment.update_status",
|
||||||
args: {appointmentId: doc.name, status:status},
|
args: {appointmentId: doc.name, status:status},
|
||||||
callback: function(data){
|
callback: function(data){
|
||||||
if(!data.exc){
|
if(!data.exc){
|
||||||
cur_frm.reload_doc();
|
frm.reload_doc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
var btn_invoice_consultation = function(frm){
|
var btn_invoice_consultation = function(frm){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user