35 lines
594 B
Vue
35 lines
594 B
Vue
<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>
|