update Mo 10. Feb 21:01:01 CET 2020

This commit is contained in:
Robert Richter 2020-02-10 21:01:01 +01:00
parent c7736731fb
commit 7c98238299
4 changed files with 7 additions and 5 deletions

View File

@ -53,6 +53,7 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) {
sql.db_get_einsatzdaten_by_uuid(waip_uuid, function(einsatzdaten) { sql.db_get_einsatzdaten_by_uuid(waip_uuid, function(einsatzdaten) {
if (einsatzdaten) { if (einsatzdaten) {
res.render('rmld', { res.render('rmld', {
public: app_cfg.public,
title: 'Einsatz-Rückmeldung', title: 'Einsatz-Rückmeldung',
user: req.user, user: req.user,
einsatzdaten: einsatzdaten einsatzdaten: einsatzdaten
@ -65,11 +66,11 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) {
}); });
}); });
app.post('/rueckmeldung/:waip_uuid', function(req, res) { app.post('/rmld/:waip_uuid', function(req, res) {
console.log('post_rueckmeldung '+JSON.stringify(req.body)); console.log('post_rueckmeldung '+JSON.stringify(req.body));
sql.db_save_response(req.body, function(result){ sql.db_save_response(req.body, function(result){
if (result) { if (result) {
res.redirect('/rueckmeldung/' + req.params.waip_uuid); res.redirect('/rmld/' + req.params.waip_uuid);
} else { } else {
var err = new Error('Fehler beim senden der Rückmeldung!'); var err = new Error('Fehler beim senden der Rückmeldung!');
err.status = 501; err.status = 501;
@ -146,6 +147,7 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) {
app.get('/adm_show_missions', auth.ensureAdmin, function(req, res) { app.get('/adm_show_missions', auth.ensureAdmin, function(req, res) {
sql.db_get_active_waips(function(data) { sql.db_get_active_waips(function(data) {
res.render('admin/adm_show_missions', { res.render('admin/adm_show_missions', {
public: app_cfg.public,
title: 'Akutelle Einsätze', title: 'Akutelle Einsätze',
user: req.user, user: req.user,
dataSet: data dataSet: data

View File

@ -10,7 +10,7 @@ block content
ol ol
each val in dataSet each val in dataSet
li= val.einsatzart + ', ' + val.stichwort + ', ' + val.ort + ' ' + val.ortsteil li= val.einsatzart + ', ' + val.stichwort + ', ' + val.ort + ' ' + val.ortsteil
a(href="/rueckmeldung/" + val.uuid)= val.uuid a(href="/rmld/" + val.uuid)= val.uuid
ul ul
if val.a if val.a
each val_a in (val.a).split(",") each val_a in (val.a).split(",")

View File

@ -1,5 +1,5 @@
.row.no-gutters .row.no-gutters
.d-flex.justify-content-between .col-12.d-flex.justify-content-between
p#einsatz_datum.text-muted 01.01.2020 p#einsatz_datum.text-muted 01.01.2020
p#einsatz_uhrzeit.text-muted.text-right 11:22:33 p#einsatz_uhrzeit.text-muted.text-right 11:22:33
.col-10 .col-10

View File

@ -11,4 +11,4 @@ block content
script. script.
var einsatzdaten_obj = !{JSON.stringify(einsatzdaten).replace(/<\//g, '<\\/')} var einsatzdaten_obj = !{JSON.stringify(einsatzdaten).replace(/<\//g, '<\\/')}
script(src='/js/leaflet.js') script(src='/js/leaflet.js')
script(src='/js/rueckmeldung_client.js') script(src='/js/client_rmld.js')