v2 transaction

This commit is contained in:
2018-12-19 17:27:30 +01:00
parent fdffe19a11
commit efd95eacab
3 changed files with 42 additions and 42 deletions

42
dist/autoloaderV2.js vendored
View File

@@ -1,4 +1,4 @@
/*Generated on:Wed Dec 19 2018 17:18:57 GMT+0100 (CET)*/
/*Generated on:Wed Dec 19 2018 17:27:29 GMT+0100 (CET)*/
/*
* Dexie.js - a minimalistic wrapper for IndexedDB
* ===============================================
@@ -17203,7 +17203,7 @@ class AutomaticDispose {
RemovePoliceSprechwunschFromQueue(WunschID) {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => {
return this.ADisDB.ADisSprechwunschPolice.where({
return await this.ADisDB.ADisSprechwunschPolice.where({
missionID: WunschID
}).delete();
@@ -17214,7 +17214,7 @@ class AutomaticDispose {
RemoveRescueSprechwunschFromQueue(WunschID) {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return this.ADisDB.ADisSprechwunsch.where({
return await this.ADisDB.ADisSprechwunsch.where({
vehicleID: WunschID
}).delete();
@@ -17258,8 +17258,8 @@ class AutomaticDispose {
OpenNextRescueSprechwunsch() {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
this.ADSettings().then((setting) => {
return await self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return await this.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunsch.where({
done: 'false'
@@ -17267,9 +17267,9 @@ class AutomaticDispose {
}
}).then((Wunsch) => {
if (Wunsch !== undefined) {
Wunsch.each((myWunsch) => {
Wunsch.each(async (myWunsch) => {
let VehicleID = myWunsch.vehicleID;
self.UpdateRescueSprechwunschToDone(VehicleID).then(() => {
await self.UpdateRescueSprechwunschToDone(VehicleID).then(() => {
if ($("#adis-sprechwunsch-rescue-frame").attr("vehicle_id") == "empty") {
$("#adis-sprechwunsch-rescue-frame").attr("src", "https://www.leitstellenspiel.de/vehicles/" + VehicleID);
$("#adis-sprechwunsch-rescue-frame").attr("vehicle_id", VehicleID);
@@ -17294,7 +17294,7 @@ class AutomaticDispose {
AddRescueSprechwunschToQueue(WunschID) {
let self = this
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return self.ADisDB.ADisSprechwunsch.put({
return await self.ADisDB.ADisSprechwunsch.put({
vehicleID: WunschID,
done: 'false'
})
@@ -17307,7 +17307,7 @@ class AutomaticDispose {
UpdateRescueSprechwunschToDone(WunschID) {
let self = this
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunsch], async () => {
return self.ADisDB.ADisSprechwunsch.put({
return await self.ADisDB.ADisSprechwunsch.put({
vehicleID: WunschID,
done: 'true'
})
@@ -17425,7 +17425,7 @@ class AutomaticDispose {
CollectPoliceSprechwuensche() {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => {
new Promise(async (resolve, reject) => {
await new Promise(async (resolve, reject) => {
await self.ADisDB.ADisSprechwunschPolice.where({
done: 'false'
}).each((myWunsch) => {
@@ -17437,14 +17437,14 @@ class AutomaticDispose {
return resolve();
}).then(() => {
var MOIODOS = $('div#mission_list div.missionSideBarEntry:visible');
return MOIODOS.each((_, elem) => {
return MOIODOS.each(async (_, elem) => {
if ($(elem).text().match(/Gefangene sollen abtransportiert werden/g)) {
var MissionID = $(elem).attr("mission_id");
self.AddPoliceSprechwunschToQueue(MissionID);
await self.AddPoliceSprechwunschToQueue(MissionID);
}
});
}).then(() => {
$("#building_list").find(".building_list_vehicle_element").each((_, elem) => {
$("#building_list").find(".building_list_vehicle_element").each(async (_, elem) => {
var VehicleStatus = $(elem).find(".building_list_fms").text();
var VehicleType = Number(parseInt($(elem).find("a").attr("vehicle_type_id")));
var VehicleID = $(elem).attr("vehicle_id");
@@ -17454,7 +17454,7 @@ class AutomaticDispose {
var _meap = String(map2.attr('href'));
var MissionID = _meap.substr(_meap.lastIndexOf("/") + 1);
if (MissionID) {
self.AddPoliceSprechwunschToQueue(MissionID);
await self.AddPoliceSprechwunschToQueue(MissionID);
}
}
}
@@ -17468,7 +17468,7 @@ class AutomaticDispose {
OpenNextPoliceSprechwunsch() {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => {
return this.ADSettings().then((setting) => {
return await self.ADSettings().then((setting) => {
if (setting['Sprechwunsch-Automatic'] == 'true') {
return self.ADisDB.ADisSprechwunschPolice.where({
done: 'false'
@@ -17476,16 +17476,16 @@ class AutomaticDispose {
}
}).then((Wunsch) => {
if (Wunsch !== undefined) {
Wunsch.each((myWunsch) => {
Wunsch.each(async (myWunsch) => {
let MissionID = myWunsch.missionID;
self.UpdatePoliceSprechwunschToDone(MissionID).then(() => {
await self.UpdatePoliceSprechwunschToDone(MissionID).then(() => {
if ($("#adis-sprechwunsch-police-frame").attr("mission_id") == "empty") {
$("#adis-sprechwunsch-police-frame").attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
$("#adis-sprechwunsch-police-frame").attr("mission_id", MissionID);
self.PoliceVehicleFrameWatchDog = setTimeout(async function (MissionID) {
let self = this;
self.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => {
await self.RemovePoliceSprechwunschFromQueue(MissionID).then((deleteCount) => {
$("#adis-sprechwunsch-police-frame").attr("src", "");
$("#adis-sprechwunsch-police-frame").attr("mission_id", "empty");
});
@@ -17503,7 +17503,7 @@ class AutomaticDispose {
AddPoliceSprechwunschToQueue(WunschID) {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => {
return this.ADisDB.ADisSprechwunschPolice.put({
return await self.ADisDB.ADisSprechwunschPolice.put({
missionID: WunschID,
done: 'false'
})
@@ -17515,7 +17515,7 @@ class AutomaticDispose {
UpdatePoliceSprechwunschToDone(WunschID) {
let self = this;
return self.ADisDB.transaction('rw', [self.ADisDB.ADisSprechwunschPolice], async () => {
return self.ADisDB.ADisSprechwunschPolice.put({
return await self.ADisDB.ADisSprechwunschPolice.put({
missionID: WunschID,
done: 'true'
})
@@ -17685,7 +17685,7 @@ class AutomaticDispose {
self.Jails.reverse();
if (self.Jails.length > 0) {
this.Send_Vehicle_To_Jail()
self.Send_Vehicle_To_Jail()
} else {
$("#mission_vehicle_driving tbody, #mission_vehicle_at_mission tbody").find("tr").each((_, elem) => {
var CalledVehicleID = parseInt($(elem).find("a").first().attr("vehicle_type_id"));