diff --git a/src/components/workflows/timeline/TimelineItem.vue b/src/components/workflows/timeline/TimelineItem.vue index 41d8025..7e47e98 100644 --- a/src/components/workflows/timeline/TimelineItem.vue +++ b/src/components/workflows/timeline/TimelineItem.vue @@ -23,6 +23,7 @@ const op = ref() const isOpVisible = ref(false) const selectedStep = ref(null) const selectedStepUrl = computed(() => selectedStep.value ? getStepUrl(selectedStep.value) : null) +const selectedStepVersion = computed(() => selectedStep.value ? getStepVersion(selectedStep.value) : null) const startDate = ref(new Date('2023-10-01')) const endDate = ref(new Date()) @@ -56,11 +57,18 @@ function toggleParameterOverlay(step: WorkflowStep, event: Event) { function getStepUrl(step: WorkflowStep) { const repo = projectsStore.repos.find(({ ocrd_tool }) => { - return ocrd_tool && ocrd_tool.tools[step.id] + return ocrd_tool?.tools[step.id] }) return repo?.url ?? null } +function getStepVersion(step: WorkflowStep) { + const repo = projectsStore.repos.find(({ ocrd_tool }) => { + return ocrd_tool?.tools[step.id] + }) + return repo?.ocrd_tool?.version ?? null +} +