From 212898ed981ebc15c2b020ed11f14adc4e33d30d Mon Sep 17 00:00:00 2001 From: Joan Date: Tue, 15 Jan 2019 08:17:22 +0100 Subject: [PATCH 1/8] mailer service docker-compose --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1f4a3ee29..2e2ed89a7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: image: registry.verdnatura.es/salix-mailer:${TAG} restart: unless-stopped build: - dockerfile: services/mailer/Dockerfile + context: services/mailer environment: - NODE_ENV volumes: From f64569d070ba23ce79bf84556d7551b83f183b71 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Jan 2019 08:27:02 +0100 Subject: [PATCH 2/8] mailer volume --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2e2ed89a7..931a0a382 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,4 +28,4 @@ services: environment: - NODE_ENV volumes: - - /config/vn-mailer \ No newline at end of file + - /config/vn-mailer:/config/vn-mailer \ No newline at end of file From 76bfd0db7aa45a3b744f5653d4d22ef3e4b5b5fa Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Jan 2019 08:34:54 +0100 Subject: [PATCH 3/8] mailer config path --- docker-compose.yml | 2 +- services/mailer/application/config.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 931a0a382..497803c4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,4 +28,4 @@ services: environment: - NODE_ENV volumes: - - /config/vn-mailer:/config/vn-mailer \ No newline at end of file + - /containers/vn-mailer:/etc/vn-mailer \ No newline at end of file diff --git a/services/mailer/application/config.js b/services/mailer/application/config.js index e1b9eb8d0..23a3ed699 100644 --- a/services/mailer/application/config.js +++ b/services/mailer/application/config.js @@ -1,8 +1,8 @@ require('require-yaml'); const fs = require('fs-extra'); -const package = require('../package.json'); -let configPath = `/config/${package.name}`; -let nginxConfigPath = '/config/nginx'; +const packageJson = require('../package.json'); +let configPath = `/etc/${packageJson.name}`; +let nginxConfigPath = configPath; let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; @@ -24,7 +24,7 @@ if (fs.existsSync(proxyEnvFile)) Object.assign(proxyConf, require(proxyEnvFile)); config.proxy = proxyConf; -config.package = package; +config.package = packageJson; config.env = env; -module.exports = config; \ No newline at end of file +module.exports = config; From 68bc3f2c7b5daf49078eb89ec4f9f1ab4de081c3 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Jan 2019 08:56:30 +0100 Subject: [PATCH 4/8] mailer config --- services/mailer/application/config.js | 32 ++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/services/mailer/application/config.js b/services/mailer/application/config.js index 23a3ed699..4c54025fb 100644 --- a/services/mailer/application/config.js +++ b/services/mailer/application/config.js @@ -2,26 +2,28 @@ require('require-yaml'); const fs = require('fs-extra'); const packageJson = require('../package.json'); let configPath = `/etc/${packageJson.name}`; -let nginxConfigPath = configPath; -let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; +let config = require('./config/datasources.json'); +let configFiles = [ + `${configPath}/datasources.json`, + `${configPath}/datasources.${env}.json` +]; -if (env === 'development') { - configPath = `${__dirname}/config`; - nginxConfigPath = '../../nginx'; +for (let configFile of configFiles) { + if (fs.accessSync(configFile)) + Object.assign(config, require(configFile)); } -let config = require(`${configPath}/datasources.json`); -let configEnvFile = `${configPath}/datasources.${env}.json`; +let proxyConf = require('../../nginx/config.yml'); +let proxyFiles = [ + `${configPath}/config.yml`, + `${configPath}/config.${env}.yml` +]; -if (fs.existsSync(configEnvFile)) - Object.assign(config, require(configEnvFile)); - -let proxyConf = require(`${nginxConfigPath}/config.yml`); -let proxyEnvFile = `${nginxConfigPath}/config.${env}.yml`; - -if (fs.existsSync(proxyEnvFile)) - Object.assign(proxyConf, require(proxyEnvFile)); +for (let proxyFile of proxyFiles) { + if (fs.accessSync(proxyFile)) + Object.assign(proxyConf, require(proxyFile)); +} config.proxy = proxyConf; config.package = packageJson; From 9cb9192fc99c9e9460b9afcaa3349aa049464b62 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Jan 2019 09:00:14 +0100 Subject: [PATCH 5/8] mailer env config --- services/mailer/application/config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/services/mailer/application/config.js b/services/mailer/application/config.js index 4c54025fb..6b3311861 100644 --- a/services/mailer/application/config.js +++ b/services/mailer/application/config.js @@ -2,6 +2,7 @@ require('require-yaml'); const fs = require('fs-extra'); const packageJson = require('../package.json'); let configPath = `/etc/${packageJson.name}`; +let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; let config = require('./config/datasources.json'); let configFiles = [ From 2ec21b52571072024b28a74954a3987df97ffacc Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Jan 2019 09:04:21 +0100 Subject: [PATCH 6/8] fs existsSync --- services/mailer/application/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/mailer/application/config.js b/services/mailer/application/config.js index 6b3311861..25b430119 100644 --- a/services/mailer/application/config.js +++ b/services/mailer/application/config.js @@ -11,7 +11,7 @@ let configFiles = [ ]; for (let configFile of configFiles) { - if (fs.accessSync(configFile)) + if (fs.existsSync(configFile)) Object.assign(config, require(configFile)); } @@ -22,7 +22,7 @@ let proxyFiles = [ ]; for (let proxyFile of proxyFiles) { - if (fs.accessSync(proxyFile)) + if (fs.existsSync(proxyFile)) Object.assign(proxyConf, require(proxyFile)); } From 729019486dd871299457ad5a27fd6201afc60cbd Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 15 Jan 2019 09:11:22 +0100 Subject: [PATCH 7/8] mailer config --- services/mailer/application/config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/mailer/application/config.js b/services/mailer/application/config.js index 25b430119..f0f0dfea6 100644 --- a/services/mailer/application/config.js +++ b/services/mailer/application/config.js @@ -15,8 +15,9 @@ for (let configFile of configFiles) { Object.assign(config, require(configFile)); } -let proxyConf = require('../../nginx/config.yml'); +let proxyConf = {}; let proxyFiles = [ + '../../nginx/config.yml', `${configPath}/config.yml`, `${configPath}/config.${env}.yml` ]; From be5a8803ec863a471d17c49f94357d8dbae9b560 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 15 Jan 2019 11:15:30 +0100 Subject: [PATCH 8/8] #255 Download icon fixes --- modules/client/back/methods/receipt/filter.js | 6 ++- modules/client/front/address/index/index.html | 1 - modules/client/front/index/index.js | 4 +- modules/client/front/risk/index/index.html | 43 +++++++++++-------- modules/client/front/risk/index/locale/es.yml | 5 ++- 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/modules/client/back/methods/receipt/filter.js b/modules/client/back/methods/receipt/filter.js index f4ec6ad40..b9f26b1ab 100644 --- a/modules/client/back/methods/receipt/filter.js +++ b/modules/client/back/methods/receipt/filter.js @@ -42,7 +42,8 @@ module.exports = Self => { r.bankFk, firstName, name, - r.clientFk + r.clientFk, + FALSE pdf FROM vn.receipt r LEFT JOIN vn.worker w ON w.id = r.workerFk JOIN vn.company c ON c.id = r.companyFk @@ -60,7 +61,8 @@ module.exports = Self => { NULL, NULL, NULL, - i.clientFk + i.clientFk, + i.pdf FROM vn.invoiceOut i JOIN vn.company c ON c.id = i.companyFk WHERE i.clientFk = ? AND i.companyFk = ? diff --git a/modules/client/front/address/index/index.html b/modules/client/front/address/index/index.html index b9e60c2e2..494d249d9 100644 --- a/modules/client/front/address/index/index.html +++ b/modules/client/front/address/index/index.html @@ -6,7 +6,6 @@ data="addresses" auto-load="true"> - Addresses diff --git a/modules/client/front/index/index.js b/modules/client/front/index/index.js index 7fa644f5c..1497224fe 100644 --- a/modules/client/front/index/index.js +++ b/modules/client/front/index/index.js @@ -12,7 +12,7 @@ export default class Controller { case 'search': return /^\d+$/.test(value) ? {id: value} - : {name: {regexp: value}}; + : {name: {like: `%${value}%`}}; case 'phone': return { or: [ @@ -23,7 +23,7 @@ export default class Controller { case 'name': case 'socialName': case 'city': - return {[param]: {regexp: value}}; + return {[param]: {regexp: `%${value}%`}}; case 'id': case 'fi': case 'postcode': diff --git a/modules/client/front/risk/index/index.html b/modules/client/front/risk/index/index.html index d93a77b59..9c87712f9 100644 --- a/modules/client/front/risk/index/index.html +++ b/modules/client/front/risk/index/index.html @@ -30,7 +30,7 @@
-
Total por empresa
+
Total by company
Creation date Employee Reference - Bank - Debit - Havings - Balance - Conciliated + Bank + Debit + Havings + Balance + Conciliated @@ -62,23 +62,23 @@ {{::risk.created | dateTime:'dd/MM/yyyy HH:mm'}} {{::risk.firstName}} {{::risk.name}} {{::risk.ref ? 'N/FRA ' + risk.ref : ''}} - {{::risk.bankFk}} - {{::risk.debit | currency:'€':2}} - {{::risk.credit | currency:'€':2}} - {{risk.balance | currency:'€':2}} - + {{::risk.bankFk}} + {{::risk.debit | currency:'€':2}} + {{::risk.credit | currency:'€':2}} + {{risk.balance | currency:'€':2}} + - - + - - + @@ -94,8 +94,13 @@ - - + + + - \ No newline at end of file diff --git a/modules/client/front/risk/index/locale/es.yml b/modules/client/front/risk/index/locale/es.yml index f0eb2cd52..17672a8a9 100644 --- a/modules/client/front/risk/index/locale/es.yml +++ b/modules/client/front/risk/index/locale/es.yml @@ -4,4 +4,7 @@ Bank: Caja Debit: Debe Conciliated: Conciliado New payment: Añadir pago -Havings: Haber \ No newline at end of file +Havings: Haber +Balance: Balance +Total by company: Total por empresa +Download PDF: Descargar PDF \ No newline at end of file