Update yy

This commit is contained in:
2018-11-26 07:50:44 +01:00
parent c05ef23e9c
commit 6699d3f900
4 changed files with 57 additions and 47 deletions

View File

@@ -158,29 +158,34 @@ function AD_StartAlarmProcess() {
return await ADis_CollectPatients();
})
.then(async () => {
return await Promise.all([
ADis_ProcessEmergencyMedicalService(),
ADis_ProcessFireDepartment(),
ADis_ProcessPoliceDepartment(),
ADis_ProcessTechnicalEmergencyService(),
ADis_ProcessWaterRescue(),
]).then((result) => {
var updateData = {
last_check: CurrentTime,
next_check: CurrentTime + 60
};
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
if (['adis-ownmissions', 'adis-krankentransporte', 'adis-verbandmission'].indexOf(window.name) !== -1) {
console.log("WILL KLICK SEND")
setTimeout(() => {
$('#mission_alarm_btn').click();
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${MissionID}');ADis_MissionUpdateDone('${window.name}', '${MissionID}');},1000);`);
}, 250);
}
})
});
return await ADis_ProcessEmergencyMedicalService()
})
.then(async () => {
return await ADis_ProcessFireDepartment()
})
.then(async () => {
return await ADis_ProcessPoliceDepartment()
})
.then(async () => {
return await ADis_ProcessTechnicalEmergencyService()
})
.then(async () => {
return await ADis_ProcessWaterRescue()
}).then(() => {
var updateData = {
last_check: CurrentTime,
next_check: CurrentTime + 60
};
console.log("Clicked Vehicles: ", $('#vehicle_show_table_all input[type="checkbox"]:checked').size(), $('#vehicle_show_table_all input[type="checkbox"]:checked'));
if (['adis-ownmissions', 'adis-krankentransporte', 'adis-verbandmission'].indexOf(window.name) !== -1) {
console.log("WILL KLICK SEND")
setTimeout(() => {
$('#mission_alarm_btn').click();
tellParent(`setTimeout(function(){console.log('ok:${window.name}:${MissionID}');ADis_MissionUpdateDone('${window.name}', '${MissionID}');},1000);`);
}, 250);
}
})
}, 500);
}