updated delivery-note dms path
gitea/salix/master This commit looks good
Details
gitea/salix/master This commit looks good
Details
This commit is contained in:
parent
2ca78d5916
commit
e94dbfe189
|
@ -24,5 +24,8 @@
|
||||||
"rejectUnauthorized": false
|
"rejectUnauthorized": false
|
||||||
},
|
},
|
||||||
"pool": true
|
"pool": true
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"root": "./e2e/dms"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,8 @@
|
||||||
const strftime = require('strftime');
|
const strftime = require('strftime');
|
||||||
const database = require(`${appPath}/lib/database`);
|
const database = require(`${appPath}/lib/database`);
|
||||||
|
const config = require(`${appPath}/lib/config.js`);
|
||||||
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
||||||
|
const md5 = require('md5');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'rpt-delivery-note',
|
name: 'rpt-delivery-note',
|
||||||
|
@ -30,7 +32,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
dmsPath() {
|
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)
|
if (this.signature && this.signature.id)
|
||||||
return `${hostPath}/${this.signature.id}.png`;
|
return `${hostPath}/${this.signature.id}.png`;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue