Compare commits
66 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b7008e2c7 | |||
| 13b2c5b265 | |||
| ad2c6bae21 | |||
| 94efbc9bad | |||
| 1327a4f52b | |||
| 700d2b21d9 | |||
| a0521d8299 | |||
| 6361749e0d | |||
| 729fe6c857 | |||
| bbdde391ae | |||
| d9d2ed799f | |||
| 9ab4be8f1a | |||
| 443539d9ed | |||
| be5a7ff61d | |||
| 39fe750cc0 | |||
| a266c208c5 | |||
| 1e605b01dd | |||
| 9cb3c40e90 | |||
| b900993fea | |||
| 9bf82dee21 | |||
| 87d19156a3 | |||
| f7886678c4 | |||
| a6ffa303a2 | |||
| d6fbec51db | |||
| c05df83bf6 | |||
| a39e55f04a | |||
| a5ab7bd80f | |||
| 4a29d9d4d4 | |||
| 5435c440ec | |||
| 1d1fe5f9f6 | |||
| c7f627f392 | |||
| b340b7c73d | |||
| ed8ace3876 | |||
| 120dd7e484 | |||
| 1947d7180e | |||
| 60f672bf97 | |||
| dadca832ce | |||
| 43d0da95b2 | |||
| 178d847871 | |||
| 27f1319162 | |||
| 8224bd00f3 | |||
| 9d3dd45181 | |||
| c25c4fe5e9 | |||
| 9de498b739 | |||
| b24f0dd1e3 | |||
| 166e53bbc8 | |||
| ae6419f63f | |||
| 95855b96a6 | |||
| e5c5432e78 | |||
| bc3239e3b2 | |||
| 57c86e788e | |||
| d7c8342728 | |||
| e9793a7c75 | |||
| 5df1b65598 | |||
| c80fe55df9 | |||
| d2c54b866f | |||
| c4a7390c72 | |||
| e78337b3be | |||
| 3030a230c8 | |||
| c836b158b4 | |||
| 00efc5ff9c | |||
| 66d44850cf | |||
| fca21d717a | |||
| f705576d9a | |||
| de918cf2f8 | |||
| 1517dbd7f0 |
+45
-2
@@ -11244,8 +11244,51 @@ JSON.parse(`{
|
|||||||
"423": {
|
"423": {
|
||||||
"id": "423",
|
"id": "423",
|
||||||
"type": "423",
|
"type": "423",
|
||||||
"name": null,
|
"name": "Brand in Klassenraum",
|
||||||
"share": false
|
"share": false,
|
||||||
|
"fire_department": {
|
||||||
|
"num_LF": 6,
|
||||||
|
"num_ELW_1": 2,
|
||||||
|
"num_ELW_2": 1,
|
||||||
|
"num_DLK": 1,
|
||||||
|
"num_RW": 1,
|
||||||
|
"num_FwK": 0,
|
||||||
|
"num_GW_A": 1,
|
||||||
|
"num_GW_G": 0,
|
||||||
|
"num_GW_Oel": 0,
|
||||||
|
"num_GW_Mess": 0,
|
||||||
|
"num_SW": 1,
|
||||||
|
"num_GW_Hoeh": 0,
|
||||||
|
"num_Dekon_P": 0,
|
||||||
|
"num_FLF": 0,
|
||||||
|
"num_Rettungstreppe": 0,
|
||||||
|
"num_GW_Werkfeuerwehr": 0,
|
||||||
|
"num_ULF_mit_Loescharm": 0,
|
||||||
|
"num_Turboloescher": 0
|
||||||
|
},
|
||||||
|
"police_department": {
|
||||||
|
"num_FuStW": 3,
|
||||||
|
"num_leBefKw": 0,
|
||||||
|
"num_GruKw": 0,
|
||||||
|
"num_FueKw": 0,
|
||||||
|
"num_GefKw": 0,
|
||||||
|
"num_WaWe": 0,
|
||||||
|
"num_PHu": 0,
|
||||||
|
"num_SEK_ZF": 0,
|
||||||
|
"num_SEK_MTF": 0,
|
||||||
|
"num_MEK_ZF": 0,
|
||||||
|
"num_MEK_MTF": 0
|
||||||
|
},
|
||||||
|
"emergency_medical_service": {
|
||||||
|
"use_KTW": false,
|
||||||
|
"use_RTW": true,
|
||||||
|
"use_NEF": true,
|
||||||
|
"use_RTH": false,
|
||||||
|
"use_LNA": true,
|
||||||
|
"use_OrgL": true,
|
||||||
|
"use_SEG_FULL": true,
|
||||||
|
"use_SEG_ELW1_Only": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"43": {
|
"43": {
|
||||||
"id": "43",
|
"id": "43",
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+46
-3
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Tue Dec 11 2018 19:22:03 GMT+0100 (CET)*/
|
/*Generated on:Mon Dec 17 2018 20:00:28 GMT+0100 (CET)*/
|
||||||
var AutomaticDispose_Branch = "master";
|
var AutomaticDispose_Branch = "master";
|
||||||
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
|
var AutomaticDispose_URL = "https://jf.git.rest/Jomaar/automatic-dispose/raw/branch/";
|
||||||
var da_lss_adis_time = new Date().getTime();
|
var da_lss_adis_time = new Date().getTime();
|
||||||
@@ -11249,8 +11249,51 @@ var ADis_AllMissions = JSON.parse(`{
|
|||||||
"423": {
|
"423": {
|
||||||
"id": "423",
|
"id": "423",
|
||||||
"type": "423",
|
"type": "423",
|
||||||
"name": null,
|
"name": "Brand in Klassenraum",
|
||||||
"share": false
|
"share": false,
|
||||||
|
"fire_department": {
|
||||||
|
"num_LF": 6,
|
||||||
|
"num_ELW_1": 2,
|
||||||
|
"num_ELW_2": 1,
|
||||||
|
"num_DLK": 1,
|
||||||
|
"num_RW": 1,
|
||||||
|
"num_FwK": 0,
|
||||||
|
"num_GW_A": 1,
|
||||||
|
"num_GW_G": 0,
|
||||||
|
"num_GW_Oel": 0,
|
||||||
|
"num_GW_Mess": 0,
|
||||||
|
"num_SW": 1,
|
||||||
|
"num_GW_Hoeh": 0,
|
||||||
|
"num_Dekon_P": 0,
|
||||||
|
"num_FLF": 0,
|
||||||
|
"num_Rettungstreppe": 0,
|
||||||
|
"num_GW_Werkfeuerwehr": 0,
|
||||||
|
"num_ULF_mit_Loescharm": 0,
|
||||||
|
"num_Turboloescher": 0
|
||||||
|
},
|
||||||
|
"police_department": {
|
||||||
|
"num_FuStW": 3,
|
||||||
|
"num_leBefKw": 0,
|
||||||
|
"num_GruKw": 0,
|
||||||
|
"num_FueKw": 0,
|
||||||
|
"num_GefKw": 0,
|
||||||
|
"num_WaWe": 0,
|
||||||
|
"num_PHu": 0,
|
||||||
|
"num_SEK_ZF": 0,
|
||||||
|
"num_SEK_MTF": 0,
|
||||||
|
"num_MEK_ZF": 0,
|
||||||
|
"num_MEK_MTF": 0
|
||||||
|
},
|
||||||
|
"emergency_medical_service": {
|
||||||
|
"use_KTW": false,
|
||||||
|
"use_RTW": true,
|
||||||
|
"use_NEF": true,
|
||||||
|
"use_RTH": false,
|
||||||
|
"use_LNA": true,
|
||||||
|
"use_OrgL": true,
|
||||||
|
"use_SEG_FULL": true,
|
||||||
|
"use_SEG_ELW1_Only": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"43": {
|
"43": {
|
||||||
"id": "43",
|
"id": "43",
|
||||||
|
|||||||
Vendored
+212
-58
@@ -1,4 +1,4 @@
|
|||||||
/*Generated on:Tue Dec 11 2018 19:22:03 GMT+0100 (CET)*/
|
/*Generated on:Mon Dec 17 2018 20:00:28 GMT+0100 (CET)*/
|
||||||
/*
|
/*
|
||||||
* Dexie.js - a minimalistic wrapper for IndexedDB
|
* Dexie.js - a minimalistic wrapper for IndexedDB
|
||||||
* ===============================================
|
* ===============================================
|
||||||
@@ -15728,8 +15728,51 @@ class AutomaticDispose {
|
|||||||
"423": {
|
"423": {
|
||||||
"id": "423",
|
"id": "423",
|
||||||
"type": "423",
|
"type": "423",
|
||||||
"name": null,
|
"name": "Brand in Klassenraum",
|
||||||
"share": false
|
"share": false,
|
||||||
|
"fire_department": {
|
||||||
|
"num_LF": 6,
|
||||||
|
"num_ELW_1": 2,
|
||||||
|
"num_ELW_2": 1,
|
||||||
|
"num_DLK": 1,
|
||||||
|
"num_RW": 1,
|
||||||
|
"num_FwK": 0,
|
||||||
|
"num_GW_A": 1,
|
||||||
|
"num_GW_G": 0,
|
||||||
|
"num_GW_Oel": 0,
|
||||||
|
"num_GW_Mess": 0,
|
||||||
|
"num_SW": 1,
|
||||||
|
"num_GW_Hoeh": 0,
|
||||||
|
"num_Dekon_P": 0,
|
||||||
|
"num_FLF": 0,
|
||||||
|
"num_Rettungstreppe": 0,
|
||||||
|
"num_GW_Werkfeuerwehr": 0,
|
||||||
|
"num_ULF_mit_Loescharm": 0,
|
||||||
|
"num_Turboloescher": 0
|
||||||
|
},
|
||||||
|
"police_department": {
|
||||||
|
"num_FuStW": 3,
|
||||||
|
"num_leBefKw": 0,
|
||||||
|
"num_GruKw": 0,
|
||||||
|
"num_FueKw": 0,
|
||||||
|
"num_GefKw": 0,
|
||||||
|
"num_WaWe": 0,
|
||||||
|
"num_PHu": 0,
|
||||||
|
"num_SEK_ZF": 0,
|
||||||
|
"num_SEK_MTF": 0,
|
||||||
|
"num_MEK_ZF": 0,
|
||||||
|
"num_MEK_MTF": 0
|
||||||
|
},
|
||||||
|
"emergency_medical_service": {
|
||||||
|
"use_KTW": false,
|
||||||
|
"use_RTW": true,
|
||||||
|
"use_NEF": true,
|
||||||
|
"use_RTH": false,
|
||||||
|
"use_LNA": true,
|
||||||
|
"use_OrgL": true,
|
||||||
|
"use_SEG_FULL": true,
|
||||||
|
"use_SEG_ELW1_Only": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"43": {
|
"43": {
|
||||||
"id": "43",
|
"id": "43",
|
||||||
@@ -17405,6 +17448,7 @@ class AutomaticDispose {
|
|||||||
self.MaxVehicleID = 86
|
self.MaxVehicleID = 86
|
||||||
self.MissionType = null
|
self.MissionType = null
|
||||||
self.MissionID = null
|
self.MissionID = null
|
||||||
|
self.MissionData = null
|
||||||
self.MyRunner = null
|
self.MyRunner = null
|
||||||
self.MyRunnerSettings = null
|
self.MyRunnerSettings = null
|
||||||
self.OweSecure = false
|
self.OweSecure = false
|
||||||
@@ -17524,7 +17568,9 @@ class AutomaticDispose {
|
|||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
self.ADisSettings.runner.forEach((runner) => {
|
self.ADisSettings.runner.forEach((runner) => {
|
||||||
|
if(['kt','om'].indexOf(runner) !== -1) {
|
||||||
self.OpenNextMission(runner)
|
self.OpenNextMission(runner)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18473,6 +18519,30 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
CollectMissions() {
|
CollectMissions() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], async () => {
|
||||||
|
self.ADSettings().then((setting) => {
|
||||||
|
return self.ADisDB.ADisMissions.toCollection()
|
||||||
|
}).then((Missions) => {
|
||||||
|
if (typeof Missions !== "undefined") {
|
||||||
|
|
||||||
|
return Missions.count((count) => {
|
||||||
|
if (count > 0) {
|
||||||
|
return Missions.each((MyMission) => {
|
||||||
|
var MissionElement = $("#mission_" + MyMission.missionID);
|
||||||
|
if (MissionElement.length == 0 || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_green')) {
|
||||||
|
// remove
|
||||||
|
console.log("Remove :", MyMission)
|
||||||
|
self.RemoveMissionsFromQueue(MyMission.missionID)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const MyOwnObserver = new MutationObserver((mutations) => {
|
const MyOwnObserver = new MutationObserver((mutations) => {
|
||||||
mutations.forEach((mutation) => {
|
mutations.forEach((mutation) => {
|
||||||
// console.log(mutation.target.id);
|
// console.log(mutation.target.id);
|
||||||
@@ -18500,11 +18570,11 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
ReadAndAddMissions(MissionID, Runner) {
|
ReadAndAddMissions(MissionID, Runner) {
|
||||||
const self = this;
|
const self = this;
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], async () => {
|
||||||
if (typeof MissionID != 'undefined') {
|
if (typeof MissionID != 'undefined') {
|
||||||
self.AddMission(MissionID, Runner);
|
await self.AddMission(MissionID, Runner);
|
||||||
} else {
|
} else {
|
||||||
self.ADisSettings.runner_divs.forEach(async (RunnerX, index) => {
|
await self.ADisSettings.runner_divs.forEach(async (RunnerX, index) => {
|
||||||
await $("#" + RunnerX).find(".missionSideBarEntry").each(async (index, elem) => {
|
await $("#" + RunnerX).find(".missionSideBarEntry").each(async (index, elem) => {
|
||||||
MissionID = $(elem).attr("mission_id");
|
MissionID = $(elem).attr("mission_id");
|
||||||
await self.AddMission(MissionID, RunnerX);
|
await self.AddMission(MissionID, RunnerX);
|
||||||
@@ -18522,7 +18592,6 @@ class AutomaticDispose {
|
|||||||
const runnerOpt = self.ADisSettings.runner[runnerID];
|
const runnerOpt = self.ADisSettings.runner[runnerID];
|
||||||
|
|
||||||
return self.ADSettings().then((setting) => {
|
return self.ADSettings().then((setting) => {
|
||||||
|
|
||||||
if (setting[settingOpt] == 'true') {
|
if (setting[settingOpt] == 'true') {
|
||||||
let where = {
|
let where = {
|
||||||
missionID: ID,
|
missionID: ID,
|
||||||
@@ -18531,38 +18600,67 @@ class AutomaticDispose {
|
|||||||
return self.ADisDB.ADisMissions.where(where).limit(1)
|
return self.ADisDB.ADisMissions.where(where).limit(1)
|
||||||
}
|
}
|
||||||
}).then((Missions) => {
|
}).then((Missions) => {
|
||||||
if (typeof Missions === "undefined") {
|
if (typeof Missions !== "undefined") {
|
||||||
return;
|
|
||||||
}
|
|
||||||
return Missions.count((count) => {
|
return Missions.count((count) => {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Missions.each(() => {
|
return Missions.each((MyMission) => {
|
||||||
var MissionElement = $("#mission_" + ID);
|
var MissionElement = $("#mission_" + ID);
|
||||||
var _MissionID = MissionElement.attr("mission_id");
|
|
||||||
var _MissionType = MissionElement.attr("mission_type_id");
|
var _MissionType = MissionElement.attr("mission_type_id");
|
||||||
var addr = MissionElement.find(".map_position_mover").text().split(",")
|
var addr = MissionElement.find(".map_position_mover").text().split(",")
|
||||||
var MissionName = addr[0];
|
var MissionName = addr[0];
|
||||||
var MissionStreet = addr[1];
|
var MissionStreet = addr[1];
|
||||||
var MissionVillage = addr[2];
|
var MissionVillage = addr[2];
|
||||||
|
|
||||||
|
if (MissionElement.length) {
|
||||||
|
return self.ADisDB.ADisAvailabelMissions.get({
|
||||||
|
type: _MissionType
|
||||||
|
}).then((available) => {
|
||||||
|
return self.UpdateMissions({
|
||||||
|
"missionID": MyMission.missionID,
|
||||||
|
"type": _MissionType,
|
||||||
|
"runner": MyMission.runner,
|
||||||
|
"name": MissionName,
|
||||||
|
"street": MissionStreet,
|
||||||
|
"village": MissionVillage,
|
||||||
|
"available": (available !== undefined)?'true':'false',
|
||||||
|
"done": "false",
|
||||||
|
"last_check": MyMission.last_check,
|
||||||
|
"next_check": MyMission.next_check
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var MissionElement = $("#mission_" + ID);
|
||||||
|
var MissionID = MissionElement.attr("mission_id");
|
||||||
|
var MissionType = MissionElement.attr("mission_type_id");
|
||||||
|
var addr = MissionElement.find(".map_position_mover").text().split(",")
|
||||||
|
var MissionName = addr[0];
|
||||||
|
var MissionStreet = addr[1];
|
||||||
|
var MissionVillage = addr[2];
|
||||||
|
if (MissionElement.length) {
|
||||||
return self.ADisDB.ADisAvailabelMissions.get({
|
return self.ADisDB.ADisAvailabelMissions.get({
|
||||||
type: MissionType
|
type: MissionType
|
||||||
}).then((available) => {
|
}).then((available) => {
|
||||||
return self.AddMissionsToQueue({
|
return self.UpdateMissions({
|
||||||
"id": _MissionID,
|
"missionID": MissionID,
|
||||||
"type": _MissionType,
|
"type": MissionType,
|
||||||
"runner": runnerOpt,
|
"runner": runnerOpt,
|
||||||
"name": MissionName,
|
"name": MissionName,
|
||||||
"street": MissionStreet,
|
"street": MissionStreet,
|
||||||
"village": MissionVillage,
|
"village": MissionVillage,
|
||||||
"available": (available !== undefined),
|
"available": (available !== undefined)?'true':'false',
|
||||||
"done": false,
|
"done": "false",
|
||||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var MissionElement = $("#mission_" + ID);
|
var MissionElement = $("#mission_" + ID);
|
||||||
|
|
||||||
@@ -18577,32 +18675,31 @@ class AutomaticDispose {
|
|||||||
type: MissionType
|
type: MissionType
|
||||||
}).then((available) => {
|
}).then((available) => {
|
||||||
return self.AddMissionsToQueue({
|
return self.AddMissionsToQueue({
|
||||||
"id": MissionID,
|
"missionID": MissionID,
|
||||||
"type": MissionType,
|
"type": MissionType,
|
||||||
"runner": runnerOpt,
|
"runner": runnerOpt,
|
||||||
"name": MissionName,
|
"name": MissionName,
|
||||||
"street": MissionStreet,
|
"street": MissionStreet,
|
||||||
"village": MissionVillage,
|
"village": MissionVillage,
|
||||||
"available": (available !== undefined),
|
"available": (available !== undefined)?'true':'false',
|
||||||
"done": false,
|
"done": 'false',
|
||||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddMissionsToQueue(Mission) {
|
AddMissionsToQueue(Mission) {
|
||||||
const self = this;
|
const self = this;
|
||||||
return self.ADisDB.ADisMissions.put({
|
return self.ADisDB.ADisMissions.put({
|
||||||
missionID: Mission.id,
|
missionID: Mission.missionID,
|
||||||
type: Mission.type,
|
type: Mission.type,
|
||||||
runner: Mission.runner,
|
runner: Mission.runner,
|
||||||
name: Mission.name,
|
name: Mission.name,
|
||||||
available: Mission.available ? 'true' : 'false',
|
available: Mission.available,
|
||||||
done: Mission.done ? 'true' : 'false',
|
done: Mission.done,
|
||||||
street: Mission.street,
|
street: Mission.street,
|
||||||
village: Mission.village,
|
village: Mission.village,
|
||||||
last_check: Mission.last_check,
|
last_check: Mission.last_check,
|
||||||
@@ -18621,6 +18718,7 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FreeIframe(Runner) {
|
FreeIframe(Runner) {
|
||||||
|
// console.log('FreeIframe', Runner);
|
||||||
const self = this;
|
const self = this;
|
||||||
const runnerID = self.ADisSettings.runner.indexOf(Runner)
|
const runnerID = self.ADisSettings.runner.indexOf(Runner)
|
||||||
const runnerIframe = self.ADisSettings.runner_iframes[runnerID];
|
const runnerIframe = self.ADisSettings.runner_iframes[runnerID];
|
||||||
@@ -18633,7 +18731,7 @@ class AutomaticDispose {
|
|||||||
const self = this;
|
const self = this;
|
||||||
return self.ADisDB.ADisMissions.update(MissionID, {
|
return self.ADisDB.ADisMissions.update(MissionID, {
|
||||||
last_check: Math.floor(new Date().getTime() / 1000),
|
last_check: Math.floor(new Date().getTime() / 1000),
|
||||||
next_check: Math.floor(new Date().getTime() / 1000) + 60
|
next_check: Math.floor(new Date().getTime() / 1000) + 120
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
})
|
})
|
||||||
@@ -18660,19 +18758,24 @@ class AutomaticDispose {
|
|||||||
// runnerID: runnerID,
|
// runnerID: runnerID,
|
||||||
// runnerSettings: runnerSettings,
|
// runnerSettings: runnerSettings,
|
||||||
// runnerIframeName: runnerIframeName,
|
// runnerIframeName: runnerIframeName,
|
||||||
// runnerIframe:runnerIframe
|
// runnerIframe: runnerIframe
|
||||||
// })
|
// })
|
||||||
|
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
|
||||||
self.ADSettings().then((setting) => {
|
self.ADSettings().then((setting) => {
|
||||||
if (setting[runnerSettings] == 'true') {
|
if (setting[runnerSettings] == 'true') {
|
||||||
return self.ADisDB.ADisMissions.where({
|
let coll = self.ADisDB.ADisMissions.where({
|
||||||
runner: Runner,
|
runner: Runner,
|
||||||
available: 'true',
|
available: 'true',
|
||||||
done: 'false'
|
done: 'false'
|
||||||
}).and(function (item) {
|
})
|
||||||
|
//if (self.MyRunner != "kt") {
|
||||||
|
coll = coll.and(function (item) {
|
||||||
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
}).toArray()
|
});
|
||||||
|
//}
|
||||||
|
|
||||||
|
return coll.toArray()
|
||||||
}
|
}
|
||||||
}).then((Wunsche) => {
|
}).then((Wunsche) => {
|
||||||
if (typeof Wunsche === "undefined") {
|
if (typeof Wunsche === "undefined") {
|
||||||
@@ -18681,11 +18784,13 @@ class AutomaticDispose {
|
|||||||
Wunsche.sort((a, b) => {
|
Wunsche.sort((a, b) => {
|
||||||
return a.next_check - b.next_check;
|
return a.next_check - b.next_check;
|
||||||
});
|
});
|
||||||
// console.table(Wunsche);
|
console.log("TIME:", Math.floor(new Date().getTime() / 1000))
|
||||||
|
//console.table(Wunsche);
|
||||||
|
|
||||||
if (Wunsche.length > 0) {
|
if (Wunsche.length > 0) {
|
||||||
let myWunsch = Wunsche[0];
|
let myWunsch = Wunsche[0];
|
||||||
// console.log("MYWUNSCH:")
|
console.log("MYWUNSCH:")
|
||||||
// console.table(myWunsch);
|
console.table(myWunsch);
|
||||||
let MissionID = myWunsch.missionID;
|
let MissionID = myWunsch.missionID;
|
||||||
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
||||||
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
@@ -18699,6 +18804,7 @@ class AutomaticDispose {
|
|||||||
} else {
|
} else {
|
||||||
// only while
|
// only while
|
||||||
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
||||||
|
self.UpdateMissionsToDone(MissionID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return setTimeout(self.OpenNextMission.bind(self), 1000, Runner);
|
return setTimeout(self.OpenNextMission.bind(self), 1000, Runner);
|
||||||
@@ -18736,6 +18842,13 @@ class AutomaticDispose {
|
|||||||
// console.log("Window", window.name);
|
// console.log("Window", window.name);
|
||||||
// console.log("self.MyRunner", self.MyRunner);
|
// console.log("self.MyRunner", self.MyRunner);
|
||||||
// console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
// console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
||||||
|
|
||||||
|
if (self.includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
||||||
|
console.log("DONE: " + self.MissionID);
|
||||||
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||||
|
})
|
||||||
|
} else {
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
||||||
self.ADSettings().then((setting) => {
|
self.ADSettings().then((setting) => {
|
||||||
if (setting[self.MyRunnerSettings] === 'true') {
|
if (setting[self.MyRunnerSettings] === 'true') {
|
||||||
@@ -18754,12 +18867,17 @@ class AutomaticDispose {
|
|||||||
return Wunsch.count(function (count) {
|
return Wunsch.count(function (count) {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Wunsch.each((mywunsch) => {
|
return Wunsch.each((mywunsch) => {
|
||||||
|
self.MissionData = mywunsch;
|
||||||
|
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
return self.MainHandler()
|
return self.MainHandler()
|
||||||
});
|
});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
//return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||||
})
|
})
|
||||||
|
//})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -18769,7 +18887,8 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, 1500);
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -18780,20 +18899,19 @@ class AutomaticDispose {
|
|||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||||
})
|
})
|
||||||
}
|
} else if (self.includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
||||||
if (self.includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
|
||||||
console.log("SEND: " + self.MissionID);
|
console.log("SEND: " + self.MissionID);
|
||||||
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
|
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function () {
|
|
||||||
if (['adis-ownmissions', 'adis-plannedeventss', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
if (['adis-ownmissions', 'adis-plannedeventss', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
||||||
self.CheckMissionAutomatic();
|
self.CheckMissionAutomatic();
|
||||||
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
||||||
self.WorkVerbandMission();
|
self.WorkVerbandMission();
|
||||||
}
|
}
|
||||||
}, 250);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18893,7 +19011,10 @@ class AutomaticDispose {
|
|||||||
if (self.MyRunner == 'os') {
|
if (self.MyRunner == 'os') {
|
||||||
self.OweSecure = true;
|
self.OweSecure = true;
|
||||||
}
|
}
|
||||||
|
Mission.done = "true";
|
||||||
|
self.UpdateMissions(Mission).then(()=>{
|
||||||
self.GetMissionConfiguration(Mission.type);
|
self.GetMissionConfiguration(Mission.type);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -18907,16 +19028,15 @@ class AutomaticDispose {
|
|||||||
return self.ADisDB.ADisAvailabelMissions.get({
|
return self.ADisDB.ADisAvailabelMissions.get({
|
||||||
type: MissionType.toString()
|
type: MissionType.toString()
|
||||||
}).then((availableMission) => {
|
}).then((availableMission) => {
|
||||||
if (availableMission != undefined && availableMission.jsondata) {
|
if (availableMission != undefined) {
|
||||||
|
if (availableMission.jsondata) {
|
||||||
self.MissionConfig = availableMission.jsondata;
|
self.MissionConfig = availableMission.jsondata;
|
||||||
// console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2))
|
// console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2))
|
||||||
self.StartAlarmProcess();
|
self.StartAlarmProcess();
|
||||||
} else {
|
} else {
|
||||||
var updateData = {
|
self.UpdateMissionsToDone(self.MissionID);
|
||||||
available: false,
|
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
|
||||||
next_check: CurrentTime + 60
|
}
|
||||||
};
|
|
||||||
self.UpdateOwnMissionsToDone(self.MissionID, updateData);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -18926,7 +19046,8 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
StartAlarmProcess() {
|
StartAlarmProcess() {
|
||||||
const self = this;
|
const self = this;
|
||||||
setTimeout(function () {
|
|
||||||
|
const alarming = function alarming(self) {
|
||||||
Promise.resolve().then(async () => {
|
Promise.resolve().then(async () => {
|
||||||
return await self.PrepareVehicleNeedList();
|
return await self.PrepareVehicleNeedList();
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
@@ -18965,27 +19086,60 @@ class AutomaticDispose {
|
|||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
elems[i].click();
|
$(elems[i]).click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
console.log("Clicked Vehicles:"+self.MissionID+":"+self.MissionConfig.type+" ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
||||||
// console.log("WILL KLICK SEND")
|
console.table(self.MissionData)
|
||||||
setTimeout(() => {
|
|
||||||
self.UpdateMissionsToDone(self.MissionID).then(async () => {
|
self.UpdateMissionsToDone(self.MissionID).then(async () => {
|
||||||
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
|
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},2500);`);
|
||||||
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
|
//if (window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").length > 0 && self.MissionConfig.share) {
|
||||||
window.$('input[type=checkbox]').prop('checked', false);
|
// window.$('input[type=checkbox]').prop('checked', false);
|
||||||
await self.WorkVerbandMission(true);
|
// await self.WorkVerbandMission(true);
|
||||||
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
|
// window.$('#allianceShareText').val('Kein RD, die Patiernten gehören mir! Anonsten kann nach 2h geschlossen werden. Danke für die Aufmerksamkeit!')
|
||||||
} else {
|
// window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").click();
|
||||||
|
//} else {
|
||||||
|
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length){
|
||||||
|
console.log('send now')
|
||||||
window.$('#mission_alarm_btn').click();
|
window.$('#mission_alarm_btn').click();
|
||||||
|
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
|
||||||
|
} else {
|
||||||
|
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
});
|
});
|
||||||
}, 250);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}, 500);
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
var $div = $("#mission-form > div:nth-child(7) > a");
|
||||||
|
var isShow = $div.is(':hidden');
|
||||||
|
//console.log($div, isShow);
|
||||||
|
if ($div.length && isShow) {
|
||||||
|
var observer = new MutationObserver(function (mutations) {
|
||||||
|
mutations.forEach(function (mutation) {
|
||||||
|
if (mutation.attributeName === "style") {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 750);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe($div[0], {
|
||||||
|
attributes: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$div.click();
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}, 150);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<title>LEITSTELLENSPIEL.DE - baue deine eigene Leitstelle, in deiner Stadt!</title>
|
<title>LEITSTELLENSPIEL.DE - baue deine eigene Leitstelle, in deiner Stadt!</title>
|
||||||
<meta content="authenticity_token" name="csrf-param" />
|
<meta content="authenticity_token" name="csrf-param" />
|
||||||
<meta content="vkqegDfvu+Jw9iZkm9WZO3ro5/gP+YsBhM/jZ+O/RJc=" name="csrf-token" />
|
<meta content="TjGsiG+tPyL8SPR51dhx6sasfS4wF1Rh9n4qtzZ+rMw=" name="csrf-token" />
|
||||||
|
|
||||||
<script src="/assets/application-a789289a71061d030b76a864e1d16075.js" type="text/javascript"></script>
|
<script src="/assets/application-a789289a71061d030b76a864e1d16075.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<title>LEITSTELLENSPIEL.DE - baue deine eigene Leitstelle, in deiner Stadt!</title>
|
<title>LEITSTELLENSPIEL.DE - baue deine eigene Leitstelle, in deiner Stadt!</title>
|
||||||
<meta content="authenticity_token" name="csrf-param" />
|
<meta content="authenticity_token" name="csrf-param" />
|
||||||
<meta content="DkQCRLr/vO+nL+kpNDWUuqKQ2S5OD3s5AAE9AC/cay0=" name="csrf-token" />
|
<meta content="hJglNqkHsn0i29Jl1jR6BKjpRCfjK8cVTvRYHW9X3mQ=" name="csrf-token" />
|
||||||
|
|
||||||
<script src="/assets/application-a789289a71061d030b76a864e1d16075.js" type="text/javascript"></script>
|
<script src="/assets/application-a789289a71061d030b76a864e1d16075.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
|||||||
+411
-21
@@ -1,25 +1,415 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<title>We're sorry, but something went wrong (500)</title>
|
<meta charset="utf-8">
|
||||||
<style type="text/css">
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
|
||||||
div.dialog {
|
|
||||||
width: 25em;
|
|
||||||
padding: 0 4em;
|
|
||||||
margin: 4em auto 0 auto;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-right-color: #999;
|
|
||||||
border-bottom-color: #999;
|
|
||||||
}
|
|
||||||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- This file lives in public/500.html -->
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<div id="500_hype_container" style="margin:auto;position:relative;width:600px;height:200px;overflow:hidden;">
|
|
||||||
<script type="text/javascript" charset="utf-8" src="/500.hyperesources/500_hype_generated_script.js?47359"></script>
|
|
||||||
|
<title>LEITSTELLENSPIEL.DE - baue deine eigene Leitstelle, in deiner Stadt!</title>
|
||||||
|
<meta content="authenticity_token" name="csrf-param" />
|
||||||
|
<meta content="A7oqOPApiZ55rSDeWfOI6Tk/D0I8Dd/wMWOGGAJr+xw=" name="csrf-token" />
|
||||||
|
|
||||||
|
<script src="/assets/application-a789289a71061d030b76a864e1d16075.js" type="text/javascript"></script>
|
||||||
|
|
||||||
|
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<link href="/assets/application-028394b6ea814be350e95b1aa7bb4711.css" media="all" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript"> //Set language
|
||||||
|
I18n.defaultLocale = "de";
|
||||||
|
I18n.locale = "de";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
">
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
tellParent("lightboxAdjust();");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<img src="/images/ajax-loader.gif" class="ajax-loader" id="ajax-loader">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-fluid" id="iframe-inside-container">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
|
||||||
|
<li><a href="/einsaetze">Mögliche Einsätze</a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="active">Brand in Klassenraum</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1>
|
||||||
|
<img src="/images/fire_gruen.png">
|
||||||
|
<img src="/images/fire_gelb.png">
|
||||||
|
<img src="/images/fire_rot.png">
|
||||||
|
Brand in Klassenraum
|
||||||
|
</h1>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-4">
|
||||||
|
<table class="table table-striped">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>Beschreibung</th>
|
||||||
|
<th>Wert</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Credits im Durchschnitt
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
3100
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Vorraussetzung an Polizeiwachen
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
3
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Vorraussetzung an Feuerwachen
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
11
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Vorraussetzung an Rettungswachen
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
10
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Ort
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
Schule
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
<div class="col-md-4">
|
||||||
|
<table class="table table-striped">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>Beschreibung</th>
|
||||||
|
<th>Wert</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte Löschfahrzeuge
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
6
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte Drehleitern
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
1
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte Rüstwagen
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
1
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte ELW 1
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
2
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte ELW 2
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
1
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte Streifenwagen
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
3
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte GW L 2 Wasser
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
1
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
GW-L2-Wasser Anforderungswahrscheinlichkeit
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
10
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Benötigte GW-A
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
1
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
GW-A Anforderungswahrscheinlichkeit
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
5
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
|
||||||
|
<table class="table table-striped">
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>Beschreibung</th>
|
||||||
|
<th>Wert</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Maximale Patientenanzahl
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
20
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Wahrscheinlichkeit, dass ein Patient transportiert werden muss
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
50
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
NEF Anforderungswahrscheinlichkeit
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
|
||||||
|
10
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Fachrichtung für Patienten
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
|
||||||
|
Allgemeine Innere
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="javascript:history.back()">Zurück</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Facebook Pixel Code -->
|
||||||
|
<script>
|
||||||
|
!function(f,b,e,v,n,t,s)
|
||||||
|
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||||
|
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
||||||
|
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
|
||||||
|
n.queue=[];t=b.createElement(e);t.async=!0;
|
||||||
|
t.src=v;s=b.getElementsByTagName(e)[0];
|
||||||
|
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
||||||
|
'https://connect.facebook.net/en_US/fbevents.js');
|
||||||
|
fbq('init', '2182797941993258');
|
||||||
|
fbq('track', 'PageView');
|
||||||
|
</script>
|
||||||
|
<noscript><img height="1" width="1" style="display:none"
|
||||||
|
src="https://www.facebook.com/tr?id=2182797941993258&ev=PageView&noscript=1"
|
||||||
|
/></noscript>
|
||||||
|
<!-- End Facebook Pixel Code -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
if(window.top !== window.self) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
$("#iframe-inside-container").css("width", "auto");
|
||||||
|
$("#iframe-inside-container").css("height", "auto");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
window.addEventListener("keydown",
|
||||||
|
function(e){
|
||||||
|
|
||||||
|
if (!$("input:text").is(":focus"))
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if (e.keyCode == 27)
|
||||||
|
{
|
||||||
|
|
||||||
|
tellParent("lightboxClose();");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"Name":null}
|
{"Credits im Durchschnitt":"3100","Vorraussetzung an Polizeiwachen":"3","Vorraussetzung an Feuerwachen":"11","Vorraussetzung an Rettungswachen":"10","Ort":"Schule","Benötigte Löschfahrzeuge":"6","Benötigte Drehleitern":"1","Benötigte Rüstwagen":"1","Benötigte ELW 1":"2","Benötigte ELW 2":"1","Benötigte Streifenwagen":"3","Benötigte GW L 2 Wasser":"1","GW-L2-Wasser Anforderungswahrscheinlichkeit":"10","Benötigte GW-A":"1","GW-A Anforderungswahrscheinlichkeit":"5","Maximale Patientenanzahl":"20","Wahrscheinlichkeit, dass ein Patient transportiert werden muss":"50","NEF Anforderungswahrscheinlichkeit":"10","Fachrichtung für Patienten":"Allgemeine Innere","Name":"Brand in Klassenraum"}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1. Mögliche_Einsätze
|
||||||
|
2. Brand in Klassenraum
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Brand in Klassenraum
|
||||||
|
|
||||||
|
|
||||||
|
Beschreibung Wert
|
||||||
|
Credits im Durchschnitt 3100
|
||||||
|
Vorraussetzung an Polizeiwachen 3
|
||||||
|
Vorraussetzung an Feuerwachen 11
|
||||||
|
Vorraussetzung an Rettungswachen 10
|
||||||
|
Ort Schule
|
||||||
|
|
||||||
|
|
||||||
|
Beschreibung Wert
|
||||||
|
Benötigte Löschfahrzeuge 6
|
||||||
|
Benötigte Drehleitern 1
|
||||||
|
Benötigte Rüstwagen 1
|
||||||
|
Benötigte ELW 1 2
|
||||||
|
Benötigte ELW 2 1
|
||||||
|
Benötigte Streifenwagen 3
|
||||||
|
Benötigte GW L 2 Wasser 1
|
||||||
|
GW-L2-Wasser Anforderungswahrscheinlichkeit 10
|
||||||
|
Benötigte GW-A 1
|
||||||
|
GW-A Anforderungswahrscheinlichkeit 5
|
||||||
|
|
||||||
|
|
||||||
|
Beschreibung Wert
|
||||||
|
Maximale Patientenanzahl 20
|
||||||
|
Wahrscheinlichkeit, dass ein Patient transportiert werden muss 50
|
||||||
|
NEF Anforderungswahrscheinlichkeit 10
|
||||||
|
Fachrichtung für Patienten Allgemeine Innere
|
||||||
|
|
||||||
|
Zurück
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,37 @@
|
|||||||
|
[ajax-loader.gif]
|
||||||
|
|
||||||
|
1. [1]Mögliche Einsätze
|
||||||
|
2. Brand in Klassenraum
|
||||||
|
|
||||||
|
[fire_gruen.png] [fire_gelb.png] [fire_rot.png] Brand in Klassenraum
|
||||||
|
|
||||||
|
Beschreibung Wert
|
||||||
|
Credits im Durchschnitt 3100
|
||||||
|
Vorraussetzung an Polizeiwachen 3
|
||||||
|
Vorraussetzung an Feuerwachen 11
|
||||||
|
Vorraussetzung an Rettungswachen 10
|
||||||
|
Ort Schule
|
||||||
|
Beschreibung Wert
|
||||||
|
Benötigte Löschfahrzeuge 6
|
||||||
|
Benötigte Drehleitern 1
|
||||||
|
Benötigte Rüstwagen 1
|
||||||
|
Benötigte ELW 1 2
|
||||||
|
Benötigte ELW 2 1
|
||||||
|
Benötigte Streifenwagen 3
|
||||||
|
Benötigte GW L 2 Wasser 1
|
||||||
|
GW-L2-Wasser Anforderungswahrscheinlichkeit 10
|
||||||
|
Benötigte GW-A 1
|
||||||
|
GW-A Anforderungswahrscheinlichkeit 5
|
||||||
|
Beschreibung Wert
|
||||||
|
Maximale Patientenanzahl 20
|
||||||
|
Wahrscheinlichkeit, dass ein Patient transportiert werden muss 50
|
||||||
|
NEF Anforderungswahrscheinlichkeit 10
|
||||||
|
Fachrichtung für Patienten Allgemeine Innere
|
||||||
|
[2]Zurück
|
||||||
|
|
||||||
|
[tr?id=2182797941993258&ev=PageView&noscript=1]
|
||||||
|
|
||||||
|
Verweise
|
||||||
|
|
||||||
|
1. file:///einsaetze
|
||||||
|
2. javascript:history.back()
|
||||||
|
|||||||
@@ -1372,7 +1372,17 @@ alertFhz(elw1, 1, 'ELW1', false);
|
|||||||
RTW();
|
RTW();
|
||||||
//alertFhz(rtw, 1, 'RTW', false);
|
//alertFhz(rtw, 1, 'RTW', false);
|
||||||
} else if ([423].indexOf(help) != -1 && !(isVerband)) {
|
} else if ([423].indexOf(help) != -1 && !(isVerband)) {
|
||||||
} else if ([43].indexOf(help) != -1 && !(isVerband)) {
|
alertFhz(ruest, 1, 'RÜST', false);
|
||||||
|
alertFhz(nef, 1, 'NEF', false);
|
||||||
|
alertFhz(lf, 6, 'LF', false);
|
||||||
|
alertFhz(gws, 1, 'GW-S', false);
|
||||||
|
alertFhz(gwa, 1, 'GW-A', false);
|
||||||
|
alertFhz(fustw, 3, 'FuStW', false);
|
||||||
|
alertFhz(elw2, 1, 'ELW2', false);
|
||||||
|
alertFhz(dl, 1, 'DL', false);
|
||||||
|
RTW();
|
||||||
|
//alertFhz(rtw, 20, 'RTW', false);
|
||||||
|
} else if ([43].indexOf(help) != -1 && !(isVerband)) {
|
||||||
alertFhz(ruest, 5, 'RÜST', false);
|
alertFhz(ruest, 5, 'RÜST', false);
|
||||||
alertFhz(oel, 2, 'GW-ÖL', false);
|
alertFhz(oel, 2, 'GW-ÖL', false);
|
||||||
alertFhz(lf, 10, 'LF', false);
|
alertFhz(lf, 10, 'LF', false);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"00080":["189"],"00100":["117","119","148","149","153","154","188","284","349","60","61"],"00110":["0","288","37","38","39","40","403","404","410"],"00120":["159","62","63","67","68","69","70","71"],"00130":["78"],"00150":["145","150","160","190","209","267","285","64","65","66"],"00170":["1"],"00200":["241","269","270","318","4","415","85"],"00210":["7"],"00220":["260","8"],"00240":["11"],"00250":["9","90"],"00300":["202","287","292","371","372","375","98"],"00310":["12","191","52"],"00340":["17","3","338"],"00350":["111","277"],"00370":["158","2","259","337","91"],"00400":["143","144","265","266","289","31","402","408","418","422","81","82","94"],"00500":["216","217","218","219","220","301","336","357","360","361","362","363","364","365","74","77","88"],"00550":["118","366"],"00600":["10","122","130","168","169","170","172","376","383","6"],"00610":["203"],"00650":["19"],"00700":["128","173","18","27","303","329","73"],"00750":["152","199"],"00800":["129","290","421","76"],"00850":["112"],"00870":["55"],"00900":["100","114","161","175","24","263","313","379","380","381","382"],"00980":["13","405","406","409"],"01000":["14","194","195","196","230","244","25","250","261","282","308","309","310","319","370","390"],"01010":["15","344"],"01020":["174","286"],"01100":["123","16","295","311","384"],"01200":["151","166","23","243","245","251","328","33","345"],"01310":["32"],"01400":["162","163","167","246","247","252","253","28","5"],"01410":["53"],"01500":["101","113","138","142","235","264","280","298","300","317","323"],"01600":["116","124","140","272","273","401"],"01700":["125","237","355","356"],"01800":["106","107","321","369","79","84"],"01900":["192","30","314","392"],"02000":["102","104","126","131","193","197","228","236","238","248","254","276","330","72","80"],"02020":["296"],"02100":["176","242"],"02200":["103","105","120","127"],"02230":["187"],"02400":["21"],"02470":["29"],"02500":["121","198","20","240","257","262","278","299","322","342","343","388","413","83","89","97"],"02700":["22","399"],"02800":["258","279","367"],"02900":["178","96"],"03000":["214","239","249","255","331","393","394","395","396","412","414","86","87","93"],"03200":["398"],"03310":["36"],"03500":["139","204","232","327"],"03510":["26"],"03600":["141"],"03620":["51"],"03700":["407"],"03710":["34"],"03720":["42"],"03810":["35"],"04000":["134","171","208","215","224","229","231","234","283","351","358","95"],"04100":["135"],"04200":["146","268"],"04400":["223","315","378"],"04500":["233","353","419"],"04600":["177"],"05000":["132","226","227"],"05050":["400"],"05100":["133","205","385"],"05400":["316"],"05500":["200","386"],"05630":["186"],"05900":["411"],"06000":["302","307","334","335","347"],"06050":["271"],"06500":["304","346","387"],"07000":["225","275","291","325"],"07500":["352","368"],"08000":["136","306"],"08100":["137"],"08500":["389"],"09000":["201","359"],"10000":["324","332","333","348"],"10010":["256","41","43"],"10020":["75"],"10200":["206"],"11200":["213"],"11500":["320"],"12000":["294"],"13000":["305"],"14000":["222"],"14010":["59"],"16010":["207"],"17000":["221","350","99"]}
|
{"00080":["189"],"00100":["117","119","148","149","153","154","188","284","349","60","61"],"00110":["0","288","37","38","39","40","403","404","410"],"00120":["159","62","63","67","68","69","70","71"],"00130":["78"],"00150":["145","150","160","190","209","267","285","64","65","66"],"00170":["1"],"00200":["241","269","270","318","4","415","85"],"00210":["7"],"00220":["260","8"],"00240":["11"],"00250":["9","90"],"00300":["202","287","292","371","372","375","98"],"00310":["12","191","52"],"00340":["17","3","338"],"00350":["111","277"],"00370":["158","2","259","337","91"],"00400":["143","144","265","266","289","31","402","408","418","422","81","82","94"],"00500":["216","217","218","219","220","301","336","357","360","361","362","363","364","365","74","77","88"],"00550":["118","366"],"00600":["10","122","130","168","169","170","172","376","383","6"],"00610":["203"],"00650":["19"],"00700":["128","173","18","27","303","329","73"],"00750":["152","199"],"00800":["129","290","421","76"],"00850":["112"],"00870":["55"],"00900":["100","114","161","175","24","263","313","379","380","381","382"],"00980":["13","405","406","409"],"01000":["14","194","195","196","230","244","25","250","261","282","308","309","310","319","370","390"],"01010":["15","344"],"01020":["174","286"],"01100":["123","16","295","311","384"],"01200":["151","166","23","243","245","251","328","33","345"],"01310":["32"],"01400":["162","163","167","246","247","252","253","28","5"],"01410":["53"],"01500":["101","113","138","142","235","264","280","298","300","317","323"],"01600":["116","124","140","272","273","401"],"01700":["125","237","355","356"],"01800":["106","107","321","369","79","84"],"01900":["192","30","314","392"],"02000":["102","104","126","131","193","197","228","236","238","248","254","276","330","72","80"],"02020":["296"],"02100":["176","242"],"02200":["103","105","120","127"],"02230":["187"],"02400":["21"],"02470":["29"],"02500":["121","198","20","240","257","262","278","299","322","342","343","388","413","83","89","97"],"02700":["22","399"],"02800":["258","279","367"],"02900":["178","96"],"03000":["214","239","249","255","331","393","394","395","396","412","414","86","87","93"],"03100":["423"],"03200":["398"],"03310":["36"],"03500":["139","204","232","327"],"03510":["26"],"03600":["141"],"03620":["51"],"03700":["407"],"03710":["34"],"03720":["42"],"03810":["35"],"04000":["134","171","208","215","224","229","231","234","283","351","358","95"],"04100":["135"],"04200":["146","268"],"04400":["223","315","378"],"04500":["233","353","419"],"04600":["177"],"05000":["132","226","227"],"05050":["400"],"05100":["133","205","385"],"05400":["316"],"05500":["200","386"],"05630":["186"],"05900":["411"],"06000":["302","307","334","335","347"],"06050":["271"],"06500":["304","346","387"],"07000":["225","275","291","325"],"07500":["352","368"],"08000":["136","306"],"08100":["137"],"08500":["389"],"09000":["201","359"],"10000":["324","332","333","348"],"10010":["256","41","43"],"10020":["75"],"10200":["206"],"11200":["213"],"11500":["320"],"12000":["294"],"13000":["305"],"14000":["222"],"14010":["59"],"16010":["207"],"17000":["221","350","99"]}
|
||||||
+166
-55
@@ -22,6 +22,7 @@ class AutomaticDispose {
|
|||||||
self.MaxVehicleID = 86
|
self.MaxVehicleID = 86
|
||||||
self.MissionType = null
|
self.MissionType = null
|
||||||
self.MissionID = null
|
self.MissionID = null
|
||||||
|
self.MissionData = null
|
||||||
self.MyRunner = null
|
self.MyRunner = null
|
||||||
self.MyRunnerSettings = null
|
self.MyRunnerSettings = null
|
||||||
self.OweSecure = false
|
self.OweSecure = false
|
||||||
@@ -141,7 +142,9 @@ class AutomaticDispose {
|
|||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
self.ADisSettings.runner.forEach((runner) => {
|
self.ADisSettings.runner.forEach((runner) => {
|
||||||
|
if(['kt','om'].indexOf(runner) !== -1) {
|
||||||
self.OpenNextMission(runner)
|
self.OpenNextMission(runner)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -856,6 +859,30 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
CollectMissions() {
|
CollectMissions() {
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
|
self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], async () => {
|
||||||
|
self.ADSettings().then((setting) => {
|
||||||
|
return self.ADisDB.ADisMissions.toCollection()
|
||||||
|
}).then((Missions) => {
|
||||||
|
if (typeof Missions !== "undefined") {
|
||||||
|
|
||||||
|
return Missions.count((count) => {
|
||||||
|
if (count > 0) {
|
||||||
|
return Missions.each((MyMission) => {
|
||||||
|
var MissionElement = $("#mission_" + MyMission.missionID);
|
||||||
|
if (MissionElement.length == 0 || $('#mission_panel_' + MyMission.missionID).hasClass('mission_panel_green')) {
|
||||||
|
// remove
|
||||||
|
console.log("Remove :", MyMission)
|
||||||
|
self.RemoveMissionsFromQueue(MyMission.missionID)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
const MyOwnObserver = new MutationObserver((mutations) => {
|
const MyOwnObserver = new MutationObserver((mutations) => {
|
||||||
mutations.forEach((mutation) => {
|
mutations.forEach((mutation) => {
|
||||||
// console.log(mutation.target.id);
|
// console.log(mutation.target.id);
|
||||||
@@ -883,11 +910,11 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
ReadAndAddMissions(MissionID, Runner) {
|
ReadAndAddMissions(MissionID, Runner) {
|
||||||
const self = this;
|
const self = this;
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], async () => {
|
||||||
if (typeof MissionID != 'undefined') {
|
if (typeof MissionID != 'undefined') {
|
||||||
self.AddMission(MissionID, Runner);
|
await self.AddMission(MissionID, Runner);
|
||||||
} else {
|
} else {
|
||||||
self.ADisSettings.runner_divs.forEach(async (RunnerX, index) => {
|
await self.ADisSettings.runner_divs.forEach(async (RunnerX, index) => {
|
||||||
await $("#" + RunnerX).find(".missionSideBarEntry").each(async (index, elem) => {
|
await $("#" + RunnerX).find(".missionSideBarEntry").each(async (index, elem) => {
|
||||||
MissionID = $(elem).attr("mission_id");
|
MissionID = $(elem).attr("mission_id");
|
||||||
await self.AddMission(MissionID, RunnerX);
|
await self.AddMission(MissionID, RunnerX);
|
||||||
@@ -905,7 +932,6 @@ class AutomaticDispose {
|
|||||||
const runnerOpt = self.ADisSettings.runner[runnerID];
|
const runnerOpt = self.ADisSettings.runner[runnerID];
|
||||||
|
|
||||||
return self.ADSettings().then((setting) => {
|
return self.ADSettings().then((setting) => {
|
||||||
|
|
||||||
if (setting[settingOpt] == 'true') {
|
if (setting[settingOpt] == 'true') {
|
||||||
let where = {
|
let where = {
|
||||||
missionID: ID,
|
missionID: ID,
|
||||||
@@ -914,38 +940,67 @@ class AutomaticDispose {
|
|||||||
return self.ADisDB.ADisMissions.where(where).limit(1)
|
return self.ADisDB.ADisMissions.where(where).limit(1)
|
||||||
}
|
}
|
||||||
}).then((Missions) => {
|
}).then((Missions) => {
|
||||||
if (typeof Missions === "undefined") {
|
if (typeof Missions !== "undefined") {
|
||||||
return;
|
|
||||||
}
|
|
||||||
return Missions.count((count) => {
|
return Missions.count((count) => {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Missions.each(() => {
|
return Missions.each((MyMission) => {
|
||||||
var MissionElement = $("#mission_" + ID);
|
var MissionElement = $("#mission_" + ID);
|
||||||
var _MissionID = MissionElement.attr("mission_id");
|
|
||||||
var _MissionType = MissionElement.attr("mission_type_id");
|
var _MissionType = MissionElement.attr("mission_type_id");
|
||||||
var addr = MissionElement.find(".map_position_mover").text().split(",")
|
var addr = MissionElement.find(".map_position_mover").text().split(",")
|
||||||
var MissionName = addr[0];
|
var MissionName = addr[0];
|
||||||
var MissionStreet = addr[1];
|
var MissionStreet = addr[1];
|
||||||
var MissionVillage = addr[2];
|
var MissionVillage = addr[2];
|
||||||
|
|
||||||
|
if (MissionElement.length) {
|
||||||
|
return self.ADisDB.ADisAvailabelMissions.get({
|
||||||
|
type: _MissionType
|
||||||
|
}).then((available) => {
|
||||||
|
return self.UpdateMissions({
|
||||||
|
"missionID": MyMission.missionID,
|
||||||
|
"type": _MissionType,
|
||||||
|
"runner": MyMission.runner,
|
||||||
|
"name": MissionName,
|
||||||
|
"street": MissionStreet,
|
||||||
|
"village": MissionVillage,
|
||||||
|
"available": (available !== undefined)?'true':'false',
|
||||||
|
"done": "false",
|
||||||
|
"last_check": MyMission.last_check,
|
||||||
|
"next_check": MyMission.next_check
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var MissionElement = $("#mission_" + ID);
|
||||||
|
var MissionID = MissionElement.attr("mission_id");
|
||||||
|
var MissionType = MissionElement.attr("mission_type_id");
|
||||||
|
var addr = MissionElement.find(".map_position_mover").text().split(",")
|
||||||
|
var MissionName = addr[0];
|
||||||
|
var MissionStreet = addr[1];
|
||||||
|
var MissionVillage = addr[2];
|
||||||
|
if (MissionElement.length) {
|
||||||
return self.ADisDB.ADisAvailabelMissions.get({
|
return self.ADisDB.ADisAvailabelMissions.get({
|
||||||
type: MissionType
|
type: MissionType
|
||||||
}).then((available) => {
|
}).then((available) => {
|
||||||
return self.AddMissionsToQueue({
|
return self.UpdateMissions({
|
||||||
"id": _MissionID,
|
"missionID": MissionID,
|
||||||
"type": _MissionType,
|
"type": MissionType,
|
||||||
"runner": runnerOpt,
|
"runner": runnerOpt,
|
||||||
"name": MissionName,
|
"name": MissionName,
|
||||||
"street": MissionStreet,
|
"street": MissionStreet,
|
||||||
"village": MissionVillage,
|
"village": MissionVillage,
|
||||||
"available": (available !== undefined),
|
"available": (available !== undefined)?'true':'false',
|
||||||
"done": false,
|
"done": "false",
|
||||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
var MissionElement = $("#mission_" + ID);
|
var MissionElement = $("#mission_" + ID);
|
||||||
|
|
||||||
@@ -960,32 +1015,31 @@ class AutomaticDispose {
|
|||||||
type: MissionType
|
type: MissionType
|
||||||
}).then((available) => {
|
}).then((available) => {
|
||||||
return self.AddMissionsToQueue({
|
return self.AddMissionsToQueue({
|
||||||
"id": MissionID,
|
"missionID": MissionID,
|
||||||
"type": MissionType,
|
"type": MissionType,
|
||||||
"runner": runnerOpt,
|
"runner": runnerOpt,
|
||||||
"name": MissionName,
|
"name": MissionName,
|
||||||
"street": MissionStreet,
|
"street": MissionStreet,
|
||||||
"village": MissionVillage,
|
"village": MissionVillage,
|
||||||
"available": (available !== undefined),
|
"available": (available !== undefined)?'true':'false',
|
||||||
"done": false,
|
"done": 'false',
|
||||||
"last_check": Math.floor(new Date().getTime() / 1000),
|
"last_check": Math.floor(new Date().getTime() / 1000),
|
||||||
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
"next_check": Math.floor(new Date().getTime() / 1000) + 1
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AddMissionsToQueue(Mission) {
|
AddMissionsToQueue(Mission) {
|
||||||
const self = this;
|
const self = this;
|
||||||
return self.ADisDB.ADisMissions.put({
|
return self.ADisDB.ADisMissions.put({
|
||||||
missionID: Mission.id,
|
missionID: Mission.missionID,
|
||||||
type: Mission.type,
|
type: Mission.type,
|
||||||
runner: Mission.runner,
|
runner: Mission.runner,
|
||||||
name: Mission.name,
|
name: Mission.name,
|
||||||
available: Mission.available ? 'true' : 'false',
|
available: Mission.available,
|
||||||
done: Mission.done ? 'true' : 'false',
|
done: Mission.done,
|
||||||
street: Mission.street,
|
street: Mission.street,
|
||||||
village: Mission.village,
|
village: Mission.village,
|
||||||
last_check: Mission.last_check,
|
last_check: Mission.last_check,
|
||||||
@@ -1004,6 +1058,7 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FreeIframe(Runner) {
|
FreeIframe(Runner) {
|
||||||
|
// console.log('FreeIframe', Runner);
|
||||||
const self = this;
|
const self = this;
|
||||||
const runnerID = self.ADisSettings.runner.indexOf(Runner)
|
const runnerID = self.ADisSettings.runner.indexOf(Runner)
|
||||||
const runnerIframe = self.ADisSettings.runner_iframes[runnerID];
|
const runnerIframe = self.ADisSettings.runner_iframes[runnerID];
|
||||||
@@ -1016,7 +1071,7 @@ class AutomaticDispose {
|
|||||||
const self = this;
|
const self = this;
|
||||||
return self.ADisDB.ADisMissions.update(MissionID, {
|
return self.ADisDB.ADisMissions.update(MissionID, {
|
||||||
last_check: Math.floor(new Date().getTime() / 1000),
|
last_check: Math.floor(new Date().getTime() / 1000),
|
||||||
next_check: Math.floor(new Date().getTime() / 1000) + 60
|
next_check: Math.floor(new Date().getTime() / 1000) + 120
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
})
|
})
|
||||||
@@ -1043,19 +1098,24 @@ class AutomaticDispose {
|
|||||||
// runnerID: runnerID,
|
// runnerID: runnerID,
|
||||||
// runnerSettings: runnerSettings,
|
// runnerSettings: runnerSettings,
|
||||||
// runnerIframeName: runnerIframeName,
|
// runnerIframeName: runnerIframeName,
|
||||||
// runnerIframe:runnerIframe
|
// runnerIframe: runnerIframe
|
||||||
// })
|
// })
|
||||||
|
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions, self.ADisDB.ADisAvailabelMissions], () => {
|
||||||
self.ADSettings().then((setting) => {
|
self.ADSettings().then((setting) => {
|
||||||
if (setting[runnerSettings] == 'true') {
|
if (setting[runnerSettings] == 'true') {
|
||||||
return self.ADisDB.ADisMissions.where({
|
let coll = self.ADisDB.ADisMissions.where({
|
||||||
runner: Runner,
|
runner: Runner,
|
||||||
available: 'true',
|
available: 'true',
|
||||||
done: 'false'
|
done: 'false'
|
||||||
}).and(function (item) {
|
})
|
||||||
|
//if (self.MyRunner != "kt") {
|
||||||
|
coll = coll.and(function (item) {
|
||||||
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
||||||
}).toArray()
|
});
|
||||||
|
//}
|
||||||
|
|
||||||
|
return coll.toArray()
|
||||||
}
|
}
|
||||||
}).then((Wunsche) => {
|
}).then((Wunsche) => {
|
||||||
if (typeof Wunsche === "undefined") {
|
if (typeof Wunsche === "undefined") {
|
||||||
@@ -1064,11 +1124,13 @@ class AutomaticDispose {
|
|||||||
Wunsche.sort((a, b) => {
|
Wunsche.sort((a, b) => {
|
||||||
return a.next_check - b.next_check;
|
return a.next_check - b.next_check;
|
||||||
});
|
});
|
||||||
// console.table(Wunsche);
|
console.log("TIME:", Math.floor(new Date().getTime() / 1000))
|
||||||
|
//console.table(Wunsche);
|
||||||
|
|
||||||
if (Wunsche.length > 0) {
|
if (Wunsche.length > 0) {
|
||||||
let myWunsch = Wunsche[0];
|
let myWunsch = Wunsche[0];
|
||||||
// console.log("MYWUNSCH:")
|
console.log("MYWUNSCH:")
|
||||||
// console.table(myWunsch);
|
console.table(myWunsch);
|
||||||
let MissionID = myWunsch.missionID;
|
let MissionID = myWunsch.missionID;
|
||||||
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
if ($('#' + runnerIframe).attr("mission_id") == "empty") {
|
||||||
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
$('#' + runnerIframe).attr("src", "https://www.leitstellenspiel.de/missions/" + MissionID);
|
||||||
@@ -1082,6 +1144,7 @@ class AutomaticDispose {
|
|||||||
} else {
|
} else {
|
||||||
// only while
|
// only while
|
||||||
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
// setTimeout(self.OpenNextMission.bind(self), 5000, Runner);
|
||||||
|
self.UpdateMissionsToDone(MissionID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return setTimeout(self.OpenNextMission.bind(self), 1000, Runner);
|
return setTimeout(self.OpenNextMission.bind(self), 1000, Runner);
|
||||||
@@ -1119,6 +1182,13 @@ class AutomaticDispose {
|
|||||||
// console.log("Window", window.name);
|
// console.log("Window", window.name);
|
||||||
// console.log("self.MyRunner", self.MyRunner);
|
// console.log("self.MyRunner", self.MyRunner);
|
||||||
// console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
// console.log("self.MyRunnerSettings", self.MyRunnerSettings);
|
||||||
|
|
||||||
|
if (self.includesString($('#iframe-inside-container > div.missionNotFound > div.missionNotFoundText').text(), 'Der Einsatz wurde erfolgreich abgeschlossen.')) {
|
||||||
|
console.log("DONE: " + self.MissionID);
|
||||||
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||||
|
})
|
||||||
|
} else {
|
||||||
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
return self.ADisDB.transaction('rw', [self.ADisDB.ADisMissions], () => {
|
||||||
self.ADSettings().then((setting) => {
|
self.ADSettings().then((setting) => {
|
||||||
if (setting[self.MyRunnerSettings] === 'true') {
|
if (setting[self.MyRunnerSettings] === 'true') {
|
||||||
@@ -1137,12 +1207,17 @@ class AutomaticDispose {
|
|||||||
return Wunsch.count(function (count) {
|
return Wunsch.count(function (count) {
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Wunsch.each((mywunsch) => {
|
return Wunsch.each((mywunsch) => {
|
||||||
|
self.MissionData = mywunsch;
|
||||||
|
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
return self.MainHandler()
|
return self.MainHandler()
|
||||||
});
|
});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
//return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
|
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
return tellParent(`console.log('wunsch:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`);
|
||||||
})
|
})
|
||||||
|
//})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -1152,7 +1227,8 @@ class AutomaticDispose {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, 1500);
|
}
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1163,20 +1239,19 @@ class AutomaticDispose {
|
|||||||
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
return self.RemoveMissionsFromQueue(self.MissionID).then(() => {
|
||||||
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
return tellParent(`console.log('handler:1000:done:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // delete Mission here as completed
|
||||||
})
|
})
|
||||||
}
|
} else if (self.includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
||||||
if (self.includesString($('#iframe-inside-container > div.alert.fade.in.alert-success').text(), "wurde erfolgreich informiert") /*|| $('#vehicle_show_table_all input[type="checkbox"]:checked').size() > 0*/ ) {
|
|
||||||
console.log("SEND: " + self.MissionID);
|
console.log("SEND: " + self.MissionID);
|
||||||
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
return self.UpdateMissionsToDone(self.MissionID).then(() => {
|
||||||
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
|
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function () {
|
|
||||||
if (['adis-ownmissions', 'adis-plannedeventss', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
if (['adis-ownmissions', 'adis-plannedeventss', 'adis-krankentransporte'].indexOf(window.name) != -1) {
|
||||||
self.CheckMissionAutomatic();
|
self.CheckMissionAutomatic();
|
||||||
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
} else if (['adis-verbandmission', 'adis-verbandmission-event'].indexOf(window.name) != -1) {
|
||||||
self.WorkVerbandMission();
|
self.WorkVerbandMission();
|
||||||
}
|
}
|
||||||
}, 250);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1276,7 +1351,10 @@ class AutomaticDispose {
|
|||||||
if (self.MyRunner == 'os') {
|
if (self.MyRunner == 'os') {
|
||||||
self.OweSecure = true;
|
self.OweSecure = true;
|
||||||
}
|
}
|
||||||
|
Mission.done = "true";
|
||||||
|
self.UpdateMissions(Mission).then(()=>{
|
||||||
self.GetMissionConfiguration(Mission.type);
|
self.GetMissionConfiguration(Mission.type);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1290,16 +1368,15 @@ class AutomaticDispose {
|
|||||||
return self.ADisDB.ADisAvailabelMissions.get({
|
return self.ADisDB.ADisAvailabelMissions.get({
|
||||||
type: MissionType.toString()
|
type: MissionType.toString()
|
||||||
}).then((availableMission) => {
|
}).then((availableMission) => {
|
||||||
if (availableMission != undefined && availableMission.jsondata) {
|
if (availableMission != undefined) {
|
||||||
|
if (availableMission.jsondata) {
|
||||||
self.MissionConfig = availableMission.jsondata;
|
self.MissionConfig = availableMission.jsondata;
|
||||||
// console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2))
|
// console.log('MissionConfig: ', MissionType.toString(), JSON.stringify(self.MissionConfig, null, 2))
|
||||||
self.StartAlarmProcess();
|
self.StartAlarmProcess();
|
||||||
} else {
|
} else {
|
||||||
var updateData = {
|
self.UpdateMissionsToDone(self.MissionID);
|
||||||
available: false,
|
return tellParent(`console.log('handler:2000:update:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');`); // update Mission here as updated or full
|
||||||
next_check: CurrentTime + 60
|
}
|
||||||
};
|
|
||||||
self.UpdateOwnMissionsToDone(self.MissionID, updateData);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -1309,7 +1386,8 @@ class AutomaticDispose {
|
|||||||
|
|
||||||
StartAlarmProcess() {
|
StartAlarmProcess() {
|
||||||
const self = this;
|
const self = this;
|
||||||
setTimeout(function () {
|
|
||||||
|
const alarming = function alarming(self) {
|
||||||
Promise.resolve().then(async () => {
|
Promise.resolve().then(async () => {
|
||||||
return await self.PrepareVehicleNeedList();
|
return await self.PrepareVehicleNeedList();
|
||||||
}).then(async () => {
|
}).then(async () => {
|
||||||
@@ -1348,27 +1426,60 @@ class AutomaticDispose {
|
|||||||
if (i === 0) {
|
if (i === 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
elems[i].click();
|
$(elems[i]).click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
console.log("Clicked Vehicles:"+self.MissionID+":"+self.MissionConfig.type+" ", $('#vehicle_show_table_all input[type="checkbox"]:checked').length, $('#vehicle_show_table_all input[type="checkbox"]:checked'));
|
||||||
// console.log("WILL KLICK SEND")
|
console.table(self.MissionData)
|
||||||
setTimeout(() => {
|
|
||||||
self.UpdateMissionsToDone(self.MissionID).then(async () => {
|
self.UpdateMissionsToDone(self.MissionID).then(async () => {
|
||||||
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
|
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},2500);`);
|
||||||
if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
|
//if (window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").length > 0 && self.MissionConfig.share) {
|
||||||
window.$('input[type=checkbox]').prop('checked', false);
|
// window.$('input[type=checkbox]').prop('checked', false);
|
||||||
await self.WorkVerbandMission(true);
|
// await self.WorkVerbandMission(true);
|
||||||
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
|
// window.$('#allianceShareText').val('Kein RD, die Patiernten gehören mir! Anonsten kann nach 2h geschlossen werden. Danke für die Aufmerksamkeit!')
|
||||||
} else {
|
// window.$("a.btn.btn-success.btn-sm.alert_notify_alliance").click();
|
||||||
|
//} else {
|
||||||
|
if ($('#vehicle_show_table_all input[type="checkbox"]:checked').length){
|
||||||
|
console.log('send now')
|
||||||
window.$('#mission_alarm_btn').click();
|
window.$('#mission_alarm_btn').click();
|
||||||
|
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
|
||||||
|
} else {
|
||||||
|
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');window.AutomaticDisposeCall.FreeIframe('${self.MyRunner}');},500);`);
|
||||||
}
|
}
|
||||||
|
//}
|
||||||
});
|
});
|
||||||
}, 250);
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}, 500);
|
}
|
||||||
|
setTimeout(function () {
|
||||||
|
var $div = $("#mission-form > div:nth-child(7) > a");
|
||||||
|
var isShow = $div.is(':hidden');
|
||||||
|
//console.log($div, isShow);
|
||||||
|
if ($div.length && isShow) {
|
||||||
|
var observer = new MutationObserver(function (mutations) {
|
||||||
|
mutations.forEach(function (mutation) {
|
||||||
|
if (mutation.attributeName === "style") {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 750);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
observer.observe($div[0], {
|
||||||
|
attributes: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$div.click();
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
alarming(self)
|
||||||
|
}, 250);
|
||||||
|
}
|
||||||
|
}, 150);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
// - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
||||||
|
|||||||
+193
-6
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
class WatchMissions {
|
class WatchMissions {
|
||||||
|
|
||||||
constructor(){
|
constructor() {
|
||||||
let self = this;
|
let self = this;
|
||||||
self.DB = new Dexie('LSS_AutomaticDispo');
|
self.DB = new Dexie('LSS_WatchMissions');
|
||||||
|
|
||||||
|
|
||||||
self.DB.version(1).stores({
|
self.DB.version(1).stores({
|
||||||
@@ -18,6 +18,7 @@ class WatchMissions {
|
|||||||
* Missions to Watch
|
* Missions to Watch
|
||||||
* - missionID - Mission ID that should be watched.
|
* - missionID - Mission ID that should be watched.
|
||||||
* - limit - If the Mission turns green more than 6 times, no more requests will be sent.
|
* - limit - If the Mission turns green more than 6 times, no more requests will be sent.
|
||||||
|
* - data - {name, datetime, onsite{ username:{ cars: [ {name, type} ] } } }
|
||||||
*/
|
*/
|
||||||
Missions: "++missionID"
|
Missions: "++missionID"
|
||||||
});
|
});
|
||||||
@@ -33,23 +34,209 @@ class WatchMissions {
|
|||||||
else if (window.location.pathname.indexOf("/missions/") !== -1 && window.name == 'watchMission') {
|
else if (window.location.pathname.indexOf("/missions/") !== -1 && window.name == 'watchMission') {
|
||||||
self.RegisterMissionPage();
|
self.RegisterMissionPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
get RandomTime() {
|
get RandomTime() {
|
||||||
const max = 6;
|
const max = 6;
|
||||||
const min = 1;
|
const min = 1;
|
||||||
return Math.floor((Math.random()*(max-min+1)+min)*1000);
|
return Math.floor((Math.random() * (max - min + 1) + min) * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterIndexPage() {
|
RegisterIndexPage() {
|
||||||
|
let self = this;
|
||||||
|
// -
|
||||||
|
// - Google Font
|
||||||
|
// -
|
||||||
|
var styleElement = document.createElement("link");
|
||||||
|
styleElement.rel = "stylesheet";
|
||||||
|
styleElement.href = "https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700";
|
||||||
|
this.ADis_MyHead.appendChild(styleElement);
|
||||||
|
|
||||||
|
// -
|
||||||
|
// - FontAwesome 5
|
||||||
|
// -
|
||||||
|
var scriptElement = document.createElement("script");
|
||||||
|
scriptElement.type = "text/javascript";
|
||||||
|
scriptElement.src = "https://use.fontawesome.com/releases/v5.5.0/js/all.js";
|
||||||
|
this.ADis_MyHead.appendChild(scriptElement);
|
||||||
|
|
||||||
|
// -
|
||||||
|
// - Navbar Dashboard
|
||||||
|
// -
|
||||||
|
var styleElement = document.createElement("link");
|
||||||
|
styleElement.rel = "stylesheet";
|
||||||
|
styleElement.type = "text/css";
|
||||||
|
styleElement.media = "screen";
|
||||||
|
styleElement.href = this.ADisSettings.url + this.ADisSettings.branch + "/style/interface.css";
|
||||||
|
this.ADis_MyHead.appendChild(styleElement);
|
||||||
|
|
||||||
|
// Create Dashboard
|
||||||
|
$('#news_li').before('<li id="adis-nav-item"></li>');
|
||||||
|
$('#adis-nav-item').html(`/***ADis_Navbar***/0`)
|
||||||
|
$("#adis-dashboard").css({
|
||||||
|
display: "none",
|
||||||
|
opacity: "0"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
RegisterMissionPage() {
|
// Generate HTML Table
|
||||||
|
// Builds the HTML Table out of myList json data from Ivy restful service.
|
||||||
|
buildHtmlTable() {
|
||||||
|
const self = this;
|
||||||
|
self.addTable(myList, $("#excelDataTable"));
|
||||||
|
}
|
||||||
|
|
||||||
|
addTable(list, appendObj) {
|
||||||
|
const self = this;
|
||||||
|
appendObj.html('');
|
||||||
|
var columns = self.addAllColumnHeaders(list, appendObj);
|
||||||
|
|
||||||
|
for (var i = 0; i < list.length; i++) {
|
||||||
|
var row$ = $('<tr/>');
|
||||||
|
for (var colIndex = 0; colIndex < columns.length; colIndex++) {
|
||||||
|
var cellValue = list[i][columns[colIndex]];
|
||||||
|
|
||||||
|
if (cellValue == null) {
|
||||||
|
cellValue = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellValue.constructor === Array) {
|
||||||
|
$a = $('<td/>');
|
||||||
|
row$.append($a);
|
||||||
|
self.addTable(cellValue, $a);
|
||||||
|
|
||||||
|
} else if (cellValue.constructor === Object) {
|
||||||
|
|
||||||
|
var array = $.map(cellValue, function (value, index) {
|
||||||
|
return [value];
|
||||||
|
});
|
||||||
|
|
||||||
|
$a = $('<td/>');
|
||||||
|
row$.append($a);
|
||||||
|
self.addObject(array, $a);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
row$.append($('<td/>').html(cellValue));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appendObj.append(row$);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
addObject(list, appendObj) {
|
||||||
|
const self = this;
|
||||||
|
for (var i = 0; i < list.length; i++) {
|
||||||
|
var row$ = $('<tr/>');
|
||||||
|
|
||||||
|
var cellValue = list[i];
|
||||||
|
|
||||||
|
if (cellValue == null) {
|
||||||
|
cellValue = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellValue.constructor === Array) {
|
||||||
|
$a = $('<td/>');
|
||||||
|
row$.append($a);
|
||||||
|
self.addTable(cellValue, $a);
|
||||||
|
|
||||||
|
} else if (cellValue.constructor === Object) {
|
||||||
|
|
||||||
|
var array = $.map(cellValue, function (value, index) {
|
||||||
|
return [value];
|
||||||
|
});
|
||||||
|
|
||||||
|
$a = $('<td/>');
|
||||||
|
row$.append($a);
|
||||||
|
self.addObject(array, $a);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
row$.append($('<td/>').html(cellValue));
|
||||||
|
}
|
||||||
|
appendObj.append(row$);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds a header row to the table and returns the set of columns.
|
||||||
|
// Need to do union of keys from all records as some records may not contain
|
||||||
|
// all records
|
||||||
|
addAllColumnHeaders(list, appendObj) {
|
||||||
|
var columnSet = [];
|
||||||
|
var headerTr$ = $('<tr/>');
|
||||||
|
|
||||||
|
for (var i = 0; i < list.length; i++) {
|
||||||
|
var rowHash = list[i];
|
||||||
|
for (var key in rowHash) {
|
||||||
|
if ($.inArray(key, columnSet) == -1) {
|
||||||
|
columnSet.push(key);
|
||||||
|
headerTr$.append($('<th/>').html(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
appendObj.append(headerTr$);
|
||||||
|
|
||||||
|
return columnSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mission Page
|
||||||
|
|
||||||
|
RegisterMissionPage() {
|
||||||
|
let MissionType = null;
|
||||||
|
let MissionID = document.location.pathname.substr(document.location.pathname.lastIndexOf("/") + 1);
|
||||||
|
let help_el = $('a#mission_help');
|
||||||
|
if (help_el.length > 0) {
|
||||||
|
MissionType = help_el[0].href.split("?")[0];
|
||||||
|
var re = /\d+$/i;
|
||||||
|
var found = MissionType.match(re);
|
||||||
|
MissionType = Number(found[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var myRows = [];
|
||||||
|
var $headers = $("table#mission_vehicle_driving th");
|
||||||
|
var $rows = $("table#mission_vehicle_driving tbody tr").each(function (index) {
|
||||||
|
$cells = $(this).find("td");
|
||||||
|
myRows[index] = {};
|
||||||
|
$cells.each(function (cellIndex) {
|
||||||
|
let mcoai = '';
|
||||||
|
if (cellIndex == 1) {
|
||||||
|
mcoai = ($($(this).find("a")[0]).text().trim() + ' ' + $($(this).find("small")[0]).text().trim()).replace(/(\r\n\t|\n|\r\t|\s{2,})/gm, "");
|
||||||
|
} else {
|
||||||
|
mcoai = ($(this).text().trim()).replace(/(\r\n\t|\n|\r\t|\s{2,})/gm, "");
|
||||||
|
}
|
||||||
|
console.log(cellIndex, mcoai, $($headers[cellIndex]).text().trim());
|
||||||
|
if ($($headers[cellIndex]).text().trim() != '') {
|
||||||
|
myRows[index][$($headers[cellIndex]).text().trim()] = mcoai
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Let's put this in the object like you want and convert to JSON (Note: jQuery will also do this for you on the Ajax request)
|
||||||
|
var myObj = {};
|
||||||
|
myObj.Anfahrt = myRows.filter(value => Object.keys(value).length !== 0);
|
||||||
|
|
||||||
|
myRows = [];
|
||||||
|
$headers = $("table#mission_vehicle_at_mission th");
|
||||||
|
$rows = $("table#mission_vehicle_at_mission tbody tr").each(function (index) {
|
||||||
|
$cells = $(this).find("td");
|
||||||
|
myRows[index] = {};
|
||||||
|
$cells.each(function (cellIndex) {
|
||||||
|
let mcoai = '';
|
||||||
|
if (cellIndex == 1) {
|
||||||
|
mcoai = ($($(this).find("a")[0]).text().trim() + ' ' + $($(this).find("small")[0]).text().trim()).replace(/(\r\n\t|\n|\r\t|\s{2,})/gm, "");
|
||||||
|
} else {
|
||||||
|
mcoai = ($(this).text().trim()).replace(/(\r\n\t|\n|\r\t|\s{2,})/gm, "");
|
||||||
|
}
|
||||||
|
console.log(cellIndex, mcoai, $($headers[cellIndex]).text().trim());
|
||||||
|
if ($($headers[cellIndex]).text().trim() != '') {
|
||||||
|
myRows[index][$($headers[cellIndex]).text().trim()] = mcoai
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Let's put this in the object like you want and convert to JSON (Note: jQuery will also do this for you on the Ajax request)
|
||||||
|
myObj.VorOrt = myRows.filter(value => Object.keys(value).length !== 0);
|
||||||
|
console.log(myObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user