1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

fix: improve BLOB primary fields management, fixes #938

This commit is contained in:
2025-02-06 13:28:12 +01:00
parent 0f93d70417
commit 72f8d4249f
2 changed files with 6 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ const fakerGroups = computed(() => {
localType.value = 'datetime';
else if (TIME.includes(props.type))
localType.value = 'time';
else if (UUID.includes(props.type))
else if (UUID.includes(props.type) || (BLOB.includes(props.type) && props.field.key === 'pri'))
localType.value = 'uuid';
else
localType.value = 'none';
@@ -177,7 +177,7 @@ const inputProps = () => {
return { type: 'text', mask: datetimeMask };
}
if (BLOB.includes(props.type))
if (BLOB.includes(props.type) && props.field.key !== 'pri')
return { type: 'file', mask: false };
if (BIT.includes(props.type))

View File

@@ -440,7 +440,7 @@ const editON = async (field: string) => {
return;
}
if (BLOB.includes(type)) {
if (BLOB.includes(type) && props.fields[field].key !== 'pri') {
isBlobEditor.value = true;
editingContent.value = content || '';
fileToUpload.value = null;
@@ -458,9 +458,12 @@ const editON = async (field: string) => {
};
}
}
emit('start-editing', field);
return;
}
else if (BLOB.includes(type) && props.fields[field].key === 'pri')// Disable edit on BLOB primary until we are sure it's not problematic
return;
// Inline editable fields
editingContent.value = originalContent.value;