mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
App: Do not allow to link folders to M2A relationship (#14952)
* Do not allow to link `folders` to M2A relationship * Apply same getter to another relations
This commit is contained in:
@@ -191,7 +191,7 @@ export default defineComponent({
|
||||
const availableCollections = computed(() => {
|
||||
return orderBy(
|
||||
[
|
||||
...collectionsStore.allCollections,
|
||||
...collectionsStore.databaseCollections,
|
||||
{
|
||||
divider: true,
|
||||
},
|
||||
|
||||
@@ -97,7 +97,7 @@ export default defineComponent({
|
||||
const availableCollections = computed(() => {
|
||||
return orderBy(
|
||||
[
|
||||
...collectionsStore.allCollections,
|
||||
...collectionsStore.databaseCollections,
|
||||
{
|
||||
divider: true,
|
||||
},
|
||||
|
||||
@@ -81,13 +81,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const availableCollections = computed(() => {
|
||||
return orderBy(
|
||||
collectionsStore.collections.filter((collection) => {
|
||||
return collection.collection.startsWith('directus_') === false && collection.schema;
|
||||
}),
|
||||
['sort', 'collection'],
|
||||
['asc']
|
||||
);
|
||||
return orderBy(collectionsStore.databaseCollections, ['sort', 'collection'], ['asc']);
|
||||
});
|
||||
|
||||
const systemCollections = collectionsStore.crudSafeSystemCollections;
|
||||
|
||||
@@ -96,11 +96,7 @@ export default defineComponent({
|
||||
|
||||
const collectionsStore = useCollectionsStore();
|
||||
|
||||
const regularCollections = computed(() =>
|
||||
collectionsStore.collections.filter(
|
||||
(collection) => collection.collection.startsWith('directus_') === false && collection.schema
|
||||
)
|
||||
);
|
||||
const regularCollections = computed(() => collectionsStore.databaseCollections);
|
||||
|
||||
const systemCollections = computed(() =>
|
||||
orderBy(
|
||||
|
||||
@@ -26,6 +26,9 @@ export const useCollectionsStore = defineStore({
|
||||
allCollections(): Collection[] {
|
||||
return this.collections.filter(({ collection }) => collection.startsWith('directus_') === false);
|
||||
},
|
||||
databaseCollections(): Collection[] {
|
||||
return this.allCollections.filter((collection) => collection.schema);
|
||||
},
|
||||
crudSafeSystemCollections(): Collection[] {
|
||||
return orderBy(
|
||||
this.collections.filter((collection) => {
|
||||
|
||||
Reference in New Issue
Block a user