diff --git a/src/App.vue b/src/App.vue index d7ef24f..eecbcef 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,7 +12,18 @@ import { RouterLink, RouterView } from 'vue-router' - +
+ +
+ + @@ -32,4 +43,13 @@ nav { img.logo { max-width: 40px; } + +main { + flex: 1; +} + +footer { + text-align: right; + font-size: 0.8rem; +} diff --git a/src/modules/record/stores/useTaskRecordStore.ts b/src/modules/record/stores/useTaskRecordStore.ts index 2321a9a..5762ace 100644 --- a/src/modules/record/stores/useTaskRecordStore.ts +++ b/src/modules/record/stores/useTaskRecordStore.ts @@ -202,6 +202,12 @@ export const useTaskRecordStore = defineStore('task-record-store', { ) if (nextStepIndex >= 0) { + const latestStartDate = Math.max( + ...Object.values(record.stepRecords).map((stepRecord) => + new Date(stepRecord.start).getTime() + ) + ) + task.steps .filter((_, index) => index > nextStepIndex) .map((step) => step.id) @@ -212,7 +218,7 @@ export const useTaskRecordStore = defineStore('task-record-store', { this.startStepRecord({ taskId: task.id, stepId: task.steps[nextStepIndex].id, - start: toISODate(new Date()) + start: toISODate(new Date(latestStartDate)) }) } } diff --git a/src/views/task/TaskHistory.vue b/src/views/task/TaskHistory.vue index 6444235..5ef1e5f 100644 --- a/src/views/task/TaskHistory.vue +++ b/src/views/task/TaskHistory.vue @@ -2,6 +2,7 @@ import EstimationTimeArrival from '@/components/EstimationTimeArrival.vue' import { adaptStepsToTextarea } from '@/modules/task/infra/adaptStepsToTextarea' import { useTaskStore } from '@/modules/task/stores/useTask.store' +import { logicOr } from '@vueuse/math' import { useMagicKeys, whenever } from '@vueuse/core' import { computed, ref } from 'vue' import { useRouter } from 'vue-router' @@ -43,13 +44,13 @@ const isNextDisabled = computed( currentIndex.value === task.value?.stepHistory.length - 2 ) -const { n, p } = useMagicKeys() +const { n, p, right, left } = useMagicKeys() -whenever(p, () => { +whenever(logicOr(p, left), () => { goToPrev() }) -whenever(n, () => { +whenever(logicOr(n, right), () => { goToNext() }) @@ -65,7 +66,7 @@ whenever(n, () => {

-
+