add tags to ETA
This commit is contained in:
@@ -37,17 +37,19 @@ const isSuperiorToEstimation = computed(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<main class="task-record" v-if="task">
|
<main class="task-record" v-if="task">
|
||||||
<record-progress :task-id="taskId" />
|
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
<router-link
|
<button @click="$router.go(-1)" class="button is-white">⬅️</button>
|
||||||
:to="{ name: 'task-view', params: { id: task.id } }"
|
|
||||||
class="button is-link is-light"
|
|
||||||
>
|
|
||||||
{{ task.title }}
|
{{ task.title }}
|
||||||
</router-link>
|
|
||||||
</h1>
|
</h1>
|
||||||
<h2 class="subtitle" v-if="record">{{ formatLongDate(record.start) }}</h2>
|
<h2 class="subtitle" v-if="record">
|
||||||
|
{{ formatLongDate(record.start) }}
|
||||||
|
<div class="tags has-addons">
|
||||||
|
<div class="tag">ETA</div>
|
||||||
|
<div class="tag is-primary">{{ task.totalEstimation }} minutes</div>
|
||||||
|
</div>
|
||||||
|
</h2>
|
||||||
<record-controls :task-id="taskId" />
|
<record-controls :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>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,15 +1,37 @@
|
|||||||
|
import type { TaskRecordStoreState } from '@/modules/record/stores/useTaskRecordStore'
|
||||||
import { createTaskFixture } from '@/modules/task/models/task.fixture'
|
import { createTaskFixture } from '@/modules/task/models/task.fixture'
|
||||||
import type { TaskStoreState } from '@/modules/task/stores/useTask.store'
|
import type { TaskStoreState } from '@/modules/task/stores/useTask.store'
|
||||||
import { router } from '@/router'
|
import { router } from '@/router'
|
||||||
|
import { toISODate } from '@/shared/types/date'
|
||||||
import { createTestingPinia } from '@pinia/testing'
|
import { createTestingPinia } from '@pinia/testing'
|
||||||
import { vi } from 'vitest'
|
import { vi } from 'vitest'
|
||||||
|
|
||||||
export interface InitialState {
|
export interface InitialState {
|
||||||
'task-store': TaskStoreState
|
'task-store': TaskStoreState
|
||||||
|
'task-record-store': TaskRecordStoreState
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialState = {
|
const tasks = [createTaskFixture(), createTaskFixture()]
|
||||||
'task-store': { tasks: [createTaskFixture(), createTaskFixture()] }
|
|
||||||
|
const initialState: InitialState = {
|
||||||
|
'task-store': { tasks },
|
||||||
|
'task-record-store': {
|
||||||
|
currentStepId: null,
|
||||||
|
records: {
|
||||||
|
[tasks[0].id]: {
|
||||||
|
taskId: tasks[0].id,
|
||||||
|
stepRecords: {},
|
||||||
|
start: toISODate(new Date()),
|
||||||
|
notes: ''
|
||||||
|
},
|
||||||
|
[tasks[1].id]: {
|
||||||
|
taskId: tasks[1].id,
|
||||||
|
stepRecords: {},
|
||||||
|
start: toISODate(new Date()),
|
||||||
|
notes: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const withPlugins = (partialState?: TaskStoreState) => ({
|
export const withPlugins = (partialState?: TaskStoreState) => ({
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ const task = computed(() => taskStore.getTask(props.id))
|
|||||||
<template>
|
<template>
|
||||||
<div class="task-view" v-if="task">
|
<div class="task-view" v-if="task">
|
||||||
<h1 class="title">{{ task.title }}</h1>
|
<h1 class="title">{{ task.title }}</h1>
|
||||||
<h2 class="subtitle">{{ task.totalEstimation }} minutes</h2>
|
<h2 class="subtitle">
|
||||||
|
<div class="tags has-addons">
|
||||||
|
<div class="tag">ETA</div>
|
||||||
|
<div class="tag is-primary">{{ task.totalEstimation }} minutes</div>
|
||||||
|
</div>
|
||||||
|
</h2>
|
||||||
<a
|
<a
|
||||||
v-if="task.link"
|
v-if="task.link"
|
||||||
:href="task.link"
|
:href="task.link"
|
||||||
@@ -24,8 +29,7 @@ const task = computed(() => taskStore.getTask(props.id))
|
|||||||
class="button is-link"
|
class="button is-link"
|
||||||
>user story link</a
|
>user story link</a
|
||||||
>
|
>
|
||||||
<div class="columns">
|
<div class="content">
|
||||||
<div class="column content is-large">
|
|
||||||
<h3 class="subtitle is-4">Tasks</h3>
|
<h3 class="subtitle is-4">Tasks</h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="step in task.steps" :key="step.id">
|
<li v-for="step in task.steps" :key="step.id">
|
||||||
@@ -36,8 +40,7 @@ const task = computed(() => taskStore.getTask(props.id))
|
|||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
<task-record-list class="column" :task-id="id" />
|
<task-record-list :task-id="id" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>Task not found</div>
|
<div v-else>Task not found</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -48,6 +51,6 @@ const task = computed(() => taskStore.getTask(props.id))
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
max-width: 400px;
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user