Fix VehicleID for Rescue Handler

This commit is contained in:
2018-11-24 15:38:35 +01:00
parent df57183f30
commit ac2f75b884
4 changed files with 18 additions and 6 deletions

View File

@@ -1,12 +1,18 @@
$(document).ready(function () {
setTimeout(function () {
ADis_Check_Call_Active();
}, 500);
}, 250);
});
function ADis_Check_Call_Active() {
if ($("h4:contains('Eigene Krankenhäuser')").length > 0 || $("h4:contains('Verbandskrankenhäuser')").length > 0) {
ADis_Collect_Hospitals();
} else {
VehicleID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1);
ADis_RemoveRescueSprechwunschFromQueue(VehicleID).then((deleteCount) => {
$("#adis-sprechwunsch-rescue-frame").attr("src", "");
$("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", "empty");
});
}
}