Rev 33213 | Blame | Compare with Previous | Last modification | View Log | RSS feed
$(document).on('click', ".transactionApprovalApproved, .transactionApprovalRejected", function () {let card = $(this).closest('.approval-card');if (card.length === 0) {card = $(this).closest('tr');}let remark = (card.find(".remark-box").val() || "").trim();let transactionId = card.find(".mk-transactionId").html();if (remark === "") {alert("Remark is required");return;}let approval = $(this).data('approval');let endpoint = `${context}/transaction/approval?transactionId=${transactionId}&remark=${remark}&transactionApprovalStatus=${approval}`;doPutAjaxRequestHandler(endpoint, function (data) {alert(`Transaction ${approval} successfully`);$('.transaction-approval').click();});});