diff --git a/public/js/client_dbrd.js b/public/js/client_dbrd.js index bc49c69..94a5284 100755 --- a/public/js/client_dbrd.js +++ b/public/js/client_dbrd.js @@ -1,3 +1,17 @@ + +$(document).ready(function() { + // Sound nicht beim laden der Seite abspielen + var audio = document.getElementById('audio'); + audio.src = ('/media/bell_message.mp3'); + audio.volume = 0.0; + setTimeout(function () { + audio.pause(); + audio.currentTime = 0; + audio.volume = 1.0; + }, 1000); +}); + + /* ########################### */ /* ######### LEAFLET ######### */ /* ########################### */ diff --git a/server/waip.js b/server/waip.js index a15990f..8fc66b2 100755 --- a/server/waip.js +++ b/server/waip.js @@ -326,6 +326,18 @@ module.exports = function (io, sql, fs, brk, async, app_cfg) { // nach alten Einsaetzen suchen und diese ggf. loeschen if (waip) { sql.db_log('WAIP', 'Einsatz mit der ID ' + waip.id + ' ist veraltet und kann gelöscht werden.') + // Dashboards trennen, deren Einsatz geloescht wurde + sql.db_socket_get_dbrd(waip.uuid, function (socket_ids) { + // TODO TEST: Dashboard-Trennen-Funktion testen + if (socket_ids) { + socket_ids.forEach(function (row) { + var socket = io.of('/dbrd').connected[row.socket_id]; + socket.emit('io.deleted', null); + sql.db_log('DBRD', 'Dashboard mit dem Socket ' + socket.id + ' getrennt, da Einsatz gelöscht.'); + sql.db_client_update_status(socket, null); + }); + }; + }); // beteiligte Wachen zum Einsatz ermitteln sql.db_einsatz_get_rooms(waip.id, function (data) { if (data) { @@ -348,18 +360,6 @@ module.exports = function (io, sql, fs, brk, async, app_cfg) { }; }); }; - sql.db_socket_get_by_room(waip.uuid, function (socket_ids) { - // Dashboards trennen, deren Einsatz geloescht wurde - // TODO TEST: Dashboard-Trennen-Funktion testen - if (socket_ids) { - socket_ids.forEach(function (row) { - var socket = io.of('/dbrd').connected[row.socket_id]; - socket.emit('io.deleted', null); - sql.db_log('DBRD', 'Dashboard mit dem Socket ' + socket.id + ' getrennt, da Einsatz gelöscht.'); - sql.db_client_update_status(socket, null); - }); - }; - }); sql.db_rmld_get_for_export(waip.einsatznummer, waip.uuid, function (full_rmld) { // beteiligte Wachen aus den Einsatz-Rueckmeldungen filtern var arry_wachen = full_rmld.map(a => a.wache_nr); diff --git a/views/includes/master_dashboard.pug b/views/includes/master_dashboard.pug index 9581bce..e7511d2 100755 --- a/views/includes/master_dashboard.pug +++ b/views/includes/master_dashboard.pug @@ -269,7 +269,7 @@ style(type='text/css'). a  AGT //a.badge.badge-warning 2 AGT .row - .col-4#pg-ek + .col-4#pg-ek.pr-1 //.progress.mt-1 .progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') a(style='') 2min @@ -278,12 +278,12 @@ style(type='text/css'). h 2min //.progress.mt-1 .progress-bar.progress-bar-striped.bg-success.ion-md-checkmark-circle(role='progressbar', style='width: 100%', aria-valuenow='100', aria-valuemin='0', aria-valuemax='100') - .col-4#pg-ma + .col-4#pg-ma.px-1 //.progress.mt-1 .progress-bar.progress-bar-striped.bg-info(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 3min //.progress.mt-1 .progress-bar.progress-bar-striped.bg-info(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 1min - .col-4#pg-fk + .col-4#pg-fk.pl-1 //.progress.mt-1.border.border-warning .progress-bar.progress-bar-striped.bg-light(role='progressbar', style='width: 50%', aria-valuenow='50', aria-valuemin='0', aria-valuemax='100') 10min .card-body.p-2 diff --git a/views/includes/master_wachalarm.pug b/views/includes/master_wachalarm.pug index 097ccbf..c9d5f49 100644 --- a/views/includes/master_wachalarm.pug +++ b/views/includes/master_wachalarm.pug @@ -54,7 +54,7 @@ a  AGT //a.badge.badge-warning 2 AGT .row - .col-4#pg-ek + .col-4#pg-ek.pr-1 //.progress.mt-1 .progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') a(style='') 2min @@ -63,12 +63,12 @@ h 2min //.progress.mt-1 .progress-bar.progress-bar-striped.bg-success.ion-md-checkmark-circle(role='progressbar', style='width: 100%', aria-valuenow='100', aria-valuemin='0', aria-valuemax='100') - .col-4#pg-ma + .col-4#pg-ma.px-1 //.progress.mt-1 .progress-bar.progress-bar-striped.bg-info(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 3min //.progress.mt-1 .progress-bar.progress-bar-striped.bg-info(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 1min - .col-4#pg-fk + .col-4#pg-fk.pl-1 //.progress.mt-1.border.border-warning .progress-bar.progress-bar-striped.bg-light(role='progressbar', style='width: 50%', aria-valuenow='50', aria-valuemin='0', aria-valuemax='100') 10min .col-6.h-60.d-flex.align-items-end.justify-content-start.tf_multiline