Skip to content
Snippets Groups Projects

Show worker costs

Merged ml bonhomme requested to merge costs into release-1.7.2
All threads resolved!
Files
6
@@ -9,19 +9,26 @@
<span class="mx-1" :title="worker.name">
{{ worker.name }}
</span>
<span v-if="hasCosts(worker)" class="tag is-warning"></span>
</template>
<script>
<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { WORKER_TYPE_COLORS } from '@/config'
import { Worker } from '@/types/worker'
import { hasCosts } from '@/helpers/worker'
export default {
export default defineComponent({
props: {
// A worker instance to build base tag elements
worker: {
type: Object,
type: Object as PropType<Worker>,
required: true
}
},
data: () => ({
hasCosts
}),
computed: {
workerType () {
return this.worker?.type
@@ -30,5 +37,5 @@ export default {
return WORKER_TYPE_COLORS[this.workerType]?.cssClass ?? WORKER_TYPE_COLORS.default.cssClass
}
}
}
})
</script>
Loading