mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
fix: Fetch credentials on workflows view to include in duplicated workflows (#5532)
fix: fetch credentials on workflows view to include in duplicated workflows
This commit is contained in:
parent
71c349b071
commit
493f7a1c92
|
@ -137,6 +137,7 @@ import { useUIStore } from '@/stores/ui';
|
||||||
import { useSettingsStore } from '@/stores/settings';
|
import { useSettingsStore } from '@/stores/settings';
|
||||||
import { useUsersStore } from '@/stores/users';
|
import { useUsersStore } from '@/stores/users';
|
||||||
import { useWorkflowsStore } from '@/stores/workflows';
|
import { useWorkflowsStore } from '@/stores/workflows';
|
||||||
|
import { useCredentialsStore } from '@/stores/credentials';
|
||||||
import { usePostHog } from '@/stores/posthog';
|
import { usePostHog } from '@/stores/posthog';
|
||||||
|
|
||||||
type IResourcesListLayoutInstance = Vue & { sendFiltersTelemetry: (source: string) => void };
|
type IResourcesListLayoutInstance = Vue & { sendFiltersTelemetry: (source: string) => void };
|
||||||
|
@ -170,7 +171,13 @@ const WorkflowsView = mixins(showMessage, debounceHelper).extend({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapStores(useSettingsStore, useUIStore, useUsersStore, useWorkflowsStore),
|
...mapStores(
|
||||||
|
useSettingsStore,
|
||||||
|
useUIStore,
|
||||||
|
useUsersStore,
|
||||||
|
useWorkflowsStore,
|
||||||
|
useCredentialsStore,
|
||||||
|
),
|
||||||
currentUser(): IUser {
|
currentUser(): IUser {
|
||||||
return this.usersStore.currentUser || ({} as IUser);
|
return this.usersStore.currentUser || ({} as IUser);
|
||||||
},
|
},
|
||||||
|
@ -229,6 +236,8 @@ const WorkflowsView = mixins(showMessage, debounceHelper).extend({
|
||||||
this.workflowsStore.fetchActiveWorkflows(),
|
this.workflowsStore.fetchActiveWorkflows(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
this.credentialsStore.fetchAllCredentials();
|
||||||
|
|
||||||
// If the user has no workflows and is not participating in the demo experiment,
|
// If the user has no workflows and is not participating in the demo experiment,
|
||||||
// redirect to the new workflow view
|
// redirect to the new workflow view
|
||||||
if (!this.isDemoTest && this.allWorkflows.length === 0) {
|
if (!this.isDemoTest && this.allWorkflows.length === 0) {
|
||||||
|
|
Loading…
Reference in a new issue