#8442 - createVehicleDms #1614
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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}
|
||||
|
|
|
@ -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
jorgep
commented
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
jorgep
commented
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
|
||||
|
|
|
@ -33,7 +33,7 @@ const importDms = async () => {
|
|||
dmsId.value = null;
|
||||
jtubau marked this conversation as resolved
jorgep
commented
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
jorgep
commented
throw e? throw e?
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -24,4 +24,3 @@ vehicle:
|
|||
document: Document
|
||||
errors:
|
||||
documentIdEmpty: The document identifier can't be empty
|
||||
dmsImported: Error occurred while importing the document
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Muestra notificación al usuario correctamente no?