Skip to content

Commit

Permalink
fix: make only related workflows visible while filtering by processors
Browse files Browse the repository at this point in the history
  • Loading branch information
amtul.noor committed Mar 18, 2024
1 parent eb75b01 commit 95cf1a8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/components/workflows/timeline/TimelineItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ const selectedStep = ref<WorkflowStep | null>(null)
const startDate = ref<Date>(new Date('2023-10-01'))
const endDate = ref<Date>(new Date())
const workflows = computed(() => {
return props.selectedWorkflowId
? workflowsStore.workflows.filter((item) => item.id === props.selectedWorkflowId)
: workflowsStore.workflows
if (props.selectedWorkflowId) {
return workflowsStore.workflows.filter((item) => item.id === props.selectedWorkflowId)
} else {
if (props.selectedWorkflowStepIds.length > 0) {
return workflowsStore.workflows.filter(({ steps }) => {
return props.selectedWorkflowStepIds.findIndex((id) => {
return steps.findIndex((step) => step.id === id) > -1
}) > -1
})
} else {
return workflowsStore.workflows
}
}
})
function getStepAcronym(stepId) {
Expand Down

0 comments on commit 95cf1a8

Please sign in to comment.