feat: refs #8388 add hasFile property handling in VnDms component
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-24 11:15:59 +01:00
parent 028477ecbe
commit 2fabff05be
1 changed files with 2 additions and 3 deletions

View File

@ -50,11 +50,9 @@ const dms = ref({});
onMounted(() => {
defaultData();
if (!$props.formInitialData) {
if (!$props.formInitialData)
dms.value.description =
$props.description ?? t($props.model + 'Description', dms.value);
dms.value.hasFile = $props.hasFile;
}
});
function onFileChange(files) {
dms.value.hasFileAttached = !!files;
@ -96,6 +94,7 @@ function defaultData() {
if ($props.formInitialData) return (dms.value = $props.formInitialData);
return addDefaultData({
reference: route.params.id,
hasFile: $props.hasFile,
});
}