From fd613140e169912f44966fdc6f25fafd85bae7a1 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 28 Jun 2020 02:31:02 -0500 Subject: started adding date types --- src/client/views/collections/CollectionSchemaView.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/client/views/collections/CollectionSchemaView.tsx') diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index bfd5fa96f..7e8455149 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -37,7 +37,8 @@ export enum ColumnType { Boolean, Doc, Image, - List + List, + Date } // this map should be used for keys that should have a const type of value const columnTypes: Map = new Map([ @@ -225,6 +226,11 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { Image ; + const dateType =
this.changeColumnType(ColumnType.Date, col)}> + + Date +
; + const allColumnTypes =
{anyType} @@ -234,11 +240,13 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { {listType} {docType} {imageType} + {dateType}
; const justColType = type === ColumnType.Any ? anyType : type === ColumnType.Number ? numType : type === ColumnType.String ? textType : type === ColumnType.Boolean ? boolType : - type === ColumnType.List ? listType : type === ColumnType.Doc ? docType : imageType; + type === ColumnType.List ? listType : type === ColumnType.Doc ? docType : + type === ColumnType.Date ? dateType : imageType; return (
-- cgit v1.2.3-70-g09d2