updated delivery-note dms path
gitea/salix/master This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-07-23 13:41:28 +02:00
parent 2ca78d5916
commit e94dbfe189
2 changed files with 8 additions and 1 deletions

View File

@ -24,5 +24,8 @@
"rejectUnauthorized": false
},
"pool": true
},
"storage": {
"root": "./e2e/dms"
}
}

View File

@ -1,6 +1,8 @@
const strftime = require('strftime');
const database = require(`${appPath}/lib/database`);
const config = require(`${appPath}/lib/config.js`);
const UserException = require(`${appPath}/lib/exceptions/userException`);
const md5 = require('md5');
module.exports = {
name: 'rpt-delivery-note',
@ -30,7 +32,9 @@ module.exports = {
},
computed: {
dmsPath() {
const hostPath = 'http://windows.verdnatura.es/signatures/tickets';
const pathHash = md5(this.signature.id.toString()).substring(0, 3);
const hostPath = `file:///${config.storage.root}/${pathHash}`;
if (this.signature && this.signature.id)
return `${hostPath}/${this.signature.id}.png`;
},