#8442 - createVehicleDms #1614

Merged
jtubau merged 47 commits from 8422-createVehicleDms into dev 2025-04-16 14:20:24 +00:00
5 changed files with 7 additions and 11 deletions
Showing only changes of commit f0ef9b42c9 - Show all commits

View File

@ -89,7 +89,7 @@ async function save() {
delete dms.value.files;
return response;
} catch (e) {
notify(t('errorDmsSave'), 'negative');
throw new Error(e.message);
jtubau marked this conversation as resolved Outdated

Muestra notificación al usuario correctamente no?

Muestra notificación al usuario correctamente no?
}
}
@ -211,13 +211,11 @@ function addDefaultData(data) {
</style>
<i18n>
en:
errorDmsSave: Error saving the dms
contentTypesInfo: Allowed file types {allowedContentTypes}
EntryDmsDescription: Reference {reference}
WorkersDescription: Working of employee id {reference}
SupplierDmsDescription: Reference {reference}
es:
errorDmsSave: Error al guardar el dms
Generate identifier for original file: Generar identificador para archivo original
contentTypesInfo: Tipos de archivo permitidos {allowedContentTypes}
EntryDmsDescription: Referencia {reference}

View File

@ -259,13 +259,15 @@ function deleteDms(dmsFk) {
},
})
.onOk(async () => {
try{
await axios.post(`${$props.deleteModel ?? $props.model}/${dmsFk}/removeFile`);
try {
jtubau marked this conversation as resolved Outdated

Si falla el post, mostrarás la notificación igualmente, trycatch para no mostrar la notificación si falla.

Si falla el post, mostrarás la notificación igualmente, trycatch para no mostrar la notificación si falla.
await axios.post(
`${$props.deleteModel ?? $props.model}/${dmsFk}/removeFile`,
);
const index = rows.value.findIndex((row) => row.id == dmsFk);
rows.value.splice(index, 1);
notify(t('globals.dataDeleted'), 'positive');
} catch (e) {
notify(t('errorDmsDelete'), 'negative');
throw new Error(e.message);
jtubau marked this conversation as resolved Outdated

throw e?

throw e?
}
});
}
@ -435,11 +437,9 @@ defineExpose({
</style>
<i18n>
en:
errorDmsDelete: Error deleting the dms
contentTypesInfo: Allowed file types {allowedContentTypes}
The documentation is available in paper form: The documentation is available in paper form
es:
errorDmsSave: Error al eliminar el dms
contentTypesInfo: Tipos de archivo permitidos {allowedContentTypes}
Generate identifier for original file: Generar identificador para archivo original
Upload file: Subir fichero

View File

@ -33,7 +33,7 @@ const importDms = async () => {
dmsId.value = null;
jtubau marked this conversation as resolved
Review

Revisar si se muestra el el error al usuario

Revisar si se muestra el el error al usuario
emit('onDataSaved');
} catch (e) {
notify('vehicle.errors.dmsImported', 'negative');
throw new Error(e.message);
jtubau marked this conversation as resolved Outdated

throw e?

throw e?
}
};
</script>

View File

@ -24,4 +24,3 @@ vehicle:
document: Document
errors:
documentIdEmpty: The document identifier can't be empty
dmsImported: Error occurred while importing the document

View File

@ -24,4 +24,3 @@ vehicle:
document: Documento
errors:
documentIdEmpty: El número de documento no puede estar vacío
dmsImported: Se ha producido un error al importar el documento