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';
|
localType.value = 'datetime';
|
||||||
else if (TIME.includes(props.type))
|
else if (TIME.includes(props.type))
|
||||||
localType.value = 'time';
|
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';
|
localType.value = 'uuid';
|
||||||
else
|
else
|
||||||
localType.value = 'none';
|
localType.value = 'none';
|
||||||
@@ -177,7 +177,7 @@ const inputProps = () => {
|
|||||||
return { type: 'text', mask: datetimeMask };
|
return { type: 'text', mask: datetimeMask };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BLOB.includes(props.type))
|
if (BLOB.includes(props.type) && props.field.key !== 'pri')
|
||||||
return { type: 'file', mask: false };
|
return { type: 'file', mask: false };
|
||||||
|
|
||||||
if (BIT.includes(props.type))
|
if (BIT.includes(props.type))
|
||||||
|
@@ -440,7 +440,7 @@ const editON = async (field: string) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BLOB.includes(type)) {
|
if (BLOB.includes(type) && props.fields[field].key !== 'pri') {
|
||||||
isBlobEditor.value = true;
|
isBlobEditor.value = true;
|
||||||
editingContent.value = content || '';
|
editingContent.value = content || '';
|
||||||
fileToUpload.value = null;
|
fileToUpload.value = null;
|
||||||
@@ -458,9 +458,12 @@ const editON = async (field: string) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit('start-editing', field);
|
emit('start-editing', field);
|
||||||
return;
|
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
|
// Inline editable fields
|
||||||
editingContent.value = originalContent.value;
|
editingContent.value = originalContent.value;
|
||||||
|
Reference in New Issue
Block a user