Skip to content

Commit

Permalink
add estimation time on issue card due to #43
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Dobrzynski committed Feb 12, 2018
1 parent a0dbe59 commit 39a5a93
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/app/components/workspace/boards/boards.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ <h2 class="project-list__title" (click)="openInBrowser('/agiles/'+agile.id)" >{{

<div class="project-list__content">
<span class="project-list__summary">{{ issue.field.summary }}</span>
<span class="project-list__estimation" title="Estimation time: {{ issue.field.Est }}">{{ issue.field.Est }}</span>
</div>
</div>
<div *ngIf="agile?.issues == 0" class="project-list__issues--empty">
Expand Down
12 changes: 12 additions & 0 deletions src/app/components/workspace/boards/boards.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions src/app/components/workspace/boards/boards.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}

Expand Down

0 comments on commit 39a5a93

Please sign in to comment.