refactor: refs #8422 removed error-related changes
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jose Antonio Tubau 2025-04-01 06:56:02 +02:00
parent dbdccc4774
commit f0ef9b42c9
5 changed files with 7 additions and 11 deletions

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);
}
}
@ -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 {
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);
}
});
}
@ -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;
emit('onDataSaved');
} catch (e) {
notify('vehicle.errors.dmsImported', 'negative');
throw new Error(e.message);
}
};
</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