From 39a5a93a9723fb6789c8d359caf780e8fc77d314 Mon Sep 17 00:00:00 2001 From: Kamil Dobrzynski Date: Mon, 12 Feb 2018 16:29:22 +0100 Subject: [PATCH] add estimation time on issue card due to #43 --- .../workspace/boards/boards.component.html | 1 + .../workspace/boards/boards.component.scss | 12 ++++++++++++ .../workspace/boards/boards.component.ts | 16 ++++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/app/components/workspace/boards/boards.component.html b/src/app/components/workspace/boards/boards.component.html index bd19269..f67b597 100644 --- a/src/app/components/workspace/boards/boards.component.html +++ b/src/app/components/workspace/boards/boards.component.html @@ -36,6 +36,7 @@

{{
{{ issue.field.summary }} + {{ issue.field.Est }}
diff --git a/src/app/components/workspace/boards/boards.component.scss b/src/app/components/workspace/boards/boards.component.scss index dcd0099..63cd401 100644 --- a/src/app/components/workspace/boards/boards.component.scss +++ b/src/app/components/workspace/boards/boards.component.scss @@ -198,11 +198,23 @@ } } .project-list__content { + position: relative; font-family: 'Montserrat', sans-serif; color: $white; font-size: 14px; font-weight: 400; text-align: left; + .project-list__summary { + width: 88%; + display: inline-block; + } + .project-list__estimation { + position: absolute; + bottom: -5px; + right: -4px; + font-size: 10px; + color: $issue-font-color; + } } } } diff --git a/src/app/components/workspace/boards/boards.component.ts b/src/app/components/workspace/boards/boards.component.ts index 8c642a4..45e52b1 100644 --- a/src/app/components/workspace/boards/boards.component.ts +++ b/src/app/components/workspace/boards/boards.component.ts @@ -275,13 +275,17 @@ export class BoardsComponent implements OnInit { } public convertEstimate = (est) => { - let newEst = Number(est) / 60 - if (newEst < 8) { - return newEst + "h" - } else if (newEst % 8 !== 0){ - return Math.floor(newEst / 8) + "d" + newEst % 8 + "h" + if (est === undefined) { + return "No est" } else { - return Math.floor(newEst / 8) + "d" + let newEst = Number(est) / 60 + if (newEst < 8) { + return newEst + "h" + } else if (newEst % 8 !== 0){ + return Math.floor(newEst / 8) + "d" + newEst % 8 + "h" + } else { + return Math.floor(newEst / 8) + "d" + } } }