diff --git a/frontend/app/components/progress-tooltip/component.js b/frontend/app/components/progress-tooltip/component.js index 2aec8f17..69aa0772 100644 --- a/frontend/app/components/progress-tooltip/component.js +++ b/frontend/app/components/progress-tooltip/component.js @@ -82,37 +82,41 @@ export default class ProgressTooltipComponent extends Component { : 0; } + get badgeClass() { + return "text-foreground-primary rounded-xl py-1 px-1.5 font-mono text-xs rounded-xl m-0.5 inline-block min-w-2.5 text-center whitespace-nowrap"; + } + // The color of the badge and progress bar for billable time spent get colorBillable() { if (this.progressBillable > 1) { - return "danger"; + return "bg-danger"; } else if (this.progressBillable >= 0.9) { - return "warning"; + return "bg-warning"; } - return "success"; + return "bg-success"; } // The color of the badge and progress bar for total time spent get colorTotal() { if (this.progressTotal > 1) { - return "danger"; + return "bg-danger"; } else if (this.progressTotal >= 0.9) { - return "warning"; + return "bg-warning"; } - return "success"; + return "bg-success"; } // The color of the badge and progress bar for remaining effort get colorRemainingEffort() { if (this.progressRemainingEffort > 1) { - return "danger"; + return "bg-danger"; } else if (this.progressRemainingEffort >= 0.9) { - return "warning"; + return "bg-warning"; } - return "success"; + return "bg-success"; } get tooltipVisible() { diff --git a/frontend/app/components/progress-tooltip/template.hbs b/frontend/app/components/progress-tooltip/template.hbs index ab48d7da..9a0205eb 100644 --- a/frontend/app/components/progress-tooltip/template.hbs +++ b/frontend/app/components/progress-tooltip/template.hbs @@ -1,24 +1,23 @@ {{#if this.tooltipVisible}} -
+
Spent (Total): {{humanize-duration this.spent}}
{{#if this.progressTotal}} - + {{#if (gt this.progressTotal 1)}} - {{/if}} - {{round (mult 100 this.progressTotal)}}% + {{/if}}{{round (mult 100 this.progressTotal)}}% {{/if}}
@@ -27,7 +26,7 @@ {{humanize-duration this.billable}}
{{#if this.progressBillable}} - + {{#if (gt this.progressBillable 1)}} - Budget: + Budget: {{if this.estimated (humanize-duration this.estimated) "None"}} {{#if this.remainingEffort}} @@ -48,7 +47,9 @@ }}
{{#if this.progressRemainingEffort}} - + {{#if (gt this.progressRemainingEffort 1)}} -{{/if}} +{{/if}} \ No newline at end of file