PR feedback, signature to signature single

This commit is contained in:
Dean 2024-05-17 17:04:15 +01:00
parent c45ae63742
commit 37dd75823f
36 changed files with 65 additions and 54 deletions

View File

@ -364,7 +364,7 @@
value.customType !== "cron" && value.customType !== "cron" &&
value.customType !== "triggerSchema" && value.customType !== "triggerSchema" &&
value.customType !== "automationFields" && value.customType !== "automationFields" &&
value.type !== "signature" && value.type !== "signature_single" &&
value.type !== "attachment" && value.type !== "attachment" &&
value.type !== "attachment_single" value.type !== "attachment_single"
) )
@ -457,7 +457,7 @@
value={inputData[key]} value={inputData[key]}
options={Object.keys(table?.schema || {})} options={Object.keys(table?.schema || {})}
/> />
{:else if value.type === "attachment" || value.type === "signature"} {:else if value.type === "attachment" || value.type === "signature_single"}
<div class="attachment-field-wrapper"> <div class="attachment-field-wrapper">
<div class="label-wrapper"> <div class="label-wrapper">
<Label>{label}</Label> <Label>{label}</Label>

View File

@ -27,7 +27,7 @@
let attachmentTypes = [ let attachmentTypes = [
FieldType.ATTACHMENTS, FieldType.ATTACHMENTS,
FieldType.ATTACHMENT_SINGLE, FieldType.ATTACHMENT_SINGLE,
FieldType.SIGNATURE, FieldType.SIGNATURE_SINGLE,
] ]
$: { $: {

View File

@ -21,6 +21,12 @@
return clone return clone
}) })
let attachmentTypes = [
FieldType.ATTACHMENTS,
FieldType.ATTACHMENT_SINGLE,
FieldType.SIGNATURE_SINGLE,
]
function schemaHasOptions(schema) { function schemaHasOptions(schema) {
return !!schema.constraints?.inclusion?.length return !!schema.constraints?.inclusion?.length
} }
@ -30,7 +36,7 @@
if ( if (
(schema.type === FieldType.ATTACHMENT_SINGLE || (schema.type === FieldType.ATTACHMENT_SINGLE ||
schema.type === FieldType.SIGNATURE) && schema.type === FieldType.SIGNATURE_SINGLE) &&
Object.keys(keyValueObj).length === 0 Object.keys(keyValueObj).length === 0
) { ) {
return [] return []
@ -101,7 +107,7 @@
on:change={e => onChange(e, field)} on:change={e => onChange(e, field)}
useLabel={false} useLabel={false}
/> />
{:else if schema.type === FieldType.ATTACHMENTS || schema.type === FieldType.ATTACHMENT_SINGLE || schema.type === FieldType.SIGNATURE} {:else if attachmentTypes.includes(schema.type)}
<div class="attachment-field-spacinng"> <div class="attachment-field-spacinng">
<KeyValueBuilder <KeyValueBuilder
on:change={e => on:change={e =>
@ -109,7 +115,7 @@
{ {
detail: detail:
schema.type === FieldType.ATTACHMENT_SINGLE || schema.type === FieldType.ATTACHMENT_SINGLE ||
schema.type === FieldType.SIGNATURE schema.type === FieldType.SIGNATURE_SINGLE
? e.detail.length > 0 ? e.detail.length > 0
? { ? {
url: e.detail[0].name, url: e.detail[0].name,

View File

@ -111,7 +111,7 @@
}} }}
maximum={1} maximum={1}
/> />
{:else if type === "signature"} {:else if type === "signature_single"}
<div class="signature"> <div class="signature">
<Label>{label}</Label> <Label>{label}</Label>
<div class="sig-wrap" class:display={value}> <div class="sig-wrap" class:display={value}>

View File

@ -9,7 +9,7 @@ const MAX_DEPTH = 1
const TYPES_TO_SKIP = [ const TYPES_TO_SKIP = [
FieldType.FORMULA, FieldType.FORMULA,
FieldType.LONGFORM, FieldType.LONGFORM,
FieldType.SIGNATURE, FieldType.SIGNATURE_SINGLE,
FieldType.ATTACHMENTS, FieldType.ATTACHMENTS,
//https://github.com/Budibase/budibase/issues/3030 //https://github.com/Budibase/budibase/issues/3030
FieldType.INTERNAL, FieldType.INTERNAL,

View File

@ -412,7 +412,7 @@
FIELDS.FORMULA, FIELDS.FORMULA,
FIELDS.JSON, FIELDS.JSON,
FIELDS.BARCODEQR, FIELDS.BARCODEQR,
FIELDS.SIGNATURE, FIELDS.SIGNATURE_SINGLE,
FIELDS.BIGINT, FIELDS.BIGINT,
FIELDS.AUTO, FIELDS.AUTO,
] ]

View File

@ -56,7 +56,7 @@
}, },
{ {
label: "Signature", label: "Signature",
value: FieldType.SIGNATURE, value: FieldType.SIGNATURE_SINGLE,
}, },
{ {
label: "Attachment list", label: "Attachment list",

View File

@ -31,7 +31,7 @@
let attachmentTypes = [ let attachmentTypes = [
FieldType.ATTACHMENT_SINGLE, FieldType.ATTACHMENT_SINGLE,
FieldType.ATTACHMENTS, FieldType.ATTACHMENTS,
FieldType.SIGNATURE, FieldType.SIGNATURE_SINGLE,
] ]
$: readableValue = runtimeToReadableBinding(bindings, value) $: readableValue = runtimeToReadableBinding(bindings, value)
@ -111,7 +111,7 @@
boolean: isValidBoolean, boolean: isValidBoolean,
attachment: false, attachment: false,
attachment_single: false, attachment_single: false,
signature: false, signature_single: false,
} }
const isValid = value => { const isValid = value => {
@ -133,7 +133,7 @@
"bigint", "bigint",
"barcodeqr", "barcodeqr",
"attachment", "attachment",
"signature", "signature_single",
"attachment_single", "attachment_single",
].includes(type) ].includes(type)
) { ) {

View File

@ -76,7 +76,7 @@ const componentMap = {
"field/array": FormFieldSelect, "field/array": FormFieldSelect,
"field/json": FormFieldSelect, "field/json": FormFieldSelect,
"field/barcodeqr": FormFieldSelect, "field/barcodeqr": FormFieldSelect,
"field/signature": FormFieldSelect, "field/signature_single": FormFieldSelect,
"field/bb_reference": FormFieldSelect, "field/bb_reference": FormFieldSelect,
// Some validation types are the same as others, so not all types are // Some validation types are the same as others, so not all types are
// explicitly listed here. e.g. options uses string validation // explicitly listed here. e.g. options uses string validation
@ -87,7 +87,7 @@ const componentMap = {
"validation/datetime": ValidationEditor, "validation/datetime": ValidationEditor,
"validation/attachment": ValidationEditor, "validation/attachment": ValidationEditor,
"validation/attachment_single": ValidationEditor, "validation/attachment_single": ValidationEditor,
"validation/signature": ValidationEditor, "validation/signature_single": ValidationEditor,
"validation/link": ValidationEditor, "validation/link": ValidationEditor,
"validation/bb_reference": ValidationEditor, "validation/bb_reference": ValidationEditor,
} }

View File

@ -41,7 +41,7 @@ export const FieldTypeToComponentMap = {
[FieldType.BOOLEAN]: "booleanfield", [FieldType.BOOLEAN]: "booleanfield",
[FieldType.LONGFORM]: "longformfield", [FieldType.LONGFORM]: "longformfield",
[FieldType.DATETIME]: "datetimefield", [FieldType.DATETIME]: "datetimefield",
[FieldType.SIGNATURE]: "signaturefield", [FieldType.SIGNATURE_SINGLE]: "signaturesinglefield",
[FieldType.ATTACHMENTS]: "attachmentfield", [FieldType.ATTACHMENTS]: "attachmentfield",
[FieldType.ATTACHMENT_SINGLE]: "attachmentsinglefield", [FieldType.ATTACHMENT_SINGLE]: "attachmentsinglefield",
[FieldType.LINK]: "relationshipfield", [FieldType.LINK]: "relationshipfield",

View File

@ -109,7 +109,7 @@
Constraints.MaxUploadSize, Constraints.MaxUploadSize,
], ],
["attachment_single"]: [Constraints.Required, Constraints.MaxUploadSize], ["attachment_single"]: [Constraints.Required, Constraints.MaxUploadSize],
["signature"]: [Constraints.Required], ["signature_single"]: [Constraints.Required],
["link"]: [ ["link"]: [
Constraints.Required, Constraints.Required,
Constraints.Contains, Constraints.Contains,

View File

@ -127,9 +127,9 @@ export const FIELDS = {
presence: false, presence: false,
}, },
}, },
SIGNATURE: { SIGNATURE_SINGLE: {
name: "Signature", name: "Signature",
type: FieldType.SIGNATURE, type: FieldType.SIGNATURE_SINGLE,
icon: "AnnotatePen", icon: "AnnotatePen",
constraints: { constraints: {
presence: false, presence: false,

View File

@ -71,7 +71,7 @@
"multifieldselect", "multifieldselect",
"s3upload", "s3upload",
"codescanner", "codescanner",
"signaturefield", "signaturesinglefield",
"bbreferencesinglefield", "bbreferencesinglefield",
"bbreferencefield" "bbreferencefield"
] ]

View File

@ -4107,7 +4107,7 @@
} }
] ]
}, },
"signaturefield": { "signaturesinglefield": {
"name": "Signature", "name": "Signature",
"icon": "AnnotatePen", "icon": "AnnotatePen",
"styles": ["size"], "styles": ["size"],
@ -4117,7 +4117,7 @@
}, },
"settings": [ "settings": [
{ {
"type": "field/signature", "type": "field/signature_single",
"label": "Field", "label": "Field",
"key": "field", "key": "field",
"required": true "required": true
@ -4150,7 +4150,7 @@
] ]
}, },
{ {
"type": "validation/signature", "type": "validation/signature_single",
"label": "Validation", "label": "Validation",
"key": "validation" "key": "validation"
} }

View File

@ -15,7 +15,7 @@
[FieldType.BOOLEAN]: "booleanfield", [FieldType.BOOLEAN]: "booleanfield",
[FieldType.LONGFORM]: "longformfield", [FieldType.LONGFORM]: "longformfield",
[FieldType.DATETIME]: "datetimefield", [FieldType.DATETIME]: "datetimefield",
[FieldType.SIGNATURE]: "signaturefield", [FieldType.SIGNATURE_SINGLE]: "signaturesinglefield",
[FieldType.ATTACHMENTS]: "attachmentfield", [FieldType.ATTACHMENTS]: "attachmentfield",
[FieldType.ATTACHMENT_SINGLE]: "attachmentsinglefield", [FieldType.ATTACHMENT_SINGLE]: "attachmentsinglefield",
[FieldType.LINK]: "relationshipfield", [FieldType.LINK]: "relationshipfield",

View File

@ -80,7 +80,7 @@
{validation} {validation}
{span} {span}
{helpText} {helpText}
type="signature" type="signature_single"
bind:fieldState bind:fieldState
bind:fieldApi bind:fieldApi
bind:fieldSchema bind:fieldSchema

View File

@ -16,6 +16,6 @@ export { default as formstep } from "./FormStep.svelte"
export { default as jsonfield } from "./JSONField.svelte" export { default as jsonfield } from "./JSONField.svelte"
export { default as s3upload } from "./S3Upload.svelte" export { default as s3upload } from "./S3Upload.svelte"
export { default as codescanner } from "./CodeScannerField.svelte" export { default as codescanner } from "./CodeScannerField.svelte"
export { default as signaturefield } from "./SignatureField.svelte" export { default as signaturesinglefield } from "./SignatureField.svelte"
export { default as bbreferencefield } from "./BBReferenceField.svelte" export { default as bbreferencefield } from "./BBReferenceField.svelte"
export { default as bbreferencesinglefield } from "./BBReferenceSingleField.svelte" export { default as bbreferencesinglefield } from "./BBReferenceSingleField.svelte"

View File

@ -201,7 +201,10 @@ const parseType = (value, type) => {
} }
// Parse attachment/signature single, treating no key as null // Parse attachment/signature single, treating no key as null
if (type === FieldTypes.ATTACHMENT_SINGLE || type === FieldTypes.SIGNATURE) { if (
type === FieldTypes.ATTACHMENT_SINGLE ||
type === FieldTypes.SIGNATURE_SINGLE
) {
if (!value?.key) { if (!value?.key) {
return null return null
} }

View File

@ -11,7 +11,6 @@
export let readonly = false export let readonly = false
export let api export let api
export let invertX = false export let invertX = false
export let invertY = false
const { API, notifications, props } = getContext("grid") const { API, notifications, props } = getContext("grid")

View File

@ -21,7 +21,7 @@ const TypeComponentMap = {
[FieldType.OPTIONS]: OptionsCell, [FieldType.OPTIONS]: OptionsCell,
[FieldType.DATETIME]: DateCell, [FieldType.DATETIME]: DateCell,
[FieldType.BARCODEQR]: TextCell, [FieldType.BARCODEQR]: TextCell,
[FieldType.SIGNATURE]: SignatureCell, [FieldType.SIGNATURE_SINGLE]: SignatureCell,
[FieldType.LONGFORM]: LongFormCell, [FieldType.LONGFORM]: LongFormCell,
[FieldType.ARRAY]: MultiSelectCell, [FieldType.ARRAY]: MultiSelectCell,
[FieldType.NUMBER]: NumberCell, [FieldType.NUMBER]: NumberCell,

View File

@ -121,7 +121,7 @@ export const TypeIconMap = {
[FieldType.OPTIONS]: "Dropdown", [FieldType.OPTIONS]: "Dropdown",
[FieldType.DATETIME]: "Calendar", [FieldType.DATETIME]: "Calendar",
[FieldType.BARCODEQR]: "Camera", [FieldType.BARCODEQR]: "Camera",
[FieldType.SIGNATURE]: "AnnotatePen", [FieldType.SIGNATURE_SINGLE]: "AnnotatePen",
[FieldType.LONGFORM]: "TextAlignLeft", [FieldType.LONGFORM]: "TextAlignLeft",
[FieldType.ARRAY]: "Duplicate", [FieldType.ARRAY]: "Duplicate",
[FieldType.NUMBER]: "123", [FieldType.NUMBER]: "123",

View File

@ -310,7 +310,7 @@ describe.each([
constraints: { type: "array", presence: false }, constraints: { type: "array", presence: false },
} }
const signature: FieldSchema = { const signature: FieldSchema = {
type: FieldType.SIGNATURE, type: FieldType.SIGNATURE_SINGLE,
name: "signature", name: "signature",
constraints: { presence: false }, constraints: { presence: false },
} }
@ -982,7 +982,7 @@ describe.each([
await coreAttachmentEnrichment( await coreAttachmentEnrichment(
{ {
signature: { signature: {
type: FieldType.SIGNATURE, type: FieldType.SIGNATURE_SINGLE,
name: "signature", name: "signature",
constraints: { presence: false }, constraints: { presence: false },
}, },

View File

@ -114,7 +114,7 @@ export async function sendAutomationAttachmentsToStorage(
if ( if (
schema?.type === FieldType.ATTACHMENTS || schema?.type === FieldType.ATTACHMENTS ||
schema?.type === FieldType.ATTACHMENT_SINGLE || schema?.type === FieldType.ATTACHMENT_SINGLE ||
schema?.type === FieldType.SIGNATURE schema?.type === FieldType.SIGNATURE_SINGLE
) { ) {
attachmentRows[prop] = value attachmentRows[prop] = value
} }

View File

@ -125,7 +125,7 @@ function generateSchema(
break break
case FieldType.ATTACHMENTS: case FieldType.ATTACHMENTS:
case FieldType.ATTACHMENT_SINGLE: case FieldType.ATTACHMENT_SINGLE:
case FieldType.SIGNATURE: case FieldType.SIGNATURE_SINGLE:
case FieldType.AUTO: case FieldType.AUTO:
case FieldType.JSON: case FieldType.JSON:
case FieldType.INTERNAL: case FieldType.INTERNAL:

View File

@ -72,7 +72,7 @@ const isTypeAllowed: Record<FieldType, boolean> = {
[FieldType.JSON]: false, [FieldType.JSON]: false,
[FieldType.INTERNAL]: false, [FieldType.INTERNAL]: false,
[FieldType.BIGINT]: false, [FieldType.BIGINT]: false,
[FieldType.SIGNATURE]: false, [FieldType.SIGNATURE_SINGLE]: false,
} }
const ALLOWED_TYPES = Object.entries(isTypeAllowed) const ALLOWED_TYPES = Object.entries(isTypeAllowed)

View File

@ -381,7 +381,7 @@ function copyExistingPropsOver(
case FieldType.ARRAY: case FieldType.ARRAY:
case FieldType.ATTACHMENTS: case FieldType.ATTACHMENTS:
case FieldType.ATTACHMENT_SINGLE: case FieldType.ATTACHMENT_SINGLE:
case FieldType.SIGNATURE: case FieldType.SIGNATURE_SINGLE:
case FieldType.JSON: case FieldType.JSON:
case FieldType.BB_REFERENCE: case FieldType.BB_REFERENCE:
case FieldType.BB_REFERENCE_SINGLE: case FieldType.BB_REFERENCE_SINGLE:

View File

@ -69,7 +69,7 @@ export async function updateAttachmentColumns(prodAppId: string, db: Database) {
) )
} else if ( } else if (
(columnType === FieldType.ATTACHMENT_SINGLE || (columnType === FieldType.ATTACHMENT_SINGLE ||
columnType === FieldType.SIGNATURE) && columnType === FieldType.SIGNATURE_SINGLE) &&
row[column] row[column]
) { ) {
row[column] = rewriteAttachmentUrl(prodAppId, row[column]) row[column] = rewriteAttachmentUrl(prodAppId, row[column])

View File

@ -33,7 +33,7 @@ export async function getRowsWithAttachments(appId: string, table: Table) {
if ( if (
column.type === FieldType.ATTACHMENTS || column.type === FieldType.ATTACHMENTS ||
column.type === FieldType.ATTACHMENT_SINGLE || column.type === FieldType.ATTACHMENT_SINGLE ||
column.type === FieldType.SIGNATURE column.type === FieldType.SIGNATURE_SINGLE
) { ) {
attachmentCols.push(key) attachmentCols.push(key)
} }

View File

@ -42,7 +42,7 @@ const FieldTypeMap: Record<FieldType, SQLiteType> = {
[FieldType.BARCODEQR]: SQLiteType.BLOB, [FieldType.BARCODEQR]: SQLiteType.BLOB,
[FieldType.ATTACHMENTS]: SQLiteType.BLOB, [FieldType.ATTACHMENTS]: SQLiteType.BLOB,
[FieldType.ATTACHMENT_SINGLE]: SQLiteType.BLOB, [FieldType.ATTACHMENT_SINGLE]: SQLiteType.BLOB,
[FieldType.SIGNATURE]: SQLiteType.BLOB, [FieldType.SIGNATURE_SINGLE]: SQLiteType.BLOB,
[FieldType.ARRAY]: SQLiteType.BLOB, [FieldType.ARRAY]: SQLiteType.BLOB,
[FieldType.LINK]: SQLiteType.BLOB, [FieldType.LINK]: SQLiteType.BLOB,
[FieldType.BIGINT]: SQLiteType.TEXT, [FieldType.BIGINT]: SQLiteType.TEXT,

View File

@ -85,7 +85,7 @@ describe("should be able to re-write attachment URLs", () => {
const { rows, db } = await coreBehaviour( const { rows, db } = await coreBehaviour(
{ {
signature: { signature: {
type: FieldType.SIGNATURE, type: FieldType.SIGNATURE_SINGLE,
name: "signature", name: "signature",
}, },
otherCol: { otherCol: {

View File

@ -32,7 +32,7 @@ export class AttachmentCleanup {
if ( if (
type !== FieldType.ATTACHMENTS && type !== FieldType.ATTACHMENTS &&
type !== FieldType.ATTACHMENT_SINGLE && type !== FieldType.ATTACHMENT_SINGLE &&
type !== FieldType.SIGNATURE type !== FieldType.SIGNATURE_SINGLE
) { ) {
return [] return []
} }
@ -64,7 +64,7 @@ export class AttachmentCleanup {
if ( if (
schema.type !== FieldType.ATTACHMENTS && schema.type !== FieldType.ATTACHMENTS &&
schema.type !== FieldType.ATTACHMENT_SINGLE && schema.type !== FieldType.ATTACHMENT_SINGLE &&
schema.type !== FieldType.SIGNATURE schema.type !== FieldType.SIGNATURE_SINGLE
) { ) {
continue continue
} }
@ -103,7 +103,7 @@ export class AttachmentCleanup {
if ( if (
schema.type !== FieldType.ATTACHMENTS && schema.type !== FieldType.ATTACHMENTS &&
schema.type !== FieldType.ATTACHMENT_SINGLE && schema.type !== FieldType.ATTACHMENT_SINGLE &&
schema.type !== FieldType.SIGNATURE schema.type !== FieldType.SIGNATURE_SINGLE
) { ) {
continue continue
} }
@ -125,7 +125,7 @@ export class AttachmentCleanup {
if ( if (
schema.type !== FieldType.ATTACHMENTS && schema.type !== FieldType.ATTACHMENTS &&
schema.type !== FieldType.ATTACHMENT_SINGLE && schema.type !== FieldType.ATTACHMENT_SINGLE &&
schema.type !== FieldType.SIGNATURE schema.type !== FieldType.SIGNATURE_SINGLE
) { ) {
continue continue
} }

View File

@ -160,7 +160,7 @@ export async function inputProcessing(
} }
} else if ( } else if (
field.type === FieldType.ATTACHMENT_SINGLE || field.type === FieldType.ATTACHMENT_SINGLE ||
field.type === FieldType.SIGNATURE field.type === FieldType.SIGNATURE_SINGLE
) { ) {
const attachment = clonedRow[key] const attachment = clonedRow[key]
if (attachment?.url) { if (attachment?.url) {
@ -234,7 +234,7 @@ export async function outputProcessing<T extends Row[] | Row>(
if ( if (
column.type === FieldType.ATTACHMENTS || column.type === FieldType.ATTACHMENTS ||
column.type === FieldType.ATTACHMENT_SINGLE || column.type === FieldType.ATTACHMENT_SINGLE ||
column.type === FieldType.SIGNATURE column.type === FieldType.SIGNATURE_SINGLE
) { ) {
for (let row of enriched) { for (let row of enriched) {
if (row[property] == null) { if (row[property] == null) {

View File

@ -35,7 +35,11 @@ const mockedDeleteFiles = objectStore.deleteFiles as jest.MockedFunction<
const rowGenerators: [ const rowGenerators: [
string, string,
FieldType.ATTACHMENT_SINGLE | FieldType.ATTACHMENTS | FieldType.SIGNATURE, (
| FieldType.ATTACHMENT_SINGLE
| FieldType.ATTACHMENTS
| FieldType.SIGNATURE_SINGLE
),
string, string,
(fileKey?: string) => Row (fileKey?: string) => Row
][] = [ ][] = [
@ -71,7 +75,7 @@ const rowGenerators: [
], ],
[ [
"row with a single signature column", "row with a single signature column",
FieldType.SIGNATURE, FieldType.SIGNATURE_SINGLE,
"signature", "signature",
function rowWithSignature(): Row { function rowWithSignature(): Row {
return { return {
@ -102,7 +106,7 @@ describe.each(rowGenerators)(
}, },
signature: { signature: {
name: "signature", name: "signature",
type: FieldType.SIGNATURE, type: FieldType.SIGNATURE_SINGLE,
constraints: {}, constraints: {},
}, },
}, },

View File

@ -152,7 +152,7 @@ export function parse(rows: Rows, schema: TableSchema): Rows {
} else if ( } else if (
(columnType === FieldType.ATTACHMENTS || (columnType === FieldType.ATTACHMENTS ||
columnType === FieldType.ATTACHMENT_SINGLE || columnType === FieldType.ATTACHMENT_SINGLE ||
columnType === FieldType.SIGNATURE) && columnType === FieldType.SIGNATURE_SINGLE) &&
typeof columnData === "string" typeof columnData === "string"
) { ) {
parsedRow[columnName] = parseCsvExport(columnData) parsedRow[columnName] = parseCsvExport(columnData)

View File

@ -15,7 +15,7 @@ const allowDisplayColumnByType: Record<FieldType, boolean> = {
[FieldType.ARRAY]: false, [FieldType.ARRAY]: false,
[FieldType.ATTACHMENTS]: false, [FieldType.ATTACHMENTS]: false,
[FieldType.ATTACHMENT_SINGLE]: false, [FieldType.ATTACHMENT_SINGLE]: false,
[FieldType.SIGNATURE]: false, [FieldType.SIGNATURE_SINGLE]: false,
[FieldType.LINK]: false, [FieldType.LINK]: false,
[FieldType.JSON]: false, [FieldType.JSON]: false,
[FieldType.BB_REFERENCE]: false, [FieldType.BB_REFERENCE]: false,
@ -34,11 +34,10 @@ const allowSortColumnByType: Record<FieldType, boolean> = {
[FieldType.BIGINT]: true, [FieldType.BIGINT]: true,
[FieldType.BOOLEAN]: true, [FieldType.BOOLEAN]: true,
[FieldType.JSON]: true, [FieldType.JSON]: true,
[FieldType.FORMULA]: false, [FieldType.FORMULA]: false,
[FieldType.ATTACHMENTS]: false, [FieldType.ATTACHMENTS]: false,
[FieldType.ATTACHMENT_SINGLE]: false, [FieldType.ATTACHMENT_SINGLE]: false,
[FieldType.SIGNATURE]: false, [FieldType.SIGNATURE_SINGLE]: false,
[FieldType.ARRAY]: false, [FieldType.ARRAY]: false,
[FieldType.LINK]: false, [FieldType.LINK]: false,
[FieldType.BB_REFERENCE]: false, [FieldType.BB_REFERENCE]: false,

View File

@ -97,7 +97,7 @@ export enum FieldType {
* a JSON type, called Signature within Budibase. This type functions much the same as ATTACHMENTS but restricted * a JSON type, called Signature within Budibase. This type functions much the same as ATTACHMENTS but restricted
* only to signatures. * only to signatures.
*/ */
SIGNATURE = "signature", SIGNATURE_SINGLE = "signature_single",
/** /**
* a string type, this allows representing very large integers, but they are held/managed within Budibase as * a string type, this allows representing very large integers, but they are held/managed within Budibase as
* strings. When stored in external databases Budibase will attempt to use a real big integer type and depend * strings. When stored in external databases Budibase will attempt to use a real big integer type and depend