[Bugfix] Display subtask.title if is defined, instead of subtask.mastertask.title

This commit is contained in:
Matej Glasnák committed 2023-06-02 13:57:52 +02:00
1 parent 86f27b73bf
commit ac61d77122
3 files changed
+3 -3

No files matched your search

@@ -69,7 +69,7 @@
<div class="event-content" :class="{'is-blocker': event.isBlocker}"> <div class="event-content" :class="{'is-blocker': event.isBlocker}">
<template v-if="event.type == 'subtask'"> <template v-if="event.type == 'subtask'">
<small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small> <small v-if="event.subtask.project_code" class="project-code">{{ event.subtask.project_code }}</small>
<h3>{{ event.subtask.master_task?.name || event.subtask.master_task }}</h3> <h3>{{ event.subtask.title ?? event.subtask.master_task?.name ?? event.subtask.master_task }}</h3>
</template> </template>
<template v-else> <template v-else>
@@ -13,7 +13,7 @@
<tbody> <tbody>
<tr class="cursor-pointer" v-for="subtask in subtasks" :key="subtask.id" @click.stop="editTask(subtask, false)"> <tr class="cursor-pointer" v-for="subtask in subtasks" :key="subtask.id" @click.stop="editTask(subtask, false)">
<td>{{ subtask.project_code }}</td> <td>{{ subtask.project_code }}</td>
<td>{{ subtask.master_task?.name || subtask.master_task }}</td> <td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
<td>{{ subtask.duration }} h</td> <td>{{ subtask.duration }} h</td>
<td>{{ subtask.duration - subtask.spent_time }} h</td> <td>{{ subtask.duration - subtask.spent_time }} h</td>
<td class="task-action"> <td class="task-action">
@@ -13,7 +13,7 @@
<tr class="cursor-pointer" v-for="subtask in subtasks" :key="subtask.id" @click.stop="editTask(subtask, false)"> <tr class="cursor-pointer" v-for="subtask in subtasks" :key="subtask.id" @click.stop="editTask(subtask, false)">
<td>{{ subtask.project_code }}</td> <td>{{ subtask.project_code }}</td>
<td>{{ subtask.master_task?.name || subtask.master_task }}</td> <td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
<td>{{ subtask.spent_time }} h</td> <td>{{ subtask.spent_time }} h</td>
<td class="task-action"> <td class="task-action">
<div class="d-flex justify-start"> <div class="d-flex justify-start">