Web: Let WorkerTaskLink support undefined tasks
Fixes an error when the component is passed an undefined or missing workerTask property.
This commit is contained in:
parent
736ca103c3
commit
36e0a6052f
@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<router-link :to="{ name: 'jobs', params: { jobID: workerTask.job_id, taskID: workerTask.id } }">
|
||||
{{ workerTask.name }}
|
||||
(<span class="status-label" :class="'status-' + workerTask.status">{{ workerTask.status }}</span>)
|
||||
</router-link>
|
||||
<span>
|
||||
<router-link v-if="workerTask" :to="{ name: 'jobs', params: { jobID: workerTask.job_id, taskID: workerTask.id } }">
|
||||
{{ workerTask.name }}
|
||||
(<span class="status-label" :class="'status-' + workerTask.status">{{ workerTask.status }}</span>)
|
||||
</router-link>
|
||||
<span v-else>-</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user