From 7ce52c8be9b5c7e43a7ea4ef26d0f21e07088006 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Mon, 2 Mar 2020 10:31:01 +0100 Subject: [PATCH] =?UTF-8?q?update=20Mo=202.=20M=C3=A4r=2010:31:01=20CET=20?= =?UTF-8?q?2020?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/client_dbrd.js | 18 ++++++++-------- views/includes/master_dashboard.pug | 32 ++++++++++++++++++----------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/public/js/client_dbrd.js b/public/js/client_dbrd.js index b9d4916..3cc25ab 100755 --- a/public/js/client_dbrd.js +++ b/public/js/client_dbrd.js @@ -68,10 +68,10 @@ function add_resp_progressbar(p_id, p_type, p_agt, p_start, p_end) { break; }; - $( '#pg-' + p_type ).append( '
'); //+ ' >' ); + $( '#pg-' + p_type ).append( '
'); //+ ' >' ); $( '#pg-'+ p_id ).append( '
' ); - + $( '#pg-bar'+ p_id ).append(''); @@ -107,14 +107,14 @@ function add_resp_progressbar(p_id, p_type, p_agt, p_start, p_end) { $("#pg-bar"+p_id) .css("width", "100%") .attr("aria-valuenow", 100) - .text("") .addClass("ion-md-checkmark-circle"); + $("#pg-text"+p_id).text(""); clearInterval(counter_ID[p_id]); } else { $("#pg-bar"+p_id) .css("width", current_progress + "%") - .attr("aria-valuenow", current_progress) - .text(minutes + " min"); + .attr("aria-valuenow", current_progress); + $("#pg-text"+p_id).text(minutes); }; }; @@ -131,9 +131,9 @@ function add_resp_progressbar(p_id, p_type, p_agt, p_start, p_end) { var names = ["CB FW Cottbus 1", "CB FW Madlow", "Lee", "Grant"]; var groupCount = 2; var groups = new vis.DataSet(); - for (var g = 0; g < groupCount; g++) { - groups.add({ id: g, content: names[g] }); - }; + //for (var g = 0; g < groupCount; g++) { + // groups.add({ id: g, content: names[g] }); + //}; var date = new Date(); date.setMinutes(date.getMinutes() - 0,1 ); @@ -351,6 +351,8 @@ if (arrayItem.agt){ add_resp_progressbar(arrayItem.resp_uuid, item_type, arrayItem.agt, new Date(arrayItem.set_time), new Date(arrayItem.arrival_time)); items.update(new_item); groups.update({ id: arrayItem.wache_id, content: arrayItem.wache_name }); + $( '#'+item_type+'-counter' ).text('x') + }); console.log(items.get()); diff --git a/views/includes/master_dashboard.pug b/views/includes/master_dashboard.pug index af663c3..0c46a54 100755 --- a/views/includes/master_dashboard.pug +++ b/views/includes/master_dashboard.pug @@ -228,30 +228,38 @@ style(type='text/css'). .text-info.font-weight-bold Einsatzrückmeldungen .card-body.p-2 .d-flex.fustify-content-between.font-weight-bold - #rueckmeldung.list-group.list-group-horizontal.text-center.w-100 - a.list-group-item.bg-secondary.flex-fill.text-success 3 EK - a.list-group-item.bg-secondary.flex-fill.text-info 2 MA - a.list-group-item.bg-secondary.flex-fill.text-light 1 FK - #rueckmeldung.list-group.list-group-horizontal.text-center - a.list-group-item.bg-warning.flex-fill.text-dark 2 AGT + .list-group.list-group-horizontal.text-center.w-100 + .list-group-item.flex-fill.text-success + a#ek-counter 0 + a  EK + .list-group-item.flex-fill.text-info + a#ma-counter 0 + a  MA + .list-group-item.flex-fill.text-light + a#fk-counter 0 + a  FK + .list-group.text-center + .list-group-item.border.border-warning.flex-fill.text-warning + a#agt-counter 0 + a  AGT //a.badge.badge-warning 2 AGT .row .col-4#pg-ek - .progress.mt-1 + //.progress.mt-1 .progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') a(style='') 2min - .progress.mt-1.border.border-warning(style='height: 20px;') + //.progress.mt-1.border.border-warning(style='height: 20px;') .progress-bar.progress-bar-striped.bg-success(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') h 2min - .progress.mt-1 + //.progress.mt-1 .progress-bar.progress-bar-striped.bg-success.ion-md-checkmark-circle(role='progressbar', style='width: 100%', aria-valuenow='100', aria-valuemin='0', aria-valuemax='100') .col-4#pg-ma - .progress.mt-1 + //.progress.mt-1 .progress-bar.progress-bar-striped.bg-info(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 3min - .progress.mt-1 + //.progress.mt-1 .progress-bar.progress-bar-striped.bg-info(role='progressbar', style='width: 25%', aria-valuenow='25', aria-valuemin='0', aria-valuemax='100') 1min .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 .card-body.p-2 #visualization.border.rounded(style='background-color:white')