aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx12
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">