diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql
index 2f3a9378d9..9d9b84da46 100644
--- a/db/dump/fixtures.sql
+++ b/db/dump/fixtures.sql
@@ -1901,11 +1901,11 @@ INSERT INTO `vn`.`dmsType`(`id`, `name`, `path`, `readRoleFk`, `writeRoleFk`, `c
VALUES
(1, 'Facturas Recibidas', 'recibidas', NULL, NULL, 'invoiceIn'),
(2, 'Doc oficial', 'oficial', NULL, NULL, 'officialDoc'),
- (3, 'Laboral', 'laboral', NULL, NULL, 'hhrrData'),
+ (3, 'Laboral', 'laboral', 37, 37, 'hhrrData'),
(4, 'Albaranes recibidos', 'entradas', NULL, NULL, 'deliveryNote'),
(5, 'Otros', 'otros', 1, 1, 'miscellaneous'),
(6, 'Pruebas', 'pruebas', NULL, NULL, 'tests'),
- (7, 'IAE Clientes', 'IAE_Clientes', NULL, NULL, 'economicActivitiesTax'),
+ (7, 'IAE Clientes', 'IAE_Clientes', 1, 1, 'economicActivitiesTax'),
(8, 'Fiscal', 'fiscal', NULL, NULL, 'fiscal'),
(9, 'Vehiculos', 'vehiculos', NULL, NULL, 'vehicles'),
(10, 'Plantillas', 'plantillas', NULL, NULL, 'templates'),
diff --git a/modules/worker/back/methods/worker-dms/removeFile.js b/modules/worker/back/methods/worker-dms/removeFile.js
index d0116c3c22..b441c56ce1 100644
--- a/modules/worker/back/methods/worker-dms/removeFile.js
+++ b/modules/worker/back/methods/worker-dms/removeFile.js
@@ -5,7 +5,7 @@ module.exports = Self => {
accepts: {
arg: 'id',
type: 'Number',
- description: 'The document id',
+ description: 'The worker document id',
http: {source: 'path'}
},
returns: {
diff --git a/modules/worker/back/models/worker-dms.json b/modules/worker/back/models/worker-dms.json
index f8ad824bc4..56cad65a64 100644
--- a/modules/worker/back/models/worker-dms.json
+++ b/modules/worker/back/models/worker-dms.json
@@ -13,10 +13,10 @@
},
"properties": {
"id": {
- "type": "Number"
+ "type": "Number",
+ "id": true
},
"dmsFk": {
- "id": true,
"type": "Number",
"required": true,
"mysql": {
diff --git a/modules/worker/front/dms/index/index.html b/modules/worker/front/dms/index/index.html
index 697d3d5413..697d3d5aa1 100644
--- a/modules/worker/front/dms/index/index.html
+++ b/modules/worker/front/dms/index/index.html
@@ -19,7 +19,6 @@
Reference
Description
Original
- File
Created
@@ -45,6 +44,7 @@
href="api/dms/{{::document.dmsFk}}/downloadFile?access_token={{::$ctrl.accessToken}}">{{::document.dms.file}}
+
{{::document.dms.created | date:'dd/MM/yyyy HH:mm'}}
diff --git a/modules/worker/front/dms/index/index.js b/modules/worker/front/dms/index/index.js
index 907047f970..ab3be34080 100644
--- a/modules/worker/front/dms/index/index.js
+++ b/modules/worker/front/dms/index/index.js
@@ -58,8 +58,8 @@ class Controller extends Component {
deleteDms(response) {
if (response === 'accept') {
- const dmsFk = this.workerDms[this.dmsIndex].dmsFk;
- const query = `WorkerDms/${dmsFk}/removeFile`;
+ const workerDmsId = this.workerDms[this.dmsIndex].id;
+ const query = `WorkerDms/${workerDmsId}/removeFile`;
this.$http.post(query).then(() => {
this.$.model.remove(this.dmsIndex);
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));