Merge pull request 'fix: refs #7229 set right urls' (!3226) from 7229-fixDownloadFile into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #3226 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
470d9bde64
|
@ -86,30 +86,30 @@ module.exports = Self => {
|
||||||
'Tipo Documento': 'description',
|
'Tipo Documento': 'description',
|
||||||
'Stored on': 'created',
|
'Stored on': 'created',
|
||||||
'Document ID': 'id',
|
'Document ID': 'id',
|
||||||
'URL': 'download',
|
'URL': 'url',
|
||||||
'Stored by': 'name',
|
'Stored by': 'name',
|
||||||
'Estado': 'state'
|
'Estado': 'state'
|
||||||
};
|
};
|
||||||
|
|
||||||
workerDocuware =
|
workerDocuware =
|
||||||
await models.Docuware.getById('hr', worker.lastName + ' ' + worker.firstName, docuwareParse) ?? [];
|
await models.Docuware.getById('hr', worker?.lastName + ' ' + worker?.firstName, docuwareParse) ?? [];
|
||||||
const url = (await Self.app.models.Url.getUrl('docuware')) + 'WebClient';
|
|
||||||
for (document of workerDocuware) {
|
for (document of workerDocuware) {
|
||||||
const docuwareId = document.id;
|
const {id: documentId, dmsFk} = document;
|
||||||
const defaultData = {
|
const defaultData = {
|
||||||
id: docuwareId,
|
id: documentId,
|
||||||
workerFk: id,
|
workerFk: id,
|
||||||
dmsFk: docuwareId,
|
dmsFk: dmsFk,
|
||||||
dms: {
|
dms: {
|
||||||
id: docuwareId,
|
id: documentId,
|
||||||
file: docuwareId + '.pdf',
|
file: dmsFk + '.pdf',
|
||||||
isDocuware: true,
|
isDocuware: true,
|
||||||
hasFile: false,
|
hasFile: false,
|
||||||
reference: worker.fi,
|
reference: worker?.fi,
|
||||||
dmsFk: docuwareId,
|
dmsFk: dmsFk,
|
||||||
url,
|
url: document.url,
|
||||||
|
download: `WorkerDms/${document.dmsFk}/docuwareDownload`,
|
||||||
description: document.description + ' - ' + document.state,
|
description: document.description + ' - ' + document.state,
|
||||||
download: document.download,
|
|
||||||
created: document.created,
|
created: document.created,
|
||||||
dmsType: {name: 'Docuware'},
|
dmsType: {name: 'Docuware'},
|
||||||
worker: {id: null, user: {name: document.name}},
|
worker: {id: null, user: {name: document.name}},
|
||||||
|
|
Loading…
Reference in New Issue