update Do 6. Feb 16:31:01 CET 2020

This commit is contained in:
Robert Richter 2020-02-06 16:31:01 +01:00
parent f6ca61cbdd
commit 8eaf7d0991
2 changed files with 17 additions and 9 deletions

View File

@ -680,11 +680,15 @@ module.exports = function(db, async, app_cfg) {
if (err == null && row) { if (err == null && row) {
console.log(row.uuid); console.log(row.uuid);
console.log(row.id); console.log(row.id);
db.all(`SELECT e.wachenname, e.einsatzmittel, e.status FROM waip_einsatzmittel e db.all(`SELECT e.einsatzmittel, e.status FROM waip_einsatzmittel e
WHERE e.waip_einsaetze_id = ?`, [row.id], function(err, rows) { WHERE e.waip_einsaetze_id = ?`, [row.id], function(err, rows) {
if (err == null && rows) { if (err == null && rows) {
var einsatzdaten = row; var einsatzdaten = row;
einsatzdaten.einsatzmittel = rows; einsatzdaten.einsatzmittel = rows;
db.all(`SELECT DISTINCT e.wachenname FROM waip_einsatzmittel e
WHERE e.waip_einsaetze_id = ?`, [row.id], function(err, wachen) {
if (err == null && wachen) {
einsatzdaten.wachen = wachen;
callback && callback(einsatzdaten); callback && callback(einsatzdaten);
} else { } else {
callback && callback(null); callback && callback(null);
@ -694,6 +698,10 @@ module.exports = function(db, async, app_cfg) {
callback && callback(null); callback && callback(null);
}; };
}); });
} else {
callback && callback(null);
};
});
}; };
return { return {

View File

@ -39,11 +39,11 @@
p.text-muted zur Wache ... p.text-muted zur Wache ...
.form-group .form-group
select#wachenauswahl.form-control.form-control-lg select#wachenauswahl.form-control.form-control-lg
select.custom-select
option(value=null) bitte Wache wählen option(value=null) bitte Wache wählen
option(value='1') CB FW Cottbus 1 each val in einsatzdaten.wachen
option(value='2') CB FW Cottbus 3 option(value='#{val.wachenname}') #{val.wachenname}
option(value='3') CB FW Madlow //option(value='2') CB FW Cottbus 3
option(value='4') CB FW Kieckebusch //option(value='3') CB FW Madlow
//option(value='4') CB FW Kieckebusch
.modal-footer .modal-footer
button#send_response.btn.btn-lg.btn-block.btn-warning.btn-outline-primary.ion-md-paper-plane(type='button', data-dismiss='modal') Rückmeldung absenden! button#send_response.btn.btn-lg.btn-block.btn-warning.btn-outline-primary.ion-md-paper-plane(type='button', data-dismiss='modal') Rückmeldung absenden!