Delete Attribute
-
- Are you sure you want to delete '{selectedAttribute.key}' from {$collection.name} ?
+ Are you sure you want to delete '{selectedAttribute?.key}' from {$collection?.name} ?
(showDelete = false)}>Cancel
diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/overview.svelte b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/overview.svelte
index ac098f928..e7818d4b3 100644
--- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/overview.svelte
+++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/overview.svelte
@@ -1,31 +1,55 @@
Overview
-
-
{#if selectedAttribute}
-
+
+
+ {#if selectedAttribute.format}
+
+ {/if}
+ {#if selectedAttribute.min}
+
+ {/if}
+ {#if selectedAttribute.max}
+
+ {/if}
+ {#if selectedAttribute.elements}
+
+ {/if}
+
+
+ Indicate whether this is a required attribute
+
+ Indicate whether this attribute should act as an array
{/if}
diff --git a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts
index cd0baad18..ca2b439e5 100644
--- a/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts
+++ b/src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/attributes/store.ts
@@ -12,41 +12,55 @@ import Url from './url.svelte';
export type Option = {
name: string;
component: typeof SvelteComponent;
+ type: 'string' | 'integer' | 'double' | 'boolean';
+ format?: 'email' | 'ip' | 'url' | 'enum';
};
export const options: Option[] = [
{
name: 'String',
- component: String
+ component: String,
+ type: 'string'
},
{
name: 'Integer',
- component: Integer
+ component: Integer,
+ type: 'integer'
},
{
name: 'Float',
- component: Float
+ component: Float,
+ type: 'double'
},
{
name: 'Boolean',
- component: Boolean
+ component: Boolean,
+ type: 'boolean'
},
{
name: 'Email',
- component: Email
+ component: Email,
+ type: 'string',
+ format: 'email'
},
{
name: 'IP',
- component: Ip
+ component: Ip,
+ type: 'string',
+ format: 'ip'
},
{
name: 'URL',
- component: Url
+ component: Url,
+ type: 'string',
+ format: 'url'
},
{
name: 'Enum',
- component: Enum
+ component: Enum,
+ type: 'string',
+ format: 'enum'
}
];
-export const option = writable({ name: null, component: null });
+export const option = writable ();