fix: refs #8388 update file attachment logic and redirect after invoice creation
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2025-03-11 13:41:52 +01:00
parent 14ccfc18a9
commit df3bbfe5e4
2 changed files with 4 additions and 2 deletions

View File

@ -46,9 +46,11 @@ 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 = false;
}
});
function onFileChange(files) {
dms.value.hasFileAttached = !!files;

View File

@ -156,7 +156,7 @@ const cols = computed(() => [
:create="{
urlCreate: 'InvoiceIns',
title: t('globals.createInvoiceIn'),
onDataSaved: ({ id }) => tableRef.redirect(id),
onDataSaved: ({ id }) => tableRef.redirect(`${id}/basic-data`),
formInitialData: { companyFk: user.companyFk, issued: Date.vnNew() },
}"
redirect="invoice-in"