update Di 4. Feb 17:01:01 CET 2020

This commit is contained in:
Robert Richter 2020-02-04 17:01:01 +01:00
parent 2244dcb0c5
commit ac931ddaf1
4 changed files with 17 additions and 8 deletions

View File

@ -40,4 +40,6 @@ $('#rueckmeldung').each(function(index) {
$(this).on("click", function(){
$('#responseModal').modal('show');
});
});
});
console.log(einsatzdaten);

View File

@ -50,11 +50,17 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) {
app.get('/rueckmeldung/:waip_uuid', function(req, res, next) {
var waip_uuid = req.params.waip_uuid;
sql.db_get_einsatzdaten_by_uuid(waip_uuid, function(einsatzdaten) {
res.render('', {
//title: 'Einstellungen',
//user: req.user,
//reset_counter: data
});
if (einsatzdaten) {
res.render('test_rueckmeldung', {
title: 'Einsatz-Rückmeldung',
user: req.user,
einsatzdaten: einsatzdaten
});
} else {
var err = new Error('Der angefragte Einsatz ist nicht vorhanden!'+waip_uuid);
err.status = 404;
next(err);
};
});
});

View File

@ -674,7 +674,7 @@ module.exports = function(db, async, app_cfg) {
};
function db_get_einsatzdaten_by_uuid(waip_uuid, callback){
db.get(`SELECT e.id, e.ZEITSTEMPEL e.EINSATZART, e.STICHWORT, e.SONDERSIGNAL, e.OBJEKT, e.ORT,
db.get(`SELECT e.id, e.ZEITSTEMPEL, e.EINSATZART, e.STICHWORT, e.SONDERSIGNAL, e.OBJEKT, e.ORT,
e.ORTSTEIL, e.STRASSE, e.BESONDERHEITEN, e.wgs84_x, e.wgs84_y, e.wgs84_area FROM WAIP_EINSAETZE e
WHERE e.uuid like ?`, [waip_uuid], function(err, row) {
if (err == null && row) {
@ -682,7 +682,7 @@ module.exports = function(db, async, app_cfg) {
WHERE e.waip_einsaetze_id = ?`, [row.id], function(err, rows) {
if (err == null && rows) {
var einsatzdaten = row;
einsatzdaten.einsatzmittel = rows;
einsatzdaten.einsatzmittel = rows;
callback && callback(einsatzdaten);
} else {
callback && callback(null);

View File

@ -9,6 +9,7 @@ block content
include includes/modal_response
.container-fluid
include includes/rueckmeldung
a= JSON.stringify(einsatzdaten)
script(src='/js/leaflet.js')
// script(src='/js/textFit.min.js')
script(src='/js/rueckmeldung_client.js')