Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fetch credentials on workflows view to include in duplicated workflows #5532

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/editor-ui/src/views/WorkflowsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import { useUIStore } from '@/stores/ui';
import { useSettingsStore } from '@/stores/settings';
import { useUsersStore } from '@/stores/users';
import { useWorkflowsStore } from '@/stores/workflows';
import { useCredentialsStore } from '@/stores/credentials';
import { usePostHog } from '@/stores/posthog';

type IResourcesListLayoutInstance = Vue & { sendFiltersTelemetry: (source: string) => void };
Expand Down Expand Up @@ -170,7 +171,13 @@ const WorkflowsView = mixins(showMessage, debounceHelper).extend({
};
},
computed: {
...mapStores(useSettingsStore, useUIStore, useUsersStore, useWorkflowsStore),
...mapStores(
useSettingsStore,
useUIStore,
useUsersStore,
useWorkflowsStore,
useCredentialsStore,
),
currentUser(): IUser {
return this.usersStore.currentUser || ({} as IUser);
},
Expand Down Expand Up @@ -229,6 +236,8 @@ const WorkflowsView = mixins(showMessage, debounceHelper).extend({
this.workflowsStore.fetchActiveWorkflows(),
]);

this.credentialsStore.fetchAllCredentials();

// If the user has no workflows and is not participating in the demo experiment,
// redirect to the new workflow view
if (!this.isDemoTest && this.allWorkflows.length === 0) {
Expand Down