From 7c9823829949378ba8cc36061e501fcdfa1b12d7 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Mon, 10 Feb 2020 21:01:01 +0100 Subject: [PATCH] update Mo 10. Feb 21:01:01 CET 2020 --- server/routing.js | 6 ++++-- views/admin/adm_show_missions.pug | 2 +- views/includes/master_rueckmeldung.pug | 2 +- views/rmld.pug | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/server/routing.js b/server/routing.js index b0ff9c9..40a6fcc 100644 --- a/server/routing.js +++ b/server/routing.js @@ -53,6 +53,7 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) { sql.db_get_einsatzdaten_by_uuid(waip_uuid, function(einsatzdaten) { if (einsatzdaten) { res.render('rmld', { + public: app_cfg.public, title: 'Einsatz-Rückmeldung', user: req.user, 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)); sql.db_save_response(req.body, function(result){ if (result) { - res.redirect('/rueckmeldung/' + req.params.waip_uuid); + res.redirect('/rmld/' + req.params.waip_uuid); } else { var err = new Error('Fehler beim senden der Rückmeldung!'); 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) { sql.db_get_active_waips(function(data) { res.render('admin/adm_show_missions', { + public: app_cfg.public, title: 'Akutelle Einsätze', user: req.user, dataSet: data diff --git a/views/admin/adm_show_missions.pug b/views/admin/adm_show_missions.pug index 2aa3568..5cc0b23 100644 --- a/views/admin/adm_show_missions.pug +++ b/views/admin/adm_show_missions.pug @@ -10,7 +10,7 @@ block content ol each val in dataSet li= val.einsatzart + ', ' + val.stichwort + ', ' + val.ort + ' ' + val.ortsteil - a(href="/rueckmeldung/" + val.uuid)= val.uuid + a(href="/rmld/" + val.uuid)= val.uuid ul if val.a each val_a in (val.a).split(",") diff --git a/views/includes/master_rueckmeldung.pug b/views/includes/master_rueckmeldung.pug index 4e77576..080cd3f 100755 --- a/views/includes/master_rueckmeldung.pug +++ b/views/includes/master_rueckmeldung.pug @@ -1,5 +1,5 @@ .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_uhrzeit.text-muted.text-right 11:22:33 .col-10 diff --git a/views/rmld.pug b/views/rmld.pug index 7db97da..a84bd4f 100755 --- a/views/rmld.pug +++ b/views/rmld.pug @@ -11,4 +11,4 @@ block content script. var einsatzdaten_obj = !{JSON.stringify(einsatzdaten).replace(/<\//g, '<\\/')} script(src='/js/leaflet.js') - script(src='/js/rueckmeldung_client.js') \ No newline at end of file + script(src='/js/client_rmld.js') \ No newline at end of file