update Do 6. Feb 17:31:01 CET 2020
This commit is contained in:
parent
371a3c66e3
commit
c8b5c8df19
@ -65,16 +65,16 @@ module.exports = function(app, sql, app_cfg, passport, auth, udp) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.post('/rueckmeldung/:waip_uuid', function(req, res) {
|
app.post('/rueckmeldung/:waip_uuid', function(req, res) {
|
||||||
sql.db_save_response(waip_id, responseobj, function(result){
|
console.log('post_rueckmeldung '+req.body.waip_id);
|
||||||
|
sql.db_save_response(req.body.waip_id, req.body, function(result){
|
||||||
if (result) {
|
if (result) {
|
||||||
res.redirect('/rueckmeldung/' + req.params.waip_uuid);
|
res.redirect('/rueckmeldung/' + 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 = 500;
|
err.status = 501;
|
||||||
next(err);
|
next(err);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
res.redirect('/rueckmeldung/:waip_uuid');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// get /config
|
// get /config
|
||||||
|
|||||||
@ -605,6 +605,7 @@ module.exports = function(db, async, app_cfg) {
|
|||||||
};*/
|
};*/
|
||||||
|
|
||||||
function db_save_response(waip_id, responseobj, callback) {
|
function db_save_response(waip_id, responseobj, callback) {
|
||||||
|
console.log(waip_id,responseobj);
|
||||||
db.run((`INSERT INTO waip_response
|
db.run((`INSERT INTO waip_response
|
||||||
(waip_einsaetze_id, response_json)
|
(waip_einsaetze_id, response_json)
|
||||||
VALUES (
|
VALUES (
|
||||||
|
|||||||
@ -7,7 +7,8 @@
|
|||||||
button.close(type='button', data-dismiss='modal', aria-label='Close')
|
button.close(type='button', data-dismiss='modal', aria-label='Close')
|
||||||
span(aria-hidden='true') ×
|
span(aria-hidden='true') ×
|
||||||
#responseModalBody.modal-body
|
#responseModalBody.modal-body
|
||||||
form#send_response(action="/rueckmeldung", method="POST")
|
form#send_response(action=einsatzdaten.uuid, method="POST")
|
||||||
|
input(type="hidden" name="waip_id" value=einsatzdaten.id)
|
||||||
.form-group
|
.form-group
|
||||||
p.text-muted Ich komme als ...
|
p.text-muted Ich komme als ...
|
||||||
.custom-control.custom-radio.form-control-lg
|
.custom-control.custom-radio.form-control-lg
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user