#8442 - createVehicleDms #1614

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

View File

@ -44,7 +44,7 @@ export default defineConfig({
supportFile: 'test/cypress/support/index.js',
videosFolder: 'test/cypress/videos',
downloadsFolder: 'test/cypress/downloads',
tmpUploadFolder: '../salix/storage/tmp/dms',
tmpUploadFolder: 'test/cypress/storage/tmp/dms',
jtubau marked this conversation as resolved Outdated

@alexm das el ok?

@alexm das el ok?
Outdated
Review

@jorgep No, diria que hay que usar este path: test/cypress/storage/tmp/dms esta dentro de lilium

@jorgep No, diria que hay que usar este path: `test/cypress/storage/tmp/dms` esta dentro de lilium
video: false,
specPattern: 'test/cypress/integration/**/*.spec.js',
experimentalRunAllSpecs: true,

View File

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

Muestra notificación al usuario correctamente no?

Muestra notificación al usuario correctamente no?
}
}
@ -210,12 +210,14 @@ function addDefaultData(data) {
}
</style>
<i18n>
en:
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,10 +259,14 @@ function deleteDms(dmsFk) {
},
})
.onOk(async () => {
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');
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');
}
});
jtubau marked this conversation as resolved Outdated

throw e?

throw e?
}
@ -431,9 +435,11 @@ 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