Fixed webhook stuff.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-12-06 08:11:39 -07:00
parent 807603fd4f
commit c791070126
4 changed files with 23 additions and 6 deletions

View File

@@ -28,6 +28,21 @@ function errorToast(message) {
}
})
}
function infoToast(message) {
Swal.fire({
toast: true,
position: "top-end",
showConfirmButton: false,
timer: 3000,
title: message,
timerProgressBar: true,
icon: "info",
didOpen: (toast) => {
toast.onmouseenter = Swal.stopTimer;
toast.onmouseleave = Swal.resumeTimer;
}
})
}
function viewVehicle(vehicleId) {
window.location.href = `/Vehicle/Index?vehicleId=${vehicleId}`;
}

View File

@@ -181,9 +181,11 @@ function getAndValidateTaxRecordValues() {
}
function checkRecurringTaxes() {
$.post('/Vehicle/CheckRecurringTaxRecords', { vehicleId: GetVehicleId().vehicleId }, function (data) {
let vehicleId = GetVehicleId().vehicleId
$.post('/Vehicle/CheckRecurringTaxRecords', { vehicleId: vehicleId }, function (data) {
if (data) {
viewVehicle(GetVehicleId().vehicleId);
//notify users that recurring tax records were updated and they should refresh the page to see the new changes.
infoToast(`Recurring Tax Records Updated!<br /><br /><a class='text-link' style='cursor:pointer;' onclick='viewVehicle(${vehicleId})'>Refresh to see new records</a>`);
}
})
}