diff --git a/lerna.json b/lerna.json index a943000cea..9488ebe3a0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.27.2", + "version": "2.27.3", "npmClient": "yarn", "packages": [ "packages/*", @@ -22,4 +22,4 @@ "loadEnvFiles": false } } -} \ No newline at end of file +} diff --git a/packages/backend-core/src/docIds/ids.ts b/packages/backend-core/src/docIds/ids.ts index 9627b2b94c..a828c1b91e 100644 --- a/packages/backend-core/src/docIds/ids.ts +++ b/packages/backend-core/src/docIds/ids.ts @@ -18,6 +18,14 @@ export const generateAppID = (tenantId?: string | null) => { return `${id}${newid()}` } +/** + * Generates a new table ID. + * @returns The new table ID which the table doc can be stored under. + */ +export function generateTableID() { + return `${DocumentType.TABLE}${SEPARATOR}${newid()}` +} + /** * Gets a new row ID for the specified table. * @param tableId The table which the row is being created for. diff --git a/packages/bbui/src/helpers.js b/packages/bbui/src/helpers.js index dd94d12f7f..0f912a7161 100644 --- a/packages/bbui/src/helpers.js +++ b/packages/bbui/src/helpers.js @@ -170,7 +170,8 @@ export const stringifyDate = ( const offset = referenceDate.getTimezoneOffset() * 60000 const date = new Date(value.valueOf() - offset) if (timeOnly) { - return date.toISOString().slice(11, 19) + // Extract HH:mm + return date.toISOString().slice(11, 16) } return date.toISOString().slice(0, -1) } diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 5dd9d5ec61..f3881c4836 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -586,13 +586,17 @@ bind:constraints={editableColumn.constraints} bind:optionColors={editableColumn.optionColors} /> - {:else if editableColumn.type === FieldType.DATETIME && !editableColumn.autocolumn} + {:else if editableColumn.type === DATE_TYPE && !editableColumn.autocolumn}
- +
@@ -601,30 +605,36 @@
- -
- - {#if datasource?.source !== SourceName.ORACLE && datasource?.source !== SourceName.SQL_SERVER && !editableColumn.dateOnly} -
-
- - - - -
-
+ + {#if !editableColumn.timeOnly} + {#if datasource?.source !== SourceName.ORACLE && datasource?.source !== SourceName.SQL_SERVER && !editableColumn.dateOnly} +
+
+ + + + +
+ +
+ {/if} + {/if} - {:else if editableColumn.type === FieldType.NUMBER && !editableColumn.autocolumn}
diff --git a/packages/builder/src/components/common/NavItem.svelte b/packages/builder/src/components/common/NavItem.svelte index 5cc6db65a0..5a04907570 100644 --- a/packages/builder/src/components/common/NavItem.svelte +++ b/packages/builder/src/components/common/NavItem.svelte @@ -1,5 +1,5 @@