From 142cc920def4e74b2ea63c7361e26bd20bdcddd7 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 6 Jul 2017 14:21:55 +0200 Subject: [PATCH 01/28] bug de multi seleccion corregido, cambio estilos --- client/core/src/multi-check/multi-check.js | 1 + client/production/src/index/index.html | 2 +- client/production/src/index/index.js | 8 ++++++++ .../src/production-filters/production-filters.html | 6 ++++-- .../src/production-filters/production-filters.js | 1 - client/production/src/production-filters/style.scss | 9 --------- .../src/production-table/production-table.html | 2 +- .../src/production-table/production-table.js | 10 +++++++++- 8 files changed, 24 insertions(+), 15 deletions(-) delete mode 100644 client/production/src/production-filters/style.scss diff --git a/client/core/src/multi-check/multi-check.js b/client/core/src/multi-check/multi-check.js index 14e14760e9..ba3f7b79f2 100644 --- a/client/core/src/multi-check/multi-check.js +++ b/client/core/src/multi-check/multi-check.js @@ -74,6 +74,7 @@ module.component('vnMultiCheck', { template: require('./multi-check.html'), controller: MultiCheck, bindings: { + checkAll: '=', options: '<', models: '=', className: '@?' diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html index dc1cd79e12..4026b67f21 100644 --- a/client/production/src/index/index.html +++ b/client/production/src/index/index.html @@ -35,6 +35,6 @@ - + \ No newline at end of file diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js index 95eb8e6508..fd3a7b5aab 100644 --- a/client/production/src/index/index.js +++ b/client/production/src/index/index.js @@ -10,6 +10,7 @@ export default class ProductionIndex { this.filter = {}; this.tickets = []; this.states = []; + this.checkAll = 0; this.footer = { total: null, lines: null, @@ -20,6 +21,12 @@ export default class ProductionIndex { this.userProfile = aclConstant.userProfile; this.filter.warehouseFk = this.userProfile.warehouseId; } + get checkAll() { + return this._checkAll; + } + set checkAll(value) { + this._checkAll = value; + } // Actions Callbacks _changeState(ids, sateteId, stateName, index) { @@ -80,6 +87,7 @@ export default class ProductionIndex { page: 1, limit: 700 }); + this.checkAll = 0; this.$http.get('/production/api/FakeProductions/list?filter=' + JSON.stringify(filters)).then( json => { this.tickets = json.data.tickets; diff --git a/client/production/src/production-filters/production-filters.html b/client/production/src/production-filters/production-filters.html index 037d6c8855..587e03199e 100644 --- a/client/production/src/production-filters/production-filters.html +++ b/client/production/src/production-filters/production-filters.html @@ -24,7 +24,9 @@ - - + + + + diff --git a/client/production/src/production-filters/production-filters.js b/client/production/src/production-filters/production-filters.js index eb6a95ea48..0e6143efc4 100644 --- a/client/production/src/production-filters/production-filters.js +++ b/client/production/src/production-filters/production-filters.js @@ -1,5 +1,4 @@ import ngModule from '../module'; -import './style.scss'; ngModule.component('vnProductionFilterPanel', { template: require('./production-filters.html') diff --git a/client/production/src/production-filters/style.scss b/client/production/src/production-filters/style.scss deleted file mode 100644 index 17e5fc417b..0000000000 --- a/client/production/src/production-filters/style.scss +++ /dev/null @@ -1,9 +0,0 @@ -vn-production-filter-panel{ - .mdl-button--colored{ - color: #ffa410 !important; - background-color: white !important; - } - .mdl-button--colored:hover{ - color: white !important; - } -} \ No newline at end of file diff --git a/client/production/src/production-table/production-table.html b/client/production/src/production-table/production-table.html index d559bb16cb..111b530c96 100644 --- a/client/production/src/production-table/production-table.html +++ b/client/production/src/production-table/production-table.html @@ -2,7 +2,7 @@ - + diff --git a/client/production/src/production-table/production-table.js b/client/production/src/production-table/production-table.js index a8dc794fc0..96ebf6c2e1 100644 --- a/client/production/src/production-table/production-table.js +++ b/client/production/src/production-table/production-table.js @@ -5,6 +5,7 @@ export class ProductionTable { this.$filter = $filter; this._tickets = []; this.itemsDisplayedInList = 14; + this._checkAll = 0; this.pageTable = { filter: { page: 1, @@ -13,6 +14,12 @@ export class ProductionTable { model: [] }; } + get checkAll() { + return this._checkAll; + } + set checkAll(value) { + this._checkAll = value; + } set tickets(value) { this._tickets = value; this.totalFilter = this._tickets.length; @@ -40,7 +47,8 @@ ngModule.component('vnProductionTable', { template: require('./production-table.html'), bindings: { tickets: '=', - footer: '<' + footer: '<', + checkAll: '=' }, controller: ProductionTable }); From 2b7abef98fafb67dc146176fb6fa4a15b5bb2c77 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 6 Jul 2017 14:46:22 +0200 Subject: [PATCH 02/28] corregido filtro principal --- client/production/src/index/index.html | 4 +-- .../common/methods/fake-production/list.js | 34 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html index 4026b67f21..8d258a0277 100644 --- a/client/production/src/index/index.html +++ b/client/production/src/index/index.html @@ -4,7 +4,7 @@ Finder - +
- +
{ - let field = new Object(); - field[key] = filter.where[key]; - newFilter.and.push(field); - } - ); + + if(Object.keys(filter.where).length){ + Object.keys(filter.where).forEach( + key => { + let field = new Object(); + field[key] = filter.where[key]; + newFilter.and.push(field); + } + ); + } filter.where = newFilter; } + console.log(JSON.stringify(filter)); + FakeProduction.connectToService(ctx, "client"); this.find(filter, function(err, tickets) { FakeProduction.disconnectFromService("client"); From bbd09b3d36894d2f924e4ffcc926a8cc8e663274 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 6 Jul 2017 14:48:05 +0200 Subject: [PATCH 03/28] eliminado console.log --- .../common/methods/fake-production/list.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/services/production/common/methods/fake-production/list.js b/services/production/common/methods/fake-production/list.js index a1f1a7212c..16f139d76d 100644 --- a/services/production/common/methods/fake-production/list.js +++ b/services/production/common/methods/fake-production/list.js @@ -12,14 +12,15 @@ module.exports = function(FakeProduction) { delete filter.page; if(filter.where && filter.where.q){ - var newFilter = {and: [ - { - or: [ - {agency: {regexp: filter.where.q}}, - {state: {regexp: filter.where.q}} - ] - } - ] + var newFilter = { + and: [ + { + or: [ + {agency: {regexp: filter.where.q}}, + {state: {regexp: filter.where.q}} + ] + } + ] }; delete filter.where.q; @@ -36,8 +37,6 @@ module.exports = function(FakeProduction) { filter.where = newFilter; } - console.log(JSON.stringify(filter)); - FakeProduction.connectToService(ctx, "client"); this.find(filter, function(err, tickets) { FakeProduction.disconnectFromService("client"); From 81726e0a09beebac9942fc79013be90e25fdee87 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Tue, 11 Jul 2017 08:59:12 +0200 Subject: [PATCH 04/28] columnHeader change icon, style --- .../column-header.html} | 4 ++-- .../column-header.js} | 10 ++++----- client/core/src/components.js | 2 +- client/core/src/grid-header/style.scss | 6 ++--- .../production-table/production-table.html | 22 +++++++++---------- 5 files changed, 22 insertions(+), 22 deletions(-) rename client/core/src/{colum-header/colum-header.html => column-header/column-header.html} (68%) rename client/core/src/{colum-header/colum-header.js => column-header/column-header.js} (84%) diff --git a/client/core/src/colum-header/colum-header.html b/client/core/src/column-header/column-header.html similarity index 68% rename from client/core/src/colum-header/colum-header.html rename to client/core/src/column-header/column-header.html index 8472abe530..435057a19b 100644 --- a/client/core/src/colum-header/colum-header.html +++ b/client/core/src/column-header/column-header.html @@ -4,8 +4,8 @@ {{::$ctrl.text}} - - + +
diff --git a/client/core/src/colum-header/colum-header.js b/client/core/src/column-header/column-header.js similarity index 84% rename from client/core/src/colum-header/colum-header.js rename to client/core/src/column-header/column-header.js index ad9c57aad6..b153f09874 100644 --- a/client/core/src/colum-header/colum-header.js +++ b/client/core/src/column-header/column-header.js @@ -1,6 +1,6 @@ import {module} from '../module'; -export default class ColumHeader { +export default class ColumnHeader { constructor() { this.order = undefined; this.mouseIsOver = false; @@ -22,10 +22,10 @@ export default class ColumHeader { return showArrow; } } -ColumHeader.$inject = []; +ColumnHeader.$inject = []; -module.component('vnColumHeader', { - template: require('./colum-header.html'), +module.component('vnColumnHeader', { + template: require('./column-header.html'), bindings: { field: '@?', text: '@?', @@ -34,6 +34,6 @@ module.component('vnColumHeader', { require: { gridHeader: '^^vnGridHeader' }, - controller: ColumHeader, + controller: ColumnHeader, transclude: true }); diff --git a/client/core/src/components.js b/client/core/src/components.js index 9e7b27edec..5694ae8f7f 100644 --- a/client/core/src/components.js +++ b/client/core/src/components.js @@ -17,7 +17,7 @@ import './snackbar/snackbar'; import './tooltip/tooltip'; import './icon-menu/icon-menu'; import './drop-down/drop-down'; -import './colum-header/colum-header'; +import './column-header/column-header'; import './grid-header/grid-header'; import './multi-check/multi-check'; diff --git a/client/core/src/grid-header/style.scss b/client/core/src/grid-header/style.scss index 742c8e7d51..cc983dcf1a 100644 --- a/client/core/src/grid-header/style.scss +++ b/client/core/src/grid-header/style.scss @@ -7,12 +7,12 @@ vn-grid-header { white-space: nowrap; justify-content: center; vn-none{ - min-width: 16px; + min-width: 17px; } } vn-icon{ - line-height: 16px; - font-size: 16px; + line-height: 17px; + font-size: 17px; margin: 0; padding: 0; display: inline; diff --git a/client/production/src/production-table/production-table.html b/client/production/src/production-table/production-table.html index 111b530c96..42a9e45ac8 100644 --- a/client/production/src/production-table/production-table.html +++ b/client/production/src/production-table/production-table.html @@ -1,18 +1,18 @@ - + - - - - - - - - - - + + + + + + + + + + From f1fda284cb4eed1ae7632463f8f85e59c6f83997 Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Tue, 11 Jul 2017 09:36:11 +0200 Subject: [PATCH 05/28] varios cambios --- services/mailer/application/Config/app.json | 9 ++++ services/mailer/application/Config/mysql.json | 7 +++ services/mailer/application/Config/smtp.json | 12 +++++ services/mailer/application/settings.js | 4 -- services/mailer/settings.js | 45 +++++++++++++++++++ .../common/methods/ticket/change-time.js | 2 +- .../common/models/fake-production.json | 4 +- .../production/common/models/warehouse.json | 4 +- 8 files changed, 78 insertions(+), 9 deletions(-) create mode 100644 services/mailer/application/Config/app.json create mode 100644 services/mailer/application/Config/mysql.json create mode 100644 services/mailer/application/Config/smtp.json create mode 100644 services/mailer/settings.js diff --git a/services/mailer/application/Config/app.json b/services/mailer/application/Config/app.json new file mode 100644 index 0000000000..72df391739 --- /dev/null +++ b/services/mailer/application/Config/app.json @@ -0,0 +1,9 @@ +{ + "name": "MailServer", + "version": "1.0.0", + "port": 3003, + "debug": true, + "defaultLanguage": "es", + "senderMail": "noreply@localhost", + "senderName": "" +} \ No newline at end of file diff --git a/services/mailer/application/Config/mysql.json b/services/mailer/application/Config/mysql.json new file mode 100644 index 0000000000..ddfd88bede --- /dev/null +++ b/services/mailer/application/Config/mysql.json @@ -0,0 +1,7 @@ +{ + "host": "localhost", + "port": 3306, + "user": "reports", + "password": "", + "database": "" +} \ No newline at end of file diff --git a/services/mailer/application/Config/smtp.json b/services/mailer/application/Config/smtp.json new file mode 100644 index 0000000000..e4953c14d6 --- /dev/null +++ b/services/mailer/application/Config/smtp.json @@ -0,0 +1,12 @@ +{ + "host": "localhost", + "port": 465, + "secure": true, + "auth": { + "user": "noreply", + "pass": "" + }, + "tls": { + "rejectUnauthorized": false + } +} \ No newline at end of file diff --git a/services/mailer/application/settings.js b/services/mailer/application/settings.js index 8c651ab29f..afc89e7305 100644 --- a/services/mailer/application/settings.js +++ b/services/mailer/application/settings.js @@ -1,5 +1,4 @@ var path = require('path'); - /** * Módulo de configuración */ @@ -18,7 +17,6 @@ module.exports = { return require(path.join(__dirname, 'config', `${name}.${env}.json`)); }, - /** * Configuración de la aplicación * @return {Object} Objeto de configuración app @@ -26,7 +24,6 @@ module.exports = { app: function() { return this.getConfig('app'); }, - /** * Configuración de smtp * @return {Object} Objeto de configuración smtp @@ -34,7 +31,6 @@ module.exports = { smtp: function() { return this.getConfig('smtp'); }, - /** * Configuración de mysql * @return {Object} Objeto de configuración MySQL diff --git a/services/mailer/settings.js b/services/mailer/settings.js new file mode 100644 index 0000000000..8c651ab29f --- /dev/null +++ b/services/mailer/settings.js @@ -0,0 +1,45 @@ +var path = require('path'); + +/** + * Módulo de configuración + */ +module.exports = { + /** + * Obtiene la configuración en función del entorno en el que se está + * ejecutando la aplicación. + * @param {String} name Nombre del fichero + * @return {Object} Objeto de configuración + */ + getConfig: function(name) { + let env = process.env.NODE_ENV; + + if (!env) + env = 'development'; + + return require(path.join(__dirname, 'config', `${name}.${env}.json`)); + }, + + /** + * Configuración de la aplicación + * @return {Object} Objeto de configuración app + */ + app: function() { + return this.getConfig('app'); + }, + + /** + * Configuración de smtp + * @return {Object} Objeto de configuración smtp + */ + smtp: function() { + return this.getConfig('smtp'); + }, + + /** + * Configuración de mysql + * @return {Object} Objeto de configuración MySQL + */ + mysql: function() { + return this.getConfig('mysql'); + } +}; diff --git a/services/production/common/methods/ticket/change-time.js b/services/production/common/methods/ticket/change-time.js index e877c00510..d492c28009 100644 --- a/services/production/common/methods/ticket/change-time.js +++ b/services/production/common/methods/ticket/change-time.js @@ -21,7 +21,7 @@ module.exports = function(Ticket) { Ticket.changeTime = function(ctx, time, cb) { var tickets = ctx.req.body.tickets; var FakeProduction = Ticket.app.models.FakeProduction; - var hour = `${time}:00`; + var hour = `${time}`; var query = `update Ticket set date = CONCAT(DATE(date), ' ', ?) where id in (?)`; var params = [time, tickets]; diff --git a/services/production/common/models/fake-production.json b/services/production/common/models/fake-production.json index cc24898b06..77930c1d09 100644 --- a/services/production/common/models/fake-production.json +++ b/services/production/common/models/fake-production.json @@ -74,10 +74,10 @@ }, "acls": [ { - "accessType": "*", + "accessType": "READ", "principalType": "ROLE", "principalId": "$everyone", - "permission": "DENY" + "permission": "ALLOW" }, { "accessType": "*", diff --git a/services/production/common/models/warehouse.json b/services/production/common/models/warehouse.json index 28b814d605..8a6d856362 100644 --- a/services/production/common/models/warehouse.json +++ b/services/production/common/models/warehouse.json @@ -20,10 +20,10 @@ }, "acls": [ { - "accessType": "*", + "accessType": "READ", "principalType": "ROLE", "principalId": "$everyone", - "permission": "DENY" + "permission": "ALLOW" }, { "accessType": "*", From 2f6047d2416512ab46444b9121fe8b21a3cb8646 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Tue, 11 Jul 2017 10:00:29 +0200 Subject: [PATCH 06/28] merge --- client/production/src/index/index.html | 13 +++++++++++-- .../salix/src/components/searchbar/searchbar.html | 3 ++- client/salix/src/components/searchbar/searchbar.js | 3 ++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html index 8d258a0277..03110f1dfa 100644 --- a/client/production/src/index/index.html +++ b/client/production/src/index/index.html @@ -4,7 +4,7 @@ Finder -
+ + + + + - + + \ No newline at end of file diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js index aac912788c..eb5f45839f 100644 --- a/client/salix/src/components/searchbar/searchbar.js +++ b/client/salix/src/components/searchbar/searchbar.js @@ -42,7 +42,8 @@ ngModule.component('vnSearchbar', { search: '=', onSearch: '&', advanced: '=', - popover: '@' + popover: '@', + label: '@?' }, controller: Controller }); From 35d213874e3b1188dc9635c97e6c01515d9f33c3 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Tue, 11 Jul 2017 10:32:54 +0200 Subject: [PATCH 07/28] merge --- services/mailer/application/Config/app.json | 9 --------- services/mailer/application/Config/mysql.json | 7 ------- services/mailer/application/Config/smtp.json | 12 ------------ services/mailer/application/config/app.json | 9 --------- services/mailer/application/config/mysql.json | 7 ------- services/mailer/application/config/smtp.json | 12 ------------ 6 files changed, 56 deletions(-) delete mode 100644 services/mailer/application/Config/app.json delete mode 100644 services/mailer/application/Config/mysql.json delete mode 100644 services/mailer/application/Config/smtp.json delete mode 100644 services/mailer/application/config/app.json delete mode 100644 services/mailer/application/config/mysql.json delete mode 100644 services/mailer/application/config/smtp.json diff --git a/services/mailer/application/Config/app.json b/services/mailer/application/Config/app.json deleted file mode 100644 index 72df391739..0000000000 --- a/services/mailer/application/Config/app.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "MailServer", - "version": "1.0.0", - "port": 3003, - "debug": true, - "defaultLanguage": "es", - "senderMail": "noreply@localhost", - "senderName": "" -} \ No newline at end of file diff --git a/services/mailer/application/Config/mysql.json b/services/mailer/application/Config/mysql.json deleted file mode 100644 index ddfd88bede..0000000000 --- a/services/mailer/application/Config/mysql.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "host": "localhost", - "port": 3306, - "user": "reports", - "password": "", - "database": "" -} \ No newline at end of file diff --git a/services/mailer/application/Config/smtp.json b/services/mailer/application/Config/smtp.json deleted file mode 100644 index e4953c14d6..0000000000 --- a/services/mailer/application/Config/smtp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "host": "localhost", - "port": 465, - "secure": true, - "auth": { - "user": "noreply", - "pass": "" - }, - "tls": { - "rejectUnauthorized": false - } -} \ No newline at end of file diff --git a/services/mailer/application/config/app.json b/services/mailer/application/config/app.json deleted file mode 100644 index 72df391739..0000000000 --- a/services/mailer/application/config/app.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "MailServer", - "version": "1.0.0", - "port": 3003, - "debug": true, - "defaultLanguage": "es", - "senderMail": "noreply@localhost", - "senderName": "" -} \ No newline at end of file diff --git a/services/mailer/application/config/mysql.json b/services/mailer/application/config/mysql.json deleted file mode 100644 index ddfd88bede..0000000000 --- a/services/mailer/application/config/mysql.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "host": "localhost", - "port": 3306, - "user": "reports", - "password": "", - "database": "" -} \ No newline at end of file diff --git a/services/mailer/application/config/smtp.json b/services/mailer/application/config/smtp.json deleted file mode 100644 index e4953c14d6..0000000000 --- a/services/mailer/application/config/smtp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "host": "localhost", - "port": 465, - "secure": true, - "auth": { - "user": "noreply", - "pass": "" - }, - "tls": { - "rejectUnauthorized": false - } -} \ No newline at end of file From c788ea5e29ad44ae901bceaa6c66f670b2a65f55 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Tue, 11 Jul 2017 10:34:25 +0200 Subject: [PATCH 08/28] config en minusculas --- services/mailer/application/config/app.json | 9 +++++++++ services/mailer/application/config/mysql.json | 7 +++++++ services/mailer/application/config/smtp.json | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 services/mailer/application/config/app.json create mode 100644 services/mailer/application/config/mysql.json create mode 100644 services/mailer/application/config/smtp.json diff --git a/services/mailer/application/config/app.json b/services/mailer/application/config/app.json new file mode 100644 index 0000000000..72df391739 --- /dev/null +++ b/services/mailer/application/config/app.json @@ -0,0 +1,9 @@ +{ + "name": "MailServer", + "version": "1.0.0", + "port": 3003, + "debug": true, + "defaultLanguage": "es", + "senderMail": "noreply@localhost", + "senderName": "" +} \ No newline at end of file diff --git a/services/mailer/application/config/mysql.json b/services/mailer/application/config/mysql.json new file mode 100644 index 0000000000..ddfd88bede --- /dev/null +++ b/services/mailer/application/config/mysql.json @@ -0,0 +1,7 @@ +{ + "host": "localhost", + "port": 3306, + "user": "reports", + "password": "", + "database": "" +} \ No newline at end of file diff --git a/services/mailer/application/config/smtp.json b/services/mailer/application/config/smtp.json new file mode 100644 index 0000000000..e4953c14d6 --- /dev/null +++ b/services/mailer/application/config/smtp.json @@ -0,0 +1,12 @@ +{ + "host": "localhost", + "port": 465, + "secure": true, + "auth": { + "user": "noreply", + "pass": "" + }, + "tls": { + "rejectUnauthorized": false + } +} \ No newline at end of file From b93c3f50e3e2a7ccd64fbbb225122a0510f1fd8e Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Tue, 11 Jul 2017 10:35:23 +0200 Subject: [PATCH 09/28] cambiando searchBar --- client/production/src/index/index.html | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html index 03110f1dfa..89e85c2a1e 100644 --- a/client/production/src/index/index.html +++ b/client/production/src/index/index.html @@ -4,7 +4,8 @@ Finder - - - - - + + Date: Tue, 11 Jul 2017 10:59:09 +0200 Subject: [PATCH 10/28] refresh filter when clear model --- client/production/src/index/index.html | 2 +- client/production/src/index/index.js | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html index 89e85c2a1e..5f215808d2 100644 --- a/client/production/src/index/index.html +++ b/client/production/src/index/index.html @@ -6,7 +6,7 @@ Finder
- + + +

- - - + \ No newline at end of file diff --git a/client/salix/src/components/home/style.scss b/client/salix/src/components/home/style.scss index 732f8752a5..135f5d461e 100644 --- a/client/salix/src/components/home/style.scss +++ b/client/salix/src/components/home/style.scss @@ -19,11 +19,23 @@ vn-home { .vn-module{ display: flex; flex: none; - padding: 2em; margin: 10px; - border-radius: 4px; - box-sizing: border-box; - transition: opacity 0.7s ease; + background-color: #FF9300; + color: white; + + overflow:hidden; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + + .home__icon{ + width: 150px; + height: 150px; + img { + max-width: 50%; + margin-top: 20px; + } + } h4{ text-transform: capitalize; font-size: 16pt; @@ -40,14 +52,6 @@ vn-home { opacity: 0.7; } - &.Clients{ - background-color: #ffa410; - color: #ffffff; - } - &.Production{ - background-color: #95d600; - color: #ffffff; - } } } diff --git a/client/salix/src/components/main-menu/main-menu.html b/client/salix/src/components/main-menu/main-menu.html index 075b91ef79..a85bebb7c3 100644 --- a/client/salix/src/components/main-menu/main-menu.html +++ b/client/salix/src/components/main-menu/main-menu.html @@ -4,18 +4,10 @@ -
    - -
    - - - - - - -
    -
    +
      +
    • + + +
    diff --git a/client/salix/src/components/main-menu/style.scss b/client/salix/src/components/main-menu/style.scss index 55dccc4622..6b9687d5e2 100644 --- a/client/salix/src/components/main-menu/style.scss +++ b/client/salix/src/components/main-menu/style.scss @@ -1,13 +1,19 @@ vn-main-menu { - vn-icon { - padding: .1em; - border-radius: .1em; - vertical-align: middle; - font-size: 24px; - - &:hover { - cursor: pointer; - opacity: .85; + li.mdl-menu__item{ + background-color: #FF9300; + margin-bottom: 8px; + color: white; + img{ + max-width: 18px; + vertical-align: middle; + margin-top: -3px; } } + li.mdl-menu__item:hover{ + background-color: #FF9300; + opacity: 0.7 !important; + } + li.mdl-menu__item:last-child{ + margin-bottom: 0; + } } \ No newline at end of file diff --git a/services/nginx/.gitignore b/services/nginx/.gitignore index d3ed5f283f..4a76957dba 100644 --- a/services/nginx/.gitignore +++ b/services/nginx/.gitignore @@ -1,4 +1,5 @@ logs/* static/* temp/* -!static/templates \ No newline at end of file +!static/templates +!static/images \ No newline at end of file diff --git a/services/nginx/static/images/icon_client.png b/services/nginx/static/images/icon_client.png new file mode 100644 index 0000000000000000000000000000000000000000..8858ec7ae4e062f0e0bdea16eca97c420ef4c98b GIT binary patch literal 13350 zcmeHu`(Mo4_wahpOqc22Bu%MKcV;S0O-UEscaD}WA8=rD-TqK60tx>57}qn2)77Zno}83N90 zH?IjXTCgc7G{ie3XzlhbcS4*1>@O{t=j;>vyr+HtmI-c`r%59wiW~W_6+PVelPHfg znfoN(w1Xy@;}W|R&D@L}WJ42bJ9V6QJ#wi}F&mYJa`L-(9xE+7{^!c-E6ssf^*Zkg z)Ck=CzyJPsOMtKcI|I10ym*Z2YnC=huIV>Sz6|xz!f+?%T0BKjYsQE$d7e zo!LAD&`cFqKNq(r~G>*LQePBx82i=EYsBfG@^H2M6_L>V??ZEw7d<6zt=#=W5ESl20nf#_{j7zodv%+_GK*%a?mpzGllyv_ zzdxG}pBLhs+jAwgo$ULEONEVg=VB%+jt7xK5)B-}~JvGdtWmfxJa$fYh*)-Jq}cT|dg8+$hE}K~1}^YGrNC zArL4aeH&S?YcB*D7~Sw)pl~9)j&4;w5HI}5 zV?jxw5kaoc=}mU3;w)2@Kj`*bS<+-VU|YC@h+RCw*L-52Sf%c8I>cW=X&Vc?v=Ni9 zJL_J3)d>H%p73s|V_((Q&IScok8V&L~6%fehpl($ai5@eQ^8E|;pj9MxZLjG2E90$x3ec3?T-XUCKM!RbgeoIj- zx9p>QJv~z0U*kAx2pslI1~5~5^NP0*#Xc%j{)^mvwYT{Nvtz$E2qJLD=F)`cN2=A| zmJ;fX#&y-q4$ESY7T~4@^Ov8@k1=vurrO%XJ~uQm!AA+2(NZN+Z{7^2+r~*pnNmSh zuhXSWP4YNumMNU2C}0du1kNOs)x>2D%t%t~rRuQPm(vRpt_)+gtvvIw9Ww@`H)NkF zFPPGeZ8*6Amv^n=v3^npyv?QO%Id2eU$0<6*C7Gq+NiN6) zu1%D&q@>#uMAMOljNg?Bi}^7Wa6{<`IMeMUW}RgztJ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d@b2^(+t5b`~U<@ORC*WW4zX|3Da8SEf(br_x70jW5TUcr8OT zu);z&c<6{dQW&iyA4L8UHLty;9T5o}=UBp&m+1_HiQVgKLZgI)h1HmIbJcXu$LoY% z*5;sN!W{7hRyk3fpGY+NG8wbXkokGomL0%laG-#W0_sn4{6vvJ1=HqYsmtRHq)$ literal 0 HcmV?d00001 From 886c0f1e508a77f36a1f4dea404a671f360087ed Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Wed, 12 Jul 2017 07:49:45 +0200 Subject: [PATCH 13/28] editado gulp para que no elimine la carpeta imagenes --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 057483795c..7eb3907098 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -58,7 +58,7 @@ gulp.task('services', ['copy'], function() { }); gulp.task('clean', function() { - return del([`${buildDir}/*`, `!${buildDir}/templates`], {force: true}); + return del([`${buildDir}/*`, `!${buildDir}/templates`, `!${buildDir}/images`], {force: true}); }); // Spliting From 62b0a29f7c875eaf41e2845e3a5233e350ff1449 Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Wed, 12 Jul 2017 07:57:30 +0200 Subject: [PATCH 14/28] messageSend Production --- .../production/common/methods/fake-production/message-send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/production/common/methods/fake-production/message-send.js b/services/production/common/methods/fake-production/message-send.js index c1549a875c..67e518ba6e 100644 --- a/services/production/common/methods/fake-production/message-send.js +++ b/services/production/common/methods/fake-production/message-send.js @@ -44,7 +44,7 @@ module.exports = function(FakeProduction) { FakeProduction.beginTransaction({isolationLevel: FakeProduction.Transaction.READ_COMMITTED}, function(err, tx) { Message.create(messages, {transaction: tx}, function (err, res) { if(err){ - transaction.rollback(function(error) { + tx.rollback(function(error) { (error) ? cb(error, null) : cb(err, null); }); } else{ From ace002e02bdd6cea5dd767bb57b6bb8af78bac24 Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Wed, 12 Jul 2017 08:21:36 +0200 Subject: [PATCH 15/28] time production --- services/production/common/methods/ticket/change-time.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/production/common/methods/ticket/change-time.js b/services/production/common/methods/ticket/change-time.js index d492c28009..d763d029d5 100644 --- a/services/production/common/methods/ticket/change-time.js +++ b/services/production/common/methods/ticket/change-time.js @@ -21,10 +21,10 @@ module.exports = function(Ticket) { Ticket.changeTime = function(ctx, time, cb) { var tickets = ctx.req.body.tickets; var FakeProduction = Ticket.app.models.FakeProduction; - var hour = `${time}`; + var hour = `${time}:00`; var query = `update Ticket set date = CONCAT(DATE(date), ' ', ?) where id in (?)`; - var params = [time, tickets]; + var params = [hour, tickets]; FakeProduction.updateAll({ticketFk: {inq: tickets}}, {hour: hour}, function(err, res){ if(err) From 139579e78f4d98ac33473cf6bd24e9fdcdd5ce81 Mon Sep 17 00:00:00 2001 From: Vicente Falco Date: Wed, 12 Jul 2017 08:53:55 +0200 Subject: [PATCH 16/28] FakeProductionSql campo date --- services/production/common/sql/FakeProduction.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/services/production/common/sql/FakeProduction.sql b/services/production/common/sql/FakeProduction.sql index 4eb25d65e9..fcf9ad8566 100644 --- a/services/production/common/sql/FakeProduction.sql +++ b/services/production/common/sql/FakeProduction.sql @@ -1,6 +1,7 @@ select tmp.Id_Ticket as ticketFk, tmp.Id_Cliente as clientFk, tmp.Alias as client, +tmp.Fecha as `date`, tmp.Hora as hour, tmp.POBLACION as city, tmp.PROVINCIA as province, From 17186c40352c2a7b8d341a3485b4ffa19a20b84c Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Wed, 12 Jul 2017 13:32:25 +0200 Subject: [PATCH 17/28] nuevo date-picker --- client/core/src/components.js | 5 +- client/core/src/date-picker/date-picker.js | 4 +- client/core/src/datePicker/datePicker.html | 21 +++ client/core/src/datePicker/datePicker.js | 162 +++++++++++++++++++++ client/production/src/index/index.js | 2 +- 5 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 client/core/src/datePicker/datePicker.html create mode 100644 client/core/src/datePicker/datePicker.js diff --git a/client/core/src/components.js b/client/core/src/components.js index 5694ae8f7f..04e5d72871 100644 --- a/client/core/src/components.js +++ b/client/core/src/components.js @@ -20,6 +20,7 @@ import './drop-down/drop-down'; import './column-header/column-header'; import './grid-header/grid-header'; import './multi-check/multi-check'; +import './datePicker/datePicker'; export {NAME as BUTTON, directive as ButtonDirective} from './button/button'; export {NAME as BUTTON_MDL, factory as buttonMdl} from './button/button.mdl'; @@ -37,8 +38,8 @@ export {NAME as SUBMIT, directive as SubmitDirective} from './submit/submit'; export {NAME as SUBMIT_MDL, factory as submitMdl} from './submit/submit.mdl'; export {NAME as COMBO, directive as ComboDirective} from './combo/combo'; export {NAME as COMBO_MDL, factory as comboMdl} from './combo/combo.mdl'; -export {NAME as DATE_PICKER, directive as DatePickerDirective} from './date-picker/date-picker'; -export {NAME as DATE_PICKER_MDL, factory as datePickerMdl} from './date-picker/date-picker.mdl'; +/* export {NAME as DATE_PICKER, directive as DatePickerDirective} from './date-picker/date-picker'; +export {NAME as DATE_PICKER_MDL, factory as datePickerMdl} from './date-picker/date-picker.mdl';*/ export {NAME as CARD, directive as CardDirective} from './card/card'; export {NAME as CARD_MDL, factory as cardMdl} from './card/card.mdl'; export {NAME as SWITCH, directive as SwitchDirective} from './switch/switch'; diff --git a/client/core/src/date-picker/date-picker.js b/client/core/src/date-picker/date-picker.js index f0a829df44..dd714b0c49 100644 --- a/client/core/src/date-picker/date-picker.js +++ b/client/core/src/date-picker/date-picker.js @@ -26,8 +26,8 @@ export function directive(resolve, normalizer, $translate) { if (!initOptions.locale) initOptions.locale = $translate.use(); - if (!initOptions.dateFormat && initOptions.locale === 'es') - initOptions.dateFormat = 'd-m-Y'; + /*if (!initOptions.dateFormat && initOptions.locale === 'es') + initOptions.dateFormat = 'd-m-Y';*/ if (!input.matches('input')) input = input.querySelector('input'); diff --git a/client/core/src/datePicker/datePicker.html b/client/core/src/datePicker/datePicker.html new file mode 100644 index 0000000000..2730009c34 --- /dev/null +++ b/client/core/src/datePicker/datePicker.html @@ -0,0 +1,21 @@ +

    + + + + +
    \ No newline at end of file diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js new file mode 100644 index 0000000000..7bd3d2098a --- /dev/null +++ b/client/core/src/datePicker/datePicker.js @@ -0,0 +1,162 @@ +import {module} from '../module'; +import Component from '../lib/component'; +import Flatpickr from 'vendor/src/flatpickr'; +import './style.scss'; + +// equivalences to format date between flatpicker and angularjs +export const fromatEquivalence = { + d: 'dd', // Day of the month, 2 digits with leading zeros (01 to 31) + j: 'd', // Day of the month without leading zeros (1 to 31) + m: 'MM', // Month in year, padded (01-12) + n: 'M', // Month in year (1-12) + y: 'yy', // A two digit representation of a year (00-99) + Y: 'yyyy', // A full numeric representation of a year, 4 digits (1999 or 2003) + H: 'HH', // Hour in AM/PM, padded (01-12) + h: 'H', // Hour in AM/PM, (1-12) + i: 'mm', // Minutes (00 to 59) + s: 'ss' // Seconds (00 to 59) +}; + +class DatePicker extends Component { + constructor($element, $translate, $filter) { + super($element); + this.input = $element[0].querySelector('input'); + this.$translate = $translate; + this.$filter = $filter; + this.enabled = true; + this._modelView = ''; + this._model = undefined; + } + + get model() { + return this._model; + } + + set model(value) { + this._model = value; + if (value && !this.modelView) { + let format = this._formatFlat2Angular(this.iniOpts.dateFormat || 'Y-m-d'); + this.modelView = this.$filter('date')(value, format); + } + } + + get modelView() { + return this._modelView; + } + set modelView(value) { + this._modelView = value; + this._setModel(value); + this.mdlUpdate(value); + } + onClear() { + this.modelView = null; + } + mdlUpdate() { + let mdlField = this.element.firstChild.MaterialTextfield; + if (mdlField) + mdlField.updateClasses_(); + } + + _formatFlat2Angular(string) { // change string Flatpickr format to angular format (d-m-Y -> dd-MM-yyyy) + let aux = string.split(/[.,/ :-]/); + let parts = []; + aux.forEach( + val => { + parts.push(fromatEquivalence[val]); + } + ); + if (string.indexOf(' ') !== -1) { // datetime format + let dates = parts.slice(0, 3).join('-'); + let hours = parts.slice(3, parts.length).join(':'); + return `${dates} ${hours}`.trim(); + } else if (string.indexOf(':') !== -1) { // only time format + return parts.join(':'); + } else { // only date format + return parts.join('-'); + } + } + + _setModel(value) { + if (!value) { + this.model = undefined; + } else if (!this.iniOpts.dateFormat || (this.iniOpts.dateFormat && this.iniOpts.dateFormat.startsWith('Y-m-d'))) { + this.model = value; + } else { + let formats = this.iniOpts.dateFormat.split(/[.,/ :-]/); + let aux = value.split(/[.,/ :-]/); + let date = {}; + formats.forEach( + (k, i) => { + if (k.toLowerCase() === 'y') { + date.year = aux[i]; + } else if (k === 'm' || k === 'n') { + date.month = aux[i]; + } else if (k === 'd' || k === 'j') { + date.day = aux[i]; + } else if (k.toLowerCase() === 'h') { + date.hour = aux[i]; + } else if (k === 'i') { + date.minutes = aux[i]; + } else if (k === 's') { + date.seccons = aux[i]; + } + } + ); + + let dateStr = ''; + let hourStr = ''; + + if (date.year && date.month && date.day) { + dateStr = `${date.year}-${date.month}-${date.day}`; + } + if (date.hour) { + hourStr = date.hour; + if (date.minutes) { + hourStr += ':' + date.minutes; + } else { + hourStr += ':00'; + } + if (date.seccons) { + hourStr += ':' + date.seccons; + } else { + hourStr += ':00'; + } + } + let dateForModel = `${dateStr} ${hourStr}`.trim(); + if (this.model !== dateForModel) + this.model = dateForModel; + } + } + + $onInit() { + if (!this.iniOpts) + this.iniOpts = {}; + + if (!this.iniOpts.locale) + this.iniOpts.locale = this.$translate.use(); + + if (!this.iniOpts.dateFormat && this.iniOpts.locale === 'es') + this.iniOpts.dateFormat = 'd-m-Y'; + + if (this.input) + this.vp = new Flatpickr(this.input, this.iniOpts); + } + $onDestroy() { + if (this.vp) + this.vp.destroy(); + } +} +DatePicker.$inject = ['$element', '$translate', '$filter']; + +module.component('vnDatePicker', { + template: require('./datePicker.html'), + bindings: { + model: '=', + label: '@?', + name: '@?', + enabled: ' Date: Wed, 12 Jul 2017 13:32:42 +0200 Subject: [PATCH 18/28] estilos date-picker --- client/core/src/datePicker/style.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 client/core/src/datePicker/style.scss diff --git a/client/core/src/datePicker/style.scss b/client/core/src/datePicker/style.scss new file mode 100644 index 0000000000..f1bd30dabe --- /dev/null +++ b/client/core/src/datePicker/style.scss @@ -0,0 +1,12 @@ +vn-date-picker { + .mdl-chip__action { + position: absolute; + top: 0px; + right: -6px; + margin: 22px 0px; + background-color: white; + } + .material-icons { + font-size: 18px; + } +} \ No newline at end of file From 5e41f573f5582d6b284fee8d1f0350a455966e06 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Wed, 12 Jul 2017 14:02:03 +0200 Subject: [PATCH 19/28] =?UTF-8?q?a=C3=B1adido=20campo=20Date=20al=20modelo?= =?UTF-8?q?=20de=20=20FakeProduction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/production/common/models/fake-production.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/production/common/models/fake-production.json b/services/production/common/models/fake-production.json index 77930c1d09..d40746869c 100644 --- a/services/production/common/models/fake-production.json +++ b/services/production/common/models/fake-production.json @@ -17,6 +17,9 @@ "client":{ "type": "String" }, + "date":{ + "type": "Date" + }, "hour":{ "type": "String" }, From f2c0dd3ab70025f81ddaff541f1cb234acf2d9f3 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Wed, 12 Jul 2017 14:32:15 +0200 Subject: [PATCH 20/28] pruebas con date-picker y material --- client/core/src/datePicker/datePicker.html | 8 +++---- client/core/src/datePicker/datePicker.js | 25 ++++++++++++++-------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/client/core/src/datePicker/datePicker.html b/client/core/src/datePicker/datePicker.html index 2730009c34..b4cb4c83f4 100644 --- a/client/core/src/datePicker/datePicker.html +++ b/client/core/src/datePicker/datePicker.html @@ -1,12 +1,10 @@
    - - - +
    \ No newline at end of file diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 7bd3d2098a..e6a72ac913 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -18,11 +18,12 @@ export const fromatEquivalence = { }; class DatePicker extends Component { - constructor($element, $translate, $filter) { + constructor($element, $translate, $filter, $timeout) { super($element); this.input = $element[0].querySelector('input'); this.$translate = $translate; this.$filter = $filter; + this.$timeout = $timeout; this.enabled = true; this._modelView = ''; this._model = undefined; @@ -45,11 +46,16 @@ class DatePicker extends Component { } set modelView(value) { this._modelView = value; + this.input.value = value; this._setModel(value); - this.mdlUpdate(value); + this.$timeout( + () => { + this.mdlUpdate(); + } + ); } onClear() { - this.modelView = null; + this.modelView = ''; } mdlUpdate() { let mdlField = this.element.firstChild.MaterialTextfield; @@ -77,10 +83,11 @@ class DatePicker extends Component { } _setModel(value) { + let model; if (!value) { - this.model = undefined; + model = undefined; } else if (!this.iniOpts.dateFormat || (this.iniOpts.dateFormat && this.iniOpts.dateFormat.startsWith('Y-m-d'))) { - this.model = value; + model = value; } else { let formats = this.iniOpts.dateFormat.split(/[.,/ :-]/); let aux = value.split(/[.,/ :-]/); @@ -122,10 +129,10 @@ class DatePicker extends Component { hourStr += ':00'; } } - let dateForModel = `${dateStr} ${hourStr}`.trim(); - if (this.model !== dateForModel) - this.model = dateForModel; + model = `${dateStr} ${hourStr}`.trim(); } + + return model; } $onInit() { @@ -146,7 +153,7 @@ class DatePicker extends Component { this.vp.destroy(); } } -DatePicker.$inject = ['$element', '$translate', '$filter']; +DatePicker.$inject = ['$element', '$translate', '$filter', '$timeout']; module.component('vnDatePicker', { template: require('./datePicker.html'), From cd2560c8c6fae800d911176211f00bb7ebd02c66 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Wed, 12 Jul 2017 14:57:40 +0200 Subject: [PATCH 21/28] bug fixed datepicker --- client/core/src/datePicker/datePicker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index e6a72ac913..e823706511 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -46,7 +46,6 @@ class DatePicker extends Component { } set modelView(value) { this._modelView = value; - this.input.value = value; this._setModel(value); this.$timeout( () => { @@ -132,7 +131,9 @@ class DatePicker extends Component { model = `${dateStr} ${hourStr}`.trim(); } - return model; + if (this.model !== model) { + this.model = model; + } } $onInit() { From 3cf33fe48baf68d41877c352cc89481e9c131c97 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 13 Jul 2017 08:55:39 +0200 Subject: [PATCH 22/28] datepicker regex data with timezone --- client/core/src/datePicker/datePicker.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index e823706511..e8bea0d8d1 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -63,7 +63,7 @@ class DatePicker extends Component { } _formatFlat2Angular(string) { // change string Flatpickr format to angular format (d-m-Y -> dd-MM-yyyy) - let aux = string.split(/[.,/ :-]/); + let aux = string.split(/[T.,/ :-]/); let parts = []; aux.forEach( val => { @@ -88,8 +88,8 @@ class DatePicker extends Component { } else if (!this.iniOpts.dateFormat || (this.iniOpts.dateFormat && this.iniOpts.dateFormat.startsWith('Y-m-d'))) { model = value; } else { - let formats = this.iniOpts.dateFormat.split(/[.,/ :-]/); - let aux = value.split(/[.,/ :-]/); + let formats = this.iniOpts.dateFormat.split(/[T.,/ :-]/); + let aux = value.split(/[T.,/ :-]/); let date = {}; formats.forEach( (k, i) => { @@ -129,7 +129,6 @@ class DatePicker extends Component { } } model = `${dateStr} ${hourStr}`.trim(); - } if (this.model !== model) { this.model = model; From a06ac62b91a32f682d641885632be8145405e91a Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 13 Jul 2017 08:58:48 +0200 Subject: [PATCH 23/28] datepicker with timezone --- client/core/src/datePicker/datePicker.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index e8bea0d8d1..38d13aae2f 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -63,7 +63,7 @@ class DatePicker extends Component { } _formatFlat2Angular(string) { // change string Flatpickr format to angular format (d-m-Y -> dd-MM-yyyy) - let aux = string.split(/[T.,/ :-]/); + let aux = string.split((/[ZT.,/ :-]/)); let parts = []; aux.forEach( val => { @@ -88,8 +88,8 @@ class DatePicker extends Component { } else if (!this.iniOpts.dateFormat || (this.iniOpts.dateFormat && this.iniOpts.dateFormat.startsWith('Y-m-d'))) { model = value; } else { - let formats = this.iniOpts.dateFormat.split(/[T.,/ :-]/); - let aux = value.split(/[T.,/ :-]/); + let formats = this.iniOpts.dateFormat.split((/[ZT.,/ :-]/)); + let aux = value.split((/[ZT.,/ :-]/)); let date = {}; formats.forEach( (k, i) => { @@ -129,6 +129,7 @@ class DatePicker extends Component { } } model = `${dateStr} ${hourStr}`.trim(); + } if (this.model !== model) { this.model = model; From 7dfed60e7daa2eccf0f332ccfea55cc88c5431f1 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 13 Jul 2017 11:03:22 +0200 Subject: [PATCH 24/28] bug fixed in new datepicker and material design label effect --- client/core/src/datePicker/datePicker.js | 53 +++++++++++++++--------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 38d13aae2f..bb40201d54 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -27,34 +27,34 @@ class DatePicker extends Component { this.enabled = true; this._modelView = ''; this._model = undefined; + + componentHandler.upgradeElement($element[0].firstChild); } get model() { return this._model; } - set model(value) { this._model = value; if (value && !this.modelView) { - let format = this._formatFlat2Angular(this.iniOpts.dateFormat || 'Y-m-d'); + let format = this._formatFlat2Angular(this.iniOptions.dateFormat || 'Y-m-d'); this.modelView = this.$filter('date')(value, format); } } - get modelView() { return this._modelView; } set modelView(value) { this._modelView = value; + this.input.value = value; this._setModel(value); this.$timeout( - () => { - this.mdlUpdate(); - } - ); + () => { + this.mdlUpdate(); + }, 500); } onClear() { - this.modelView = ''; + this.modelView = null; } mdlUpdate() { let mdlField = this.element.firstChild.MaterialTextfield; @@ -63,7 +63,7 @@ class DatePicker extends Component { } _formatFlat2Angular(string) { // change string Flatpickr format to angular format (d-m-Y -> dd-MM-yyyy) - let aux = string.split((/[ZT.,/ :-]/)); + let aux = string.split(/[ZT.,/ :-]/); let parts = []; aux.forEach( val => { @@ -85,11 +85,11 @@ class DatePicker extends Component { let model; if (!value) { model = undefined; - } else if (!this.iniOpts.dateFormat || (this.iniOpts.dateFormat && this.iniOpts.dateFormat.startsWith('Y-m-d'))) { + } else if (!this.iniOptions.dateFormat || (this.iniOptions.dateFormat && this.iniOptions.dateFormat.startsWith('Y-m-d'))) { model = value; } else { - let formats = this.iniOpts.dateFormat.split((/[ZT.,/ :-]/)); - let aux = value.split((/[ZT.,/ :-]/)); + let formats = this.iniOptions.dateFormat.split(/[ZT.,/ :-]/); + let aux = value.split(/[ZT.,/ :-]/); let date = {}; formats.forEach( (k, i) => { @@ -137,17 +137,30 @@ class DatePicker extends Component { } $onInit() { - if (!this.iniOpts) - this.iniOpts = {}; + if (!this.iniOptions) + this.iniOptions = {}; - if (!this.iniOpts.locale) - this.iniOpts.locale = this.$translate.use(); + if (!this.iniOptions.locale) + this.iniOptions.locale = this.$translate.use(); - if (!this.iniOpts.dateFormat && this.iniOpts.locale === 'es') - this.iniOpts.dateFormat = 'd-m-Y'; + if (!this.iniOptions.dateFormat && this.iniOptions.locale === 'es') + this.iniOptions.dateFormat = 'd-m-Y'; + else if (this.iniOptions.dateFormat) { + let format = this.iniOptions.dateFormat.split(/[ZT.,/ :-]/); + if (format.length <= 1) { + throw new Error(`Error: Invalid string format ${format}`); + } + format.forEach( + val => { + if (!fromatEquivalence[val]) { + throw new Error(`Error in dateFormat ${this.iniOptions.dateFormat}: is not like Flatpickr Formatting Token https://chmln.github.io/flatpickr/formatting/`); + } + } + ); + } if (this.input) - this.vp = new Flatpickr(this.input, this.iniOpts); + this.vp = new Flatpickr(this.input, this.iniOptions); } $onDestroy() { if (this.vp) @@ -164,7 +177,7 @@ module.component('vnDatePicker', { name: '@?', enabled: ' Date: Thu, 13 Jul 2017 13:12:09 +0200 Subject: [PATCH 25/28] bug fixed filter in clients --- client/core/src/datePicker/datePicker.js | 4 ++-- .../salix/src/components/searchbar/searchbar.js | 10 +++++++--- services/client/common/methods/client/filter.js | 15 +++++++++------ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index bb40201d54..5a5d3dc20e 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -25,7 +25,7 @@ class DatePicker extends Component { this.$filter = $filter; this.$timeout = $timeout; this.enabled = true; - this._modelView = ''; + this._modelView = null; this._model = undefined; componentHandler.upgradeElement($element[0].firstChild); @@ -70,7 +70,7 @@ class DatePicker extends Component { parts.push(fromatEquivalence[val]); } ); - if (string.indexOf(' ') !== -1) { // datetime format + if (string.indexOf(' ') !== -1 || string.indexOf('T') !== -1) { // datetime format let dates = parts.slice(0, 3).join('-'); let hours = parts.slice(3, parts.length).join(':'); return `${dates} ${hours}`.trim(); diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js index eb5f45839f..769fdbd732 100644 --- a/client/salix/src/components/searchbar/searchbar.js +++ b/client/salix/src/components/searchbar/searchbar.js @@ -10,17 +10,17 @@ export default class Controller { this.$window = $window; } onClick(event) { - var child = this.vnPopover.showComponent(this.popover, this.$scope, this.element); + this.child = this.vnPopover.showComponent(this.popover, this.$scope, this.element); // XXX: ¿Existe una forma más adecuada de acceder al controlador de un componente? - var childCtrl = angular.element(child).isolateScope().$ctrl; + var childCtrl = angular.element(this.child).isolateScope().$ctrl; childCtrl.filter = Object.assign({}, this.index.filter); childCtrl.onSubmit = filter => this.onChildSubmit(filter); event.preventDefault(); } onChildSubmit(filter) { - this.vnPopover.hide(); + // this.vnPopover.hide(); Object.assign(this.index.filter, filter); this.onSubmit(); } @@ -28,6 +28,10 @@ export default class Controller { onSubmit() { if (this.onSearch) this.onSearch(); + + angular.element(this.child).scope().$destroy(); + angular.element(this.child).remove(); + delete this.child; } $onDestroy() { this.$window.sessionStorage.removeItem('filter'); diff --git a/services/client/common/methods/client/filter.js b/services/client/common/methods/client/filter.js index 786c01ca9b..72defd4217 100644 --- a/services/client/common/methods/client/filter.js +++ b/services/client/common/methods/client/filter.js @@ -22,7 +22,7 @@ module.exports = function(Client){ } function andWhere(p){ - return { + let where = { where: { id: p.id, name: {regexp: p.name}, @@ -30,14 +30,17 @@ module.exports = function(Client){ socialName: {regexp: p.socialName}, city: {regexp: p.city}, postcode: p.postcode, - email: {regexp: p.email}, - or: [ - {phone: p.phone}, - {mobile: p.phone} - ] + email: {regexp: p.email} }, skip: (p.page - 1) * p.size, limit: p.size + }; + if(p.phone){ + where.or = [ + {phone: p.phone}, + {mobile: p.phone} + ] } + return where; } } \ No newline at end of file From 1fc059273f1cfa4043882912194c6fafd58006b0 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 13 Jul 2017 13:32:23 +0200 Subject: [PATCH 26/28] corregido error al destruir popover en searchBar --- client/salix/src/components/searchbar/searchbar.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js index 769fdbd732..5f3ad79be4 100644 --- a/client/salix/src/components/searchbar/searchbar.js +++ b/client/salix/src/components/searchbar/searchbar.js @@ -29,8 +29,11 @@ export default class Controller { if (this.onSearch) this.onSearch(); - angular.element(this.child).scope().$destroy(); - angular.element(this.child).remove(); + if (angular.element(this.child)) { + if (angular.element(this.child).scope()) + angular.element(this.child).scope().$destroy(); + angular.element(this.child).remove(); + } delete this.child; } $onDestroy() { From 45849e4daa6343a50db2a84348777a90b9c1a572 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 13 Jul 2017 13:49:45 +0200 Subject: [PATCH 27/28] =?UTF-8?q?corregido=20CAU=202594=20cambios=20en=20d?= =?UTF-8?q?atos=20de=20facturaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/billing-data/billing-data.js | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/client/client/src/billing-data/billing-data.js b/client/client/src/billing-data/billing-data.js index f45f22c1c4..e6e8fb9a48 100644 --- a/client/client/src/billing-data/billing-data.js +++ b/client/client/src/billing-data/billing-data.js @@ -7,8 +7,7 @@ export default class Controller { this.timeout = $timeout; this.vnApp = vnApp; this.translate = $translate; - this.payMethodFk = null; - this.dueDay = null; + this.billData = {}; this.copyData(); } $onChanges(changes) { @@ -16,8 +15,12 @@ export default class Controller { } copyData() { if (this.client) { - this.payMethodFk = this.client.payMethodFk || null; - this.dueDay = this.client.dueDay ? this.client.dueDay : null; + this.billData.payMethodFk = this.client.payMethodFk; + this.billData.iban = this.client.iban; + this.billData.dueDay = this.client.dueDay; + this.billData.discount = this.client.discount; + this.billData.credit = this.client.credit; + this.billData.creditInsurance = this.client.creditInsurance; } } submit() { @@ -25,10 +28,16 @@ export default class Controller { () => this.checkPaymentChanges()); } checkPaymentChanges() { - let payMethodFk = this.client.payMethodFk || null; - let dueDay = this.client.dueDay || null; - - if (this.payMethodFk !== payMethodFk || this.dueDay !== dueDay) + let equals = true; + Object.keys(this.billData).forEach( + val => { + if (this.billData[val] !== this.client[val]) { + this.billData[val] = this.client[val]; + equals = false; + } + } + ); + if (!equals) this.$.sendMail.show(); } returnDialog(response) { From 41182abb6ed9cf27ca56e4e769026f1013514892 Mon Sep 17 00:00:00 2001 From: Dani Herrero Date: Thu, 13 Jul 2017 14:55:07 +0200 Subject: [PATCH 28/28] =?UTF-8?q?cambio=20en=20watcher=20sustitucion=20de?= =?UTF-8?q?=20la=20funci=C3=B3n=20copy=20de=20Angular,=20para=20que=20igno?= =?UTF-8?q?re=20en=20las=20copias=20los=20campos=20vacios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/core/src/watcher/watcher.js | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/client/core/src/watcher/watcher.js b/client/core/src/watcher/watcher.js index c50ea94c39..086dc314b0 100644 --- a/client/core/src/watcher/watcher.js +++ b/client/core/src/watcher/watcher.js @@ -1,7 +1,7 @@ import {module} from '../module'; import Component from '../lib/component'; import getModifiedData from '../lib/modified'; -import copyObject from '../lib/copy'; +// import copyObject from '../lib/copy'; import isEqual from '../lib/equals'; /** @@ -116,7 +116,7 @@ export default class Watcher extends Component { }); } writeData(json, resolve) { - copyObject(json.data, this.data); + this.data = this.copyObject(json.data); this.copyData(); resolve(json); } @@ -133,8 +133,22 @@ export default class Watcher extends Component { resolve(); } copyData() { - this.orgData = copyObject(this.data); + this.orgData = this.copyObject(this.data); } + + copyObject(data) { + let copy = {}; + if (data) { + Object.keys(data).forEach( + val => { + if (data[val] !== "" && data[val] !== undefined && data[val] !== null) + copy[val] = data[val]; + } + ); + } + return copy; + } + callback(transition) { if (!this.state && this.dataChanged()) { this.state = transition.to().name; @@ -145,11 +159,12 @@ export default class Watcher extends Component { return true; } dataChanged() { - return !isEqual(this.data, this.orgData); + let newData = this.copyObject(this.data); + return !isEqual(newData, this.orgData); } onConfirmResponse(response) { if (response === 'ACCEPT') { - copyObject(this.orgData, this.data); + this.data = this.copyObject(this.orgData); this.$state.go(this.state); } else { this.state = null;