update So 15. Mär 21:31:01 CET 2020

This commit is contained in:
Robert Richter 2020-03-15 21:31:01 +01:00
parent dc9f1dc8ee
commit 6aef654c66
6 changed files with 26 additions and 15 deletions

View File

@ -61,10 +61,6 @@ audio {
height: 40% !important; height: 40% !important;
} }
.h-70 {
height: 70% !important;
}
.h-45 { .h-45 {
height: 45% !important; height: 45% !important;
} }
@ -73,10 +69,18 @@ audio {
height: 55% !important; height: 55% !important;
} }
.h-60 {
height: 60% !important;
}
.h-65 { .h-65 {
height: 65% !important; height: 65% !important;
} }
.h-70 {
height: 70% !important;
}
.h-80 { .h-80 {
height: 80% !important; height: 80% !important;
} }

View File

@ -520,11 +520,14 @@ function add_resp_progressbar(p_id, p_type, p_agt, p_start, p_end) {
break; break;
}; };
// pruefen ob div mit id 'pg-'+p_id schon vorhanden ist
var pgbar = document.getElementById('pg-' + p_id);
if(!pgbar){
$( '#pg-' + p_type ).append( '<div class="progress mt-1 position-relative '+bar_border+'" id="pg-' + p_id + '" style="height: 15px; font-size: 14px;"></div>'); //+ ' ></div>' ); $( '#pg-' + p_type ).append( '<div class="progress mt-1 position-relative '+bar_border+'" id="pg-' + p_id + '" style="height: 15px; font-size: 14px;"></div>'); //+ ' ></div>' );
$( '#pg-'+ p_id ).append( '<div id="pg-bar'+ p_id +'" class="progress-bar progress-bar-striped '+ bar_background +'" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>' ); $( '#pg-'+ p_id ).append( '<div id="pg-bar'+ p_id +'" class="progress-bar progress-bar-striped '+ bar_background +'" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>' );
$( '#pg-bar'+ p_id ).append('<small id="pg-text'+ p_id +'" class="justify-content-center d-flex position-absolute w-100"></small>'); $( '#pg-bar'+ p_id ).append('<small id="pg-text'+ p_id +'" class="justify-content-center d-flex position-absolute w-100"></small>');
};

View File

@ -168,6 +168,7 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp)
app.get('/rmld/:waip_uuid/:rmld_uuid', function(req, res, next) { app.get('/rmld/:waip_uuid/:rmld_uuid', function(req, res, next) {
var waip_uuid = req.params.waip_uuid; var waip_uuid = req.params.waip_uuid;
var rmld_uuid = req.params.rmld_uuid;
sql.db_get_einsatzdaten_by_uuid(waip_uuid, function(einsatzdaten) { sql.db_get_einsatzdaten_by_uuid(waip_uuid, function(einsatzdaten) {
if (einsatzdaten) { if (einsatzdaten) {
sql.db_check_permission(req.user, einsatzdaten.id, function(valid) { sql.db_check_permission(req.user, einsatzdaten.id, function(valid) {
@ -178,6 +179,7 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp)
delete einsatzdaten.wgs84_x; delete einsatzdaten.wgs84_x;
delete einsatzdaten.wgs84_y; delete einsatzdaten.wgs84_y;
}; };
einsatzdaten.rmld_uuid = rmld_uuid;
res.render('rmld', { res.render('rmld', {
public: app_cfg.public, public: app_cfg.public,
title: 'Einsatz-Rückmeldung', title: 'Einsatz-Rückmeldung',
@ -197,14 +199,14 @@ module.exports = function(app, sql, uuidv4, app_cfg, passport, auth, waip, udp)
// Rueckmeldung entgegennehmen // Rueckmeldung entgegennehmen
app.post('/rmld/:waip_uuid/:rmld_uuid', function(req, res) { app.post('/rmld/:waip_uuid/:rmld_uuid', function(req, res) {
var waip_uuid = req.params.waip_uuid; var waip_uuid = req.body.waip_uuid;
var rmld_uuid = req.params.rmld_uuid; var rmld_uuid = req.body.rmld_uuid;
var rmld_obj = Object.assign(req.params, req.body); //var rmld_obj = Object.assign(req.params, req.body);
console.log(req.params); //console.log(req.params);
console.log(req.body); //console.log(req.body);
console.log(rmld_obj); //console.log(rmld_obj);
sql.db_save_rmld(rmld_obj, function(result){ sql.db_save_rmld(req.body, function(result){
if (result) { if (result) {
req.flash('successMessage', 'Rückmeldung erfolgreich gesendet, auf zum Einsatz!'); req.flash('successMessage', 'Rückmeldung erfolgreich gesendet, auf zum Einsatz!');
res.redirect('/rmld/' + waip_uuid + '/' + rmld_uuid ); res.redirect('/rmld/' + waip_uuid + '/' + rmld_uuid );

View File

@ -774,7 +774,7 @@ module.exports = function(db, uuidv4, turf, app_cfg) {
}; };
function db_get_single_response_by_rmlduuid(rmld_uuid, callback) { function db_get_single_response_by_rmlduuid(rmld_uuid, callback) {
db.get(`SELECT * FROM waip_response WHERE rmld_uuid like ?`, [rmld_uuid], function (err, row) { db.all(`SELECT * FROM waip_response WHERE rmld_uuid like ?`, [rmld_uuid], function (err, row) {
if (err == null && row) { if (err == null && row) {
console.log('single_rmld_uuid '+row); console.log('single_rmld_uuid '+row);
if (row.einsatzkraft == 1) { if (row.einsatzkraft == 1) {

View File

@ -52,7 +52,7 @@
.col-4#pg-fk .col-4#pg-fk
//.progress.mt-1.border.border-warning //.progress.mt-1.border.border-warning
.progress-bar.progress-bar-striped.bg-light(role='progressbar', style='width: 50%', aria-valuenow='50', aria-valuemin='0', aria-valuemax='100') 10min .progress-bar.progress-bar-striped.bg-light(role='progressbar', style='width: 50%', aria-valuenow='50', aria-valuemin='0', aria-valuemax='100') 10min
.col-6.h-65.d-flex.align-items-end.justify-content-start.tf_multiline .col-6.h-60.d-flex.align-items-end.justify-content-start.tf_multiline
#ortsdaten.flex-fill -Objekt- #ortsdaten.flex-fill -Objekt-
br br
| -Ort- | -Ort-

View File

@ -17,6 +17,8 @@
span(aria-hidden='true') × span(aria-hidden='true') ×
#responseModalBody.modal-body #responseModalBody.modal-body
form#send_response.was-validated(action=einsatzdaten.uuid, method="POST") form#send_response.was-validated(action=einsatzdaten.uuid, method="POST")
input(type="hidden" name="waip_uuid" value=einsatzdaten.uuid)
input(type="hidden" name="rmld_uuid" value=einsatzdaten.rmld_uuid)
.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