Rename ATTACHMENT to ATTACHMENTS

This commit is contained in:
Adria Navarro 2024-04-03 11:02:25 +02:00
parent 757284d6c0
commit aabee4d90e
5 changed files with 5 additions and 5 deletions

View File

@ -394,7 +394,7 @@
FIELDS.BIGINT,
FIELDS.BOOLEAN,
FIELDS.DATETIME,
FIELDS.ATTACHMENT,
FIELDS.ATTACHMENTS,
FIELDS.ATTACHMENT_SINGLE,
FIELDS.LINK,
FIELDS.FORMULA,

View File

@ -107,7 +107,7 @@ export const FIELDS = {
},
},
},
ATTACHMENT: {
ATTACHMENTS: {
name: "Attachment List",
type: FieldType.ATTACHMENTS,
icon: "Folder",

View File

@ -192,7 +192,7 @@ const parseType = (value, type) => {
}
// Parse attachments, treating no elements as null
if (type === FieldTypes.ATTACHMENT) {
if (type === FieldTypes.ATTACHMENTS) {
if (!Array.isArray(value) || !value.length) {
return null
}

View File

@ -99,7 +99,7 @@ export async function checkForColumnUpdates(
column.subtype !== oldTable?.schema[column.name]?.subtype
)
for (const attachmentColumn of changedAttachmentSubtypeColumns) {
if (attachmentColumn.subtype === FieldTypeSubtypes.ATTACHMENT.SINGLE) {
if (attachmentColumn.subtype === FieldTypeSubtypes.ATTACHMENTS.SINGLE) {
attachmentColumn.constraints ??= { length: {} }
attachmentColumn.constraints.length ??= {}
attachmentColumn.constraints.length.maximum = 1

View File

@ -48,7 +48,7 @@ export const FieldTypeSubtypes = {
USER: FieldSubtype.USER as FieldSubtype.USER,
USERS: FieldSubtype.USERS as FieldSubtype.USERS,
},
ATTACHMENT: {
ATTACHMENTS: {
SINGLE: FieldSubtype.SINGLE as FieldSubtype.SINGLE,
},
}