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:
@@ -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))
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user