summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue
blob: 33c6ac6e2ba4fb6a1be74d77e530edc7408809ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<script>
/* eslint-disable vue/no-v-html */
import { sprintf, s__ } from '~/locale';

export default {
  name: 'TimeTrackingSpentOnlyPane',
  props: {
    timeSpentHumanReadable: {
      type: String,
      required: true,
    },
  },
  computed: {
    timeSpent() {
      return sprintf(
        s__('TimeTracking|%{startTag}Spent: %{endTag}%{timeSpentHumanReadable}'),
        {
          startTag: '<span class="gl-font-weight-bold">',
          endTag: '</span>',
          timeSpentHumanReadable: this.timeSpentHumanReadable,
        },
        false,
      );
    },
  },
};
</script>

<template>
  <div data-testid="spentOnlyPane" v-html="timeSpent"></div>
</template>