From f0c9b2beca347706033af8bfaa2fea493dfdf5b0 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 11:05:07 +0100
Subject: [PATCH 01/21] new module articles, structure
---
client/articles/index.js | 1 +
client/articles/routes.json | 21 ++++++++++
client/articles/src/articles.js | 3 ++
client/articles/src/index/index.html | 0
client/articles/src/index/index.js | 15 ++++++++
client/articles/src/locale/es.json | 3 ++
client/articles/src/module.js | 5 +++
client/modules.json | 3 +-
client/salix/src/spliting.js | 11 ++++++
.../nginx/static/images/icon_articles.svg | 38 +++++++++++++++++++
10 files changed, 99 insertions(+), 1 deletion(-)
create mode 100644 client/articles/index.js
create mode 100644 client/articles/routes.json
create mode 100644 client/articles/src/articles.js
create mode 100644 client/articles/src/index/index.html
create mode 100644 client/articles/src/index/index.js
create mode 100644 client/articles/src/locale/es.json
create mode 100644 client/articles/src/module.js
create mode 100644 services/nginx/static/images/icon_articles.svg
diff --git a/client/articles/index.js b/client/articles/index.js
new file mode 100644
index 000000000..5e4d1e64b
--- /dev/null
+++ b/client/articles/index.js
@@ -0,0 +1 @@
+export * from './src/articles';
diff --git a/client/articles/routes.json b/client/articles/routes.json
new file mode 100644
index 000000000..af8c49149
--- /dev/null
+++ b/client/articles/routes.json
@@ -0,0 +1,21 @@
+{
+ "module": "articles",
+ "name": "Articles",
+ "icon": "/static/images/icon_articles.svg",
+ "routes": [
+ {
+ "state": "articles",
+ "abstract": true,
+ "acl": ["employee"]
+ },
+ {
+ "url": "/articles",
+ "state": "articles.index",
+ "component": "vn-articles-index"
+ }, {
+ "url": "/create",
+ "state": "articles.create",
+ "component": "vn-client-create"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/client/articles/src/articles.js b/client/articles/src/articles.js
new file mode 100644
index 000000000..ad5e0bb9d
--- /dev/null
+++ b/client/articles/src/articles.js
@@ -0,0 +1,3 @@
+export * from './module';
+
+import './index/index';
diff --git a/client/articles/src/index/index.html b/client/articles/src/index/index.html
new file mode 100644
index 000000000..e69de29bb
diff --git a/client/articles/src/index/index.js b/client/articles/src/index/index.js
new file mode 100644
index 000000000..d20d6b005
--- /dev/null
+++ b/client/articles/src/index/index.js
@@ -0,0 +1,15 @@
+import ngModule from '../module';
+
+export default class Controller {
+ constructor() {
+ this.model = {};
+ }
+ search(index) {
+ index.accept();
+ }
+}
+
+ngModule.component('vnArticlesIndex', {
+ template: require('./index.html'),
+ controller: Controller
+});
diff --git a/client/articles/src/locale/es.json b/client/articles/src/locale/es.json
new file mode 100644
index 000000000..947465dcc
--- /dev/null
+++ b/client/articles/src/locale/es.json
@@ -0,0 +1,3 @@
+{
+ "Articles": "Artículos"
+}
\ No newline at end of file
diff --git a/client/articles/src/module.js b/client/articles/src/module.js
new file mode 100644
index 000000000..be4d80d9c
--- /dev/null
+++ b/client/articles/src/module.js
@@ -0,0 +1,5 @@
+import {ng} from 'vendor';
+import 'core';
+
+const ngModule = ng.module('articles', ['vnCore']);
+export default ngModule;
diff --git a/client/modules.json b/client/modules.json
index 62c5e11a1..02af7e678 100644
--- a/client/modules.json
+++ b/client/modules.json
@@ -5,5 +5,6 @@
"client": [],
"production": [],
"route": [],
- "locator": []
+ "locator": [],
+ "articles": []
}
diff --git a/client/salix/src/spliting.js b/client/salix/src/spliting.js
index 697bcef98..b62c3d1d6 100644
--- a/client/salix/src/spliting.js
+++ b/client/salix/src/spliting.js
@@ -43,3 +43,14 @@ export const locator = () => {
};
core.splitingRegister.register('locator', locator);
+
+export const articles = () => {
+ return new Promise(resolve => {
+ require.ensure([], () => {
+ require('articles');
+ resolve('articles');
+ }, 'articles');
+ });
+};
+
+core.splitingRegister.register('articles', articles);
diff --git a/services/nginx/static/images/icon_articles.svg b/services/nginx/static/images/icon_articles.svg
new file mode 100644
index 000000000..cfd090f11
--- /dev/null
+++ b/services/nginx/static/images/icon_articles.svg
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 37bdd9d2b6418c8d56eddb812bfe028fc8210024 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 11:24:24 +0100
Subject: [PATCH 02/21] rename new module article to item
---
client/articles/index.js | 1 -
client/articles/routes.json | 21 ------------------
client/articles/src/index/index.html | 0
client/articles/src/locale/es.json | 3 ---
client/item/index.js | 1 +
client/item/routes.json | 22 +++++++++++++++++++
.../src/articles.js => item/src/item.js} | 2 +-
client/item/src/list/list.html | 1 +
.../index/index.js => item/src/list/list.js} | 8 +++----
client/item/src/locale/es.json | 4 ++++
client/{articles => item}/src/module.js | 0
client/modules.json | 2 +-
client/salix/src/locale/es.json | 1 +
client/salix/src/spliting.js | 10 ++++-----
14 files changed, 40 insertions(+), 36 deletions(-)
delete mode 100644 client/articles/index.js
delete mode 100644 client/articles/routes.json
delete mode 100644 client/articles/src/index/index.html
delete mode 100644 client/articles/src/locale/es.json
create mode 100644 client/item/index.js
create mode 100644 client/item/routes.json
rename client/{articles/src/articles.js => item/src/item.js} (52%)
create mode 100644 client/item/src/list/list.html
rename client/{articles/src/index/index.js => item/src/list/list.js} (50%)
create mode 100644 client/item/src/locale/es.json
rename client/{articles => item}/src/module.js (100%)
diff --git a/client/articles/index.js b/client/articles/index.js
deleted file mode 100644
index 5e4d1e64b..000000000
--- a/client/articles/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export * from './src/articles';
diff --git a/client/articles/routes.json b/client/articles/routes.json
deleted file mode 100644
index af8c49149..000000000
--- a/client/articles/routes.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "module": "articles",
- "name": "Articles",
- "icon": "/static/images/icon_articles.svg",
- "routes": [
- {
- "state": "articles",
- "abstract": true,
- "acl": ["employee"]
- },
- {
- "url": "/articles",
- "state": "articles.index",
- "component": "vn-articles-index"
- }, {
- "url": "/create",
- "state": "articles.create",
- "component": "vn-client-create"
- }
- ]
-}
\ No newline at end of file
diff --git a/client/articles/src/index/index.html b/client/articles/src/index/index.html
deleted file mode 100644
index e69de29bb..000000000
diff --git a/client/articles/src/locale/es.json b/client/articles/src/locale/es.json
deleted file mode 100644
index 947465dcc..000000000
--- a/client/articles/src/locale/es.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "Articles": "Artículos"
-}
\ No newline at end of file
diff --git a/client/item/index.js b/client/item/index.js
new file mode 100644
index 000000000..c94fde7de
--- /dev/null
+++ b/client/item/index.js
@@ -0,0 +1 @@
+export * from './src/item';
diff --git a/client/item/routes.json b/client/item/routes.json
new file mode 100644
index 000000000..9f811bea7
--- /dev/null
+++ b/client/item/routes.json
@@ -0,0 +1,22 @@
+{
+ "module": "item",
+ "name": "Items",
+ "icon": "/static/images/icon_articles.svg",
+ "routes": [
+ {
+ "url": "/item",
+ "state": "item",
+ "abstract": true,
+ "component": "ui-view"
+ },
+ {
+ "url": "/list",
+ "state": "item.index",
+ "component": "vn-item-list"
+ }, {
+ "url": "/create",
+ "state": "item.create",
+ "component": "vn-item-create"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/client/articles/src/articles.js b/client/item/src/item.js
similarity index 52%
rename from client/articles/src/articles.js
rename to client/item/src/item.js
index ad5e0bb9d..9d5ca85e9 100644
--- a/client/articles/src/articles.js
+++ b/client/item/src/item.js
@@ -1,3 +1,3 @@
export * from './module';
-import './index/index';
+import './list/list';
diff --git a/client/item/src/list/list.html b/client/item/src/list/list.html
new file mode 100644
index 000000000..2e1f6a06e
--- /dev/null
+++ b/client/item/src/list/list.html
@@ -0,0 +1 @@
+hi world
\ No newline at end of file
diff --git a/client/articles/src/index/index.js b/client/item/src/list/list.js
similarity index 50%
rename from client/articles/src/index/index.js
rename to client/item/src/list/list.js
index d20d6b005..ce4d773fa 100644
--- a/client/articles/src/index/index.js
+++ b/client/item/src/list/list.js
@@ -1,6 +1,6 @@
import ngModule from '../module';
-export default class Controller {
+class ItemList {
constructor() {
this.model = {};
}
@@ -9,7 +9,7 @@ export default class Controller {
}
}
-ngModule.component('vnArticlesIndex', {
- template: require('./index.html'),
- controller: Controller
+ngModule.component('vnItemList', {
+ template: require('./list.html'),
+ controller: ItemList
});
diff --git a/client/item/src/locale/es.json b/client/item/src/locale/es.json
new file mode 100644
index 000000000..fd01bdf5f
--- /dev/null
+++ b/client/item/src/locale/es.json
@@ -0,0 +1,4 @@
+{
+ "Items": "Artículos",
+ "Item": "Artículo"
+}
\ No newline at end of file
diff --git a/client/articles/src/module.js b/client/item/src/module.js
similarity index 100%
rename from client/articles/src/module.js
rename to client/item/src/module.js
diff --git a/client/modules.json b/client/modules.json
index 02af7e678..d7dd0f7ce 100644
--- a/client/modules.json
+++ b/client/modules.json
@@ -6,5 +6,5 @@
"production": [],
"route": [],
"locator": [],
- "articles": []
+ "item": []
}
diff --git a/client/salix/src/locale/es.json b/client/salix/src/locale/es.json
index 0ee929eab..338feede8 100644
--- a/client/salix/src/locale/es.json
+++ b/client/salix/src/locale/es.json
@@ -13,6 +13,7 @@
"Production" : "Producción",
"Modules access" : "Acceso a módulos",
"Locator": "Localizador",
+ "Items": "Artículos",
"name": "Nombre",
"credit": "Crédito",
"phone": "Teléfono",
diff --git a/client/salix/src/spliting.js b/client/salix/src/spliting.js
index b62c3d1d6..b1a2a4d19 100644
--- a/client/salix/src/spliting.js
+++ b/client/salix/src/spliting.js
@@ -44,13 +44,13 @@ export const locator = () => {
core.splitingRegister.register('locator', locator);
-export const articles = () => {
+export const item = () => {
return new Promise(resolve => {
require.ensure([], () => {
- require('articles');
- resolve('articles');
- }, 'articles');
+ require('item');
+ resolve('item');
+ }, 'item');
});
};
-core.splitingRegister.register('articles', articles);
+core.splitingRegister.register('item', item);
From 2c03dcf1396eea7707d68fe83e1522f8623c2cb0 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 11:25:45 +0100
Subject: [PATCH 03/21] renamed item module
---
client/item/src/module.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/item/src/module.js b/client/item/src/module.js
index be4d80d9c..b44509fb2 100644
--- a/client/item/src/module.js
+++ b/client/item/src/module.js
@@ -1,5 +1,5 @@
import {ng} from 'vendor';
import 'core';
-const ngModule = ng.module('articles', ['vnCore']);
+const ngModule = ng.module('item', ['vnCore']);
export default ngModule;
From 55691b4cc955a2df64e1e495238a8cf2774a3b17 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 12:29:35 +0100
Subject: [PATCH 04/21] nuevo micro servicio Item
---
client/core/src/textfield/style.scss | 9 ++++-
client/item/routes.json | 2 +-
client/item/src/list/list.html | 25 +++++++++++-
docker-compose.yml | 14 ++++++-
services/item/Dockerfile | 15 ++++++++
services/item/common/methods/item/filter.js | 20 ++++++++++
services/item/common/models/item.js | 3 ++
services/item/common/models/item.json | 35 +++++++++++++++++
services/item/package.json | 19 ++++++++++
services/item/server/config.json | 3 ++
services/item/server/model-config.json | 31 +++++++++++++++
services/item/server/server.js | 4 ++
services/nginx/conf-dev.conf | 3 ++
services/nginx/conf-prod.conf | 3 ++
.../nginx/static/images/icon_articles.svg | 38 -------------------
services/nginx/static/images/icon_item.svg | 37 ++++++++++++++++++
16 files changed, 218 insertions(+), 43 deletions(-)
create mode 100644 services/item/Dockerfile
create mode 100644 services/item/common/methods/item/filter.js
create mode 100644 services/item/common/models/item.js
create mode 100644 services/item/common/models/item.json
create mode 100644 services/item/package.json
create mode 100644 services/item/server/config.json
create mode 100644 services/item/server/model-config.json
create mode 100644 services/item/server/server.js
delete mode 100644 services/nginx/static/images/icon_articles.svg
create mode 100644 services/nginx/static/images/icon_item.svg
diff --git a/client/core/src/textfield/style.scss b/client/core/src/textfield/style.scss
index b8d155777..0f9d95c8e 100644
--- a/client/core/src/textfield/style.scss
+++ b/client/core/src/textfield/style.scss
@@ -7,13 +7,18 @@ vn-textfield {
width: auto;
top: 0px;
right: -6px;
- margin: 22px 0px;
- background: transparent;
+ margin: 21px 0px;
+ background: white;
+ opacity: 1;
z-index: 9999;
+ color: #aaa;
}
.material-icons {
font-size: 18px;
float: right;
margin-right: 5px;
}
+ .material-icons:hover {
+ color: rgba(0,0,0, .87);
+ }
}
\ No newline at end of file
diff --git a/client/item/routes.json b/client/item/routes.json
index 9f811bea7..803a8cce8 100644
--- a/client/item/routes.json
+++ b/client/item/routes.json
@@ -1,7 +1,7 @@
{
"module": "item",
"name": "Items",
- "icon": "/static/images/icon_articles.svg",
+ "icon": "/static/images/icon_item.svg",
"routes": [
{
"url": "/item",
diff --git a/client/item/src/list/list.html b/client/item/src/list/list.html
index 2e1f6a06e..c1996e46f 100644
--- a/client/item/src/list/list.html
+++ b/client/item/src/list/list.html
@@ -1 +1,24 @@
-hi world
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index b8d64389b..4dcb065b7 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -87,7 +87,19 @@ services:
expose:
- "3006"
ports:
- - "3006:3006"
+ - "3006:3006"
+ item:
+ environment:
+ - NODE_ENV=${NODE_ENV}
+ container_name: "${BRANCH_NAME}-item"
+ image: "item:${TAG}"
+ build:
+ context: ./services
+ dockerfile: /item/Dockerfile
+ expose:
+ - "3007"
+ ports:
+ - "3007:3007"
nginx:
container_name: "${BRANCH_NAME}-nginx"
image: "nginx:${TAG}"
diff --git a/services/item/Dockerfile b/services/item/Dockerfile
new file mode 100644
index 000000000..73be20777
--- /dev/null
+++ b/services/item/Dockerfile
@@ -0,0 +1,15 @@
+FROM node:6.9.1
+
+COPY item /app
+
+COPY loopback /loopback
+
+WORKDIR /app
+
+RUN npm install
+
+RUN npm -g install pm2
+
+CMD ["pm2-docker", "./server/server.js"]
+
+EXPOSE 3007
diff --git a/services/item/common/methods/item/filter.js b/services/item/common/methods/item/filter.js
new file mode 100644
index 000000000..59be28565
--- /dev/null
+++ b/services/item/common/methods/item/filter.js
@@ -0,0 +1,20 @@
+module.exports = Self => {
+ Self.installMethod('filter', filterParams);
+
+ function filterParams(params) {
+ let filter = {
+ where: {},
+ skip: (params.page - 1) * params.size,
+ limit: params.size,
+ order: params.order || 'name ASC'/* ,
+ include: {
+ relation: "greugeType",
+ scope: {
+ fields: ["id", "name"]
+ }
+ } */
+ };
+
+ return filter;
+ }
+};
diff --git a/services/item/common/models/item.js b/services/item/common/models/item.js
new file mode 100644
index 000000000..4c8019af3
--- /dev/null
+++ b/services/item/common/models/item.js
@@ -0,0 +1,3 @@
+module.exports = function(Self) {
+ require('../methods/item/filter.js')(Self);
+};
diff --git a/services/item/common/models/item.json b/services/item/common/models/item.json
new file mode 100644
index 000000000..8479e2217
--- /dev/null
+++ b/services/item/common/models/item.json
@@ -0,0 +1,35 @@
+{
+ "name": "Item",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "item",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "size": {
+ "type": "Number"
+ },
+ "category": {
+ "type": "Number"
+ },
+ "stems": {
+ "type": "Number"
+ },
+ "description": {
+ "type": "String"
+ },
+ "isOnOffer": {
+ "type": "Boolean"
+ },
+ "isBargain": {
+ "type": "Boolean"
+ }
+ }
+ }
\ No newline at end of file
diff --git a/services/item/package.json b/services/item/package.json
new file mode 100644
index 000000000..7a9c9b48a
--- /dev/null
+++ b/services/item/package.json
@@ -0,0 +1,19 @@
+{
+ "name": "vn-item",
+ "version": "1.0.0",
+ "main": "server/server.js",
+ "scripts": {
+ "lint": "eslint .",
+ "start": "node .",
+ "posttest": "npm run lint && nsp check"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://git.verdnatura.es/salix"
+ },
+ "license": "GPL-3.0",
+ "description": "vn-item",
+ "dependencies": {
+ "uuid": "^3.1.0"
+ }
+}
diff --git a/services/item/server/config.json b/services/item/server/config.json
new file mode 100644
index 000000000..f52e73b1d
--- /dev/null
+++ b/services/item/server/config.json
@@ -0,0 +1,3 @@
+{
+ "port": 3007
+}
diff --git a/services/item/server/model-config.json b/services/item/server/model-config.json
new file mode 100644
index 000000000..60b0133b3
--- /dev/null
+++ b/services/item/server/model-config.json
@@ -0,0 +1,31 @@
+{
+ "user": {
+ "dataSource": "salix"
+ },
+ "AccessToken": {
+ "dataSource": "salix",
+ "relations": {
+ "user": {
+ "type": "belongsTo",
+ "model": "user",
+ "foreignKey": "userId"
+ }
+ }
+ },
+ "ACL": {
+ "dataSource": "salix"
+ },
+ "RoleMapping": {
+ "dataSource": "salix"
+ },
+ "Role": {
+ "dataSource": "salix"
+ },
+ "Account": {
+ "dataSource": "salix"
+ },
+ "Item": {
+ "dataSource": "vn"
+ }
+
+}
diff --git a/services/item/server/server.js b/services/item/server/server.js
new file mode 100644
index 000000000..f0493dcd9
--- /dev/null
+++ b/services/item/server/server.js
@@ -0,0 +1,4 @@
+var vnLoopback = require('../../loopback/server/server.js');
+
+var app = module.exports = vnLoopback.loopback();
+vnLoopback.boot(app, __dirname, module);
diff --git a/services/nginx/conf-dev.conf b/services/nginx/conf-dev.conf
index b35bd3757..104bd704f 100644
--- a/services/nginx/conf-dev.conf
+++ b/services/nginx/conf-dev.conf
@@ -46,6 +46,9 @@ http {
location ~ ^/print(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3006/$1$is_args$args;
}
+ location ~ ^/item(?:/(.*))?$ {
+ proxy_pass http://127.0.0.1:3007/$1$is_args$args;
+ }
# Este tiene que ser el último
location ~ ^(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
diff --git a/services/nginx/conf-prod.conf b/services/nginx/conf-prod.conf
index eab866aaa..9e8843344 100644
--- a/services/nginx/conf-prod.conf
+++ b/services/nginx/conf-prod.conf
@@ -41,6 +41,9 @@ http {
location ~ ^/print(?:/(.*))?$ {
proxy_pass http://print:3006/$1$is_args$args;
}
+ location ~ ^/item(?:/(.*))?$ {
+ proxy_pass http://item:3007/$1$is_args$args;
+ }
# Este tiene que ser el último
location ~ ^(?:/(.*))?$ {
proxy_pass http://salix:3001/$1$is_args$args;
diff --git a/services/nginx/static/images/icon_articles.svg b/services/nginx/static/images/icon_articles.svg
deleted file mode 100644
index cfd090f11..000000000
--- a/services/nginx/static/images/icon_articles.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/services/nginx/static/images/icon_item.svg b/services/nginx/static/images/icon_item.svg
new file mode 100644
index 000000000..2cebc333f
--- /dev/null
+++ b/services/nginx/static/images/icon_item.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 5bc375d3247e0c4a3d5ae266306e7fd924a1f4e0 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 14:28:19 +0100
Subject: [PATCH 05/21] list items with images
---
client/item/routes.json | 6 +++-
client/item/src/list/item-product.html | 14 ++++++++
client/item/src/list/item-product.js | 8 +++++
client/item/src/list/list.js | 2 ++
client/item/src/list/style.css | 16 +++++++++
services/item/common/methods/item/filter.js | 2 +-
services/item/common/models/item.json | 9 +++++
services/nginx/static/images/icon_item.png | Bin 0 -> 3006 bytes
services/nginx/static/images/icon_item.svg | 37 --------------------
9 files changed, 55 insertions(+), 39 deletions(-)
create mode 100644 client/item/src/list/item-product.html
create mode 100644 client/item/src/list/item-product.js
create mode 100644 client/item/src/list/style.css
create mode 100644 services/nginx/static/images/icon_item.png
delete mode 100644 services/nginx/static/images/icon_item.svg
diff --git a/client/item/routes.json b/client/item/routes.json
index 803a8cce8..014dc318d 100644
--- a/client/item/routes.json
+++ b/client/item/routes.json
@@ -1,7 +1,7 @@
{
"module": "item",
"name": "Items",
- "icon": "/static/images/icon_item.svg",
+ "icon": "/static/images/icon_item.png",
"routes": [
{
"url": "/item",
@@ -17,6 +17,10 @@
"url": "/create",
"state": "item.create",
"component": "vn-item-create"
+ }, {
+ "url": "/data",
+ "state": "item.data",
+ "component": "vn-item-data"
}
]
}
\ No newline at end of file
diff --git a/client/item/src/list/item-product.html b/client/item/src/list/item-product.html
new file mode 100644
index 000000000..6368f1f95
--- /dev/null
+++ b/client/item/src/list/item-product.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ {{$ctrl.item.name}}
+ Id : {{$ctrl.item.id}}
+ Category : {{$ctrl.item.category}}
+ Description : {{$ctrl.item.description}}
+ Size : {{$ctrl.item.size}}
+
+
+
diff --git a/client/item/src/list/item-product.js b/client/item/src/list/item-product.js
new file mode 100644
index 000000000..4f7c7b4e7
--- /dev/null
+++ b/client/item/src/list/item-product.js
@@ -0,0 +1,8 @@
+import ngModule from '../module';
+
+ngModule.component('vnItemProduct', {
+ template: require('./item-product.html'),
+ bindings: {
+ item: '<'
+ }
+});
diff --git a/client/item/src/list/list.js b/client/item/src/list/list.js
index ce4d773fa..db48692d8 100644
--- a/client/item/src/list/list.js
+++ b/client/item/src/list/list.js
@@ -1,4 +1,6 @@
import ngModule from '../module';
+import './item-product';
+import './style.css';
class ItemList {
constructor() {
diff --git a/client/item/src/list/style.css b/client/item/src/list/style.css
new file mode 100644
index 000000000..f6afaff66
--- /dev/null
+++ b/client/item/src/list/style.css
@@ -0,0 +1,16 @@
+vn-item-product {
+ display: block;
+}
+vn-item-product a {
+ display: block;
+ text-decoration: none;
+ color: inherit;
+}
+vn-item-product a:hover {
+ color: white;
+ background-color: #424242;
+}
+
+.vn-item-product-name {
+ font-family: vn-font-bold;
+}
diff --git a/services/item/common/methods/item/filter.js b/services/item/common/methods/item/filter.js
index 59be28565..c60c2222b 100644
--- a/services/item/common/methods/item/filter.js
+++ b/services/item/common/methods/item/filter.js
@@ -6,7 +6,7 @@ module.exports = Self => {
where: {},
skip: (params.page - 1) * params.size,
limit: params.size,
- order: params.order || 'name ASC'/* ,
+ order: params.order || 'relevancy DESC'/* ,
include: {
relation: "greugeType",
scope: {
diff --git a/services/item/common/models/item.json b/services/item/common/models/item.json
index 8479e2217..0ccbb2e4c 100644
--- a/services/item/common/models/item.json
+++ b/services/item/common/models/item.json
@@ -30,6 +30,15 @@
},
"isBargain": {
"type": "Boolean"
+ },
+ "comment": {
+ "type": "String"
+ },
+ "relevancy": {
+ "type": "Number"
+ },
+ "image": {
+ "type": "String"
}
}
}
\ No newline at end of file
diff --git a/services/nginx/static/images/icon_item.png b/services/nginx/static/images/icon_item.png
new file mode 100644
index 0000000000000000000000000000000000000000..ff660fb23ebae0b5957a21cad994edba30698650
GIT binary patch
literal 3006
zcmV;v3qkaWP)jiu-93@4;NfA*)dmY9&)-VK0)P_$cK~hxL_AbXuDY0$rTPZIspYd@
z0C*smIp?8ca#bNEUG|WdnT=lWQVK=z-4+
z$FGSn+lCf!MFJlN3z*XElF2nuUA3Yxf=R5W0M?$LgEg0Dx+*6fbYie7=R}OI552%H
zK6XwnQK!egq3fA^=wiy2OX{K2-~y!{S~YZmP0pWHgf$-N_=?FDp03IaGeD`UGGzuh
zgylS~&|?WExRf+CaxKUbm>%SqYl1P6?6^XYB?A$jHCICyl*7Da^GG^qF`|Vi$ckN5
z=&=WSIVPdUreL`;0KW(DQ^WBqhq|iE%di6QszQ&Y^ujQ?M!*ulp8)*AaQp}Cf}4L}
zH_qg0B9Q+I;8!(2A3|(Nmoui~7W+kY)?5x<$wLETNiE}hZ0Uxq*p)$#g_+tTgb3j$
z6+&!9cWi|andkQ!2_f=|d)Npek`SJo?{3jHeQ%2p*7{{aJ$7T!V@oDiealnOXZm=<>tNI1d}EH;+A?N~LnfEYS&{7x
zuY()S5>fjY6^<|#k>oH9@L?omg5PLn
zRqKHD*pehbTiw$4q$i{6D(~jLrpd`*A(EjtXqe(i$JiIET?9xndEFNs^jOzP&yxOL
zr>o8|LXnfPcK?{-NTC-;TanB8x`Q5TS`pgRj6p4GSBxMdO-}IS@YVTa>P#tXo2ea@+1J)`Vo5K%MlcFg0ViB~oYbpsJ5gn_{JI
zDaVm~jB@u8l4;^9F9G}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
From adb2f60fefd99b07a266e3f264e898c256db3b2a Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 14:33:01 +0100
Subject: [PATCH 06/21] list item widht image forced by css
---
client/item/src/list/item-product.html | 1 -
client/item/src/list/style.css | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/client/item/src/list/item-product.html b/client/item/src/list/item-product.html
index 6368f1f95..916881e86 100644
--- a/client/item/src/list/item-product.html
+++ b/client/item/src/list/item-product.html
@@ -4,7 +4,6 @@
- {{$ctrl.item.name}}
Id : {{$ctrl.item.id}}
Category : {{$ctrl.item.category}}
Description : {{$ctrl.item.description}}
diff --git a/client/item/src/list/style.css b/client/item/src/list/style.css
index f6afaff66..476406982 100644
--- a/client/item/src/list/style.css
+++ b/client/item/src/list/style.css
@@ -11,6 +11,10 @@ vn-item-product a:hover {
background-color: #424242;
}
+vn-item-product img {
+ max-width: 150px;
+}
+
.vn-item-product-name {
font-family: vn-font-bold;
}
From 29c75d3d8db3fb81460f97800a05a353e240a27b Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 14:58:14 +0100
Subject: [PATCH 07/21] model Itemype added
---
client/item/src/list/item-product.html | 1 +
services/item/common/methods/item/filter.js | 6 +++---
services/item/common/models/item-type.json | 23 +++++++++++++++++++++
services/item/common/models/item.json | 7 +++++++
services/item/server/model-config.json | 4 +++-
5 files changed, 37 insertions(+), 4 deletions(-)
create mode 100644 services/item/common/models/item-type.json
diff --git a/client/item/src/list/item-product.html b/client/item/src/list/item-product.html
index 916881e86..951eabfc5 100644
--- a/client/item/src/list/item-product.html
+++ b/client/item/src/list/item-product.html
@@ -8,6 +8,7 @@
Category : {{$ctrl.item.category}}
Description : {{$ctrl.item.description}}
Size : {{$ctrl.item.size}}
+ Type : {{$ctrl.item.itemType.name}}
diff --git a/services/item/common/methods/item/filter.js b/services/item/common/methods/item/filter.js
index c60c2222b..af21fb58b 100644
--- a/services/item/common/methods/item/filter.js
+++ b/services/item/common/methods/item/filter.js
@@ -6,13 +6,13 @@ module.exports = Self => {
where: {},
skip: (params.page - 1) * params.size,
limit: params.size,
- order: params.order || 'relevancy DESC'/* ,
+ order: params.order || 'relevancy DESC',
include: {
- relation: "greugeType",
+ relation: "itemType",
scope: {
fields: ["id", "name"]
}
- } */
+ }
};
return filter;
diff --git a/services/item/common/models/item-type.json b/services/item/common/models/item-type.json
new file mode 100644
index 000000000..d1f45c0db
--- /dev/null
+++ b/services/item/common/models/item-type.json
@@ -0,0 +1,23 @@
+{
+ "name": "ItemType",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "itemType",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "name": {
+ "type": "String"
+ },
+ "life": {
+ "type": "Number"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/item.json b/services/item/common/models/item.json
index 0ccbb2e4c..6db749227 100644
--- a/services/item/common/models/item.json
+++ b/services/item/common/models/item.json
@@ -40,5 +40,12 @@
"image": {
"type": "String"
}
+ },
+ "relations": {
+ "itemType": {
+ "type": "belongsTo",
+ "model": "ItemType",
+ "foreignKey": "typeFk"
+ }
}
}
\ No newline at end of file
diff --git a/services/item/server/model-config.json b/services/item/server/model-config.json
index 60b0133b3..ab9410fb5 100644
--- a/services/item/server/model-config.json
+++ b/services/item/server/model-config.json
@@ -26,6 +26,8 @@
},
"Item": {
"dataSource": "vn"
+ },
+ "ItemType": {
+ "dataSource": "vn"
}
-
}
From bd80c9cbe009a751de25ef5cfb9a38386299cd6b Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Tue, 19 Dec 2017 15:00:15 +0100
Subject: [PATCH 08/21] locale list item
---
client/item/src/locale/es.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/client/item/src/locale/es.json b/client/item/src/locale/es.json
index fd01bdf5f..e51c46008 100644
--- a/client/item/src/locale/es.json
+++ b/client/item/src/locale/es.json
@@ -1,4 +1,8 @@
{
"Items": "Artículos",
- "Item": "Artículo"
+ "Item": "Artículo",
+ "Category": "Categoría",
+ "Description": "Descripción",
+ "Size": "Tamaño",
+ "Type": "Tipo"
}
\ No newline at end of file
From dc03c5f453d1ad3a5275de76b0919f8baa13f268 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Wed, 20 Dec 2017 09:53:50 +0100
Subject: [PATCH 09/21] modelos para el microservicio item
---
services/item/common/models/ink.json | 28 +++++++++++++
services/item/common/models/intrastat.json | 32 +++++++++++++++
services/item/common/models/item.json | 20 +++++++++
services/item/common/models/origin.json | 23 +++++++++++
services/item/common/models/producer.json | 20 +++++++++
services/item/common/models/tax-class.json | 23 +++++++++++
services/item/common/models/tax-code.json | 47 ++++++++++++++++++++++
services/item/common/models/tax-type.json | 36 +++++++++++++++++
services/item/server/model-config.json | 24 +++++++++++
9 files changed, 253 insertions(+)
create mode 100644 services/item/common/models/ink.json
create mode 100644 services/item/common/models/intrastat.json
create mode 100644 services/item/common/models/origin.json
create mode 100644 services/item/common/models/producer.json
create mode 100644 services/item/common/models/tax-class.json
create mode 100644 services/item/common/models/tax-code.json
create mode 100644 services/item/common/models/tax-type.json
diff --git a/services/item/common/models/ink.json b/services/item/common/models/ink.json
new file mode 100644
index 000000000..52d6c22f8
--- /dev/null
+++ b/services/item/common/models/ink.json
@@ -0,0 +1,28 @@
+{
+ "name": "Ink",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "ink",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "name": {
+ "type": "String"
+ },
+ "picture": {
+ "mysql": {
+ "dataType": "blob"
+ }
+ },
+ "showOrder": {
+ "type": "number"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/intrastat.json b/services/item/common/models/intrastat.json
new file mode 100644
index 000000000..0ef5c5876
--- /dev/null
+++ b/services/item/common/models/intrastat.json
@@ -0,0 +1,32 @@
+{
+ "name": "Intrastat",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "intrastat",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "description": {
+ "type": "String"
+ }
+ },
+ "relations": {
+ "taxClass": {
+ "type": "belongsTo",
+ "model": "TaxClass",
+ "foreignKey": "taxClassFk"
+ },
+ "taxCode": {
+ "type": "belongsTo",
+ "model": "TaxCode",
+ "foreignKey": "taxCodeFk"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/item.json b/services/item/common/models/item.json
index 6db749227..2ea6707b6 100644
--- a/services/item/common/models/item.json
+++ b/services/item/common/models/item.json
@@ -46,6 +46,26 @@
"type": "belongsTo",
"model": "ItemType",
"foreignKey": "typeFk"
+ },
+ "ink": {
+ "type": "belongsTo",
+ "model": "Ink",
+ "foreignKey": "inkFk"
+ },
+ "origin": {
+ "type": "belongsTo",
+ "model": "Origin",
+ "foreignKey": "originFk"
+ },
+ "producer": {
+ "type": "belongsTo",
+ "model": "Producer",
+ "foreignKey": "producerFk"
+ },
+ "intrastat": {
+ "type": "belongsTo",
+ "model": "Intrastat",
+ "foreignKey": "intrastatFk"
}
}
}
\ No newline at end of file
diff --git a/services/item/common/models/origin.json b/services/item/common/models/origin.json
new file mode 100644
index 000000000..9ebeb98f8
--- /dev/null
+++ b/services/item/common/models/origin.json
@@ -0,0 +1,23 @@
+{
+ "name": "Origin",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "origin",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "code": {
+ "type": "String"
+ },
+ "name": {
+ "type": "String"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/producer.json b/services/item/common/models/producer.json
new file mode 100644
index 000000000..f4628b988
--- /dev/null
+++ b/services/item/common/models/producer.json
@@ -0,0 +1,20 @@
+{
+ "name": "Producer",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "producer",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "name": {
+ "type": "String"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/tax-class.json b/services/item/common/models/tax-class.json
new file mode 100644
index 000000000..c107f3391
--- /dev/null
+++ b/services/item/common/models/tax-class.json
@@ -0,0 +1,23 @@
+{
+ "name": "TaxClass",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "taxClass",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "description": {
+ "type": "String"
+ },
+ "code": {
+ "type": "String"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/tax-code.json b/services/item/common/models/tax-code.json
new file mode 100644
index 000000000..93a426a07
--- /dev/null
+++ b/services/item/common/models/tax-code.json
@@ -0,0 +1,47 @@
+{
+ "name": "TaxCode",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "taxCode",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "dated": {
+ "type": "date"
+ },
+ "code": {
+ "type": "String"
+ },
+ "rate": {
+ "type": "number"
+ },
+ "equalizationTax": {
+ "type": "number"
+ },
+ "type": {
+ "type": "String"
+ },
+ "isActive": {
+ "type": "Boolean"
+ }
+ },
+ "relations": {
+ "taxType": {
+ "type": "belongsTo",
+ "model": "TaxType",
+ "foreignKey": "taxTypeFk"
+ },
+ "link": {
+ "type": "belongsTo",
+ "model": "Link",
+ "foreignKey": "linkFk"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/common/models/tax-type.json b/services/item/common/models/tax-type.json
new file mode 100644
index 000000000..527e90f39
--- /dev/null
+++ b/services/item/common/models/tax-type.json
@@ -0,0 +1,36 @@
+{
+ "name": "TaxType",
+ "base": "VnModel",
+ "options": {
+ "mysql": {
+ "table": "taxType",
+ "database": "vn"
+ }
+ },
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "nickname": {
+ "type": "String"
+ },
+ "serial": {
+ "type": "String"
+ },
+ "TIPOOPE": {
+ "type": "String"
+ },
+ "description": {
+ "type": "String"
+ }
+ },
+ "relations": {
+ "country": {
+ "type": "belongsTo",
+ "model": "Country",
+ "foreignKey": "countryFk"
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/item/server/model-config.json b/services/item/server/model-config.json
index ab9410fb5..43c9a80fe 100644
--- a/services/item/server/model-config.json
+++ b/services/item/server/model-config.json
@@ -29,5 +29,29 @@
},
"ItemType": {
"dataSource": "vn"
+ },
+ "Ink": {
+ "dataSource": "vn"
+ },
+ "Origin": {
+ "dataSource": "vn"
+ },
+ "Producer": {
+ "dataSource": "vn"
+ },
+ "Intrastat": {
+ "dataSource": "vn"
+ },
+ "TaxClass": {
+ "dataSource": "vn"
+ },
+ "TaxCode": {
+ "dataSource": "vn"
+ },
+ "TaxType": {
+ "dataSource": "vn"
+ },
+ "Country": {
+ "dataSource": "salix"
}
}
From 75c77fcdc6900c5f947d22186b12671618d51865 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Wed, 20 Dec 2017 12:20:59 +0100
Subject: [PATCH 10/21] filtro de items
---
.../item/src/filter-panel/filter-panel.html | 58 +++++++++++++++++++
client/item/src/filter-panel/filter-panel.js | 16 +++++
client/item/src/filter-panel/locale/es.json | 5 ++
client/item/src/item.js | 1 +
client/item/src/list/list.html | 2 +-
services/item/common/methods/item/filter.js | 6 ++
services/item/common/models/ink.json | 5 --
7 files changed, 87 insertions(+), 6 deletions(-)
create mode 100644 client/item/src/filter-panel/filter-panel.html
create mode 100644 client/item/src/filter-panel/filter-panel.js
create mode 100644 client/item/src/filter-panel/locale/es.json
diff --git a/client/item/src/filter-panel/filter-panel.html b/client/item/src/filter-panel/filter-panel.html
new file mode 100644
index 000000000..607e7e7cc
--- /dev/null
+++ b/client/item/src/filter-panel/filter-panel.html
@@ -0,0 +1,58 @@
+
+
+
diff --git a/client/item/src/filter-panel/filter-panel.js b/client/item/src/filter-panel/filter-panel.js
new file mode 100644
index 000000000..608918b51
--- /dev/null
+++ b/client/item/src/filter-panel/filter-panel.js
@@ -0,0 +1,16 @@
+import ngModule from '../module';
+
+class ItemFilterPanel {
+ constructor() {
+ this.onSubmit = () => {};
+ }
+
+ onSearch() {
+ this.onSubmit(this.filter);
+ }
+}
+
+ngModule.component('vnItemFilterPanel', {
+ template: require('./filter-panel.html'),
+ controller: ItemFilterPanel
+});
diff --git a/client/item/src/filter-panel/locale/es.json b/client/item/src/filter-panel/locale/es.json
new file mode 100644
index 000000000..e7bc89814
--- /dev/null
+++ b/client/item/src/filter-panel/locale/es.json
@@ -0,0 +1,5 @@
+{
+ "Ink": "Tinta",
+ "Origin": "Origen",
+ "Producer": "Productor"
+}
\ No newline at end of file
diff --git a/client/item/src/item.js b/client/item/src/item.js
index 9d5ca85e9..436f5a0ac 100644
--- a/client/item/src/item.js
+++ b/client/item/src/item.js
@@ -1,3 +1,4 @@
export * from './module';
import './list/list';
+import './filter-panel/filter-panel';
diff --git a/client/item/src/list/list.html b/client/item/src/list/list.html
index c1996e46f..81f59b9ad 100644
--- a/client/item/src/list/list.html
+++ b/client/item/src/list/list.html
@@ -7,7 +7,7 @@
index="index"
on-search="$ctrl.search(index)"
advanced="true"
- popover="vn-item-search-panel"
+ popover="vn-item-filter-panel"
ignore-keys = "['page', 'size', 'search']"
>
diff --git a/services/item/common/methods/item/filter.js b/services/item/common/methods/item/filter.js
index af21fb58b..683117b2d 100644
--- a/services/item/common/methods/item/filter.js
+++ b/services/item/common/methods/item/filter.js
@@ -15,6 +15,12 @@ module.exports = Self => {
}
};
+ delete params.page;
+ delete params.size;
+ delete params.order;
+
+ Object.assign(filter.where, params);
+
return filter;
}
};
diff --git a/services/item/common/models/ink.json b/services/item/common/models/ink.json
index 52d6c22f8..5cb80693d 100644
--- a/services/item/common/models/ink.json
+++ b/services/item/common/models/ink.json
@@ -16,11 +16,6 @@
"name": {
"type": "String"
},
- "picture": {
- "mysql": {
- "dataType": "blob"
- }
- },
"showOrder": {
"type": "number"
}
From 7acb047ec9017494b4e7d480418dae9fa603d3da Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Wed, 20 Dec 2017 12:40:29 +0100
Subject: [PATCH 11/21] Item: interfaz crear item
---
client/item/routes.json | 2 +-
client/item/src/create/item-create.html | 65 +++++++++++++++++++++
client/item/src/create/item-create.js | 18 ++++++
client/item/src/item.js | 1 +
services/item/common/methods/item/filter.js | 5 ++
5 files changed, 90 insertions(+), 1 deletion(-)
create mode 100644 client/item/src/create/item-create.html
create mode 100644 client/item/src/create/item-create.js
diff --git a/client/item/routes.json b/client/item/routes.json
index 014dc318d..8096f991f 100644
--- a/client/item/routes.json
+++ b/client/item/routes.json
@@ -18,7 +18,7 @@
"state": "item.create",
"component": "vn-item-create"
}, {
- "url": "/data",
+ "url": "/:id/data",
"state": "item.data",
"component": "vn-item-data"
}
diff --git a/client/item/src/create/item-create.html b/client/item/src/create/item-create.html
new file mode 100644
index 000000000..bd3e3cce3
--- /dev/null
+++ b/client/item/src/create/item-create.html
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/client/item/src/create/item-create.js b/client/item/src/create/item-create.js
new file mode 100644
index 000000000..139822c44
--- /dev/null
+++ b/client/item/src/create/item-create.js
@@ -0,0 +1,18 @@
+import ngModule from '../module';
+
+class ItemCreate {
+ constructor() {
+ this.item = {};
+ }
+
+ onSubmit() {
+ this.$.watcher.submit().then(
+ json => this.$state.go('item.data', {id: json.data.id})
+ );
+ }
+}
+
+ngModule.component('vnItemCreate', {
+ template: require('./item-create.html'),
+ controller: ItemCreate
+});
diff --git a/client/item/src/item.js b/client/item/src/item.js
index 436f5a0ac..908f0e46f 100644
--- a/client/item/src/item.js
+++ b/client/item/src/item.js
@@ -2,3 +2,4 @@ export * from './module';
import './list/list';
import './filter-panel/filter-panel';
+import './create/item-create';
diff --git a/services/item/common/methods/item/filter.js b/services/item/common/methods/item/filter.js
index 683117b2d..5db641a04 100644
--- a/services/item/common/methods/item/filter.js
+++ b/services/item/common/methods/item/filter.js
@@ -19,6 +19,11 @@ module.exports = Self => {
delete params.size;
delete params.order;
+ if (params.itemSize) {
+ filter.where.size = params.itemSize;
+ delete params.itemSize;
+ }
+
Object.assign(filter.where, params);
return filter;
From 86209e43cd4b7f6799efcfdec88d6ecf8512e677 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Wed, 20 Dec 2017 14:36:12 +0100
Subject: [PATCH 12/21] card item structure
---
client/client/src/card/card.js | 2 +-
client/client/src/card/style.scss | 12 -----------
client/item/routes.json | 15 +++++++++++---
client/item/src/card/item-card.html | 20 ++++++++++++++++++
client/item/src/card/item-card.js | 12 +++++++++++
client/item/src/create/item-create.js | 2 +-
client/item/src/data/item-data.html | 0
client/item/src/data/item-data.js | 0
client/item/src/item.js | 1 +
client/item/src/list/item-product.html | 28 +++++++++++++-------------
client/item/src/list/list.html | 4 +++-
client/item/src/list/style.css | 4 ++--
client/salix/src/styles/misc.scss | 13 ++++++++++++
13 files changed, 79 insertions(+), 34 deletions(-)
delete mode 100644 client/client/src/card/style.scss
create mode 100644 client/item/src/card/item-card.html
create mode 100644 client/item/src/card/item-card.js
create mode 100644 client/item/src/data/item-data.html
create mode 100644 client/item/src/data/item-data.js
diff --git a/client/client/src/card/card.js b/client/client/src/card/card.js
index 560ca8f9e..9660ce3ce 100644
--- a/client/client/src/card/card.js
+++ b/client/client/src/card/card.js
@@ -1,5 +1,5 @@
import ngModule from '../module';
-import './style.scss';
+
export default class Controller {
constructor() {
this.client = null;
diff --git a/client/client/src/card/style.scss b/client/client/src/card/style.scss
deleted file mode 100644
index 74c5695c6..000000000
--- a/client/client/src/card/style.scss
+++ /dev/null
@@ -1,12 +0,0 @@
-vn-main-block {
- display:block;
- max-width: 1920px;
- width:100%;
- margin: 0 auto;
-
- .left-block {
- min-width: 18em;
- padding-left: 1em;
- padding-bottom: 1em;
- }
-}
diff --git a/client/item/routes.json b/client/item/routes.json
index 8096f991f..61197e499 100644
--- a/client/item/routes.json
+++ b/client/item/routes.json
@@ -18,9 +18,18 @@
"state": "item.create",
"component": "vn-item-create"
}, {
- "url": "/:id/data",
- "state": "item.data",
- "component": "vn-item-data"
+ "url": "/:id",
+ "state": "item.card",
+ "abstract": true,
+ "component": "vn-item-card"
+ }, {
+ "url" : "/data",
+ "state": "item.card.data",
+ "component": "vn-item-data",
+ "menu": {
+ "description": "Basic data",
+ "icon": "folder"
+ }
}
]
}
\ No newline at end of file
diff --git a/client/item/src/card/item-card.html b/client/item/src/card/item-card.html
new file mode 100644
index 000000000..dc96049a8
--- /dev/null
+++ b/client/item/src/card/item-card.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/item/src/card/item-card.js b/client/item/src/card/item-card.js
new file mode 100644
index 000000000..0783bb6bd
--- /dev/null
+++ b/client/item/src/card/item-card.js
@@ -0,0 +1,12 @@
+import ngModule from '../module';
+
+class ItemCard {
+ constructor() {
+ this.item = {};
+ }
+}
+
+ngModule.component('vnItemCard', {
+ template: require('./item-card.html'),
+ controller: ItemCard
+});
diff --git a/client/item/src/create/item-create.js b/client/item/src/create/item-create.js
index 139822c44..7723370e1 100644
--- a/client/item/src/create/item-create.js
+++ b/client/item/src/create/item-create.js
@@ -7,7 +7,7 @@ class ItemCreate {
onSubmit() {
this.$.watcher.submit().then(
- json => this.$state.go('item.data', {id: json.data.id})
+ json => this.$state.go('item.card.basic', {id: json.data.id})
);
}
}
diff --git a/client/item/src/data/item-data.html b/client/item/src/data/item-data.html
new file mode 100644
index 000000000..e69de29bb
diff --git a/client/item/src/data/item-data.js b/client/item/src/data/item-data.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/client/item/src/item.js b/client/item/src/item.js
index 908f0e46f..6eed86e86 100644
--- a/client/item/src/item.js
+++ b/client/item/src/item.js
@@ -3,3 +3,4 @@ export * from './module';
import './list/list';
import './filter-panel/filter-panel';
import './create/item-create';
+import './card/item-card';
diff --git a/client/item/src/list/item-product.html b/client/item/src/list/item-product.html
index 951eabfc5..9e8fc1417 100644
--- a/client/item/src/list/item-product.html
+++ b/client/item/src/list/item-product.html
@@ -1,14 +1,14 @@
-
-
-
-
-
-
- Id : {{$ctrl.item.id}}
- Category : {{$ctrl.item.category}}
- Description : {{$ctrl.item.description}}
- Size : {{$ctrl.item.size}}
- Type : {{$ctrl.item.itemType.name}}
-
-
-
+
+
+
+
+
+
+ Id : {{$ctrl.item.id}}
+ Category : {{$ctrl.item.category}}
+ Description : {{$ctrl.item.description}}
+ Size : {{$ctrl.item.size}}
+ Type : {{$ctrl.item.itemType.name}}
+
+
+
diff --git a/client/item/src/list/list.html b/client/item/src/list/list.html
index 81f59b9ad..00f498d4e 100644
--- a/client/item/src/list/list.html
+++ b/client/item/src/list/list.html
@@ -14,7 +14,9 @@
-
+
+
+
diff --git a/client/item/src/list/style.css b/client/item/src/list/style.css
index 476406982..ca53151b9 100644
--- a/client/item/src/list/style.css
+++ b/client/item/src/list/style.css
@@ -1,12 +1,12 @@
vn-item-product {
display: block;
}
-vn-item-product a {
+a.item-product-link {
display: block;
text-decoration: none;
color: inherit;
}
-vn-item-product a:hover {
+a.item-product-link:hover {
color: white;
background-color: #424242;
}
diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss
index ddfe20a05..6ee45820d 100644
--- a/client/salix/src/styles/misc.scss
+++ b/client/salix/src/styles/misc.scss
@@ -99,3 +99,16 @@ html [pointer], .pointer{
html [noDrop], .noDrop{
cursor: no-drop;
}
+
+vn-main-block {
+ display:block;
+ max-width: 1920px;
+ width:100%;
+ margin: 0 auto;
+
+ .left-block {
+ min-width: 18em;
+ padding-left: 1em;
+ padding-bottom: 1em;
+ }
+}
From 723a4143f6be996f291b29bda3569583016dfe3e Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Thu, 21 Dec 2017 11:47:01 +0100
Subject: [PATCH 13/21] changed model name
---
services/item/common/models/intrastat.json | 6 +++---
.../item/common/models/{tax-class.json => tax-group.json} | 4 ++--
services/item/server/model-config.json | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
rename services/item/common/models/{tax-class.json => tax-group.json} (86%)
diff --git a/services/item/common/models/intrastat.json b/services/item/common/models/intrastat.json
index 0ef5c5876..615c16a1e 100644
--- a/services/item/common/models/intrastat.json
+++ b/services/item/common/models/intrastat.json
@@ -18,10 +18,10 @@
}
},
"relations": {
- "taxClass": {
+ "taxGroup": {
"type": "belongsTo",
- "model": "TaxClass",
- "foreignKey": "taxClassFk"
+ "model": "TaxGroup",
+ "foreignKey": "taxGroupFk"
},
"taxCode": {
"type": "belongsTo",
diff --git a/services/item/common/models/tax-class.json b/services/item/common/models/tax-group.json
similarity index 86%
rename from services/item/common/models/tax-class.json
rename to services/item/common/models/tax-group.json
index c107f3391..e2fdd5a3b 100644
--- a/services/item/common/models/tax-class.json
+++ b/services/item/common/models/tax-group.json
@@ -1,9 +1,9 @@
{
- "name": "TaxClass",
+ "name": "TaxGroup",
"base": "VnModel",
"options": {
"mysql": {
- "table": "taxClass",
+ "table": "taxGroup",
"database": "vn"
}
},
diff --git a/services/item/server/model-config.json b/services/item/server/model-config.json
index 43c9a80fe..9258f7f1c 100644
--- a/services/item/server/model-config.json
+++ b/services/item/server/model-config.json
@@ -42,7 +42,7 @@
"Intrastat": {
"dataSource": "vn"
},
- "TaxClass": {
+ "TaxGroup": {
"dataSource": "vn"
},
"TaxCode": {
From 3fe9e3d325a9ec815ff31ba6723d3e815116b2cd Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Thu, 21 Dec 2017 14:08:40 +0100
Subject: [PATCH 14/21] bug fixed in model item
---
services/item/common/models/item.json | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/services/item/common/models/item.json b/services/item/common/models/item.json
index 2ea6707b6..0e396c0bf 100644
--- a/services/item/common/models/item.json
+++ b/services/item/common/models/item.json
@@ -13,11 +13,14 @@
"id": true,
"description": "Identifier"
},
+ "name": {
+ "type": "String"
+ },
"size": {
"type": "Number"
},
"category": {
- "type": "Number"
+ "type": "String"
},
"stems": {
"type": "Number"
From 862420e434aedd79c4170bf24ca913558407b040 Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Thu, 21 Dec 2017 14:09:02 +0100
Subject: [PATCH 15/21] new generic function
---
client/core/src/lib/fullEmpty.js | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 client/core/src/lib/fullEmpty.js
diff --git a/client/core/src/lib/fullEmpty.js b/client/core/src/lib/fullEmpty.js
new file mode 100644
index 000000000..64d82cdad
--- /dev/null
+++ b/client/core/src/lib/fullEmpty.js
@@ -0,0 +1,9 @@
+import {module} from '../module';
+
+const isFullEmpty = item => {
+ return (!item && item !== 0) || (typeof item === 'object' && !Object.keys(item).length);
+};
+
+export default isFullEmpty;
+export const NAME = 'isFullEmpty';
+module.value(NAME, isFullEmpty);
From 424f607063c67adc6c4c16fe7ff95702a250fefc Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Thu, 21 Dec 2017 14:09:16 +0100
Subject: [PATCH 16/21] refactor watcher
---
client/core/src/watcher/watcher.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/core/src/watcher/watcher.js b/client/core/src/watcher/watcher.js
index d259f6f39..83012eca4 100644
--- a/client/core/src/watcher/watcher.js
+++ b/client/core/src/watcher/watcher.js
@@ -3,6 +3,7 @@ import Component from '../lib/component';
import getModifiedData from '../lib/modified';
import copyObject from '../lib/copy';
import isEqual from '../lib/equals';
+import isFullEmpty from '../lib/fullEmpty';
/**
* Component that checks for changes on a specific model property and
@@ -95,7 +96,7 @@ export default class Watcher extends Component {
let changedData = getModifiedData(this.data, this.orgData);
if (this.save) {
- this.save.model = changedData;
+ this.save.model = this.copyInNewObject(changedData);
return new Promise((resolve, reject) => {
this.save.accept().then(
json => this.writeData({data: json}, resolve),
@@ -154,7 +155,7 @@ export default class Watcher extends Component {
if (data && typeof data === 'object') {
Object.keys(data).forEach(
val => {
- if (data[val] !== "" && data[val] !== undefined && data[val] !== null) {
+ if (!isFullEmpty(data[val])) {
if (typeof data[val] === 'object') {
newCopy[val] = this.copyInNewObject(data[val]);
} else {
From 9e44803c66d8257b15f4bf3ae04e8c96dbf4545b Mon Sep 17 00:00:00 2001
From: Daniel Herrero
Date: Thu, 21 Dec 2017 14:09:55 +0100
Subject: [PATCH 17/21] New module Item in progress
---
client/item/routes.json | 14 +++++
client/item/src/card/item-card.html | 12 ++--
client/item/src/card/item-card.js | 22 ++++++-
client/item/src/create/item-create.html | 1 +
client/item/src/data/item-data.html | 84 +++++++++++++++++++++++++
client/item/src/data/item-data.js | 8 +++
client/item/src/item.js | 1 +
client/item/src/list/item-product.html | 2 +-
client/salix/src/styles/misc.scss | 1 +
9 files changed, 135 insertions(+), 10 deletions(-)
diff --git a/client/item/routes.json b/client/item/routes.json
index 61197e499..e703ed1de 100644
--- a/client/item/routes.json
+++ b/client/item/routes.json
@@ -26,10 +26,24 @@
"url" : "/data",
"state": "item.card.data",
"component": "vn-item-data",
+ "params": {
+ "item": "$ctrl.item"
+ },
"menu": {
"description": "Basic data",
"icon": "folder"
}
+ }, {
+ "url" : "/image",
+ "state": "item.card.image",
+ "component": "vn-item-image",
+ "params": {
+ "item": "$ctrl.item"
+ },
+ "menu": {
+ "description": "Images",
+ "icon": "image"
+ }
}
]
}
\ No newline at end of file
diff --git a/client/item/src/card/item-card.html b/client/item/src/card/item-card.html
index dc96049a8..179272d51 100644
--- a/client/item/src/card/item-card.html
+++ b/client/item/src/card/item-card.html
@@ -1,20 +1,16 @@
-
-
-
-
+
+ {{$ctrl.item.name}}
+
-
+
diff --git a/client/item/src/card/item-card.js b/client/item/src/card/item-card.js
index 0783bb6bd..063910369 100644
--- a/client/item/src/card/item-card.js
+++ b/client/item/src/card/item-card.js
@@ -1,10 +1,30 @@
import ngModule from '../module';
class ItemCard {
- constructor() {
+ constructor($http, $state) {
+ this.$http = $http;
+ this.$state = $state;
this.item = {};
}
+
+ $onInit() {
+ let filter = {
+ include: [
+ {relation: "itemType"},
+ {relation: "origin"},
+ {relation: "ink"},
+ {relation: "producer"},
+ {relation: "intrastat"}
+ ]
+ };
+ this.$http.get(`/item/api/Items/${this.$state.params.id}?filter=${JSON.stringify(filter)}`).then(
+ res => {
+ this.item = res.data;
+ }
+ );
+ }
}
+ItemCard.$inject = ['$http', '$state'];
ngModule.component('vnItemCard', {
template: require('./item-card.html'),
diff --git a/client/item/src/create/item-create.html b/client/item/src/create/item-create.html
index bd3e3cce3..9e8b35e35 100644
--- a/client/item/src/create/item-create.html
+++ b/client/item/src/create/item-create.html
@@ -56,6 +56,7 @@
field="$ctrl.item.producerFk"
>
+
diff --git a/client/item/src/data/item-data.html b/client/item/src/data/item-data.html
index e69de29bb..17c64e329 100644
--- a/client/item/src/data/item-data.html
+++ b/client/item/src/data/item-data.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
diff --git a/client/item/src/data/item-data.js b/client/item/src/data/item-data.js
index e69de29bb..6046e8dbc 100644
--- a/client/item/src/data/item-data.js
+++ b/client/item/src/data/item-data.js
@@ -0,0 +1,8 @@
+import ngModule from '../module';
+
+ngModule.component('vnItemData', {
+ template: require('./item-data.html'),
+ bindings: {
+ item: '<'
+ }
+});
diff --git a/client/item/src/item.js b/client/item/src/item.js
index 6eed86e86..9bdb719a3 100644
--- a/client/item/src/item.js
+++ b/client/item/src/item.js
@@ -4,3 +4,4 @@ import './list/list';
import './filter-panel/filter-panel';
import './create/item-create';
import './card/item-card';
+import './data/item-data';
diff --git a/client/item/src/list/item-product.html b/client/item/src/list/item-product.html
index 9e8fc1417..f4fd431d1 100644
--- a/client/item/src/list/item-product.html
+++ b/client/item/src/list/item-product.html
@@ -5,7 +5,7 @@
Id : {{$ctrl.item.id}}
- Category : {{$ctrl.item.category}}
+ Name : {{$ctrl.item.name}}
Description : {{$ctrl.item.description}}
Size : {{$ctrl.item.size}}
Type : {{$ctrl.item.itemType.name}}
diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss
index 6ee45820d..8d4fd271f 100644
--- a/client/salix/src/styles/misc.scss
+++ b/client/salix/src/styles/misc.scss
@@ -107,6 +107,7 @@ vn-main-block {
margin: 0 auto;
.left-block {
+ max-width: 20em;
min-width: 18em;
padding-left: 1em;
padding-bottom: 1em;
From e94d29f97b77755e2937e1a46921329c0a7b3fae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20S=C3=A1nchez?=
Date: Tue, 26 Dec 2017 10:02:47 +0100
Subject: [PATCH 18/21] =?UTF-8?q?Errores=20de=20renderizaci=C3=B3n=20im?=
=?UTF-8?q?=C3=A1genes=20adjuntas.=20Escritos=20de=20cliente=20deutor.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
client/core/src/lib/app.js | 2 +-
.../mailer/application/route/notification.js | 205 +++++++---
services/mailer/application/router.js | 18 +
services/mailer/application/template.js | 15 +-
.../template/client-welcome/client-welcome.js | 3 +-
.../template/client-welcome/index.html | 1 +
.../template/client-welcome/locale/es.json | 1 +
.../client-welcome/{static/css => }/style.css | 0
.../template/default/image/download.svg | 4 +
.../template/default/image/preview.svg | 4 +
.../application/template/footer/footer.js | 3 +-
.../footer/{static => }/image/action.png | Bin
.../footer/{static => }/image/facebook.png | Bin
.../footer/{static => }/image/header.png | Bin
.../footer/{static => }/image/info.png | Bin
.../footer/{static => }/image/instagram.png | Bin
.../footer/{static => }/image/linkedin.png | Bin
.../footer/{static => }/image/pinterest.png | Bin
.../footer/{static => }/image/twitter.png | Bin
.../footer/{static => }/image/youtube.png | Bin
.../application/template/footer/index.html | 16 +-
.../footer/{static/css => }/style.css | 0
.../application/template/header/header.js | 3 +-
.../image/header.png => image/logo.png} | Bin
.../application/template/header/index.html | 2 +-
.../template/header/static/image/logo.png | Bin 8577 -> 0 bytes
.../header/{static/css => }/style.css | 0
.../template/letter-debtor-nd/attachment.json | 1 +
.../template/letter-debtor-nd/index.html | 87 ++++
.../letter-debtor-nd/letter-debtor-nd.js | 39 ++
.../template/letter-debtor-nd/locale/es.json | 18 +
.../static/css => letter-debtor-nd}/style.css | 0
.../template/letter-debtor-st/attachment.json | 1 +
.../template/letter-debtor-st/index.html | 69 ++++
.../letter-debtor-st/letter-debtor-st.js | 39 ++
.../template/letter-debtor-st/locale/es.json | 11 +
.../static/css => letter-debtor-st}/style.css | 0
.../css => notification-alias}/style.css | 0
.../template/payment-update/payment-update.js | 6 +-
.../static/css => payment-update}/style.css | 0
.../template/printer-setup/printer-setup.js | 10 +-
.../template/printer-setup/style.css | 0
.../application/template/sepa-core/index.html | 21 +-
.../template/sepa-core/sepa-core.js | 13 +-
.../application/template/sepa-core/style.css | 0
services/mailer/server/server.js | 7 +-
services/mailer/static/css/component.css | 356 ++++++++++-------
services/mailer/static/images/attachment.png | Bin 18546 -> 0 bytes
.../print/application/route/manuscript.js | 107 +++--
services/print/application/router.js | 19 +
services/print/application/template.js | 33 +-
.../template/footer}/image/action.png | Bin
.../template/footer}/image/facebook.png | Bin
.../template/footer}/image/info.png | Bin
.../template/footer}/image/instagram.png | Bin
.../template/footer}/image/linkedin.png | Bin
.../template/footer}/image/pinterest.png | Bin
.../template/footer}/image/twitter.png | Bin
.../template/footer}/image/youtube.png | Bin
.../template/footer/static/image/action.png | Bin 3225 -> 0 bytes
.../template/footer/static/image/facebook.png | Bin 3586 -> 0 bytes
.../template/footer/static/image/header.png | Bin 30712 -> 0 bytes
.../template/footer/static/image/info.png | Bin 3045 -> 0 bytes
.../footer/static/image/instagram.png | Bin 3719 -> 0 bytes
.../template/footer/static/image/linkedin.png | Bin 3588 -> 0 bytes
.../template/footer/static/image/logo.png | Bin 8577 -> 0 bytes
.../template/footer/static/image/logo.svg | 48 ---
.../footer/static/image/pinterest.png | Bin 3807 -> 0 bytes
.../template/footer/static/image/twitter.png | Bin 3646 -> 0 bytes
.../template/footer/static/image/youtube.png | Bin 3513 -> 0 bytes
.../footer/{static/css => }/style.css | 1 +
.../template/header}/image/logo.svg | 0
.../application/template/header/index.html | 2 +-
.../template/header/static/image/action.png | Bin 3225 -> 0 bytes
.../template/header/static/image/facebook.png | Bin 3586 -> 0 bytes
.../template/header/static/image/header.png | Bin 30712 -> 0 bytes
.../template/header/static/image/info.png | Bin 3045 -> 0 bytes
.../header/static/image/instagram.png | Bin 3719 -> 0 bytes
.../template/header/static/image/linkedin.png | Bin 3588 -> 0 bytes
.../template/header/static/image/logo.png | Bin 8577 -> 0 bytes
.../template/header/static/image/logo.svg | 48 ---
.../header/static/image/pinterest.png | Bin 3807 -> 0 bytes
.../template/header/static/image/twitter.png | Bin 3646 -> 0 bytes
.../template/header/static/image/youtube.png | Bin 3513 -> 0 bytes
.../header/{static/css => }/style.css | 0
.../template/letter-debtor/image}/action.png | Bin
.../letter-debtor/image}/facebook.png | Bin
.../template/letter-debtor/image}/header.png | Bin
.../template/letter-debtor/image}/info.png | Bin
.../letter-debtor/image}/instagram.png | Bin
.../letter-debtor/image}/linkedin.png | Bin
.../template/letter-debtor}/image/logo.png | Bin
.../template/letter-debtor}/image/logo.svg | 0
.../letter-debtor/image}/pinterest.png | Bin
.../template/letter-debtor/image}/twitter.png | Bin
.../template/letter-debtor/image}/youtube.png | Bin
.../template/letter-debtor/index.html | 84 ++++
.../template/letter-debtor/letter-debtor.js | 54 +++
.../template/letter-debtor/locale/es.json | 31 ++
.../static/css => letter-debtor}/style.css | 0
.../application/template/sepa-core/index.html | 4 +-
.../template/sepa-core/sepa-core.js | 2 +-
.../sepa-core/static/image/action.png | Bin 3225 -> 0 bytes
.../sepa-core/static/image/facebook.png | Bin 3586 -> 0 bytes
.../sepa-core/static/image/header.png | Bin 30712 -> 0 bytes
.../template/sepa-core/static/image/info.png | Bin 3045 -> 0 bytes
.../sepa-core/static/image/instagram.png | Bin 3719 -> 0 bytes
.../sepa-core/static/image/linkedin.png | Bin 3588 -> 0 bytes
.../template/sepa-core/static/image/logo.png | Bin 8577 -> 0 bytes
.../template/sepa-core/static/image/logo.svg | 48 ---
.../sepa-core/static/image/pinterest.png | Bin 3807 -> 0 bytes
.../sepa-core/static/image/twitter.png | Bin 3646 -> 0 bytes
.../sepa-core/static/image/youtube.png | Bin 3513 -> 0 bytes
.../application/template/sepa-core/style.css | 22 ++
services/print/server/server.js | 7 +-
services/print/static/css/component.css | 373 ++++++++++--------
116 files changed, 1245 insertions(+), 593 deletions(-)
rename services/mailer/application/template/client-welcome/{static/css => }/style.css (100%)
create mode 100644 services/mailer/application/template/default/image/download.svg
create mode 100644 services/mailer/application/template/default/image/preview.svg
rename services/mailer/application/template/footer/{static => }/image/action.png (100%)
rename services/mailer/application/template/footer/{static => }/image/facebook.png (100%)
rename services/mailer/application/template/footer/{static => }/image/header.png (100%)
rename services/mailer/application/template/footer/{static => }/image/info.png (100%)
rename services/mailer/application/template/footer/{static => }/image/instagram.png (100%)
rename services/mailer/application/template/footer/{static => }/image/linkedin.png (100%)
rename services/mailer/application/template/footer/{static => }/image/pinterest.png (100%)
rename services/mailer/application/template/footer/{static => }/image/twitter.png (100%)
rename services/mailer/application/template/footer/{static => }/image/youtube.png (100%)
rename services/mailer/application/template/footer/{static/css => }/style.css (100%)
rename services/mailer/application/template/header/{static/image/header.png => image/logo.png} (100%)
delete mode 100644 services/mailer/application/template/header/static/image/logo.png
rename services/mailer/application/template/header/{static/css => }/style.css (100%)
create mode 100644 services/mailer/application/template/letter-debtor-nd/attachment.json
create mode 100644 services/mailer/application/template/letter-debtor-nd/index.html
create mode 100644 services/mailer/application/template/letter-debtor-nd/letter-debtor-nd.js
create mode 100644 services/mailer/application/template/letter-debtor-nd/locale/es.json
rename services/mailer/application/template/{notification-alias/static/css => letter-debtor-nd}/style.css (100%)
create mode 100644 services/mailer/application/template/letter-debtor-st/attachment.json
create mode 100644 services/mailer/application/template/letter-debtor-st/index.html
create mode 100644 services/mailer/application/template/letter-debtor-st/letter-debtor-st.js
create mode 100644 services/mailer/application/template/letter-debtor-st/locale/es.json
rename services/mailer/application/template/{payment-update/static/css => letter-debtor-st}/style.css (100%)
rename services/mailer/application/template/{printer-setup/static/css => notification-alias}/style.css (100%)
rename services/mailer/application/template/{sepa-core/static/css => payment-update}/style.css (100%)
create mode 100644 services/mailer/application/template/printer-setup/style.css
create mode 100644 services/mailer/application/template/sepa-core/style.css
delete mode 100644 services/mailer/static/images/attachment.png
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/action.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/facebook.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/info.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/instagram.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/linkedin.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/pinterest.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/twitter.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/footer}/image/youtube.png (100%)
delete mode 100644 services/print/application/template/footer/static/image/action.png
delete mode 100644 services/print/application/template/footer/static/image/facebook.png
delete mode 100644 services/print/application/template/footer/static/image/header.png
delete mode 100644 services/print/application/template/footer/static/image/info.png
delete mode 100644 services/print/application/template/footer/static/image/instagram.png
delete mode 100644 services/print/application/template/footer/static/image/linkedin.png
delete mode 100644 services/print/application/template/footer/static/image/logo.png
delete mode 100644 services/print/application/template/footer/static/image/logo.svg
delete mode 100644 services/print/application/template/footer/static/image/pinterest.png
delete mode 100644 services/print/application/template/footer/static/image/twitter.png
delete mode 100644 services/print/application/template/footer/static/image/youtube.png
rename services/print/application/template/footer/{static/css => }/style.css (89%)
rename services/{mailer/application/template/footer/static => print/application/template/header}/image/logo.svg (100%)
delete mode 100644 services/print/application/template/header/static/image/action.png
delete mode 100644 services/print/application/template/header/static/image/facebook.png
delete mode 100644 services/print/application/template/header/static/image/header.png
delete mode 100644 services/print/application/template/header/static/image/info.png
delete mode 100644 services/print/application/template/header/static/image/instagram.png
delete mode 100644 services/print/application/template/header/static/image/linkedin.png
delete mode 100644 services/print/application/template/header/static/image/logo.png
delete mode 100644 services/print/application/template/header/static/image/logo.svg
delete mode 100644 services/print/application/template/header/static/image/pinterest.png
delete mode 100644 services/print/application/template/header/static/image/twitter.png
delete mode 100644 services/print/application/template/header/static/image/youtube.png
rename services/print/application/template/header/{static/css => }/style.css (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/action.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/facebook.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/header.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/info.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/instagram.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/linkedin.png (100%)
rename services/{mailer/application/template/footer/static => print/application/template/letter-debtor}/image/logo.png (100%)
rename services/{mailer/application/template/header/static => print/application/template/letter-debtor}/image/logo.svg (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/pinterest.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/twitter.png (100%)
rename services/{mailer/static/images => print/application/template/letter-debtor/image}/youtube.png (100%)
create mode 100644 services/print/application/template/letter-debtor/index.html
create mode 100644 services/print/application/template/letter-debtor/letter-debtor.js
create mode 100644 services/print/application/template/letter-debtor/locale/es.json
rename services/print/application/template/{sepa-core/static/css => letter-debtor}/style.css (100%)
delete mode 100644 services/print/application/template/sepa-core/static/image/action.png
delete mode 100644 services/print/application/template/sepa-core/static/image/facebook.png
delete mode 100644 services/print/application/template/sepa-core/static/image/header.png
delete mode 100644 services/print/application/template/sepa-core/static/image/info.png
delete mode 100644 services/print/application/template/sepa-core/static/image/instagram.png
delete mode 100644 services/print/application/template/sepa-core/static/image/linkedin.png
delete mode 100644 services/print/application/template/sepa-core/static/image/logo.png
delete mode 100644 services/print/application/template/sepa-core/static/image/logo.svg
delete mode 100644 services/print/application/template/sepa-core/static/image/pinterest.png
delete mode 100644 services/print/application/template/sepa-core/static/image/twitter.png
delete mode 100644 services/print/application/template/sepa-core/static/image/youtube.png
create mode 100644 services/print/application/template/sepa-core/style.css
diff --git a/client/core/src/lib/app.js b/client/core/src/lib/app.js
index 3b58309b4..5851357d8 100644
--- a/client/core/src/lib/app.js
+++ b/client/core/src/lib/app.js
@@ -12,7 +12,7 @@ export default class App {
this.$rootScope = $rootScope;
}
show(message) {
- if (this.snackbar) this.snackbar.show({message: message});
+ if (this.snackbar) this.snackbar.show({message: message, timeout: 400});
}
showMessage(message) {
this.show(message);
diff --git a/services/mailer/application/route/notification.js b/services/mailer/application/route/notification.js
index bd7a81f11..810fbdf88 100644
--- a/services/mailer/application/route/notification.js
+++ b/services/mailer/application/route/notification.js
@@ -4,10 +4,15 @@ var config = require('../config.js');
var mail = require('../mail.js');
var template = require('../template.js');
var httpRequest = require('request');
+var auth = require('../auth.js');
+// Auth middleware
+var requestToken = function(request, response, next) {
+ auth.init(request, response, next);
+};
// Printer setup
-router.post('/printer-setup/:clientId', function(request, response) {
+router.get('/printer-setup/:clientId', requestToken, function(request, response) {
mail.sendWithTemplate('printer-setup', {clientId: request.params.clientId}, error => {
if (error)
return response.status(400).json({message: error.message});
@@ -17,7 +22,7 @@ router.post('/printer-setup/:clientId', function(request, response) {
});
// Printer setup preview
-router.get('/printer-setup/:clientId', function(request, response) {
+router.get('/printer-setup/:clientId/preview', requestToken, function(request, response) {
template.get('printer-setup', {clientId: request.params.clientId, isPreview: true}, (error, result) => {
if (error)
return response.status(400).json({message: error.message});
@@ -27,7 +32,7 @@ router.get('/printer-setup/:clientId', function(request, response) {
});
// Client welcome
-router.post('/client-welcome/:clientId', function(request, response) {
+router.get('/client-welcome/:clientId', requestToken, function(request, response) {
mail.sendWithTemplate('client-welcome', {clientId: request.params.clientId}, error => {
if (error)
return response.status(400).json({message: error.message});
@@ -37,7 +42,7 @@ router.post('/client-welcome/:clientId', function(request, response) {
});
// Client welcome preview
-router.get('/client-welcome/:clientId', function(request, response) {
+router.get('/client-welcome/:clientId/preview', requestToken, function(request, response) {
template.get('client-welcome', {clientId: request.params.clientId, isPreview: true}, (error, result) => {
if (error)
return response.status(400).json({message: error.message});
@@ -47,8 +52,13 @@ router.get('/client-welcome/:clientId', function(request, response) {
});
// Client SEPA CORE
-router.post('/sepa-core/:clientId', function(request, response) {
- let path = `${request.proxyHost}/print/manuscript/sepa-core/${request.params.clientId}`;
+router.get('/sepa-core/:companyId/:clientId', requestToken, function(request, response) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId
+ };
+
+ let path = `${request.proxyHost}/print/manuscript/sepa-core/${params.companyId}/${params.clientId}`;
let options = {
url: path,
method: 'GET',
@@ -59,25 +69,75 @@ router.post('/sepa-core/:clientId', function(request, response) {
let httpStream = httpRequest(options, function(error, httpResponse, body) {
if (error || httpResponse.statusCode != 200)
- return response.status(400).json({message: error.message});
+ return response.status(400).json({message: error});
});
if (httpStream)
- mail.sendWithTemplate('sepa-core', {
- clientId: request.params.clientId,
- attachments: [{filename: 'sepa-core.pdf', content: httpStream}]
- }, error => {
- if (error)
- return response.status(400).json({message: error.message});
-
- return response.json();
+ params.attachments = [{filename: 'sepa-core.pdf', content: httpStream}];
+
+ mail.sendWithTemplate('sepa-core', params, error => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ return response.json();
});
});
// Client SEPA CORE preview
-router.get('/sepa-core/:clientId', function(request, response) {
- template.get('sepa-core', {
+router.get('/sepa-core/:companyId/:clientId/preview', requestToken, function(request, response) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId,
+ token: request.user.token,
+ isPreview: true
+ };
+
+ template.get('sepa-core', params, (error, result) => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ response.send(result.body);
+ });
+});
+
+// First debtor letter
+router.get('/letter-debtor-st/:companyId/:clientId', requestToken, function(request, response) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId,
+ token: request.user.token
+ };
+
+ let path = `${request.proxyHost}/print/manuscript/letter-debtor/${params.companyId}/${params.clientId}`;
+ let options = {
+ url: path,
+ method: 'GET',
+ headers: {
+ 'Authorization': request.headers.authorization
+ }
+ }
+
+ let httpStream = httpRequest(options, function(error, httpResponse, body) {
+ if (error || httpResponse.statusCode != 200)
+ return response.status(400).json({message: error});
+ });
+
+ if (httpStream)
+ params.attachments = [{filename: 'extracto.pdf', content: httpStream}];
+
+ mail.sendWithTemplate('letter-debtor-st', params, error => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ return response.json();
+ });
+});
+
+// First debtor letter preview
+router.get('/letter-debtor-st/:companyId/:clientId/preview', requestToken, function(request, response) {
+ template.get('letter-debtor-st', {
clientId: request.params.clientId,
+ companyId: request.params.companyId,
token: request.user.token,
isPreview: true
}, (error, result) => {
@@ -88,6 +148,85 @@ router.get('/sepa-core/:clientId', function(request, response) {
});
});
+// Second debtor letter
+router.get('/letter-debtor-nd/:companyId/:clientId', requestToken, function(request, response) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId,
+ token: request.user.token
+ };
+
+ let path = `${request.proxyHost}/print/manuscript/letter-debtor/${params.companyId}/${params.clientId}`;
+ let options = {
+ url: path,
+ method: 'GET',
+ headers: {
+ 'Authorization': request.headers.authorization
+ }
+ }
+
+ let httpStream = httpRequest(options, function(error, httpResponse, body) {
+ if (error || httpResponse.statusCode != 200)
+ return response.status(400).json({message: error});
+ });
+
+ if (httpStream)
+ params.attachments = [{filename: 'extracto.pdf', content: httpStream}];
+
+ mail.sendWithTemplate('letter-debtor-nd', params, error => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ return response.json();
+ });
+});
+
+// Second debtor letter preview
+router.get('/letter-debtor-nd/:companyId/:clientId/preview', requestToken, function(request, response) {
+ template.get('letter-debtor-nd', {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId,
+ token: request.user.token,
+ isPreview: true
+ }, (error, result) => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ response.send(result.body);
+ });
+});
+
+// Payment method changes
+router.get('/payment-update/:clientId', requestToken, function(request, response) {
+ mail.sendWithTemplate('payment-update', {clientId: request.params.clientId}, error => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ return response.json();
+ });
+});
+
+// Send notification to alias creditInsurance on client deactivate
+router.get('/client-deactivate/:clientId', requestToken, function(request, response) {
+ var params = {
+ alias: 'creditInsurance',
+ code: 'clientDeactivate',
+ bodyParams: {
+ clientId: request.params.clientId
+ }
+ };
+
+ mail.sendWithTemplate('notification-alias', params, error => {
+ if (error)
+ response.status(400).json({message: error.message});
+
+ return response.json();
+ });
+});
+
+module.exports = router;
+
+
// Single user notification
/* router.post('/:recipient/noticeUserSend', function(request, response) {
var params = {
@@ -146,34 +285,4 @@ router.get('/sepa-core/:clientId', function(request, response) {
mail.sendWithTemplate('notification-notice', params, result => {
return response.json(result);
});
-}); */
-
-// Payment method changes
-router.post('/payment-update/:clientId', function(request, response) {
- mail.sendWithTemplate('payment-update', {clientId: request.params.clientId}, error => {
- if (error)
- return response.status(400).json({message: error.message});
-
- return response.json();
- });
-});
-
-// Send notification to alias creditInsurance on client deactivate
-router.post('/client-deactivate/:clientId', function(request, response) {
- var params = {
- alias: 'creditInsurance',
- code: 'clientDeactivate',
- bodyParams: {
- clientId: request.params.clientId
- }
- };
-
- mail.sendWithTemplate('notification-alias', params, error => {
- if (error)
- response.status(400).json({message: error.message});
-
- return response.json();
- });
-});
-
-module.exports = router;
+}); */
\ No newline at end of file
diff --git a/services/mailer/application/router.js b/services/mailer/application/router.js
index ed5794bbe..161271820 100644
--- a/services/mailer/application/router.js
+++ b/services/mailer/application/router.js
@@ -1,5 +1,7 @@
var express = require('express');
var router = new express.Router();
+var fs = require('fs');
+var path = require('path');
// Mailer default page
router.get('/', function(request, response) {
@@ -9,4 +11,20 @@ router.get('/', function(request, response) {
// Notifications
router.use('/notification', require('./route/notification.js'));
+// Serve static images
+router.use('/static/:template/:image', function(request, response) {
+ let imagePath = path.join(__dirname, '/template/', request.params.template, '/image/', request.params.image);
+
+ fs.stat(imagePath, function(error) {
+ if (error)
+ return response.json({message: 'Image not found'});
+
+ let readStream = fs.createReadStream(imagePath);
+
+ readStream.on('open', function() {
+ readStream.pipe(response);
+ });
+ });
+});
+
module.exports = router;
diff --git a/services/mailer/application/template.js b/services/mailer/application/template.js
index d2c13f222..1e9c92fde 100644
--- a/services/mailer/application/template.js
+++ b/services/mailer/application/template.js
@@ -15,7 +15,7 @@ module.exports = {
get: function(template, params, cb) {
var templatePath = path.join(__dirname, 'template', `${template}`, `index.html`);
var classPath = path.join(__dirname, 'template', `${template}`, `${template}.js`);
- var stylePath = path.join(__dirname, 'template', `${template}`, 'static', 'css', 'style.css');
+ var stylePath = path.join(__dirname, 'template', `${template}`, 'style.css');
fs.stat(templatePath, (error, stat) => {
if (error)
@@ -65,6 +65,8 @@ module.exports = {
return cb(error);
instance._ = result.locale;
+ instance.isPreview = params.isPreview;
+
getDataCb(null, result);
});
});
@@ -173,14 +175,17 @@ module.exports = {
// Template default attachments
for (var i = 0; i < tplAttachments.length; i++) {
- let name = tplAttachments[i].replace('src="cid:', '').replace('"', '');
+ let src = tplAttachments[i].replace('src="cid:', '').replace('"', '').split('/');
+ let attachmentTpl = src[0];
+ let attachment = src[1];
if (isPreview) {
- let attachmentPath = `/mailer/static/images/${name}`;
+ let attachmentPath = `/mailer/static/${attachmentTpl}/${attachment}`;
body = body.replace(tplAttachments[i], `src="${attachmentPath}"`);
} else {
- let attachmentPath = path.join(__dirname, '../static', 'images', name);
- attachments.push({filename: name, path: attachmentPath, cid: name});
+ let attachmentPath = path.join(__dirname, 'template', `${attachmentTpl}`, 'image', attachment);
+ let attachmentName = attachmentTpl + '/' + attachment;
+ attachments.push({filename: attachmentName, path: attachmentPath, cid: attachmentName});
}
}
diff --git a/services/mailer/application/template/client-welcome/client-welcome.js b/services/mailer/application/template/client-welcome/client-welcome.js
index 469e74386..7cf435d0e 100644
--- a/services/mailer/application/template/client-welcome/client-welcome.js
+++ b/services/mailer/application/template/client-welcome/client-welcome.js
@@ -14,10 +14,11 @@ module.exports = class ClientWelcome {
c.email recipient
FROM client c
JOIN account.user u ON u.id = c.id
- LEFT JOIN worker w ON w.id = c.workerFk
+ LEFT JOIN worker w ON w.id = c.salesPersonFk
LEFT JOIN account.user wu ON wu.id = w.userFk
JOIN country ct ON ct.id = c.countryFk
WHERE c.id = ?`;
+
database.pool.query(query, [params.clientId], (error, result) => {
if (error || result.length == 0)
return cb(new Error('No template data found'));
diff --git a/services/mailer/application/template/client-welcome/index.html b/services/mailer/application/template/client-welcome/index.html
index a8a711c8e..2c778bee8 100644
--- a/services/mailer/application/template/client-welcome/index.html
+++ b/services/mailer/application/template/client-welcome/index.html
@@ -22,6 +22,7 @@
{{_.dear}}
{{{_.bodyDescription}}}
+
{{_.clientNumber}} {{clientId}}
{{_.user}} {{userName}}
{{_.password}} ******** {{_.passwordResetText}}
diff --git a/services/mailer/application/template/client-welcome/locale/es.json b/services/mailer/application/template/client-welcome/locale/es.json
index b1149d62b..e7dce623c 100644
--- a/services/mailer/application/template/client-welcome/locale/es.json
+++ b/services/mailer/application/template/client-welcome/locale/es.json
@@ -3,6 +3,7 @@
"title": "¡LE DAMOS LA BIENVENIDA!",
"dear": "Estimado cliente,",
"bodyDescription": "Sus datos para poder comprar en la web de verdnatura (https://www.verdnatura.es ) o en nuestras aplicaciones para iOS y Android (Ver tutorial de uso ), son:",
+ "clientNumber": "Identificador de cliente:",
"user": "Usuario:",
"password": "Contraseña:",
"passwordResetText": "(Va a recibir un correo para establecer la contraseña)",
diff --git a/services/mailer/application/template/client-welcome/static/css/style.css b/services/mailer/application/template/client-welcome/style.css
similarity index 100%
rename from services/mailer/application/template/client-welcome/static/css/style.css
rename to services/mailer/application/template/client-welcome/style.css
diff --git a/services/mailer/application/template/default/image/download.svg b/services/mailer/application/template/default/image/download.svg
new file mode 100644
index 000000000..b05bc05c8
--- /dev/null
+++ b/services/mailer/application/template/default/image/download.svg
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/services/mailer/application/template/default/image/preview.svg b/services/mailer/application/template/default/image/preview.svg
new file mode 100644
index 000000000..09a2a6bca
--- /dev/null
+++ b/services/mailer/application/template/default/image/preview.svg
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/services/mailer/application/template/footer/footer.js b/services/mailer/application/template/footer/footer.js
index 3b4020bf4..555e70b10 100644
--- a/services/mailer/application/template/footer/footer.js
+++ b/services/mailer/application/template/footer/footer.js
@@ -5,7 +5,8 @@ var format = require(path.join(__dirname, '../../util/format.js'));
module.exports = class Footer {
getData(params, cb) {
let query = `SELECT
- socialName
+ socialName,
+ LOWER(ct.code) countryCode
FROM client c
JOIN country ct ON ct.id = c.countryFk
WHERE c.id = ?`;
diff --git a/services/mailer/application/template/footer/static/image/action.png b/services/mailer/application/template/footer/image/action.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/action.png
rename to services/mailer/application/template/footer/image/action.png
diff --git a/services/mailer/application/template/footer/static/image/facebook.png b/services/mailer/application/template/footer/image/facebook.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/facebook.png
rename to services/mailer/application/template/footer/image/facebook.png
diff --git a/services/mailer/application/template/footer/static/image/header.png b/services/mailer/application/template/footer/image/header.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/header.png
rename to services/mailer/application/template/footer/image/header.png
diff --git a/services/mailer/application/template/footer/static/image/info.png b/services/mailer/application/template/footer/image/info.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/info.png
rename to services/mailer/application/template/footer/image/info.png
diff --git a/services/mailer/application/template/footer/static/image/instagram.png b/services/mailer/application/template/footer/image/instagram.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/instagram.png
rename to services/mailer/application/template/footer/image/instagram.png
diff --git a/services/mailer/application/template/footer/static/image/linkedin.png b/services/mailer/application/template/footer/image/linkedin.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/linkedin.png
rename to services/mailer/application/template/footer/image/linkedin.png
diff --git a/services/mailer/application/template/footer/static/image/pinterest.png b/services/mailer/application/template/footer/image/pinterest.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/pinterest.png
rename to services/mailer/application/template/footer/image/pinterest.png
diff --git a/services/mailer/application/template/footer/static/image/twitter.png b/services/mailer/application/template/footer/image/twitter.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/twitter.png
rename to services/mailer/application/template/footer/image/twitter.png
diff --git a/services/mailer/application/template/footer/static/image/youtube.png b/services/mailer/application/template/footer/image/youtube.png
similarity index 100%
rename from services/mailer/application/template/footer/static/image/youtube.png
rename to services/mailer/application/template/footer/image/youtube.png
diff --git a/services/mailer/application/template/footer/index.html b/services/mailer/application/template/footer/index.html
index e52f7a695..484f5c2b8 100644
--- a/services/mailer/application/template/footer/index.html
+++ b/services/mailer/application/template/footer/index.html
@@ -2,10 +2,10 @@
@@ -13,22 +13,22 @@
diff --git a/services/mailer/application/template/footer/static/css/style.css b/services/mailer/application/template/footer/style.css
similarity index 100%
rename from services/mailer/application/template/footer/static/css/style.css
rename to services/mailer/application/template/footer/style.css
diff --git a/services/mailer/application/template/header/header.js b/services/mailer/application/template/header/header.js
index 82c78e003..a6d1d6194 100644
--- a/services/mailer/application/template/header/header.js
+++ b/services/mailer/application/template/header/header.js
@@ -5,7 +5,8 @@ var format = require(path.join(__dirname, '../../util/format.js'));
module.exports = class Header {
getData(params, cb) {
let query = `SELECT
- c.name AS clientName
+ c.name AS clientName,
+ LOWER(ct.code) countryCode
FROM client c
JOIN country ct ON ct.id = c.countryFk
WHERE c.id = ?`;
diff --git a/services/mailer/application/template/header/static/image/header.png b/services/mailer/application/template/header/image/logo.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/header.png
rename to services/mailer/application/template/header/image/logo.png
diff --git a/services/mailer/application/template/header/index.html b/services/mailer/application/template/header/index.html
index c5234bbc8..6e4fcf8a4 100644
--- a/services/mailer/application/template/header/index.html
+++ b/services/mailer/application/template/header/index.html
@@ -1,3 +1,3 @@
-
+
diff --git a/services/mailer/application/template/header/static/image/logo.png b/services/mailer/application/template/header/static/image/logo.png
deleted file mode 100644
index 55e26fec6d6a2abff506862b1f851e1554f603c6..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 8577
zcmV-{A%5P8P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T
zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p
z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&nehQ1i
z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW
zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X
zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4
zfg=2N-7=cNnjjOr{yriy6mMFgG#l
znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U
zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya?
z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y
zZN{S}1|}gUOHJxc?wV3fxuz+mJ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HAPIv4r1aaM4MZIe=y97
z?%x24g+Bc;iL`kx`g|#ya@Of{#h~~;VU|M
+
+
+ {{_.subject}}
+
+
+
+
+
+
+ {{$.header}}
+
+
+
+
+
{{_.title}}
+
+
+
+
+
+
{{_.dear}}
+
+
{{_.bodyDescription}}
+
{{_.termLimits}}
+
+ {{_.payMethod}}
+
+
+ {{_.payMethodOption1}}
+ {{_.payMethodOption2}}
+
+
+
+ {{_.legalActions}}
+
+ {{_.legalActionsOption1}}
+ {{_.legalActionsOption2}}
+ {{_.legalActionsOption3}}
+
+
+
+
{{_.contact}}
+
+
{{_.waitingForNews}}
+
{{_.conclusion}}
+
+
+
+
{{bankName}}
+
{{iban}}
+
+
{{_.accountTransferData}}
+
+
+
+
+ {{#isPreview}}
+
+
+
+
+
+
Ver adjunto
+
+
+
+
+
+
+
+
+
Descargar PDF
+
+
+ {{/isPreview}}
+
+
+
+
+
+ {{$.footer}}
+
+
+
+
+
\ No newline at end of file
diff --git a/services/mailer/application/template/letter-debtor-nd/letter-debtor-nd.js b/services/mailer/application/template/letter-debtor-nd/letter-debtor-nd.js
new file mode 100644
index 000000000..be0f996e1
--- /dev/null
+++ b/services/mailer/application/template/letter-debtor-nd/letter-debtor-nd.js
@@ -0,0 +1,39 @@
+var path = require('path');
+var database = require(path.join(__dirname, '../../database.js'));
+var format = require(path.join(__dirname, '../../util/format.js'));
+
+module.exports = class LetterDebtorNd {
+ getData(params, cb) {
+ let query = `SELECT
+ sa.iban,
+ be.name AS bankName,
+ LOWER(ct.code) countryCode,
+ c.email recipient
+ FROM client c
+ JOIN company AS cny
+ JOIN supplierAccount AS sa ON sa.id = cny.supplierAccountFk
+ JOIN bankEntity be ON be.id = sa.bankEntityFk
+ JOIN country ct ON ct.id = c.countryFk
+ WHERE c.id = ? AND cny.id = ?`;
+
+ this.clientId = params.clientId;
+ this.companyId = params.companyId;
+ this.token = params.token;
+
+ database.pool.query(query, [params.clientId, params.companyId], (error, result) => {
+ if (error || result.length == 0)
+ return cb(new Error('No template data found'));
+
+ Object.assign(this, result[0]);
+
+ cb();
+ });
+ }
+
+ get previewAttachments() {
+ if (this.isPreview)
+ return `` +
+ ' ';
+ }
+};
diff --git a/services/mailer/application/template/letter-debtor-nd/locale/es.json b/services/mailer/application/template/letter-debtor-nd/locale/es.json
new file mode 100644
index 000000000..1f8790eba
--- /dev/null
+++ b/services/mailer/application/template/letter-debtor-nd/locale/es.json
@@ -0,0 +1,18 @@
+{
+ "subject": "Reiteración de aviso por saldo deudor",
+ "title": "AVISO REITERADO",
+ "dear": "Estimado cliente,",
+ "bodyDescription": "Nos dirigimos a Vd. nuevamente para informarle que sigue pendiente su deuda con nuestra empresa, tal y como puede comprobar en el extracto adjunto.",
+ "termLimits": "Dado que los plazos de pago acordados están ampliamente superados, no procede mayor dilación en la liquidación del importe adeudado.",
+ "payMethod": "Para ello dispone de las siguientes formas de pago:",
+ "payMethodOption1": "Pago online desde nuestra web",
+ "payMethodOption2": "Ingreso o transferencia al número de cuenta que detallamos al pie de esta carta, indicando el número de cliente.",
+ "legalActions": "En caso de no ser atendido este apremio de pago, nos veremos obligados a iniciar las acciones legales que procedan, entre las que están:",
+ "legalActionsOption1": "Inclusión en ficheros negativos sobre solvencia patrimonial y crédito.",
+ "legalActionsOption2": "Reclamación judicial",
+ "legalActionsOption3": "Cesión de deuda a una empresa de gestión de cobro",
+ "contact": "Para consultas, puede ponerse en contacto con nosotros en el 96 324 21 00.",
+ "waitingForNews": "En espera de sus noticias",
+ "conclusion": "Gracias por su atención.",
+ "accountTransferData": "Datos para transferencia bancaria"
+}
\ No newline at end of file
diff --git a/services/mailer/application/template/notification-alias/static/css/style.css b/services/mailer/application/template/letter-debtor-nd/style.css
similarity index 100%
rename from services/mailer/application/template/notification-alias/static/css/style.css
rename to services/mailer/application/template/letter-debtor-nd/style.css
diff --git a/services/mailer/application/template/letter-debtor-st/attachment.json b/services/mailer/application/template/letter-debtor-st/attachment.json
new file mode 100644
index 000000000..0637a088a
--- /dev/null
+++ b/services/mailer/application/template/letter-debtor-st/attachment.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/services/mailer/application/template/letter-debtor-st/index.html b/services/mailer/application/template/letter-debtor-st/index.html
new file mode 100644
index 000000000..a3b07e677
--- /dev/null
+++ b/services/mailer/application/template/letter-debtor-st/index.html
@@ -0,0 +1,69 @@
+
+
+
+ {{_.subject}}
+
+
+
+
+
+
+ {{$.header}}
+
+
+
+
+
{{_.title}}
+
+
+
+
+
+
{{_.dear}}
+
+
{{_.bodyDescription}}
+
{{_.viewExtract}}
+
{{_.validData}}
+
{{_.payMethod}}
+
{{_.conclusion}}
+
+
+
+
{{bankName}}
+
{{iban}}
+
+
{{_.accountTransferData}}
+
+
+
+
+ {{#isPreview}}
+
+
+
+
+
+
Ver adjunto
+
+
+
+
+
+
+
+
+
Descargar PDF
+
+
+ {{/isPreview}}
+
+
+
+
+
+ {{$.footer}}
+
+
+
+
+
\ No newline at end of file
diff --git a/services/mailer/application/template/letter-debtor-st/letter-debtor-st.js b/services/mailer/application/template/letter-debtor-st/letter-debtor-st.js
new file mode 100644
index 000000000..43ccb7a25
--- /dev/null
+++ b/services/mailer/application/template/letter-debtor-st/letter-debtor-st.js
@@ -0,0 +1,39 @@
+var path = require('path');
+var database = require(path.join(__dirname, '../../database.js'));
+var format = require(path.join(__dirname, '../../util/format.js'));
+
+module.exports = class LetterDebtorSt {
+ getData(params, cb) {
+ let query = `SELECT
+ sa.iban,
+ be.name AS bankName,
+ LOWER(ct.code) countryCode,
+ c.email recipient
+ FROM client c
+ JOIN company AS cny
+ JOIN supplierAccount AS sa ON sa.id = cny.supplierAccountFk
+ JOIN bankEntity be ON be.id = sa.bankEntityFk
+ JOIN country ct ON ct.id = c.countryFk
+ WHERE c.id = ? AND cny.id = ?`;
+
+ this.clientId = params.clientId;
+ this.companyId = params.companyId;
+ this.token = params.token;
+
+ database.pool.query(query, [params.clientId, params.companyId], (error, result) => {
+ if (error || result.length == 0)
+ return cb(new Error('No template data found'));
+
+ Object.assign(this, result[0]);
+
+ cb();
+ });
+ }
+
+ get previewAttachments() {
+ if (this.isPreview)
+ return `` +
+ ' ';
+ }
+};
diff --git a/services/mailer/application/template/letter-debtor-st/locale/es.json b/services/mailer/application/template/letter-debtor-st/locale/es.json
new file mode 100644
index 000000000..558b18753
--- /dev/null
+++ b/services/mailer/application/template/letter-debtor-st/locale/es.json
@@ -0,0 +1,11 @@
+{
+ "subject": "Aviso inicial por saldo deudor",
+ "title": "AVISO INICIAL",
+ "dear": "Estimado cliente,",
+ "bodyDescription": "Por el presente escrito le comunicamos que, según nuestros datos contables, su cuenta tiene un saldo pendiente de liquidar.",
+ "viewExtract": "Le solicitamos compruebe que el extracto adjunto corresponde con los datos de que Vd. dispone. Nuestro departamento de administración le aclarará gustosamente cualquier duda que pueda tener, e igualmente le facilitará cualquier documento que solicite.",
+ "validData": "Si al comprobar los datos aportados resultaran correctos, le rogamos proceda a regularizar su situación.",
+ "payMethod": "Si no desea desplazarse personalmente hasta nuestras oficinas, puede realizar el pago mediante transferencia bancaria a la cuenta que figura al pie del comunicado, indicando su número de cliente, o bien puede realizar el pago online desde nuestra página web.",
+ "conclusion": "De antemano le agradecemos su amable colaboración.",
+ "accountTransferData": "Datos para transferencia bancaria"
+}
\ No newline at end of file
diff --git a/services/mailer/application/template/payment-update/static/css/style.css b/services/mailer/application/template/letter-debtor-st/style.css
similarity index 100%
rename from services/mailer/application/template/payment-update/static/css/style.css
rename to services/mailer/application/template/letter-debtor-st/style.css
diff --git a/services/mailer/application/template/printer-setup/static/css/style.css b/services/mailer/application/template/notification-alias/style.css
similarity index 100%
rename from services/mailer/application/template/printer-setup/static/css/style.css
rename to services/mailer/application/template/notification-alias/style.css
diff --git a/services/mailer/application/template/payment-update/payment-update.js b/services/mailer/application/template/payment-update/payment-update.js
index 187d21b73..8a5a3b45b 100644
--- a/services/mailer/application/template/payment-update/payment-update.js
+++ b/services/mailer/application/template/payment-update/payment-update.js
@@ -4,8 +4,7 @@ var format = require(path.join(__dirname, '../../util/format.js'));
module.exports = class PaymentUpdate {
getData(params, cb) {
- let query = `SELECT
- c.id clientId,
+ let query = `SELECT
pm.id payMethodFk,
pm.name payMethodName,
c.dueDay,
@@ -16,6 +15,9 @@ module.exports = class PaymentUpdate {
JOIN payMethod pm ON pm.id = c.paymentMethodFk
JOIN country ct ON ct.id = c.countryFk
WHERE c.id = ?`;
+
+ this.clientId = params.clientId;
+
database.pool.query(query, [params.clientId], (error, result) => {
if (error || result.length == 0)
return cb(new Error('No template data found'));
diff --git a/services/mailer/application/template/sepa-core/static/css/style.css b/services/mailer/application/template/payment-update/style.css
similarity index 100%
rename from services/mailer/application/template/sepa-core/static/css/style.css
rename to services/mailer/application/template/payment-update/style.css
diff --git a/services/mailer/application/template/printer-setup/printer-setup.js b/services/mailer/application/template/printer-setup/printer-setup.js
index 6dece0d23..d17add406 100644
--- a/services/mailer/application/template/printer-setup/printer-setup.js
+++ b/services/mailer/application/template/printer-setup/printer-setup.js
@@ -4,19 +4,21 @@ var format = require(path.join(__dirname, '../../util/format.js'));
module.exports = class PrinterSetup {
getData(params, cb) {
- let query = `SELECT
- c.id clientId,
+ let query = `SELECT
CONCAT(w.name, ' ', w.firstName) name,
w.phone AS phone,
CONCAT(u.name, '@verdnatura.es') AS email,
LOWER(ct.code) countryCode,
c.email recipient
FROM client c
- LEFT JOIN worker w ON w.id = c.workerFk
+ LEFT JOIN worker w ON w.id = c.salesPersonFk
LEFT JOIN account.user u ON u.id = w.userFk
JOIN country ct ON ct.id = c.countryFk
WHERE c.id = ?`;
-
+
+ this.clientId = params.clientId;
+ this.isPreview = params.isPreview;
+
database.pool.query(query, [params.clientId], (error, result) => {
if (error || result.length == 0)
return cb(new Error('No template data found'));
diff --git a/services/mailer/application/template/printer-setup/style.css b/services/mailer/application/template/printer-setup/style.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/services/mailer/application/template/sepa-core/index.html b/services/mailer/application/template/sepa-core/index.html
index 0e9c34d04..1acdae3fc 100644
--- a/services/mailer/application/template/sepa-core/index.html
+++ b/services/mailer/application/template/sepa-core/index.html
@@ -22,7 +22,26 @@
{{_.dear}}
{{_.bodyDescription}}
{{_.conclusion}}
- {{{previewAttachments}}}
+
+ {{#isPreview}}
+
+
+
+
+
+
Ver adjunto
+
+
+
+
+
+
+
+
+
Descargar PDF
+
+
+ {{/isPreview}}
diff --git a/services/mailer/application/template/sepa-core/sepa-core.js b/services/mailer/application/template/sepa-core/sepa-core.js
index 04fd71df7..ec19dd29b 100644
--- a/services/mailer/application/template/sepa-core/sepa-core.js
+++ b/services/mailer/application/template/sepa-core/sepa-core.js
@@ -5,19 +5,19 @@ var format = require(path.join(__dirname, '../../util/format.js'));
module.exports = class SepaCore {
getData(params, cb) {
let query = `SELECT
- c.id clientId,
CONCAT(w.name, ' ', w.firstName) name,
w.phone AS phone,
CONCAT(u.name, '@verdnatura.es') AS email,
LOWER(ct.code) countryCode,
c.email recipient
FROM client c
- LEFT JOIN worker w ON w.id = c.workerFk
+ LEFT JOIN worker w ON w.id = c.salesPersonFk
LEFT JOIN account.user u ON u.id = w.userFk
JOIN country ct ON ct.id = c.countryFk
WHERE c.id = ?`;
- this.isPreview = params.isPreview;
+ this.clientId = params.clientId;
+ this.companyId = params.companyId;
this.token = params.token;
database.pool.query(query, [params.clientId], (error, result) => {
@@ -29,11 +29,4 @@ module.exports = class SepaCore {
cb();
});
}
-
- get previewAttachments() {
- if (this.isPreview)
- return `` +
- ' ';
- }
};
diff --git a/services/mailer/application/template/sepa-core/style.css b/services/mailer/application/template/sepa-core/style.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/services/mailer/server/server.js b/services/mailer/server/server.js
index 50320a391..457a61ddf 100644
--- a/services/mailer/server/server.js
+++ b/services/mailer/server/server.js
@@ -13,13 +13,8 @@ app.use(bodyParser.urlencoded({extended: true}));
app.use('/static', express.static(path.join(__dirname, '../static')));
-// Auth middleware
-var requestToken = function(request, response, next) {
- auth.init(request, response, next);
-};
-
// Load routes
-app.use('/', requestToken, require('../application/router.js'));
+app.use('/', require('../application/router.js'));
app.start = function() {
var listener = app.listen(config.app.port, function() {
diff --git a/services/mailer/static/css/component.css b/services/mailer/static/css/component.css
index 10805e562..b4c018d79 100644
--- a/services/mailer/static/css/component.css
+++ b/services/mailer/static/css/component.css
@@ -1,137 +1,221 @@
-img {
- margin: 0
-}
-
-p {
- text-align: justify
-}
-
-.wrapper {
- background-color: #EEE
-}
-
-.container {
- font-family: arial, sans-serif;
- max-width: 600px;
- min-width: 320px;
- font-size: 16px;
- margin: 0 auto;
- color: #555
-}
-
-.title {
- background-color: #95d831;
- text-align: center;
- padding: 35px 0
-}
-
-.title h1 {
- font-size: 32px;
- color: #333;
- margin: 0
-}
-
-.body {
- background-color:#FFF;
- padding: 20px
-}
-
-.body a {
- color: #8dba25
-}
-
-.body h1 {
- color: #999
-}
-
-.body h3 {
- font-size: 16px
-}
-
-.panel {
- border: 1px solid #DDD;
- margin-bottom: 10px;
- padding:10px
-}
-
-.row {
- margin-bottom: 15px;
- overflow: hidden;
- content: '';
- clear: both
-}
-
-.row .text {
- margin-bottom: 5px
-}
-
-.row .control {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box
-}
-
-.row .description {
- font-size: 8px;
- color: #999
-}
-
-.row .v-align {
- padding-top: 5px;
- line-height: 21px
-}
-
-.row:last-child {
- margin-bottom: 0
-}
-
-.row.inline .text {
- margin-bottom: 0;
- width: 40%;
- float: left
-}
-
-.row.inline .control {
- font-weight: bold;
- padding-left: 20px;
- color: #000;
- width: 60%;
- float: left
-}
-
-.box {
- border-top: 1px solid #CCC;
- border-right: 1px solid #CCC;
- border-bottom: 1px solid #CCC;
- font-weight: bold;
- text-align: center;
- padding-top: 4px;
- width: 25px;
- height: 21px;
- color: #000;
- float: left
-}
-
-.row .control .box:first-child {
- border-left: 1px solid #CCC;
-}
-
-.attachment {
- overflow: hidden;
- margin-top: 10px
-}
-
-.attachment:after {
- content: ' ';
- display: block;
- clear: both
-}
-
-.attachment-icon {
- float: left
-}
-
-.attachment span {
- padding: 16px 0 0 10px;
- float: left
+body {
+ padding: 0;
+ margin: 0
+}
+
+img {
+ margin: 0
+}
+
+p {
+ text-align: justify
+}
+
+.wrapper {
+ background-color: #EEE
+}
+
+.container {
+ font-family: arial, sans-serif;
+ max-width: 600px;
+ min-width: 320px;
+ font-size: 16px;
+ margin: 0 auto;
+ color: #555
+}
+
+.title {
+ background-color: #95d831;
+ text-align: center;
+ padding: 35px 0
+}
+
+.title h1 {
+ font-size: 32px;
+ color: #333;
+ margin: 0
+}
+
+.body {
+ background-color:#FFF;
+ padding: 20px
+}
+
+.body a {
+ color: #8dba25
+}
+
+.body h1 {
+ color: #999
+}
+
+.body h3 {
+ font-size: 16px
+}
+
+.panel {
+ border: 1px solid #DDD;
+ margin-bottom: 10px;
+ position: relative;
+ padding:10px
+}
+
+.row {
+ margin-bottom: 15px;
+ overflow: hidden
+}
+
+.row .text {
+ margin-bottom: 5px
+}
+
+.row .control {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box
+}
+
+.row .text, .row .control {
+ overflow: hidden
+}
+
+.row .description {
+ position: relative;
+ padding-top: 2px;
+ overflow: hidden;
+ font-size: 11px;
+ display: block;
+ color: #999
+}
+
+.row .line {
+ border-bottom: 1px solid #DDD;
+ border-right: 1px solid #DDD;
+ border-left: 1px solid #DDD;
+ margin-top: 10px;
+ color: #999;
+ padding: 5px
+}
+
+.row .description span {
+ background-color: #FFF;
+ margin: -5px 0 0 50px;
+ display: block;
+ padding: 5px;
+ float: left
+}
+
+.row:last-child {
+ margin-bottom: 0
+}
+
+.row.inline .text {
+ margin-bottom: 0;
+ width: 40%;
+ float: left
+}
+
+.row.inline .control {
+ font-weight: bold;
+ padding-left: 20px;
+ color: #000;
+ width: 60%;
+ float: left
+}
+
+.row.inline .description {
+ position: static;
+ overflow: visible
+}
+
+.box {
+ border-top: 1px solid #CCC;
+ border-right: 1px solid #CCC;
+ border-bottom: 1px solid #CCC;
+ font-weight: bold;
+ text-align: center;
+ padding-top: 4px;
+ width: 25px;
+ height: 21px;
+ color: #000;
+ float: left
+}
+
+.box.crossed {
+ font-weight: 100;
+ font-size: 16px
+}
+
+.row .control .box:first-child {
+ border-left: 1px solid #CCC;
+}
+
+.font.small {
+ font-size: 10px
+}
+
+.font.verticalAlign {
+ height: 27px;
+ line-height: 27px
+}
+
+.font.centered {
+ height: 27px;
+ line-height: 27px;
+ text-align: center
+}
+
+.verticalText {
+ -moz-transform: rotate(90deg);
+ -webkit-transform: rotate(90deg);
+ transform: rotate(90deg);
+ position: absolute;
+ text-align: center;
+ font-size: .65em;
+ width: 200px;
+ right: -115px;
+ top: 50%
+}
+
+.attachment {
+ overflow: hidden;
+ margin-top: 10px
+}
+
+.attachment-icon {
+ float: left
+}
+
+.attachment span {
+ padding: 16px 0 0 10px;
+ float: left
+}
+
+.columns {
+ overflow: hidden
+}
+
+.columns .size100 {
+ width: 100%;
+ float: left
+}
+
+.columns .size75 {
+ width: 75%;
+ float: left
+}
+
+.columns .size50 {
+ width: 50%;
+ float: left
+}
+
+.columns .size33 {
+ width: 33.33%;
+ float: left
+}
+
+.columns .size25 {
+ width: 25%;
+ float: left
}
\ No newline at end of file
diff --git a/services/mailer/static/images/attachment.png b/services/mailer/static/images/attachment.png
deleted file mode 100644
index 78efe4f95c69f9c03a08c93b4849d253ff1b3047..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 18546
zcmeI4c|26#`@pZQP$ZI~GL87O7_*qMOib2{BC>1Kn7PAbwr0jMDk&{KEtX1>C8d%=
zdnBTjvPDs$qDVrtNJ{m+Ls@P$uYRxJ_xI25HS>Cznddy`d7g9L=Q+PDc!dn`cUAKz4-tzPEGVD1sqJ80sxAR3~Os=XMc`>
z!}sTK5%$*B2riF9XD~qk2&qeU4ffjGJDK#X7o6Z>^{D%7JaZF()X9`DQSm;avIn4S
zQBk$HwK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vo(2xeXHzuIypdkhXX%w0%6{@&{bVk_1
z1N?p~54Mh8!=DLZ&;H%Io6)F5I@fhjKe@LG*6!(c0P
zTLRq?p@(jXeyJQom*4;9m*E-xH@(7qNrJ$Dh!-We#Pfk^CAeTf#ETMK;`zX|5?nAK
z;zbEA@qA!f2`(5A@uCEmcs?+#1Q!g5cu|5&JRg`=f(r&jyePpXo)1hb!36^%UXz_b!vFd*VZ2`=$`U|I<-7!dKISX_$3
z4;h1O=*i+>=n-Po$o)Rh5;!%
z6xou$sma(oyQ#0smI+!VI|=Qc%u1+{y0APQTH>Jo$+T`C@E`wCjZZZc_A`f-10w&z_
z4{-|D^~L2I7fEBaNYZEIV#jOCc}0{cYAbkcE>YH2DzVg8^pOUD_^CzZ{V(rH0YE4D
zQ*F!Z`wHE={U0jtx$AlD^c%Ixq(J7#&1
diff --git a/services/print/application/route/manuscript.js b/services/print/application/route/manuscript.js
index 90662b646..091ffa4c3 100644
--- a/services/print/application/route/manuscript.js
+++ b/services/print/application/route/manuscript.js
@@ -4,22 +4,93 @@ var template = require('../template.js');
var config = require('../config.js');
var pdf = require('html-pdf');
var path = require('path');
+var auth = require('../auth.js');
+
+// Auth middleware
+var requestToken = function(request, response, next) {
+ auth.init(request, response, next);
+};
// Sepa core
-router.post('/sepa-core/:clientId', function(request, response, next) {
- template.get('sepa-core', {clientId: request.params.clientId}, (error, result) => {
+router.get('/sepa-core/:companyId/:clientId', requestToken, function(request, response, next) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId
+ };
+
+ template.get('sepa-core', params, (error, result) => {
if (error)
return response.status(400).json({message: error.message});
- pdf.create(result.body).toStream(function(error, stream) {
+ pdf.create(result.body, config.pdf).toStream(function(error, stream) {
if (error)
throw Error(error);
+ response.setHeader('Content-Disposition', 'attachment; filename="sepa-core.pdf"');
+ response.setHeader('Content-type', 'application/pdf');
stream.pipe(response);
});
});
});
+// Sepa core html preview
+router.get('/sepa-core/:companyId/:clientId/preview', requestToken, function(request, response, next) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId,
+ isPreview: true
+ };
+
+ template.get('sepa-core', params, (error, result) => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ response.send(result.body);
+ });
+ });
+
+ // Debtor letter
+router.get('/letter-debtor/:companyId/:clientId', requestToken, function(request, response, next) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId
+ };
+
+ template.get('letter-debtor', params, (error, result) => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ pdf.create(result.body, config.pdf).toStream(function(error, stream) {
+ if (error)
+ throw Error(error);
+
+ response.setHeader('Content-Disposition', 'attachment; filename="extracto.pdf"');
+ response.setHeader('Content-type', 'application/pdf');
+ stream.pipe(response);
+ });
+ });
+ });
+
+ // Debtor letter html preview
+router.get('/letter-debtor/:companyId/:clientId/preview', requestToken, function(request, response, next) {
+ let params = {
+ clientId: request.params.clientId,
+ companyId: request.params.companyId,
+ isPreview: true
+ };
+
+ template.get('letter-debtor', params, (error, result) => {
+ if (error)
+ return response.status(400).json({message: error.message});
+
+ response.send(result.body);
+ });
+ });
+
+
+module.exports = router;
+
+
// store pdf
/* router.post('/sepa-core/:clientId', function(request, response, next) {
template.get('sepa-core', {recipient: request.params.clientId}, (error, result) => {
@@ -35,32 +106,4 @@ router.post('/sepa-core/:clientId', function(request, response, next) {
});
});
});
- */
-// Sepa core preview
-router.get('/sepa-core/:clientId', function(request, response, next) {
- template.get('sepa-core', {clientId: request.params.clientId}, (error, result) => {
- if (error)
- return response.status(400).json({message: error.message});
-
- let options = config.pdf;
- pdf.create(result.body, options).toStream(function(error, stream) {
- if (error)
- throw Error(error);
-
- response.setHeader('Content-Disposition', 'inline; filename="sepa-core.pdf"');
- response.setHeader('Content-type', 'application/pdf');
- stream.pipe(response);
- });
- });
-});
-
-router.get('/sepa-core-view/:clientId', function(request, response, next) {
- template.get('sepa-core', {clientId: request.params.clientId}, (error, result) => {
- if (error)
- return response.status(400).json({message: error.message});
-
- response.send(result.body);
- });
- });
-
-module.exports = router;
+ */
\ No newline at end of file
diff --git a/services/print/application/router.js b/services/print/application/router.js
index 58e9a3694..a9ebe1acf 100644
--- a/services/print/application/router.js
+++ b/services/print/application/router.js
@@ -1,5 +1,7 @@
var express = require('express');
var router = new express.Router();
+var fs = require('fs');
+var path = require('path');
// Default page
router.get('/', function(request, response) {
@@ -9,4 +11,21 @@ router.get('/', function(request, response) {
// Manuscripts
router.use('/manuscript', require('./route/manuscript.js'));
+// Serve static images
+router.use('/static/:template/:image', function(request, response) {
+ let imagePath = path.join(__dirname, '/template/', request.params.template, '/image/', request.params.image);
+
+ fs.stat(imagePath, function(error) {
+ if (error)
+ return response.json({message: 'Image not found'});
+
+ let readStream = fs.createReadStream(imagePath);
+
+ readStream.on('open', function() {
+ readStream.pipe(response);
+ });
+ });
+});
+
+
module.exports = router;
diff --git a/services/print/application/template.js b/services/print/application/template.js
index 9bc968c74..9974ebcf5 100644
--- a/services/print/application/template.js
+++ b/services/print/application/template.js
@@ -4,6 +4,7 @@ var locale = require('./locale.js');
var inlineCss = require('inline-css');
var path = require('path');
+
module.exports = {
/**
* Get template.
@@ -15,7 +16,7 @@ module.exports = {
get: function(template, params, cb) {
var templatePath = path.join(__dirname, 'template', `${template}`, `index.html`);
var classPath = path.join(__dirname, 'template', `${template}`, `${template}.js`);
- var stylePath = path.join(__dirname, 'template', `${template}`, 'static', 'css', 'style.css');
+ var stylePath = path.join(__dirname, 'template', `${template}`, 'style.css');
fs.stat(templatePath, (error, stat) => {
if (error)
@@ -43,7 +44,7 @@ module.exports = {
params.subject = title[1];
}
- this.renderImages(template, body, (error, body) => {
+ this.renderImages(template, body, params.isPreview, (error, body) => {
if (error)
return cb(error);
@@ -53,7 +54,7 @@ module.exports = {
};
let getDataCb = () => {
- this.render(templatePath, instance, (error, result) => getRenderedStyles(error, result));
+ this.render(templatePath, params, instance, (error, result) => getRenderedStyles(error, result));
};
instance.getData(params, (error, result) => {
@@ -65,6 +66,7 @@ module.exports = {
return cb(error);
instance._ = result.locale;
+ instance.isPreview = params.isPreview;
getDataCb(null, result);
});
});
@@ -77,7 +79,7 @@ module.exports = {
* @param {Object} data - Params
* @param {Object} cb - Callback
*/
- render: function(path, data, cb) {
+ render: function(path, params, data, cb) {
fs.readFile(path, 'utf8', (error, body) => {
// Find matching sub-templates
let regexp = new RegExp(/\{\{\$\.(.*?)\}\}/, 'ig');
@@ -89,7 +91,7 @@ module.exports = {
}
let parentBody = body;
- this.renderSub(parentBody, subTpl, data, regexp, (error, body) => {
+ this.renderSub(parentBody, subTpl, params, regexp, (error, body) => {
if (error)
return cb(error);
@@ -99,13 +101,13 @@ module.exports = {
});
},
- renderSub: function(body, subTpl, data, regexp, cb) {
+ renderSub: function(body, subTpl, params, regexp, cb) {
let index = 1;
subTpl.forEach(keyName => {
subTplName = keyName.replace(regexp, '$1');
- this.get(subTplName, data, (error, result) => {
+ this.get(subTplName, params, (error, result) => {
if (error)
return cb(error);
@@ -140,7 +142,7 @@ module.exports = {
let style = '';
let body = style + html;
let options = {url: ' '};
-
+
inlineCss(body, options)
.then(function(body) {
cb(null, body);
@@ -156,7 +158,7 @@ module.exports = {
* @param {String} body - template body
* @param {Object} cb - Callback
*/
- renderImages: function(template, body, cb) {
+ renderImages: function(template, body, isPreview, cb) {
let tplImages = body.match(new RegExp('src="cid:(.*?)"', 'ig'));
if (!tplImages)
@@ -164,10 +166,17 @@ module.exports = {
// Template default attachments
for (var i = 0; i < tplImages.length; i++) {
- let name = tplImages[i].replace('src="cid:', '').replace('"', '');
+ let src = tplImages[i].replace('src="cid:', '').replace('"', '').split('/');
+ let attachmentTpl = src[0];
+ let attachment = src[1];
- let imagePath = path.join(__dirname, 'template', `${template}`, 'static', 'image', name);
- body = body.replace(tplImages[i], `src="file:///${imagePath}"`);
+ if (isPreview) {
+ let imagePath = `/print/static/${attachmentTpl}/${attachment}`;
+ body = body.replace(tplImages[i], `src="${imagePath}"`);
+ } else {
+ let imagePath = path.join(__dirname, 'template', attachmentTpl, 'image', attachment);
+ body = body.replace(tplImages[i], `src="file:///${imagePath}"`);
+ }
}
cb(null, body);
diff --git a/services/mailer/application/template/header/static/image/action.png b/services/print/application/template/footer/image/action.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/action.png
rename to services/print/application/template/footer/image/action.png
diff --git a/services/mailer/application/template/header/static/image/facebook.png b/services/print/application/template/footer/image/facebook.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/facebook.png
rename to services/print/application/template/footer/image/facebook.png
diff --git a/services/mailer/application/template/header/static/image/info.png b/services/print/application/template/footer/image/info.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/info.png
rename to services/print/application/template/footer/image/info.png
diff --git a/services/mailer/application/template/header/static/image/instagram.png b/services/print/application/template/footer/image/instagram.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/instagram.png
rename to services/print/application/template/footer/image/instagram.png
diff --git a/services/mailer/application/template/header/static/image/linkedin.png b/services/print/application/template/footer/image/linkedin.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/linkedin.png
rename to services/print/application/template/footer/image/linkedin.png
diff --git a/services/mailer/application/template/header/static/image/pinterest.png b/services/print/application/template/footer/image/pinterest.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/pinterest.png
rename to services/print/application/template/footer/image/pinterest.png
diff --git a/services/mailer/application/template/header/static/image/twitter.png b/services/print/application/template/footer/image/twitter.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/twitter.png
rename to services/print/application/template/footer/image/twitter.png
diff --git a/services/mailer/application/template/header/static/image/youtube.png b/services/print/application/template/footer/image/youtube.png
similarity index 100%
rename from services/mailer/application/template/header/static/image/youtube.png
rename to services/print/application/template/footer/image/youtube.png
diff --git a/services/print/application/template/footer/static/image/action.png b/services/print/application/template/footer/static/image/action.png
deleted file mode 100644
index 2cd16c453d66b10611f90ee01deba70edbd7113e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 3225
zcmV;K3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