summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue
blob: db2197ec65e2ab39aead8bb4560cefd770c604f1 (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
<script>
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 /* eslint-disable-line vue/no-v-html */"></div>
</template>