From 3c761f44510c2d7e3b3d6fbf7522a8b1548d24ae Mon Sep 17 00:00:00 2001 From: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> Date: Wed, 25 Jan 2023 03:42:57 -0500 Subject: [PATCH] Fixes issues with workflows that have more than one action (#6670) * fix untitled workflow name when no action exists * fix wrong data loaded one first laod when step was added Co-authored-by: CarinaWolli --- .../features/ee/workflows/components/WorkflowListPage.tsx | 6 ++++-- packages/features/ee/workflows/pages/workflow.tsx | 6 +++--- packages/trpc/server/routers/viewer/workflows.tsx | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/features/ee/workflows/components/WorkflowListPage.tsx b/packages/features/ee/workflows/components/WorkflowListPage.tsx index cb848c3b07..1827d780c9 100644 --- a/packages/features/ee/workflows/components/WorkflowListPage.tsx +++ b/packages/features/ee/workflows/components/WorkflowListPage.tsx @@ -94,12 +94,14 @@ export default function WorkflowListPage({ workflows }: Props) { )}> {workflow.name ? workflow.name - : "Untitled (" + + : workflow.steps[0] + ? "Untitled (" + `${t(`${workflow.steps[0].action.toLowerCase()}_action`)}` .charAt(0) .toUpperCase() + `${t(`${workflow.steps[0].action.toLowerCase()}_action`)}`.slice(1) + - ")"} + ")" + : "Untitled"}