v2 up share einsätze

This commit is contained in:
2018-12-03 10:58:20 +01:00
parent cf89b1178b
commit 7f146d2c41
6 changed files with 1310 additions and 11 deletions
+422
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
+423 -1
View File
File diff suppressed because it is too large Load Diff
+442 -5
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -295,6 +295,9 @@ foreach (glob("*.json") as $filename) {
$mission['id'] = $mission_id; $mission['id'] = $mission_id;
$mission['type'] = $mission_id; $mission['type'] = $mission_id;
$mission['name'] = $data['Name']; $mission['name'] = $data['Name'];
$mission['share'] = isset($data['Tritt nur ab dem Datum auf']) ? true : false;
$fd = fireDepartment($data); $fd = fireDepartment($data);
if (array_sum($fd) > 0) { if (array_sum($fd) > 0) {
$mission['fire_department'] = $fd; $mission['fire_department'] = $fd;
+19 -4
View File
@@ -1337,18 +1337,33 @@ class AutomaticDispose {
}).then(() => { }).then(() => {
if (self.OweSecure) { if (self.OweSecure) {
if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').size() > 0) { if ($('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)').length > 0) {
$('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)')[0].click(); $('#vehicle_show_table_all tr[vehicle_type="FuStW"] input[type="checkbox"]:not(:checked)')[0].click();
} }
} }
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked')); // TODO check cars driving or already there
if (self.MissionConfig.share){
let elem = $('#vehicle_show_table_all tr input[type="checkbox"]:checked')
for (let i = 0; 1 < elem.length; i++) {
if (i === 0) {
continue;
}
elem[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("WILL KLICK SEND") console.log("WILL KLICK SEND")
setTimeout(() => { setTimeout(() => {
self.UpdateMissionsToDone(self.MissionID).then(() => { self.UpdateMissionsToDone(self.MissionID).then(() => {
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`); tellParent(`setTimeout(function(){console.log('ok:${window.name}:${self.MissionID}');},500);`);
window.$('#mission_alarm_btn').click(); if (window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']").length > 0 && self.MissionConfig.share) {
window.$("a[title='Alarmieren, im Verband freigeben und nächsten Einsatz aufrufen']")[0].click();
} else {
window.$('#mission_alarm_btn').click();
}
}); });
}, 250); }, 250);