mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: add date columns to documents
This commit is contained in:
1 parent
6748b1425f
commit
5061a6615e
1 file changed
+12
-2
+12
-2
@@ -30,6 +30,7 @@
|
||||
import { attributes, collection, columns } from './store';
|
||||
import { clickOnEnter } from '$lib/helpers/a11y';
|
||||
import type { ColumnType } from '$lib/helpers/types';
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@@ -154,6 +155,8 @@
|
||||
<TableCellHead eyebrow={false}>{column.title}</TableCellHead>
|
||||
{/if}
|
||||
{/each}
|
||||
<TableCellHead eyebrow={false}>Created</TableCellHead>
|
||||
<TableCellHead eyebrow={false}>Updated</TableCellHead>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{#each data.documents.documents as document}
|
||||
@@ -231,6 +234,12 @@
|
||||
{/if}
|
||||
{/if}
|
||||
{/each}
|
||||
<TableCellText>
|
||||
{toLocaleDateTime(document.$createdAt)}
|
||||
</TableCellText>
|
||||
<TableCellText>
|
||||
{toLocaleDateTime(document.$updatedAt)}
|
||||
</TableCellText>
|
||||
</TableRowLink>
|
||||
{/each}
|
||||
</TableBody>
|
||||
@@ -319,8 +328,9 @@
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button text on:click={() => (showDelete = false)} disabled={deleting}>Cancel</Button>
|
||||
<Button secondary submit disabled={deleting || (relAttributes?.length && !checked)}
|
||||
>Delete</Button>
|
||||
<Button secondary submit disabled={deleting || (relAttributes?.length && !checked)}>
|
||||
Delete
|
||||
</Button>
|
||||
</svelte:fragment>
|
||||
</Modal>
|
||||
|
||||
|
||||
Reference in new issue
Block a user