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