fix(editor): Project related frontend fixes (no-changelog) (#9482)

This commit is contained in:
Csaba Tuncsik
2024-05-22 15:54:55 +02:00
committed by GitHub
parent 62ee796895
commit 8f55bb1457
16 changed files with 170 additions and 41 deletions

View File

@@ -96,6 +96,7 @@ import type { CredentialScope } from '@n8n/permissions';
import type { EventBus } from 'n8n-design-system/utils';
import { useRolesStore } from '@/stores/roles.store';
import type { RoleMap } from '@/types/roles.types';
import { ProjectTypes } from '@/features/projects/projects.utils';
export default defineComponent({
name: 'CredentialSharing',
@@ -178,7 +179,7 @@ export default defineComponent({
);
},
isHomeTeamProject(): boolean {
return this.homeProject?.type === 'team';
return this.homeProject?.type === ProjectTypes.Team;
},
numberOfMembersInHomeTeamProject(): number {
return this.teamProject?.relations.length ?? 0;

View File

@@ -384,6 +384,7 @@ import type { WorkflowScope } from '@n8n/permissions';
import { getWorkflowPermissions } from '@/permissions';
import { useExternalHooks } from '@/composables/useExternalHooks';
import { useSourceControlStore } from '@/stores/sourceControl.store';
import { ProjectTypes } from '@/features/projects/projects.utils';
export default defineComponent({
name: 'WorkflowSettings',
@@ -604,7 +605,7 @@ export default defineComponent({
{
key: 'workflowsFromSameOwner',
value: this.$locale.baseText(
this.workflow.homeProject?.type === 'personal'
this.workflow.homeProject?.type === ProjectTypes.Personal
? 'workflowSettings.callerPolicy.options.workflowsFromPersonalProject'
: 'workflowSettings.callerPolicy.options.workflowsFromTeamProject',
{

View File

@@ -152,6 +152,7 @@ import type {
} from '@/features/projects/projects.types';
import { useRolesStore } from '@/stores/roles.store';
import type { RoleMap } from '@/types/roles.types';
import { ProjectTypes } from '@/features/projects/projects.utils';
export default defineComponent({
name: 'WorkflowShareModal',
@@ -238,7 +239,7 @@ export default defineComponent({
);
},
isHomeTeamProject(): boolean {
return this.workflow.homeProject?.type === 'team';
return this.workflow.homeProject?.type === ProjectTypes.Team;
},
numberOfMembersInHomeTeamProject(): number {
return this.teamProject?.relations.length ?? 0;

View File

@@ -32,6 +32,7 @@
class="pt-2xs"
:projects="projectsStore.projects"
:placeholder="$locale.baseText('forms.resourceFiltersDropdown.owner.placeholder')"
:empty-options-text="$locale.baseText('projects.sharing.noMatchingProjects')"
@update:model-value="setKeyValue('homeProject', ($event as ProjectSharingData).id)"
/>
</enterprise-edition>