diff --git a/src/lib/components/DataTypeIcon/index.tsx b/src/lib/components/DataTypeIcon/index.ts similarity index 87% rename from src/lib/components/DataTypeIcon/index.tsx rename to src/lib/components/DataTypeIcon/index.ts index 8f626b006982f678d5192e745affc224ef5da562..770ef1d7e49fc8173a7ffa4828844fcfff96d11f 100644 --- a/src/lib/components/DataTypeIcon/index.tsx +++ b/src/lib/components/DataTypeIcon/index.ts @@ -15,8 +15,6 @@ const IconMap: Record<SchemaAttributeTypes, string> = { array: 'icon-[ic--baseline-data-array]', }; -function getDataTypeIcon(data_type?: SchemaAttributeTypes): string { +export function getDataTypeIcon(data_type?: SchemaAttributeTypes): string { return data_type && IconMap[data_type] ? IconMap[data_type] : 'icon-[carbon--undefined]'; } - -export { getDataTypeIcon }; diff --git a/src/lib/querybuilder/panel/querysidepanel/QueryBuilderLogicPillsPanel.tsx b/src/lib/querybuilder/panel/querysidepanel/QueryBuilderLogicPillsPanel.tsx index 93e5f2d2d04525478b5a90e01a9f376b7054d43a..8fdc9db0e772f6ca09ea30408470a45b058e787c 100644 --- a/src/lib/querybuilder/panel/querysidepanel/QueryBuilderLogicPillsPanel.tsx +++ b/src/lib/querybuilder/panel/querysidepanel/QueryBuilderLogicPillsPanel.tsx @@ -26,6 +26,7 @@ export const QueryBuilderLogicPillsPanel = (props: { : ((props.connection?.params?.handleId ? toHandleData(props.connection.params.handleId).attributeType : null) as string); if (filterType === 'string') filterType = 'string'; else if (filterType === 'int' || filterType === 'float') filterType = 'number'; + else if (filterType === 'datetime') filterType = 'datetime'; const dataOps = [ { @@ -55,6 +56,11 @@ export const QueryBuilderLogicPillsPanel = (props: { description: 'Text', icon: 'icon-[ic--baseline-abc]', }, + { + title: 'datetime', + description: 'Date and Time', + icon: 'icon-[carbon--calendar]', + }, ].filter(item => !filterType || item.title === filterType); const onDragStart = (event: React.DragEvent, value: AllLogicDescriptions) => {