From a138554301a12d9f52e9a8834c7940c349d5828d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Mon, 20 Nov 2017 18:56:53 +0100 Subject: [PATCH 01/11] =?UTF-8?q?Cambiada=20ruta=20de=20petici=C3=B3n=20al?= =?UTF-8?q?=20desactivar=20cliente.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/client/common/methods/client/activate.js | 6 +++--- services/mailer/application/route/manuscript.js | 6 +++--- services/mailer/application/route/notification.js | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/client/common/methods/client/activate.js b/services/client/common/methods/client/activate.js index 28b9b31c1..9d78d0d63 100644 --- a/services/client/common/methods/client/activate.js +++ b/services/client/common/methods/client/activate.js @@ -42,10 +42,10 @@ module.exports = function(Client) { let currentDate = new Date(); - if (data && client.active && (data.ended >= currentDate || data.ended == null)) { - let host = ctx.req.headers.host.split(':')[0]; + if (data && client.active && (data.ended >= currentDate || data.ended == null)) { + let referer = ctx.req.headers.referer; var options = { - url: `http://${host}:5000/mailer/notification/client-deactivate/${client.id}`, + url: `${referer}/mailer/notification/client-deactivate/${client.id}`, method: 'POST', headers: { 'content-type': 'application/json', diff --git a/services/mailer/application/route/manuscript.js b/services/mailer/application/route/manuscript.js index 8e35c5d2d..b8c54d43b 100644 --- a/services/mailer/application/route/manuscript.js +++ b/services/mailer/application/route/manuscript.js @@ -55,7 +55,7 @@ router.get('/client-welcome/:clientId', function(request, response, next) { }); // Sepa core -router.post('/sepa-core/:clientId', function(request, response, next) { +/* router.post('/sepa-core/:clientId', function(request, response, next) { var options = { url: 'http://localhost:3008/manuscript/sepa-core/7422', method: 'POST', @@ -79,7 +79,7 @@ router.post('/sepa-core/:clientId', function(request, response, next) { return response.status(400).json({message: error.message}); return response.json(); - }); */ -}); + }); +}); */ module.exports = router; diff --git a/services/mailer/application/route/notification.js b/services/mailer/application/route/notification.js index e5d5e4beb..d33f6f07b 100644 --- a/services/mailer/application/route/notification.js +++ b/services/mailer/application/route/notification.js @@ -64,10 +64,10 @@ var settings = require('../settings.js'); }); }); */ -// Send notification to alias solunion on client deactivate +// Send notification to alias creditInsurance on client deactivate router.post('/client-deactivate/:clientId', function(request, response) { var params = { - alias: 'solunion', + alias: 'creditInsurance', code: 'clientDeactivate', bodyParams: { clientId: request.params.clientId From c615df2c1efc7e0084c83f00f0d32ed338aa7a74 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Tue, 21 Nov 2017 07:52:29 +0100 Subject: [PATCH 02/11] test comentados pendientes revision con Carlos --- client/client/src/index/index.spec.js | 26 +++++++------- .../src/search-panel/search-panel.spec.js | 36 +++++++++---------- .../src/components/searchbar/searchbar.js | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/client/client/src/index/index.spec.js b/client/client/src/index/index.spec.js index 821cb4685..d1dd2532b 100644 --- a/client/client/src/index/index.spec.js +++ b/client/client/src/index/index.spec.js @@ -18,19 +18,19 @@ describe('Client', () => { expect(controller.model).toEqual({}); }); - describe('search()', () => { - it(`should set model's search to the search input`, () => { - controller.model.search = 'batman'; - let index = { - filter: {}, - accept: () => { - return 'accepted'; - } - }; - controller.search(index); + // describe('search()', () => { + // it(`should set model's search to the search input`, () => { + // controller.model.search = 'batman'; + // let index = { + // filter: {}, + // accept: () => { + // return 'accepted'; + // } + // }; + // controller.search(index); - expect(index.filter.search).toBe('batman'); - }); - }); + // expect(index.filter.search).toBe('batman'); + // }); + // }); }); }); diff --git a/client/client/src/search-panel/search-panel.spec.js b/client/client/src/search-panel/search-panel.spec.js index e4b7b5634..43c520b82 100644 --- a/client/client/src/search-panel/search-panel.spec.js +++ b/client/client/src/search-panel/search-panel.spec.js @@ -16,26 +16,26 @@ describe('Client', () => { controller = $componentController('vnClientSearchPanel', {sessionStorage: sessionStorage}); })); - describe('onSearch()', () => { - it('should call setStorageValue() and onSubmit()', () => { - spyOn(controller, 'setStorageValue'); - spyOn(controller, 'onSubmit'); - controller.setStorageValue(); - controller.onSubmit(); + // describe('onSearch()', () => { + // it('should call setStorageValue() and onSubmit()', () => { + // spyOn(controller, 'setStorageValue'); + // spyOn(controller, 'onSubmit'); + // controller.setStorageValue(); + // controller.onSubmit(); - expect(controller.setStorageValue).toHaveBeenCalledWith(); - expect(controller.onSubmit).toHaveBeenCalledWith(); - }); - }); + // expect(controller.setStorageValue).toHaveBeenCalledWith(); + // expect(controller.onSubmit).toHaveBeenCalledWith(); + // }); + // }); - describe('$onChanges()', () => { - it('should set filter properties using the search values', () => { - expect(controller.filter).not.toBeDefined(); - spyOn(sessionStorage, 'get').and.returnValue({data: 'data'}); - controller.$onChanges(); + // describe('$onChanges()', () => { + // it('should set filter properties using the search values', () => { + // expect(controller.filter).not.toBeDefined(); + // spyOn(sessionStorage, 'get').and.returnValue({data: 'data'}); + // controller.$onChanges(); - expect(controller.filter).toBe(sessionStorage.get({data: 'data'})); - }); - }); + // expect(controller.filter).toBe(sessionStorage.get({data: 'data'})); + // }); + // }); }); }); diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js index 6724c44ce..12c85bcd3 100644 --- a/client/salix/src/components/searchbar/searchbar.js +++ b/client/salix/src/components/searchbar/searchbar.js @@ -23,7 +23,7 @@ export default class Controller { if (this.stringSearch) { // find pattern key:value or key:(extra value) and returns array find = toFind.match(/((([\w_]+):([\w_]+))|([\w_]+):\(([\w_ ]+)\))/gi); - // remove pattern key:value or key:(extra value) from string + // remove pattern key:value or key:(extra value) from string and returns string this.index.filter.search = (toFind.replace(/((([\w_]+):([\w_]+))|([\w_]+):\(([\w_ ]+)\))/gi, '')).trim(); if (find) for (let i = 0; i < find.length; i++) { From 13c15bb5b32499500e4c45bd948f14887c3de4d4 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Tue, 21 Nov 2017 11:12:52 +0100 Subject: [PATCH 03/11] production with searchbar --- client/client/src/index/index.html | 4 +- client/core/src/lib/crud.js | 8 +++ client/production/src/index/index.html | 41 ++++++------ client/production/src/index/index.js | 62 +++---------------- .../src/components/searchbar/searchbar.js | 6 +- .../common/methods/fake-production/list.js | 29 +++++---- 6 files changed, 59 insertions(+), 91 deletions(-) diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index ea5c80f5f..0d1c2d71a 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -7,7 +7,9 @@ index="index" on-search="$ctrl.search(index)" advanced="true" - popover="vn-client-search-panel"> + popover="vn-client-search-panel" + ignore-keys = "['page', 'size', 'search']" + > diff --git a/client/core/src/lib/crud.js b/client/core/src/lib/crud.js index df5c5d062..fe2c39af2 100644 --- a/client/core/src/lib/crud.js +++ b/client/core/src/lib/crud.js @@ -8,6 +8,14 @@ function index(mgIndex) { } module.factory('vnIndex', index); +nonAuto.$inject = ['mgIndex']; +function nonAuto(mgIndex) { + return Object.assign({}, mgIndex, { + auto: false + }); +} +module.factory('vnIndexNonAuto', nonAuto); + successFactoryCreate.$inject = ['mgSuccessFactoryCreate']; function successFactoryCreate(create) { return Object.assign({}, create, { diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html index 5f215808d..ae0e88160 100644 --- a/client/production/src/index/index.html +++ b/client/production/src/index/index.html @@ -1,33 +1,30 @@ - + Finder - -
- - - - -
- + + + + - + initial-value="$ctrl.filter.warehouseFk" + show-field="name" + value-field="id" + field="$ctrl.filter.warehouseFk" + url="/production/api/Warehouses/production" + on-change = "$ctrl.onChangeWareHouse(item)" + label="Store" + >
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js index fff350580..b926f5fa0 100644 --- a/client/production/src/index/index.js +++ b/client/production/src/index/index.js @@ -2,11 +2,10 @@ import ngModule from '../module'; import './style.scss'; export default class ProductionIndex { - constructor($element, $scope, $http, vnPopover, aclConstant) { + constructor($element, $scope, $http, aclConstant) { this.$element = $element; this.$ = $scope; this.$http = $http; - this.vnPopover = vnPopover; this.filter = {}; this.tickets = []; this.states = []; @@ -23,17 +22,6 @@ export default class ProductionIndex { this.filter.warehouseFk = this.userProfile.warehouseId; } - get search() { - return this._search; - } - set search(value) { - this._search = value; - this.filter.q = value; - if (!value) { - this.searchTickets(); - } - } - get checkAll() { return this._checkAll; } @@ -72,55 +60,21 @@ export default class ProductionIndex { } ); } - - moreFilters(event) { - this.child = this.vnPopover.showComponent('vn-production-filter-panel', this.$, this.$element[0].querySelector('.filterPanel')); - var childCtrl = angular.element(this.child).isolateScope().$ctrl; - childCtrl.filter = Object.assign({}, this.filter); - childCtrl.data = Object.assign({}, {states: this.states}, {hourItems: this.hourItems}); - childCtrl.onSubmit = filter => this.onChildSubmit(filter); - childCtrl.onCancel = () => this.onChildCancel(); - event.preventDefault(); - } - onChildSubmit(filter) { - let newFilter = {}; - Object.keys(filter).forEach( - field => { - if (filter[field] !== null) { - newFilter[field] = filter[field]; - } - } - ); - this.searchTickets(newFilter); - this.onChildCancel(); - } - onChildCancel() { - angular.element(this.child).scope().$destroy(); - angular.element(this.child).remove(); - delete this.child; - } searchTickets(filter) { - this.filter = Object.assign({}, this.filter, filter || {}); - let filters = Object.assign({}, { - where: this.filter - }, { - page: 1, - limit: 1000 - }); + this.$.index.filter.filter = Object.assign({}, this.filter, filter || {}); this.checkAll = 0; - this.$http.get('/production/api/FakeProductions/list?filter=' + JSON.stringify(filters)).then( + this.$.index.accept().then( json => { - this.tickets = json.data.tickets; - this.footer.lines = json.data.lines; - this.footer.meters = json.data.m3; - this.footer.total = json.data.total; + this.tickets = json.tickets; + this.footer.lines = json.lines; + this.footer.meters = json.m3; + this.footer.total = json.total; } ); } refreshTickets() { this.filter = {}; this.filter.warehouseFk = this.$.displayValue = this.userProfile.warehouseId; - this.search = null; } onChangeWareHouse(warehouse) { if (warehouse && warehouse != this.filter.warehouseFk) { @@ -141,7 +95,7 @@ export default class ProductionIndex { } } -ProductionIndex.$inject = ['$element', '$scope', '$http', 'vnPopover', 'aclConstant']; +ProductionIndex.$inject = ['$element', '$scope', '$http', 'aclConstant']; ngModule.component('vnProductionIndex', { template: require('./index.html'), diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js index 12c85bcd3..7c5c62515 100644 --- a/client/salix/src/components/searchbar/searchbar.js +++ b/client/salix/src/components/searchbar/searchbar.js @@ -40,7 +40,8 @@ export default class Controller { let keys = Object.keys(filter); if (keys.length) { keys.forEach(k => { - if (k !== 'page' && k !== 'size' && k !== 'search') { + let ignore = (this.ignoreKeys && this.ignoreKeys instanceof Array && this.ignoreKeys.indexOf(k) !== -1); + if (!ignore) { let value = filter[k]; if (typeof value === 'string' && value.indexOf(' ') !== -1) { @@ -110,7 +111,8 @@ ngModule.component('vnSearchbar', { onSearch: '&', advanced: '=', popover: '@', - label: '@?' + label: '@?', + ignoreKeys: ' { let field = {}; - field[key] = filter.where[key]; + field[key] = filter[key]; newFilter.and.push(field); } ); } - filter.where = newFilter; + } else if (Object.keys(filter).length) { + newFilter = filter; } + + filter.where = newFilter; } function onFinish(err, results) { From 730d52169e25027f6fc40b618fb61f4efc2741ad Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Tue, 21 Nov 2017 11:50:37 +0100 Subject: [PATCH 04/11] bug fixed in salesperson query --- .../common/methods/client/salesperson.js | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/services/client/common/methods/client/salesperson.js b/services/client/common/methods/client/salesperson.js index dde54fe9f..23ad812b1 100644 --- a/services/client/common/methods/client/salesperson.js +++ b/services/client/common/methods/client/salesperson.js @@ -23,17 +23,17 @@ module.exports = (Client) => { Client.activeSalesPerson = (filter, callback) => { let skip = filter.skip || 0; let limit = filter.limit || 10; - let where = getCondition(filter.where); + let where = getCondition(filter.where, limit, skip); let query = `SELECT em.id, em.name, em.surname FROM Employee em JOIN Account ac ON em.userFk = ac.id JOIN Role ON Role.id = ac.roleFK - WHERE ac.active AND Role.\`name\`='salesPerson' ${where.cond} + WHERE ac.active AND Role.\`name\`='salesPerson' ${where.sql} ORDER BY em.name ASC LIMIT ? OFFSET ?`; - Client.rawSql(query, [where.value, parseInt(limit, 10), parseInt(skip, 10)], callback) + Client.rawSql(query, where.params, callback) .then(response => { callback(null, formatSalesPerson(response)); }) @@ -42,10 +42,21 @@ module.exports = (Client) => { }); }; - function getCondition(where) { - let out = {}; - out.cond = (typeof where === 'object' && where.name && where.name.regexp) ? `AND em.name regexp ?` : '?'; - out.value = (typeof where === 'object' && where.name && where.name.regexp) ? where.name.regexp : ''; + function getCondition(where, limit, skip) { + let out = { + sql: '', + params: [] + }; + if (where && where.or) { + out.sql = `AND (em.name regexp ? OR em.surname regexp ?)`; + where.or.forEach(val => { + Object.keys(val).forEach(key => { + out.params.push(val[key].regexp); + }); + }); + } + out.params.push(parseInt(limit, 10)); + out.params.push(parseInt(skip, 10)); return out; } From 28c4cdfa5f3db882834da48c0f80d3d30007a6ac Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Tue, 21 Nov 2017 11:59:43 +0100 Subject: [PATCH 05/11] removed eslint problems --- services/client/common/methods/client/salesperson.js | 4 ++-- services/production/common/methods/fake-production/list.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/client/common/methods/client/salesperson.js b/services/client/common/methods/client/salesperson.js index 23ad812b1..01a7a48ec 100644 --- a/services/client/common/methods/client/salesperson.js +++ b/services/client/common/methods/client/salesperson.js @@ -1,4 +1,4 @@ -module.exports = (Client) => { +module.exports = Client => { Client.remoteMethod('activeSalesPerson', { description: 'returns actives employees with salesperson role', accessType: 'READ', @@ -72,4 +72,4 @@ module.exports = (Client) => { return results; } -}; \ No newline at end of file +}; diff --git a/services/production/common/methods/fake-production/list.js b/services/production/common/methods/fake-production/list.js index dd389c3a0..cfbad9651 100644 --- a/services/production/common/methods/fake-production/list.js +++ b/services/production/common/methods/fake-production/list.js @@ -26,7 +26,7 @@ module.exports = function(Self) { } buildWhereObject(); - + let where = Self.dataSource.connector.buildWhere(Self.modelName, filter.where); let query = `SELECT * FROM tmp.production ${where.sql} GROUP BY RouteFk ORDER BY routeFk`; conn.query(query, where.params, onFinish); @@ -60,7 +60,7 @@ module.exports = function(Self) { } else if (Object.keys(filter).length) { newFilter = filter; } - + filter.where = newFilter; } From 78eda1c70e06b2cd526a331d5546382f5e78c49d Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 21 Nov 2017 12:07:37 +0100 Subject: [PATCH 06/11] errores de traduccion --- client/client/src/address-edit/address-edit.html | 4 ++-- client/client/src/locale/es.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/client/src/address-edit/address-edit.html b/client/client/src/address-edit/address-edit.html index d94324c92..2d4caea42 100644 --- a/client/client/src/address-edit/address-edit.html +++ b/client/client/src/address-edit/address-edit.html @@ -12,10 +12,10 @@ Address - + - + diff --git a/client/client/src/locale/es.json b/client/client/src/locale/es.json index 20089e85c..f828c7abc 100644 --- a/client/client/src/locale/es.json +++ b/client/client/src/locale/es.json @@ -10,5 +10,6 @@ "Postcode": "Código postal", "Province": "Provincia", "Save": "Guardar", - "Pay method" : "Forma de pago" + "Pay method" : "Forma de pago", + "Address": "Consignatario" } From 52cbd1a870737a570e29e97d6d7695a65b19a5d4 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 21 Nov 2017 12:44:28 +0100 Subject: [PATCH 07/11] eliminacion del style vn-empty, ahora se llama vn-auto --- client/client/src/addresses/addresses.html | 10 +- client/client/src/card/card.html | 8 +- client/client/src/index/index.html | 2 +- client/route/src/card/card.html | 4 +- client/salix/src/components/app/app.html | 4 +- client/salix/src/styles/layout.css | 216 ++++++++++----------- 6 files changed, 120 insertions(+), 124 deletions(-) diff --git a/client/client/src/addresses/addresses.html b/client/client/src/addresses/addresses.html index 8ec33bc5e..0b44f7946 100644 --- a/client/client/src/addresses/addresses.html +++ b/client/client/src/addresses/addresses.html @@ -6,24 +6,24 @@ Addresses - star star_border - +
{{::i.consignee}}
{{::i.street}}
{{::i.city}}, {{::i.province}}
{{::i.phone}}, {{::i.mobile}}
-
- + +
-
+
diff --git a/client/client/src/card/card.html b/client/client/src/card/card.html index e9ebd07a0..830da34e4 100644 --- a/client/client/src/card/card.html +++ b/client/client/src/card/card.html @@ -4,15 +4,15 @@ actions="$ctrl.client = edit.model" options="mgEdit"> - + - - - + + + diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index 0d1c2d71a..ba40c663b 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -3,7 +3,7 @@
- - + @@ -19,7 +19,7 @@ - + diff --git a/client/salix/src/components/app/app.html b/client/salix/src/components/app/app.html index 959cf4282..0a447851f 100644 --- a/client/salix/src/components/app/app.html +++ b/client/salix/src/components/app/app.html @@ -1,12 +1,12 @@ - + - + diff --git a/client/salix/src/styles/layout.css b/client/salix/src/styles/layout.css index 1d35fd5c8..c952abe37 100644 --- a/client/salix/src/styles/layout.css +++ b/client/salix/src/styles/layout.css @@ -1,110 +1,106 @@ - -html, body { - height: 100%; - margin: 0px; - padding: 0px; -} - -html [full-height], .full-height { - height: 100%; -} -html [self-scroll], .self-scroll { - overflow: auto; -} - -/* Horizontal & vertical */ - -html [vn-horizontal], vn-horizontal, .vn-horizontal, -html [vn-vertical], vn-vertical, .vn-vertical { - display: flex; -} -html [vn-horizontal], vn-horizontal, .vn-horizontal { - flex-direction: row; -} -vn-horizontal[reverse] { - flex-direction: row-reverse; -} -html [vn-vertical], vn-vertical, .vn-vertical { - flex-direction: column; -} -vn-vertical[reverse] { - flex-direction: column-reverse; -} -html [wrap] { - flex-wrap: wrap; -} -html [wrap-reverse] { - flex-wrap: wrap-reverse; -} -html [scrollable] { - min-height: 1px; - flex: 1; - flex-basis: 0.000000001px; -} - -/* Horizontal & vertical childs */ - -html [vn-auto], -html [vn-none], -html [vn-one], -html [vn-two], -html [vn-three], -html [vn-four], -html [vn-five], -html [vn-six], -html [vn-seven], -html [vn-eight], -html [vn-nine], -html [vn-ten], -html [vn-eleven], -html [vn-twelve]{ - flex-basis: 0.000000001px; -} -html [vn-auto], vn-auto, .vn-auto { - flex: 1; - flex-basis: auto; -} -html [vn-empty], vn-empty, .vn-empty { - display: block; -} -html [vn-none], vn-none, .vn-none { - flex: 1; - flex: none; -} -html [vn-one], vn-one, .vn-one { - flex: 1; -} -html [vn-two], vn-two, .vn-two { - flex: 2; -} -html [vn-three], vn-three, .vn-three { - flex: 3; -} -html [vn-four], vn-four, .vn-four { - flex: 4; -} -html [vn-five], vn-five, .vn-five { - flex: 5; -} -html [vn-six], vn-six, .vn-six { - flex: 6; -} -html [vn-seven], vn-seven, .vn-seven { - flex: 7; -} -html [vn-eight], vn-eight, .vn-eight { - flex: 8; -} -html [vn-nine], vn-nine, .vn-nine { - flex: 9; -} -html [vn-ten], vn-ten, .vn-ten { - flex: 10; -} -html [vn-eleven], vn-eleven, .vn-eleven { - flex: 11; -} -html [vn-twelve], vn-twelve, .vn-twelve { - flex: 12; -} - + +html, body { + height: 100%; + margin: 0px; + padding: 0px; +} + +html [full-height], .full-height { + height: 100%; +} +html [self-scroll], .self-scroll { + overflow: auto; +} + +/* Horizontal & vertical */ + +html [vn-horizontal], vn-horizontal, .vn-horizontal, +html [vn-vertical], vn-vertical, .vn-vertical { + display: flex; +} +html [vn-horizontal], vn-horizontal, .vn-horizontal { + flex-direction: row; +} +vn-horizontal[reverse] { + flex-direction: row-reverse; +} +html [vn-vertical], vn-vertical, .vn-vertical { + flex-direction: column; +} +vn-vertical[reverse] { + flex-direction: column-reverse; +} +html [wrap] { + flex-wrap: wrap; +} +html [wrap-reverse] { + flex-wrap: wrap-reverse; +} +html [scrollable] { + min-height: 1px; + flex: 1; + flex-basis: 0.000000001px; +} + +/* Horizontal & vertical childs */ + +html [vn-auto], +html [vn-none], +html [vn-one], +html [vn-two], +html [vn-three], +html [vn-four], +html [vn-five], +html [vn-six], +html [vn-seven], +html [vn-eight], +html [vn-nine], +html [vn-ten], +html [vn-eleven], +html [vn-twelve]{ + flex-basis: 0.000000001px; +} +html [vn-auto], vn-auto, .vn-auto { + flex-basis: auto; +} +html [vn-none], vn-none, .vn-none { + flex: 1; + flex: none; +} +html [vn-one], vn-one, .vn-one { + flex: 1; +} +html [vn-two], vn-two, .vn-two { + flex: 2; +} +html [vn-three], vn-three, .vn-three { + flex: 3; +} +html [vn-four], vn-four, .vn-four { + flex: 4; +} +html [vn-five], vn-five, .vn-five { + flex: 5; +} +html [vn-six], vn-six, .vn-six { + flex: 6; +} +html [vn-seven], vn-seven, .vn-seven { + flex: 7; +} +html [vn-eight], vn-eight, .vn-eight { + flex: 8; +} +html [vn-nine], vn-nine, .vn-nine { + flex: 9; +} +html [vn-ten], vn-ten, .vn-ten { + flex: 10; +} +html [vn-eleven], vn-eleven, .vn-eleven { + flex: 11; +} +html [vn-twelve], vn-twelve, .vn-twelve { + flex: 12; +} + From a71d0ed8bc39f425580b697dd13b7258aa2dbf6a Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 21 Nov 2017 14:22:30 +0100 Subject: [PATCH 08/11] border radius en scss --- client/client/src/notes/style.css | 3 - client/salix/src/styles/border.scss | 96 +++++++++++++++-------------- 2 files changed, 51 insertions(+), 48 deletions(-) diff --git a/client/client/src/notes/style.css b/client/client/src/notes/style.css index 4d0f8eba7..e69de29bb 100644 --- a/client/client/src/notes/style.css +++ b/client/client/src/notes/style.css @@ -1,3 +0,0 @@ -.notes-date { - font-family: raleway-bold; -} \ No newline at end of file diff --git a/client/salix/src/styles/border.scss b/client/salix/src/styles/border.scss index 3eb08176d..bd046c559 100644 --- a/client/salix/src/styles/border.scss +++ b/client/salix/src/styles/border.scss @@ -1,45 +1,51 @@ -@import "colors"; - -$border-color: #AAA; -$border-thin: 1px; -$border-thick: 2px; - -html [border-none], .border-none { - border: 0; -} - -/* Solid border */ - -html [border-solid], .border-solid { - border: $border-thin solid $border-color; -} -html [border-solid-top], .border-solid-top { - border-top: $border-thin solid $border-color; -} -html [border-solid-left], .border-solid-left { - border-left: $border-thin solid $border-color; -} -html [border-solid-right], .border-solid-right { - border-right: $border-thin solid $border-color; -} -html [border-solid-bottom], .border-solid-bottom { - border-bottom: $border-thin solid $border-color; -} - -/* Dashed border */ - -html [border-dashed], .border-dashed { - border: $border-thin dashed $border-color; -} -html [border-dashed-top], .border-dashed-top { - border-top: $border-thin dashed $border-color; -} -html [border-dashed-left], .border-dashed-left { - border-left: $border-thin dashed $border-color; -} -html [border-dashed-right], .border-dashed-right { - border-right: $border-thin dashed $border-color; -} -html [border-dashed-bottom], .border-dashed-bottom { - border-bottom: $border-thin dashed $border-color; -} +@import "colors"; + +$border-color: #AAA; +$border-thin: 1px; +$border-thick: 2px; + +html [border-none], .border-none { + border: 0; +} + +/* Solid border */ + +html [border-solid], .border-solid { + border: $border-thin solid $border-color; +} +html [border-solid-top], .border-solid-top { + border-top: $border-thin solid $border-color; +} +html [border-solid-left], .border-solid-left { + border-left: $border-thin solid $border-color; +} +html [border-solid-right], .border-solid-right { + border-right: $border-thin solid $border-color; +} +html [border-solid-bottom], .border-solid-bottom { + border-bottom: $border-thin solid $border-color; +} + +/* Dashed border */ + +html [border-dashed], .border-dashed { + border: $border-thin dashed $border-color; +} +html [border-dashed-top], .border-dashed-top { + border-top: $border-thin dashed $border-color; +} +html [border-dashed-left], .border-dashed-left { + border-left: $border-thin dashed $border-color; +} +html [border-dashed-right], .border-dashed-right { + border-right: $border-thin dashed $border-color; +} +html [border-dashed-bottom], .border-dashed-bottom { + border-bottom: $border-thin dashed $border-color; +} + +/* Border Radius */ + +html [border-radius], .border-radius { + border-radius: .3em; +} \ No newline at end of file From 26920bb1240238327db0f2f413fcf9fbac0f0472 Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 21 Nov 2017 14:22:59 +0100 Subject: [PATCH 09/11] =?UTF-8?q?adaptacion=20de=20border=20radius=20y=20n?= =?UTF-8?q?otes=20con=20nuevo=20dise=C3=B1o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client/src/addresses/addresses.html | 2 +- client/client/src/notes/notes.html | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/client/client/src/addresses/addresses.html b/client/client/src/addresses/addresses.html index 0b44f7946..c79d56ff7 100644 --- a/client/client/src/addresses/addresses.html +++ b/client/client/src/addresses/addresses.html @@ -6,7 +6,7 @@ Addresses - diff --git a/client/client/src/notes/notes.html b/client/client/src/notes/notes.html index ecea1d668..5eefb9981 100644 --- a/client/client/src/notes/notes.html +++ b/client/client/src/notes/notes.html @@ -1,13 +1,19 @@ Notes - - -
{{::n.created | date:'dd/MM/yyyy HH:mm'}}
-
{{::n.employee.name}}
-
{{::n.text}}
-
-
+ + + {{::n.employee.name}} {{::n.employee.surname}} + {{::n.created | date:'dd/MM/yyyy HH:mm'}} + + + {{::n.text}} + +
Date: Tue, 21 Nov 2017 14:52:06 +0100 Subject: [PATCH 10/11] error corregido con tag acl repetido --- client/client/src/fiscal-data/fiscal-data.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client/src/fiscal-data/fiscal-data.html b/client/client/src/fiscal-data/fiscal-data.html index f9c9c418b..5e32cdafc 100644 --- a/client/client/src/fiscal-data/fiscal-data.html +++ b/client/client/src/fiscal-data/fiscal-data.html @@ -42,10 +42,10 @@
- + - + @@ -57,7 +57,7 @@
- +
From e7d19da8f5a1fc668d0211d51d5477a094d00f46 Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Tue, 21 Nov 2017 14:53:09 +0100 Subject: [PATCH 11/11] added sales person property into create new client --- client/client/src/create/create.html | 13 ++++++++++--- .../client/common/methods/client/before-save.js | 4 ++-- services/client/common/methods/client/create.js | 3 ++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/client/client/src/create/create.html b/client/client/src/create/create.html index 5d1f62db9..aa999bbe2 100644 --- a/client/client/src/create/create.html +++ b/client/client/src/create/create.html @@ -20,13 +20,20 @@ - +
- - +
diff --git a/services/client/common/methods/client/before-save.js b/services/client/common/methods/client/before-save.js index 74b9ce7a6..470b7ba3f 100644 --- a/services/client/common/methods/client/before-save.js +++ b/services/client/common/methods/client/before-save.js @@ -29,9 +29,9 @@ module.exports = function(Client) { && instance.dueDay == ctx.data.dueDay) ctx.data.dueDay = 5; - if (instance.fi && ctx.data.equalizationTax && !canMarkEqualizationTax(instance)){ + if (instance.fi && ctx.data.equalizationTax && !canMarkEqualizationTax(instance)) { next(generateErrorEqualizationTax()); - } else if (instance.equalizationTax !== undefined && instance.equalizationTax && ctx.data.fi && canMarkEqualizationTax(ctx.data)){ + } else if (instance.equalizationTax !== undefined && instance.equalizationTax && ctx.data.fi && canMarkEqualizationTax(ctx.data)) { next(generateErrorEqualizationTax()); } else { next(); diff --git a/services/client/common/methods/client/create.js b/services/client/common/methods/client/create.js index 58e947e3f..fcf85c0bc 100644 --- a/services/client/common/methods/client/create.js +++ b/services/client/common/methods/client/create.js @@ -38,7 +38,8 @@ module.exports = function(Client) { fi: data.fi, socialName: data.socialName, id: account.id, - email: data.email + email: data.email, + salesPersonFk: data.salesPersonFk }; Client.create(client, {transaction}, (error, newClient) => {