Welcome to mirror list, hosted at ThFree Co, Russian Federation.

work_item_relationship_list.vue « work_item_relationships « components « work_items « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 002c1786044639a5411b12bdc9e96fd0882d9955 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script>
import WorkItemLinkChildContents from '../shared/work_item_link_child_contents.vue';

export default {
  components: {
    WorkItemLinkChildContents,
  },
  props: {
    linkedItems: {
      type: Array,
      required: false,
      default: () => [],
    },
    heading: {
      type: String,
      required: true,
    },
    canUpdate: {
      type: Boolean,
      required: true,
    },
  },
};
</script>
<template>
  <div data-testid="work-item-linked-items-list">
    <h4
      v-if="heading"
      data-testid="work-items-list-heading"
      class="gl-font-sm gl-font-weight-semibold gl-text-gray-700 gl-mx-2 gl-mt-3 gl-mb-2"
    >
      {{ heading }}
    </h4>
    <div class="work-items-list-body">
      <ul ref="list" class="work-items-list content-list">
        <li
          v-for="linkedItem in linkedItems"
          :key="linkedItem.workItem.id"
          class="gl-pt-0! gl-pb-0! gl-border-b-0!"
        >
          <work-item-link-child-contents
            :child-item="linkedItem.workItem"
            :can-update="canUpdate"
            :show-task-icon="true"
            @click="$emit('showModal', { event: $event, child: linkedItem.workItem })"
            @removeChild="$emit('removeLinkedItem', linkedItem.workItem)"
          />
        </li>
      </ul>
    </div>
  </div>
</template>