From e88005be786df4013543df5e6410ca31705bbf3c Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Mon, 2 Mar 2020 22:53:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B4=D0=BE=D1=81=D0=B0=D0=B4=D0=BD=D1=83=D1=8E=20?= =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/StatisticsPage.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/StatisticsPage.vue b/assets/StatisticsPage.vue index 828498d..809c47b 100644 --- a/assets/StatisticsPage.vue +++ b/assets/StatisticsPage.vue @@ -10,7 +10,7 @@ {{ item.date }} {{ item.planned.total_minutes | tt }} {{ item.worked.total_minutes | tt }} - + {{ (item.worked.total_minutes - item.planned.total_minutes) | td }} @@ -38,14 +38,14 @@ export default { }, filters: { tt(v) { - const h = Math.round(v / 60); + const h = Math.floor(v / 60); const m = v % 60; return (h ? h : '00') + ':' + String(m).padStart(2, '0'); }, td(v) { const o = v > 0; const a = Math.abs(v); - const h = Math.round(a / 60); + const h = Math.floor(a / 60); const m = a % 60; const t = (h ? h : '00') + ':' + String(m).padStart(2, '0'); return (o ? '+' : '-') + t; @@ -68,7 +68,8 @@ export default { .date, .planned, - .worked { + .worked, + .difference { text-align: center; } }