diff --git a/server/routing.js b/server/routing.js index 8d9c8ef..f005744 100755 --- a/server/routing.js +++ b/server/routing.js @@ -199,8 +199,7 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp) app.post('/rmld/:waip_uuid/:rmld_uuid', function(req, res) { var waip_uuid = req.params.waip_uuid; var rmld_uuid = req.params.rmld_uuid; - console.log('rmld by post: '+rmld_uuid); - sql.db_save_rmld(req.body, function(result){ + sql.db_save_rmld(waip_uuid, rmld_uuid, req.body, function(result){ if (result) { req.flash('successMessage', 'Rückmeldung erfolgreich gesendet, auf zum Einsatz!'); res.redirect('/rmld/' + waip_uuid + '/' + rmld_uuid ); diff --git a/server/sql_qry.js b/server/sql_qry.js index ef197f4..a2509b9 100755 --- a/server/sql_qry.js +++ b/server/sql_qry.js @@ -616,13 +616,12 @@ module.exports = function(db, uuidv4, turf, app_cfg) { }); };*/ - function db_save_rmld(responseobj, callback) { + function db_save_rmld(waip_uuid, rmld_uuid, responseobj, callback) { - console.log('rmld by post: '+JSON.stringify(responseobj.rmld_uuid)); - // Rueckmeldung aufarbeiten + // Rueckmeldung aufarbeiten var reuckmeldung = {}; - reuckmeldung.rmld_uuid = responseobj.rmld_uuid; - reuckmeldung.waip_uuid = responseobj.waip_uuid; + reuckmeldung.rmld_uuid = rmld_uuid; + reuckmeldung.waip_uuid = waip_uuid; // Typ der Einsatzfunktion festlegen switch (responseobj.radio_efunction) { case 'ek': @@ -664,7 +663,7 @@ module.exports = function(db, uuidv4, turf, app_cfg) { reuckmeldung.wache_id = null; }; //console.log(JSON.stringify(reuckmeldung)); - + console.log('rmld by post: '+JSON.stringify(reuckmeldung)); db.get(`select name_wache, nr_wache from waip_wachen where id = ?;`, [reuckmeldung.wache_id], function(err, row) { if (err == null && row) { diff --git a/views/includes/modal_rmld.pug b/views/includes/modal_rmld.pug index 7bd3981..889b8a5 100644 --- a/views/includes/modal_rmld.pug +++ b/views/includes/modal_rmld.pug @@ -17,7 +17,6 @@ span(aria-hidden='true') × #responseModalBody.modal-body form#send_response.was-validated(action=einsatzdaten.uuid, method="POST") - input(type="hidden" name="waip_uuid" value=einsatzdaten.uuid) .form-group p.text-muted Ich komme als ... .custom-control.custom-radio.form-control-lg