From e125dee691393cdf3004819f919d084d3b35a34a Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 20 Nov 2024 16:51:14 +0100 Subject: [PATCH] refactor: refs #7229 desestructure --- modules/worker/back/methods/worker-dms/filter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/worker/back/methods/worker-dms/filter.js b/modules/worker/back/methods/worker-dms/filter.js index 2836b0cc7..240a905d2 100644 --- a/modules/worker/back/methods/worker-dms/filter.js +++ b/modules/worker/back/methods/worker-dms/filter.js @@ -95,18 +95,18 @@ module.exports = Self => { await models.Docuware.getById('hr', worker?.lastName + ' ' + worker?.firstName, docuwareParse) ?? []; for (document of workerDocuware) { - const documentId = document.id; + const {id: documentId, dmsFk} = document; const defaultData = { id: documentId, workerFk: id, - dmsFk: document.dmsFk, + dmsFk: dmsFk, dms: { id: documentId, - file: document.dmsFk + '.pdf', + file: dmsFk + '.pdf', isDocuware: true, hasFile: false, reference: worker?.fi, - dmsFk: document.dmsFk, + dmsFk: dmsFk, url: document.url, download: `WorkerDms/${document.dmsFk}/docuwareDownload`, description: document.description + ' - ' + document.state,