mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: QA - index can't be created from rel attr
This commit is contained in:
1 parent
e80f228111
commit
8c7bcbe56f
2 files changed
+18
-14
No files matched your search
+11
-10
@@ -144,16 +144,17 @@
|
||||
}}>
|
||||
Edit
|
||||
</DropListItem>
|
||||
|
||||
<DropListItem
|
||||
icon="plus"
|
||||
on:click={() => {
|
||||
selectedAttribute = attribute;
|
||||
showCreateIndex = true;
|
||||
showDropdown[index] = false;
|
||||
}}>
|
||||
Create Index
|
||||
</DropListItem>
|
||||
{#if !isRelationship(attribute)}
|
||||
<DropListItem
|
||||
icon="plus"
|
||||
on:click={() => {
|
||||
selectedAttribute = attribute;
|
||||
showCreateIndex = true;
|
||||
showDropdown[index] = false;
|
||||
}}>
|
||||
Create Index
|
||||
</DropListItem>
|
||||
{/if}
|
||||
<DropListItem
|
||||
icon="trash"
|
||||
on:click={() => {
|
||||
|
||||
+7
-4
@@ -9,6 +9,7 @@
|
||||
import { remove } from '$lib/helpers/array';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { isRelationship } from '../document-[document]/attributes/store';
|
||||
import { indexes, type Attributes } from '../store';
|
||||
import { collection } from '../store';
|
||||
import Select from './select.svelte';
|
||||
@@ -27,10 +28,12 @@
|
||||
];
|
||||
let selectedType = 'key';
|
||||
|
||||
let attributeOptions = $collection.attributes.map((attribute: Attributes) => ({
|
||||
value: attribute.key,
|
||||
label: attribute.key
|
||||
}));
|
||||
let attributeOptions = $collection.attributes
|
||||
.filter((attribute) => !isRelationship(attribute))
|
||||
.map((attribute) => ({
|
||||
value: attribute.key,
|
||||
label: attribute.key
|
||||
}));
|
||||
|
||||
let attributeList = [{ value: '', order: '' }];
|
||||
|
||||
|
||||
Reference in new issue
Block a user