controls get record from params
This commit is contained in:
@@ -4,17 +4,19 @@ import { toISODate } from '@/shared/types/date'
|
||||
import { useActiveElement, useMagicKeys, whenever } from '@vueuse/core'
|
||||
import { logicAnd } from '@vueuse/math'
|
||||
import { computed, onUnmounted } from 'vue'
|
||||
import type { TaskRecord } from '../models/task-record'
|
||||
import { useTaskRecordStore } from '../stores/useTaskRecordStore'
|
||||
|
||||
const props = defineProps<{
|
||||
taskId: string
|
||||
record: TaskRecord
|
||||
}>()
|
||||
|
||||
const taskStore = useTaskStore()
|
||||
const recordStore = useTaskRecordStore()
|
||||
|
||||
const task = computed(() => taskStore.getTask(props.taskId))
|
||||
const record = computed(() => recordStore.getTaskRecord(props.taskId))
|
||||
const record = computed(() => props.record)
|
||||
|
||||
const getNextStepId = () => {
|
||||
if (!task.value) {
|
||||
|
||||
@@ -50,7 +50,7 @@ const isSuperiorToEstimation = computed(() => {
|
||||
{{ formatLongDate(record.start) }}
|
||||
<estimation-time-arrival :estimation="task.totalEstimation" />
|
||||
</h2>
|
||||
<record-controls :task-id="taskId" />
|
||||
<record-controls v-if="record" :task-id="taskId" :record="record" />
|
||||
<record-progress :task-id="taskId" />
|
||||
<table class="table is-striped is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
|
||||
Reference in New Issue
Block a user