diff options
| author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-06-28 02:31:02 -0500 |
|---|---|---|
| committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-06-28 02:31:02 -0500 |
| commit | fd613140e169912f44966fdc6f25fafd85bae7a1 (patch) | |
| tree | a06a69a10db950a68879acb2b9975fb21bbd1eae /src/client/views/collections/CollectionSchemaView.tsx | |
| parent | af7b4994fa97a2aee0a2e90b30d21d4b030bd2b7 (diff) | |
started adding date types
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 12 |
1 files changed, 10 insertions, 2 deletions
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<string, ColumnType> = new Map([ @@ -225,6 +226,11 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { Image </div>; + const dateType = <div className={"columnMenu-option" + (type === ColumnType.Date ? " active" : "")} onClick={() => this.changeColumnType(ColumnType.Date, col)}> + <FontAwesomeIcon icon={"calendar"} size="sm" /> + Date + </div>; + const allColumnTypes = <div className="columnMenu-types"> {anyType} @@ -234,11 +240,13 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { {listType} {docType} {imageType} + {dateType} </div>; 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 ( <div className="collectionSchema-headerMenu-group"> |
