update Di 7. Jul 16:31:01 CEST 2020

This commit is contained in:
Robert Richter 2020-07-07 16:31:01 +02:00
parent deb6522280
commit 094fba5966
4 changed files with 11 additions and 9 deletions

View File

@ -357,9 +357,12 @@ socket.on('io.Einsatz', function (data) {
if (data.besonderheiten) {
$('#einsatzort_list').append('<li class="list-group-item text-warning">' + data.besonderheiten+ '</li>');
};
// Alte Einsatzmittel loeschen
var table_em = document.getElementById('table_einsatzmittel');
table_em.getElementsByTagName('tbody')[0].innerHTML = '';
// Einsatzmittel-Tabelle
for (var i in data.einsatzmittel) {
var table_em = document.getElementById('table_einsatzmittel');
var wache_vorhanden = false;
var wache_zeile = 0;
var wachen_idstr =data.einsatzmittel[i].wachenname.replace(/[^A-Z0-9]+/ig, '_');

View File

@ -570,10 +570,7 @@ module.exports = function (db, app_cfg) {
function db_socket_get_dbrd(waip_id, callback) {
// Client-Eintrag per Socket-ID finden
console.log(waip_id);
db.all('select socket_id from waip_clients where client_status = ? and socket_id like \'/dbrd#%\'', [waip_id], function (err, rows) {
console.log(rows);
console.log(err);
if (err == null && rows) {
callback && callback(rows);
} else {

View File

@ -332,9 +332,11 @@ module.exports = function (io, sql, fs, brk, async, app_cfg) {
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);
if (typeof socket !== 'undefined') {
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);
};
});
};
});

View File

@ -178,7 +178,7 @@ style(type='text/css').
th(scope='col').text-info.pl-3 Wache
th(scope='col').text-info.pl-3 Einsatzmittel
tbody
//tr
tr
th(scope='row') CB FW Cottbus 1
td
div.d-flex.flex-wrap.justify-content-between.align-items-center
@ -198,7 +198,7 @@ style(type='text/css').
div.d-flex.justify-content-between
div.pr-2 FL CB 01/85-01
div.p-2.badge.badge-info 1
//tr
tr
th(scope='row') CB FW Madlow
td
div.d-flex.flex-wrap.justify-content-between.align-items-center