v2 up share einsätze
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+423
-1
File diff suppressed because it is too large
Load Diff
Vendored
+442
-5
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user