Unify date/time dependencies (#2891)

Remove all date/time-related dependencies from the ui except `dayjs` and
use `dayjs` for all tasks.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
qwerty287
2023-12-04 12:46:24 +01:00
committed by GitHub
parent 6c9ff24ba6
commit 8c6738e2bb
12 changed files with 181 additions and 146 deletions

View File

@@ -5,9 +5,9 @@
<script lang="ts" setup>
import { computed, toRef } from 'vue';
import { useDate } from '~/compositions/useDate';
import { useElapsedTime } from '~/compositions/useElapsedTime';
import { PipelineStep, PipelineWorkflow } from '~/lib/api/types';
import { durationAsNumber } from '~/utils/duration';
const props = defineProps<{
step?: PipelineStep;
@@ -16,6 +16,7 @@ const props = defineProps<{
const step = toRef(props, 'step');
const workflow = toRef(props, 'workflow');
const { durationAsNumber } = useDate();
const durationRaw = computed(() => {
const start = (step.value ? step.value?.start_time : workflow.value?.start_time) || 0;