summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/components/jobs_container.vue
blob: 951bcb3660063363924620baf0078158e28a208f (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
<script>
import JobContainerItem from './job_container_item.vue';

export default {
  components: {
    JobContainerItem,
  },

  props: {
    jobs: {
      type: Array,
      required: true,
    },
    jobId: {
      type: Number,
      required: true,
    },
  },
  methods: {
    isJobActive(currentJobId) {
      return this.jobId === currentJobId;
    },
  },
};
</script>
<template>
  <div class="js-jobs-container builds-container">
    <job-container-item
      v-for="job in jobs"
      :key="job.id"
      :job="job"
      :is-active="isJobActive(job.id)"
    />
  </div>
</template>