Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,30 @@ $(function () {
{
text: 'Check Status',
className: 'custom-table-btn flex-none btn btn-secondary payment-check-status',
attr: {
'data-selector': 'batch-payment-table-actions'
},
action: function (e, dt, node, config) {
Comment thread
plavoie-BC marked this conversation as resolved.
if (!dt.rows({ selected: true }).any() || !selectedPaymentIds || selectedPaymentIds.length === 0) {
abp.notify.info('No Payment Requests were selected for this action.')
return;
}

$.ajax({
url: '/api/app/payment-request/manually-add-payment-requests-to-reconciliation-queue',
method: 'POST',
contentType: 'application/json',
data: JSON.stringify(selectedPaymentIds)
})
.done(() => abp.notify.success('The Status Check has been sent for verification to CFS. Please refresh this page to check for Status updates.'))
.done(() => {
abp.notify.success('The Status Check has been sent for verification to CFS. Please refresh this page to check for Status updates.');
$(".select-all-payments").prop("checked", false);
payment_approve_buttons.disable();
payment_check_status_buttons.disable();
history_button.disable();
selectedPaymentIds = [];
PubSub.publish("deselect_batchpayment_application", "reset_data");
})
Comment thread
plavoie-BC marked this conversation as resolved.
.fail(() => abp.notify.error(l('Failed To Add To Reconciliation Queue')));
}
},
Expand Down Expand Up @@ -733,8 +749,10 @@ $(function () {
dataTable.ajax.reload(null, false);
$(".select-all-payments").prop("checked", false);
payment_approve_buttons.disable();

payment_check_status_buttons.disable();
history_button.disable();
selectedPaymentIds = [];
PubSub.publish("deselect_batchpayment_application", "reset_data");
});

function getStatusTextColor(status) {
Expand Down Expand Up @@ -785,6 +803,11 @@ $(function () {
(msg, data) => {
dataTable.ajax.reload(null, false);
$(".select-all-payments").prop("checked", false);
payment_approve_buttons.disable();
payment_check_status_buttons.disable();
history_button.disable();
selectedPaymentIds = [];
PubSub.publish("deselect_batchpayment_application", "reset_data");
Comment thread
plavoie-BC marked this conversation as resolved.
PubSub.publish('clear_selected_payment');
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ $(function () {
'Payment Tags'
);
selectedPaymentIds = [];
manageActionButtons();
PubSub.publish("refresh_payment_list");
Comment thread
plavoie-BC marked this conversation as resolved.
});
});
Expand Down
Loading