From 40ac2f18fc408bba560406b1a91961f38ca6e79a Mon Sep 17 00:00:00 2001 From: Joan Date: Tue, 4 Dec 2018 13:18:27 +0100 Subject: [PATCH 01/22] Zone detail structure #898 --- client/agency/routes.json | 15 +----- .../src/{zone => }/basic-data/index.html | 0 .../agency/src/{zone => }/basic-data/index.js | 3 +- .../agency/src/{zone => }/calendar/index.html | 0 .../agency/src/{zone => }/calendar/index.js | 5 +- client/agency/src/card/index.html | 13 +++++ client/agency/src/{zone => }/card/index.js | 2 +- .../agency/src/{zone => }/card/index.spec.js | 0 .../agency/src/{zone => }/create/index.html | 0 client/agency/src/{zone => }/create/index.js | 2 +- .../src/{zone => }/create/index.spec.js | 0 .../src/{zone => }/create/locale/es.yml | 0 client/agency/src/descriptor/index.html | 48 +++++++++++++++++++ client/agency/src/descriptor/index.js | 18 +++++++ client/agency/src/index.js | 18 +++---- client/agency/src/{zone => }/index/index.html | 7 --- client/agency/src/{zone => }/index/index.js | 2 +- .../agency/src/{zone => }/index/index.spec.js | 0 client/agency/src/locale/es.yml | 1 + .../index.html | 0 .../agency/src/location-search-panel/index.js | 7 +++ client/agency/src/location/index.html | 18 +++++++ .../{zone/delivery-day => location}/index.js | 5 +- client/agency/src/search-panel/index.html | 40 ++++++++++++++++ .../src/{zone => }/search-panel/index.js | 2 +- .../agency/src/{zone => }/summary/index.html | 0 client/agency/src/{zone => }/summary/index.js | 2 +- client/agency/src/zone/card/index.html | 11 ----- .../agency/src/zone/delivery-day/index.html | 19 -------- client/agency/src/zone/descriptor/index.html | 34 ------------- client/agency/src/zone/descriptor/index.js | 8 ---- client/agency/src/zone/summary/index.spec.js | 42 ---------------- client/agency/src/zone/summary/locale/es.yml | 2 - client/claim/src/action/index.html | 1 + .../core/src/components/icon-menu/style.scss | 6 ++- .../changes/1.0-OnlyLocal/07-fieldAcl.sql | 3 +- 36 files changed, 171 insertions(+), 163 deletions(-) rename client/agency/src/{zone => }/basic-data/index.html (100%) rename client/agency/src/{zone => }/basic-data/index.js (92%) rename client/agency/src/{zone => }/calendar/index.html (100%) rename client/agency/src/{zone => }/calendar/index.js (83%) create mode 100644 client/agency/src/card/index.html rename client/agency/src/{zone => }/card/index.js (95%) rename client/agency/src/{zone => }/card/index.spec.js (100%) rename client/agency/src/{zone => }/create/index.html (100%) rename client/agency/src/{zone => }/create/index.js (94%) rename client/agency/src/{zone => }/create/index.spec.js (100%) rename client/agency/src/{zone => }/create/locale/es.yml (100%) create mode 100644 client/agency/src/descriptor/index.html create mode 100644 client/agency/src/descriptor/index.js rename client/agency/src/{zone => }/index/index.html (93%) rename client/agency/src/{zone => }/index/index.js (96%) rename client/agency/src/{zone => }/index/index.spec.js (100%) rename client/agency/src/{zone/search-panel => location-search-panel}/index.html (100%) create mode 100644 client/agency/src/location-search-panel/index.js create mode 100644 client/agency/src/location/index.html rename client/agency/src/{zone/delivery-day => location}/index.js (77%) create mode 100644 client/agency/src/search-panel/index.html rename client/agency/src/{zone => }/search-panel/index.js (83%) rename client/agency/src/{zone => }/summary/index.html (100%) rename client/agency/src/{zone => }/summary/index.js (94%) delete mode 100644 client/agency/src/zone/card/index.html delete mode 100644 client/agency/src/zone/delivery-day/index.html delete mode 100644 client/agency/src/zone/descriptor/index.html delete mode 100644 client/agency/src/zone/descriptor/index.js delete mode 100644 client/agency/src/zone/summary/index.spec.js delete mode 100644 client/agency/src/zone/summary/locale/es.yml diff --git a/client/agency/routes.json b/client/agency/routes.json index 2a54e1e7c..7d33dddb9 100644 --- a/client/agency/routes.json +++ b/client/agency/routes.json @@ -27,18 +27,8 @@ { "url": "/:id", "state": "zone.card", - "abstract": true, "component": "vn-zone-card" }, - { - "url" : "/summary", - "state": "zone.card.summary", - "component": "vn-zone-summary", - "description": "Summary", - "params": { - "zone": "$ctrl.zone" - } - }, { "url": "/basic-data", "state": "zone.card.basicData", @@ -64,8 +54,5 @@ } } ], - "menu": [ - {"state": "zone.card.basicData", "icon": "settings"}, - {"state": "zone.card.deliveryDay", "icon": "today"} - ] + "menu": [] } \ No newline at end of file diff --git a/client/agency/src/zone/basic-data/index.html b/client/agency/src/basic-data/index.html similarity index 100% rename from client/agency/src/zone/basic-data/index.html rename to client/agency/src/basic-data/index.html diff --git a/client/agency/src/zone/basic-data/index.js b/client/agency/src/basic-data/index.js similarity index 92% rename from client/agency/src/zone/basic-data/index.js rename to client/agency/src/basic-data/index.js index b19194084..cad11e285 100644 --- a/client/agency/src/zone/basic-data/index.js +++ b/client/agency/src/basic-data/index.js @@ -1,7 +1,6 @@ -import ngModule from '../../module'; +import ngModule from '../module'; class Controller { - constructor($scope) { this.$scope = $scope; } diff --git a/client/agency/src/zone/calendar/index.html b/client/agency/src/calendar/index.html similarity index 100% rename from client/agency/src/zone/calendar/index.html rename to client/agency/src/calendar/index.html diff --git a/client/agency/src/zone/calendar/index.js b/client/agency/src/calendar/index.js similarity index 83% rename from client/agency/src/zone/calendar/index.js rename to client/agency/src/calendar/index.js index 7d78b1126..02bfa86ee 100644 --- a/client/agency/src/zone/calendar/index.js +++ b/client/agency/src/calendar/index.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule from '../module'; class Controller { constructor($scope) { @@ -18,9 +18,6 @@ Controller.$inject = ['$scope']; ngModule.component('vnZoneCalendar', { template: require('./index.html'), controller: Controller, - require: { - catalog: '^vnZoneDeliveryDay' - }, bindings: { zone: '<' } diff --git a/client/agency/src/card/index.html b/client/agency/src/card/index.html new file mode 100644 index 000000000..f0cace121 --- /dev/null +++ b/client/agency/src/card/index.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/client/agency/src/zone/card/index.js b/client/agency/src/card/index.js similarity index 95% rename from client/agency/src/zone/card/index.js rename to client/agency/src/card/index.js index e26b0ca7a..270ab4c27 100644 --- a/client/agency/src/zone/card/index.js +++ b/client/agency/src/card/index.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule from '../module'; class Controller { constructor($http, $stateParams) { diff --git a/client/agency/src/zone/card/index.spec.js b/client/agency/src/card/index.spec.js similarity index 100% rename from client/agency/src/zone/card/index.spec.js rename to client/agency/src/card/index.spec.js diff --git a/client/agency/src/zone/create/index.html b/client/agency/src/create/index.html similarity index 100% rename from client/agency/src/zone/create/index.html rename to client/agency/src/create/index.html diff --git a/client/agency/src/zone/create/index.js b/client/agency/src/create/index.js similarity index 94% rename from client/agency/src/zone/create/index.js rename to client/agency/src/create/index.js index c0f8cf740..b9c2a3499 100644 --- a/client/agency/src/zone/create/index.js +++ b/client/agency/src/create/index.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule from '../module'; export default class Controller { constructor($scope, $state) { diff --git a/client/agency/src/zone/create/index.spec.js b/client/agency/src/create/index.spec.js similarity index 100% rename from client/agency/src/zone/create/index.spec.js rename to client/agency/src/create/index.spec.js diff --git a/client/agency/src/zone/create/locale/es.yml b/client/agency/src/create/locale/es.yml similarity index 100% rename from client/agency/src/zone/create/locale/es.yml rename to client/agency/src/create/locale/es.yml diff --git a/client/agency/src/descriptor/index.html b/client/agency/src/descriptor/index.html new file mode 100644 index 000000000..abd1e34f7 --- /dev/null +++ b/client/agency/src/descriptor/index.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/agency/src/descriptor/index.js b/client/agency/src/descriptor/index.js new file mode 100644 index 000000000..98dc4b0df --- /dev/null +++ b/client/agency/src/descriptor/index.js @@ -0,0 +1,18 @@ +import ngModule from '../module'; + +class Controller { + constructor() { + this.moreOptions = [ + {callback: this.showAddTurnDialog, name: 'Settings'}, + {callback: this.showDeleteTicketDialog, name: 'Delete'} + ]; + } +} + +ngModule.component('vnZoneDescriptor', { + template: require('./index.html'), + controller: Controller, + bindings: { + zone: '<' + } +}); diff --git a/client/agency/src/index.js b/client/agency/src/index.js index f85eaab5a..c8cd6a0e7 100644 --- a/client/agency/src/index.js +++ b/client/agency/src/index.js @@ -1,12 +1,12 @@ export * from './module'; // import components -import './zone/card'; -import './zone/descriptor'; -import './zone/search-panel'; -import './zone/index'; -import './zone/create'; -import './zone/summary'; -import './zone/basic-data'; -import './zone/delivery-day'; -import './zone/calendar'; +import './index/index'; +import './summary'; +import './card'; +import './descriptor'; +import './search-panel'; +import './create'; +import './basic-data'; +import './location'; +import './calendar'; diff --git a/client/agency/src/zone/index/index.html b/client/agency/src/index/index.html similarity index 93% rename from client/agency/src/zone/index/index.html rename to client/agency/src/index/index.html index 547dc528d..d58a9b457 100644 --- a/client/agency/src/zone/index/index.html +++ b/client/agency/src/index/index.html @@ -58,13 +58,6 @@ - - - - - - \ No newline at end of file diff --git a/client/agency/src/zone/index/index.js b/client/agency/src/index/index.js similarity index 96% rename from client/agency/src/zone/index/index.js rename to client/agency/src/index/index.js index 578eefeae..ed3442871 100644 --- a/client/agency/src/zone/index/index.js +++ b/client/agency/src/index/index.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule from '../module'; export default class Controller { constructor($scope) { diff --git a/client/agency/src/zone/index/index.spec.js b/client/agency/src/index/index.spec.js similarity index 100% rename from client/agency/src/zone/index/index.spec.js rename to client/agency/src/index/index.spec.js diff --git a/client/agency/src/locale/es.yml b/client/agency/src/locale/es.yml index 91952e255..40deb104d 100644 --- a/client/agency/src/locale/es.yml +++ b/client/agency/src/locale/es.yml @@ -4,6 +4,7 @@ Warehouse: Almacén Hour: Hora (ETD) Price: Precio Create: Crear +Enter a new search: Introduce una nueva búsqueda Zones: Zonas List: Listado diff --git a/client/agency/src/zone/search-panel/index.html b/client/agency/src/location-search-panel/index.html similarity index 100% rename from client/agency/src/zone/search-panel/index.html rename to client/agency/src/location-search-panel/index.html diff --git a/client/agency/src/location-search-panel/index.js b/client/agency/src/location-search-panel/index.js new file mode 100644 index 000000000..4d362e638 --- /dev/null +++ b/client/agency/src/location-search-panel/index.js @@ -0,0 +1,7 @@ +import ngModule from '../module'; +import SearchPanel from 'core/src/components/searchbar/search-panel'; + +ngModule.component('vnLocationSearchPanel', { + template: require('./index.html'), + controller: SearchPanel +}); diff --git a/client/agency/src/location/index.html b/client/agency/src/location/index.html new file mode 100644 index 000000000..bc028604b --- /dev/null +++ b/client/agency/src/location/index.html @@ -0,0 +1,18 @@ + + + + + + Delivery days + + + + + \ No newline at end of file diff --git a/client/agency/src/zone/delivery-day/index.js b/client/agency/src/location/index.js similarity index 77% rename from client/agency/src/zone/delivery-day/index.js rename to client/agency/src/location/index.js index 322220225..ded4b9868 100644 --- a/client/agency/src/zone/delivery-day/index.js +++ b/client/agency/src/location/index.js @@ -1,7 +1,6 @@ -import ngModule from '../../module'; +import ngModule from '../module'; class Controller { - constructor($scope) { this.$scope = $scope; } @@ -9,7 +8,7 @@ class Controller { Controller.$inject = ['$scope']; -ngModule.component('vnZoneDeliveryDay', { +ngModule.component('vnZoneLocation', { template: require('./index.html'), controller: Controller, bindings: { diff --git a/client/agency/src/search-panel/index.html b/client/agency/src/search-panel/index.html new file mode 100644 index 000000000..d3f06d8b3 --- /dev/null +++ b/client/agency/src/search-panel/index.html @@ -0,0 +1,40 @@ +
+
+ + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/client/agency/src/zone/search-panel/index.js b/client/agency/src/search-panel/index.js similarity index 83% rename from client/agency/src/zone/search-panel/index.js rename to client/agency/src/search-panel/index.js index 83591a016..3e00e284b 100644 --- a/client/agency/src/zone/search-panel/index.js +++ b/client/agency/src/search-panel/index.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule from '../module'; import SearchPanel from 'core/src/components/searchbar/search-panel'; ngModule.component('vnZoneSearchPanel', { diff --git a/client/agency/src/zone/summary/index.html b/client/agency/src/summary/index.html similarity index 100% rename from client/agency/src/zone/summary/index.html rename to client/agency/src/summary/index.html diff --git a/client/agency/src/zone/summary/index.js b/client/agency/src/summary/index.js similarity index 94% rename from client/agency/src/zone/summary/index.js rename to client/agency/src/summary/index.js index e7f3d54e7..55c46fe5f 100644 --- a/client/agency/src/zone/summary/index.js +++ b/client/agency/src/summary/index.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule from '../module'; class Controller { constructor($http) { diff --git a/client/agency/src/zone/card/index.html b/client/agency/src/zone/card/index.html deleted file mode 100644 index b2d4c0522..000000000 --- a/client/agency/src/zone/card/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/client/agency/src/zone/delivery-day/index.html b/client/agency/src/zone/delivery-day/index.html deleted file mode 100644 index 924a1511b..000000000 --- a/client/agency/src/zone/delivery-day/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - Delivery days - - - - - - - - - diff --git a/client/agency/src/zone/descriptor/index.html b/client/agency/src/zone/descriptor/index.html deleted file mode 100644 index c153161c8..000000000 --- a/client/agency/src/zone/descriptor/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - -
- - - - - - - - - - - - - - -
-
diff --git a/client/agency/src/zone/descriptor/index.js b/client/agency/src/zone/descriptor/index.js deleted file mode 100644 index b897c5c98..000000000 --- a/client/agency/src/zone/descriptor/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import ngModule from '../../module'; - -ngModule.component('vnZoneDescriptor', { - template: require('./index.html'), - bindings: { - zone: '<' - } -}); diff --git a/client/agency/src/zone/summary/index.spec.js b/client/agency/src/zone/summary/index.spec.js deleted file mode 100644 index 5a58d2a5c..000000000 --- a/client/agency/src/zone/summary/index.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import './index.js'; - -describe('Agency', () => { - describe('Component summary', () => { - let $componentController; - let controller; - let $httpBackend; - - beforeEach(() => { - angular.mock.module('agency'); - }); - - beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => { - $componentController = _$componentController_; - $httpBackend = _$httpBackend_; - $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({}); - controller = $componentController('vnZoneSummary'); - controller.zone = {id: 1}; - })); - - describe('getSummary()', () => { - it("should perform a query to set summary", () => { - let data = {name: 'Zone One', price: 0}; - $httpBackend.when('GET', `/agency/api/Zones/1`).respond(200, data); - $httpBackend.expect('GET', `/agency/api/Zones/1`); - controller.getSummary(); - $httpBackend.flush(); - - expect(controller.summary).toEqual(data); - }); - }); - - describe('setter zone()', () => { - it("should call getSummary and define summary property", () => { - spyOn(controller, 'getSummary'); - controller.zone = {id: 1}; - - expect(controller.getSummary).toHaveBeenCalledWith(); - }); - }); - }); -}); diff --git a/client/agency/src/zone/summary/locale/es.yml b/client/agency/src/zone/summary/locale/es.yml deleted file mode 100644 index 097319a33..000000000 --- a/client/agency/src/zone/summary/locale/es.yml +++ /dev/null @@ -1,2 +0,0 @@ -Niche: Nichos -Barcode: Códigos de barras \ No newline at end of file diff --git a/client/claim/src/action/index.html b/client/claim/src/action/index.html index fad1ad924..ea3caa63e 100644 --- a/client/claim/src/action/index.html +++ b/client/claim/src/action/index.html @@ -147,6 +147,7 @@ diff --git a/client/core/src/components/icon-menu/style.scss b/client/core/src/components/icon-menu/style.scss index 9695616e4..154196508 100644 --- a/client/core/src/components/icon-menu/style.scss +++ b/client/core/src/components/icon-menu/style.scss @@ -1,3 +1,5 @@ -vn-icon-menu{ - +vn-icon-menu { + vn-drop-down { + font-family: 'vn-font' + } } \ No newline at end of file diff --git a/services/db/install/changes/1.0-OnlyLocal/07-fieldAcl.sql b/services/db/install/changes/1.0-OnlyLocal/07-fieldAcl.sql index 052b33c34..0431b9cc7 100644 --- a/services/db/install/changes/1.0-OnlyLocal/07-fieldAcl.sql +++ b/services/db/install/changes/1.0-OnlyLocal/07-fieldAcl.sql @@ -80,4 +80,5 @@ INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission` INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('TicketWeekly', '*', '*', 'employee'); -INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Receipt', '*', '*', 'administrative'); \ No newline at end of file +INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Receipt', '*', '*', 'administrative'); +INSERT INTO salix.fieldAcl (model,property,actionType,`role`) VALUES ('Zone','*','*','agency'); From 508534d2fd62504eda98c55d6a9cf1ddd4fea2e7 Mon Sep 17 00:00:00 2001 From: Joan Date: Tue, 4 Dec 2018 14:38:56 +0100 Subject: [PATCH 02/22] agency descriptor update and remove zone --- client/agency/routes.json | 26 +++++++--------- client/agency/src/card/index.html | 4 +-- client/agency/src/descriptor/index.html | 28 ++++++++++------- client/agency/src/descriptor/index.js | 31 +++++++++++++++++-- .../src/{basic-data => edit}/index.html | 3 +- .../agency/src/{basic-data => edit}/index.js | 8 +++-- client/agency/src/index.js | 2 +- client/agency/src/index/index.html | 2 +- client/agency/src/locale/es.yml | 8 +++-- 9 files changed, 72 insertions(+), 40 deletions(-) rename client/agency/src/{basic-data => edit}/index.html (94%) rename client/agency/src/{basic-data => edit}/index.js (66%) diff --git a/client/agency/routes.json b/client/agency/routes.json index 7d33dddb9..b33c81fba 100644 --- a/client/agency/routes.json +++ b/client/agency/routes.json @@ -27,30 +27,26 @@ { "url": "/:id", "state": "zone.card", - "component": "vn-zone-card" + "component": "vn-zone-card", + "abstract": true, + "description": "Detail" }, { - "url": "/basic-data", - "state": "zone.card.basicData", - "component": "vn-zone-basic-data", - "description": "Basic data", + "url": "/location", + "state": "zone.card.location", + "component": "vn-zone-location", + "description": "Location", "params": { "zone": "$ctrl.zone" - }, - "menu": { - "icon": "settings" } }, { - "url": "/delivery-day", - "state": "zone.card.deliveryDay", - "component": "vn-zone-delivery-day", - "description": "Delivery days", + "url": "/edit", + "state": "zone.card.edit", + "component": "vn-zone-edit", + "description": "Edit zone", "params": { "zone": "$ctrl.zone" - }, - "menu": { - "icon": "today" } } ], diff --git a/client/agency/src/card/index.html b/client/agency/src/card/index.html index f0cace121..3b38cfc55 100644 --- a/client/agency/src/card/index.html +++ b/client/agency/src/card/index.html @@ -2,9 +2,7 @@ - - - + diff --git a/client/agency/src/descriptor/index.html b/client/agency/src/descriptor/index.html index abd1e34f7..011e3c2d9 100644 --- a/client/agency/src/descriptor/index.html +++ b/client/agency/src/descriptor/index.html @@ -11,38 +11,44 @@ value-field="callback" translate-fields="['name']" data="$ctrl.moreOptions" - on-change="$ctrl.onMoreChange(value)" - on-open="$ctrl.onMoreOpen()"> + on-change="$ctrl.onMoreChange(value)"> + value="{{::$ctrl.zone.id}}"> + value="{{::$ctrl.zone.name}}"> + value="{{::$ctrl.zone.warehouse.name}}"> + value="{{::$ctrl.zone.agencyMode.name}}"> + value="{{::$ctrl.zone.hour | date: 'HH:mm'}}"> - + value="{{::$ctrl.zone.travelingDays}}"> + + value="{{::$ctrl.zone.price | currency: '€': 2}}"> + value="{{::$ctrl.zone.price | currency: '€': 2}}"> + + + \ No newline at end of file diff --git a/client/agency/src/descriptor/index.js b/client/agency/src/descriptor/index.js index 98dc4b0df..b1a0523c7 100644 --- a/client/agency/src/descriptor/index.js +++ b/client/agency/src/descriptor/index.js @@ -1,14 +1,39 @@ import ngModule from '../module'; class Controller { - constructor() { + constructor($scope, $state, $http) { + this.$scope = $scope; + this.$state = $state; + this.$http = $http; this.moreOptions = [ - {callback: this.showAddTurnDialog, name: 'Settings'}, - {callback: this.showDeleteTicketDialog, name: 'Delete'} + {callback: this.editZone, name: 'Settings'}, + {callback: this.deleteZone, name: 'Delete'} ]; } + + onMoreChange(callback) { + callback.call(this); + } + + deleteZone() { + this.$scope.deleteZone.show(); + } + + editZone() { + this.$state.go('zone.card.edit', {zone: this.zone}); + } + + returnDialog(response) { + if (response === 'ACCEPT') { + this.$http.delete(`/agency/api/Zones/${this.zone.id}`).then(() => { + this.$state.go('zone.index'); + }); + } + } } +Controller.$inject = ['$scope', '$state', '$http']; + ngModule.component('vnZoneDescriptor', { template: require('./index.html'), controller: Controller, diff --git a/client/agency/src/basic-data/index.html b/client/agency/src/edit/index.html similarity index 94% rename from client/agency/src/basic-data/index.html rename to client/agency/src/edit/index.html index 4a2e03075..09cbc568d 100644 --- a/client/agency/src/basic-data/index.html +++ b/client/agency/src/edit/index.html @@ -7,7 +7,7 @@
- Basic data + Edit zone + diff --git a/client/agency/src/basic-data/index.js b/client/agency/src/edit/index.js similarity index 66% rename from client/agency/src/basic-data/index.js rename to client/agency/src/edit/index.js index cad11e285..3ff19fb1d 100644 --- a/client/agency/src/basic-data/index.js +++ b/client/agency/src/edit/index.js @@ -1,20 +1,22 @@ import ngModule from '../module'; class Controller { - constructor($scope) { + constructor($scope, $state) { this.$scope = $scope; + this.$state = $state; } onSubmit() { this.$scope.watcher.submit().then(() => { + this.$state.go('zone.card.location'); this.card.reload(); }); } } -Controller.$inject = ['$scope']; +Controller.$inject = ['$scope', '$state']; -ngModule.component('vnZoneBasicData', { +ngModule.component('vnZoneEdit', { template: require('./index.html'), controller: Controller, bindings: { diff --git a/client/agency/src/index.js b/client/agency/src/index.js index c8cd6a0e7..78336e6ee 100644 --- a/client/agency/src/index.js +++ b/client/agency/src/index.js @@ -7,6 +7,6 @@ import './card'; import './descriptor'; import './search-panel'; import './create'; -import './basic-data'; +import './edit'; import './location'; import './calendar'; diff --git a/client/agency/src/index/index.html b/client/agency/src/index/index.html index d58a9b457..a6b0e74e0 100644 --- a/client/agency/src/index/index.html +++ b/client/agency/src/index/index.html @@ -31,7 +31,7 @@ - + {{::zone.id}} {{::zone.name}} {{::zone.agencyMode.name}} diff --git a/client/agency/src/locale/es.yml b/client/agency/src/locale/es.yml index 40deb104d..58f0ef81e 100644 --- a/client/agency/src/locale/es.yml +++ b/client/agency/src/locale/es.yml @@ -4,11 +4,15 @@ Warehouse: Almacén Hour: Hora (ETD) Price: Precio Create: Crear +Delete: Eliminar +Settings: Ajustes +Delivery days: Días de envío Enter a new search: Introduce una nueva búsqueda +Delete zone: Eliminar zona +Are you sure you want to delete this zone?: ¿Estás seguro de querer eliminar esta zona? Zones: Zonas List: Listado Summary: Vista previa New zone: Nueva zona -Basic data: Datos básicos -Delivery days: Días de envío \ No newline at end of file +Edit zone: Editar zona \ No newline at end of file From 3d383b806adf6e1334a0f975cd2c44a398d7c36d Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 08:43:57 +0100 Subject: [PATCH 03/22] front tests fixed --- client/agency/src/create/index.spec.js | 2 +- client/order/src/card/index.js | 2 +- client/order/src/card/index.spec.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/agency/src/create/index.spec.js b/client/agency/src/create/index.spec.js index ca378e258..d380cfa47 100644 --- a/client/agency/src/create/index.spec.js +++ b/client/agency/src/create/index.spec.js @@ -1,5 +1,5 @@ import './index'; -import {watcher} from '../../../../helpers/watcherHelper'; +import {watcher} from '../../../helpers/watcherHelper'; describe('Agency', () => { describe('Component vnZoneCreate', () => { diff --git a/client/order/src/card/index.js b/client/order/src/card/index.js index f5c88f381..3b3e2524c 100644 --- a/client/order/src/card/index.js +++ b/client/order/src/card/index.js @@ -32,7 +32,7 @@ class Controller { let json = encodeURIComponent(JSON.stringify(this.filter)); let query = `/order/api/Orders/${this.$state.params.id}?filter=${json}`; this.$http.get(query).then(res => { - if (res.data) { + if (res.data && res.data.rows) { if (res.data.rows.length == 0) delete res.data.rows; this.order = res.data; diff --git a/client/order/src/card/index.spec.js b/client/order/src/card/index.spec.js index 3d843852a..0b9f791b2 100644 --- a/client/order/src/card/index.spec.js +++ b/client/order/src/card/index.spec.js @@ -26,11 +26,11 @@ describe('Order', () => { it(`should make a query, save the data in order and call get order if the response has data`, () => { spyOn(controller, 'getTotal'); let json = encodeURIComponent(JSON.stringify(controller.filter)); - $httpBackend.expectGET(`/order/api/Orders/${controller.$state.params.id}?filter=${json}`).respond({id: 1}); + $httpBackend.expectGET(`/order/api/Orders/${controller.$state.params.id}?filter=${json}`).respond({rows: [1, 2, 3]}); controller.getCard(); $httpBackend.flush(); - expect(controller.order).toEqual({id: 1}); + expect(controller.order).toEqual({rows: [1, 2, 3]}); expect(controller.getTotal).toHaveBeenCalledWith(); }); From f5b36c5d20d1d644c3a8894cb155e849b11b4bd0 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 09:31:32 +0100 Subject: [PATCH 04/22] back test fixed --- client/client/src/risk/index/index.html | 2 +- client/client/src/risk/index/locale/es.yml | 3 ++- services/db/install/dump/fixtures.sql | 3 +-- services/loopback/common/methods/order/specs/new.spec.js | 5 ++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/client/src/risk/index/index.html b/client/client/src/risk/index/index.html index 500a2f8b7..239f22ca4 100644 --- a/client/client/src/risk/index/index.html +++ b/client/client/src/risk/index/index.html @@ -48,7 +48,7 @@ Reference Bank Debit - Credit + Havings Balance Conciliated diff --git a/client/client/src/risk/index/locale/es.yml b/client/client/src/risk/index/locale/es.yml index 78af91b1a..f0eb2cd52 100644 --- a/client/client/src/risk/index/locale/es.yml +++ b/client/client/src/risk/index/locale/es.yml @@ -3,4 +3,5 @@ Reference: Referencia Bank: Caja Debit: Debe Conciliated: Conciliado -New payment: Añadir pago \ No newline at end of file +New payment: Añadir pago +Havings: Haber \ No newline at end of file diff --git a/services/db/install/dump/fixtures.sql b/services/db/install/dump/fixtures.sql index 52b08ca09..df68d0f73 100644 --- a/services/db/install/dump/fixtures.sql +++ b/services/db/install/dump/fixtures.sql @@ -252,7 +252,6 @@ INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created (10, 101, 9, 100, DATE_ADD(CURDATE(), INTERVAL -10 MONTH)), (11, 101, 9, 50 , DATE_ADD(CURDATE(), INTERVAL -11 MONTH)), (12, 102, 9, 800, CURDATE()), - (13, 103, 9, 200, CURDATE()), (14, 104, 9, 90 , CURDATE()), (15, 105, 9, 90 , CURDATE()); @@ -1014,7 +1013,7 @@ INSERT INTO `vn`.`receipt`(`id`, `invoiceFk`, `amountPaid`, `amountUnpaid`, `pay (1, 'Cobro web', 100.50, 0.00, CURDATE(), 9, 1, 101, CURDATE(), 442, 1), (2, 'Cobro web', 200.50, 0.00, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 9, 1, 101, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 442, 1), (3, 'Cobro en efectivo', 300.00, 100.00, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 9, 1, 102, DATE_ADD(CURDATE(), INTERVAL -10 DAY), 442, 0), - (4, 'Cobro en efectivo', 400.00, -50.00, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 9, 1, 103, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 442, 0); + (4, 'Cobro en efectivo', -400.00, -50.00, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 9, 1, 103, DATE_ADD(CURDATE(), INTERVAL -15 DAY), 442, 0); INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`) VALUES diff --git a/services/loopback/common/methods/order/specs/new.spec.js b/services/loopback/common/methods/order/specs/new.spec.js index 8aa9a85d0..527192ebd 100644 --- a/services/loopback/common/methods/order/specs/new.spec.js +++ b/services/loopback/common/methods/order/specs/new.spec.js @@ -46,7 +46,10 @@ describe('order new()', () => { it('should throw an error if the client isnt frozen and is active, has data checked but has a debt', async () => { let error; - let params = {addressFk: 123}; + let params = { + addressFk: 123, + landed: new Date() + }; await app.models.Order.new(params) .catch(e => { From e52012ac41fcfcf21eae0ae6d28b93120624ae79 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 10:16:54 +0100 Subject: [PATCH 05/22] #911 claim.development --- client/claim/src/development/index.html | 11 ++++------- .../common/methods/client/activeWorkersWithRole.js | 6 +++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/claim/src/development/index.html b/client/claim/src/development/index.html index 11483ab72..1c2af1e6a 100644 --- a/client/claim/src/development/index.html +++ b/client/claim/src/development/index.html @@ -21,12 +21,6 @@ data="claimResponsibles" order="description"> - - {{firstName}} {{name}} diff --git a/services/loopback/common/methods/client/activeWorkersWithRole.js b/services/loopback/common/methods/client/activeWorkersWithRole.js index bb0231bd6..c2f429952 100644 --- a/services/loopback/common/methods/client/activeWorkersWithRole.js +++ b/services/loopback/common/methods/client/activeWorkersWithRole.js @@ -37,7 +37,11 @@ module.exports = Self => { case 'role': return {'r.name': value}; case 'firstName': - return {or: [{'w.firstName': {like: `%${value}%`}}, {'w.name': {like: `%${value}%`}}]}; + return {or: [ + {'w.firstName': {like: `%${value}%`}}, + {'w.name': {like: `%${value}%`}}, + {'u.name': {like: `%${value}%`}} + ]}; case 'id': return {'w.id': value}; } From ad19761f0b93c753b8a1732979900593eeabc754 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 14:14:40 +0100 Subject: [PATCH 06/22] #856 modificar ticket/index --- client/ticket/src/index/index.html | 1 + client/ticket/src/index/index.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/client/ticket/src/index/index.html b/client/ticket/src/index/index.html index 0055767a2..ba2509f50 100644 --- a/client/ticket/src/index/index.html +++ b/client/ticket/src/index/index.html @@ -13,6 +13,7 @@ diff --git a/client/ticket/src/index/index.js b/client/ticket/src/index/index.js index eaa31425c..fa75c20b7 100644 --- a/client/ticket/src/index/index.js +++ b/client/ticket/src/index/index.js @@ -9,6 +9,13 @@ export default class Controller { this.moreOptions = [ {callback: this.goToTurns, name: 'Turns', always: true}, ]; + + let today = new Date(); + let offset = today.getTimezoneOffset() * 60000; + today.setHours(0, 0, 0, 0); + today.setTime(today.getTime() - offset); + + this.filter = {myTeam: true, from: today}; } goToTurns() { From 9daa991d0fa7343101df3e76f26bbf7f681a44b5 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 14:22:11 +0100 Subject: [PATCH 07/22] #904 summary visual refresh --- client/claim/src/summary/index.html | 6 +++--- client/client/src/summary/style.scss | 6 ++++-- client/salix/src/styles/summary.scss | 6 +++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/client/claim/src/summary/index.html b/client/claim/src/summary/index.html index 75eefb56e..2388fd1af 100644 --- a/client/claim/src/summary/index.html +++ b/client/claim/src/summary/index.html @@ -40,7 +40,7 @@ - +
Detail
@@ -85,7 +85,7 @@
- +
Development
@@ -113,7 +113,7 @@
- +
Action
diff --git a/client/client/src/summary/style.scss b/client/client/src/summary/style.scss index f2d91ff62..a8a0be75b 100644 --- a/client/client/src/summary/style.scss +++ b/client/client/src/summary/style.scss @@ -4,6 +4,8 @@ vn-dialog { } } -vn-client-summary .bold { - font-family: vn-font-bold; +vn-client-summary { + .bold { + font-family: vn-font-bold; + } } \ No newline at end of file diff --git a/client/salix/src/styles/summary.scss b/client/salix/src/styles/summary.scss index f23d2ca2e..4efda84e0 100644 --- a/client/salix/src/styles/summary.scss +++ b/client/salix/src/styles/summary.scss @@ -1,8 +1,12 @@ @import "./colors"; .summary{ - h5 { + h5:not(.title) { + padding: 7px; + background-color: $main-01-03; border-bottom: 2px solid $main-01; + font-family: unset !important; + text-transform: uppercase; } .title, p.title { border: none; From 649824b97f94b9b7447618a08e3fc394a42ae676 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 14:24:10 +0100 Subject: [PATCH 08/22] #904 ticket.summary incluir las secciones cubos y servicios --- client/ticket/src/summary/index.html | 195 +++++++++++++----- .../loopback/common/methods/ticket/summary.js | 29 +++ 2 files changed, 177 insertions(+), 47 deletions(-) diff --git a/client/ticket/src/summary/index.html b/client/ticket/src/summary/index.html index 03a23b85f..d09490a57 100644 --- a/client/ticket/src/summary/index.html +++ b/client/ticket/src/summary/index.html @@ -52,55 +52,156 @@
- - - - - - - - - - - - - - - + + + + + + + + + + + +
ItemDescriptionQuantityPriceDiscountAmount
- - +
Sale
+ + + + + + + + + + + + + + + - - - - - - - - - - - -
ItemDescriptionQuantityPriceDiscountAmount
+ + + + + + icon="warning" + vn-tooltip="Visible: {{::sale.visible || 0}}
{{::$ctrl.translate.instant('Available')}} {{::sale.available || 0}}">
- - - - -
- - {{("000000"+sale.itemFk).slice(-6)}} - - {{::sale.quantity}}{{::sale.price | currency:'€':2}}{{::sale.discount}} %{{::sale.quantity * sale.price | currency:'€':2}}
No results
+ +
+ + {{("000000"+sale.itemFk).slice(-6)}} + + {{::sale.quantity}}{{::sale.price | currency:'€':2}}{{::sale.discount}} %{{::sale.quantity * sale.price | currency:'€':2}}
No results
+ +
+ + +
Packages
+ + + + Created + Package + Quantity + + + + + {{package.created | dateTime: 'dd/MM/yyyy'}} + {{package.packaging.item.name}} + {{package.quantity}} + + + + No results + + +
+ +
Service
+ + + + Id + Description + Quantity + Price + Tax class + + + + + {{::service.id}} + {{::service.description}} + {{::service.quantity}} + {{::service.price}} + {{::service.taxClass.description}} + + + + No results + + +
+
+ + +
Purchase request
+ + + + Id + Description + Created + Requester + Atender + Quantity + Price + Sale id + Ok + + + + + {{::request.id}} + {{::request.description}} + {{::request.created | dateTime: 'dd/MM/yyyy'}} + {{::request.requester.firstName}} {{::request.requester.name}} + {{::request.atender.firstName}} {{::request.atender.name}} + {{::request.quantity}} + {{::request.price}} + + + {{("000000"+request.saleFk).slice(-6)}} + + + + + + + + + + No results + + +
diff --git a/services/loopback/common/methods/ticket/summary.js b/services/loopback/common/methods/ticket/summary.js index 27fdebbe1..e67b438ff 100644 --- a/services/loopback/common/methods/ticket/summary.js +++ b/services/loopback/common/methods/ticket/summary.js @@ -26,6 +26,22 @@ module.exports = Self => { summaryObj.subTotal = getSubTotal(summaryObj.sales); summaryObj.VAT = await models.Ticket.getVAT(ticketFk); summaryObj.total = await models.Ticket.getTotal(ticketFk); + summaryObj.packagings = await models.TicketPackaging.find({ + where: {ticketFk: ticketFk}, + include: [{relation: 'packaging', + scope: { + fields: ['itemFk', 'name'], + include: { + relation: 'item' + } + } + }] + }); + summaryObj.requests = await getRequests(Self, ticketFk); + summaryObj.services = await models.TicketService.find({ + where: {ticketFk: ticketFk}, + include: [{relation: 'taxClass'}] + }); return summaryObj; }; @@ -98,6 +114,19 @@ module.exports = Self => { return await Sale.find(filter); } + async function getRequests(Self, ticketFk) { + let filter = { + where: { + ticketFk: ticketFk + }, + include: [ + {relation: 'requester'}, + {relation: 'atender'} + ] + }; + return await Self.app.models.TicketRequest.find(filter); + } + function getSubTotal(sales) { let subTotal = 0.00; From 403f25a408926bfc9927e0af261b77a538072877 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 10 Dec 2018 15:34:48 +0100 Subject: [PATCH 09/22] =?UTF-8?q?#889=20Registro=20de=20pagos=20web=20m?= =?UTF-8?q?=C3=A1s=20intuitivo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client/src/web-payment/index.html | 32 ++++++++++++--------- client/client/src/web-payment/index.js | 1 + client/client/src/web-payment/locale/es.yml | 4 ++- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/client/client/src/web-payment/index.html b/client/client/src/web-payment/index.html index fcebb3df0..bc3d81c7a 100644 --- a/client/client/src/web-payment/index.html +++ b/client/client/src/web-payment/index.html @@ -13,18 +13,33 @@ - + State Id Amount Payed - + Confirm + + + + + + + {{::transaction.id}} + {{::transaction.amount | currency: '€':2}} + {{::transaction.created | dateTime:'dd/MM/yyyy'}} - {{::transaction.id}} - {{::transaction.amount | currency: '€':2}} - {{::transaction.created | dateTime:'dd/MM/yyyy'}} - - - - - diff --git a/client/client/src/web-payment/index.js b/client/client/src/web-payment/index.js index 54ba6534b..0ec1a6858 100644 --- a/client/client/src/web-payment/index.js +++ b/client/client/src/web-payment/index.js @@ -1,4 +1,5 @@ import ngModule from '../module'; +import './style.scss'; class Controller { constructor($scope, $http, $stateParams) { diff --git a/client/client/src/web-payment/locale/es.yml b/client/client/src/web-payment/locale/es.yml index 656bfd32d..099ca359c 100644 --- a/client/client/src/web-payment/locale/es.yml +++ b/client/client/src/web-payment/locale/es.yml @@ -1,4 +1,6 @@ Web Payment: Pago Web Confirmed: Confirmado Payed: Pagado -Confirm transaction: Confirmar transacción \ No newline at end of file +Confirm transaction: Confirmar transacción +Confirm: Confirmar +State: Estado \ No newline at end of file From b97e79bbe87f574131cf9ad273b99bc59bcd87e7 Mon Sep 17 00:00:00 2001 From: Joan Date: Tue, 11 Dec 2018 07:37:11 +0100 Subject: [PATCH 10/22] updated color scheme --- client/salix/src/styles/colors.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/salix/src/styles/colors.scss b/client/salix/src/styles/colors.scss index daedb7100..e7d29c2d9 100644 --- a/client/salix/src/styles/colors.scss +++ b/client/salix/src/styles/colors.scss @@ -1,4 +1,4 @@ -$main-font-color :#222222; +$main-font-color:#222222; $secondary-font-color: #9b9b9b; $main-header: #3d3d3d; $hover: rgba(0, 0, 0, 0.1); @@ -10,7 +10,11 @@ $main-01-03: rgba($main-01, 0.3); $main-02: #a3d131; $main-02-05: rgba($main-02, 0.5); $main-02-03: rgba($main-02, 0.3); +$main-03: #32b1ce; +$main-03-05: rgba($main-03, 0.5); +$main-03-03: rgba($main-03, 0.3); $lines: #9b9b9b; +$alert01: #f42121; $color-green: #a3d131; $color-orange: #f7931e; From 8b1ee610cc580213f0413325496ab51c166eef59 Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 11 Dec 2018 07:47:27 +0100 Subject: [PATCH 11/22] =?UTF-8?q?#889=20Registro=20de=20pagos=20web=20m?= =?UTF-8?q?=C3=A1s=20intuitivo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client/src/web-payment/style.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 client/client/src/web-payment/style.scss diff --git a/client/client/src/web-payment/style.scss b/client/client/src/web-payment/style.scss new file mode 100644 index 000000000..dbbd120c9 --- /dev/null +++ b/client/client/src/web-payment/style.scss @@ -0,0 +1,10 @@ +@import "colors"; + +vn-client-web-payment { + vn-icon[icon=clear] { + color: $alert01; + } + vn-icon[icon=check] { + color: $main-02; + } +} \ No newline at end of file From 181baebec9f5fffa7f3caf9e1d2ce540ba00e87c Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 11 Dec 2018 08:50:54 +0100 Subject: [PATCH 12/22] #836 borrar linea debe tener el icono de la papelera --- client/claim/src/action/index.html | 2 +- client/claim/src/detail/index.html | 2 +- client/claim/src/development/index.html | 2 +- client/client/src/address/edit/index.html | 2 +- client/client/src/contact/index.html | 2 +- client/item/src/barcode/index.html | 2 +- client/item/src/niche/index.html | 2 +- client/item/src/search-panel/index.html | 2 +- client/item/src/tags/index.html | 2 +- client/order/src/line/index.html | 2 +- client/ticket/src/note/index.html | 2 +- client/ticket/src/package/index.html | 2 +- e2e/helpers/selectors.js | 8 ++++---- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client/claim/src/action/index.html b/client/claim/src/action/index.html index ea3caa63e..5ea6333d8 100644 --- a/client/claim/src/action/index.html +++ b/client/claim/src/action/index.html @@ -79,7 +79,7 @@ medium-grey margin-medium-v vn-tooltip="Remove line" - icon="remove_circle_outline" + icon="delete" ng-click="$ctrl.deleteClaimedSale(saleClaimed.id)" tabindex="-1"> diff --git a/client/claim/src/detail/index.html b/client/claim/src/detail/index.html index cb698afba..1343bcdff 100644 --- a/client/claim/src/detail/index.html +++ b/client/claim/src/detail/index.html @@ -65,7 +65,7 @@ medium-grey margin-medium-v vn-tooltip="Remove sale" - icon="remove_circle_outline" + icon="delete" ng-click="$ctrl.deleteClaimedSale($index)" tabindex="-1"> diff --git a/client/claim/src/development/index.html b/client/claim/src/development/index.html index 1c2af1e6a..c8af3bb5f 100644 --- a/client/claim/src/development/index.html +++ b/client/claim/src/development/index.html @@ -94,7 +94,7 @@ medium-grey margin-medium-v vn-tooltip="Remove sale" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)" tabindex="-1" vn-acl="salesAssistant"> diff --git a/client/client/src/address/edit/index.html b/client/client/src/address/edit/index.html index e92608491..92c76b832 100644 --- a/client/client/src/address/edit/index.html +++ b/client/client/src/address/edit/index.html @@ -84,7 +84,7 @@ medium-grey margin-medium-v vn-tooltip="Remove note" - icon="remove_circle_outline" + icon="delete" ng-click="$ctrl.removeObservation($index)" tabindex="-1"> diff --git a/client/client/src/contact/index.html b/client/client/src/contact/index.html index 56c501690..32d19cc58 100644 --- a/client/client/src/contact/index.html +++ b/client/client/src/contact/index.html @@ -32,7 +32,7 @@ medium-grey margin-medium-v vn-tooltip="Remove contact" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)"> diff --git a/client/item/src/barcode/index.html b/client/item/src/barcode/index.html index 4bffdd0ff..657e946c0 100644 --- a/client/item/src/barcode/index.html +++ b/client/item/src/barcode/index.html @@ -28,7 +28,7 @@ vn-acl="buyer,replenisher" pointer vn-tooltip="Remove barcode" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)"> diff --git a/client/item/src/niche/index.html b/client/item/src/niche/index.html index e4c8342f9..8ab90e572 100644 --- a/client/item/src/niche/index.html +++ b/client/item/src/niche/index.html @@ -37,7 +37,7 @@ vn-acl="buyer,replenisher" pointer vn-tooltip="Remove niche" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)"> diff --git a/client/item/src/search-panel/index.html b/client/item/src/search-panel/index.html index 66bdefa44..614f99e40 100644 --- a/client/item/src/search-panel/index.html +++ b/client/item/src/search-panel/index.html @@ -67,7 +67,7 @@ medium-grey margin-medium-v vn-tooltip="Remove tag" - icon="remove_circle_outline" + icon="delete" ng-click="filter.tags.splice($index, 1)" tabindex="-1"> diff --git a/client/item/src/tags/index.html b/client/item/src/tags/index.html index bc0b0d72f..8529ba372 100644 --- a/client/item/src/tags/index.html +++ b/client/item/src/tags/index.html @@ -66,7 +66,7 @@ medium-grey margin-medium-v vn-tooltip="Remove tag" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)" tabindex="-1"> diff --git a/client/order/src/line/index.html b/client/order/src/line/index.html index e7465a1c0..732fd4276 100644 --- a/client/order/src/line/index.html +++ b/client/order/src/line/index.html @@ -58,7 +58,7 @@ diff --git a/client/ticket/src/note/index.html b/client/ticket/src/note/index.html index e8b5b6175..85bba5dea 100644 --- a/client/ticket/src/note/index.html +++ b/client/ticket/src/note/index.html @@ -38,7 +38,7 @@ pointer medium-grey vn-tooltip="Remove note" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)"> diff --git a/client/ticket/src/package/index.html b/client/ticket/src/package/index.html index a4142e70d..06ec2aab9 100644 --- a/client/ticket/src/package/index.html +++ b/client/ticket/src/package/index.html @@ -43,7 +43,7 @@ pointer medium-grey vn-tooltip="Remove package" - icon="remove_circle_outline" + icon="delete" ng-click="model.remove($index)"> diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index c3ca8cc21..db1bdd5c9 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -230,7 +230,7 @@ export default { itemTags: { goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]', tagsButton: `vn-left-menu a[ui-sref="item.card.tags"]`, - firstRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(2) vn-icon-button[icon="remove_circle_outline"]`, + firstRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(2) vn-icon-button[icon="delete"]`, firstTagSelect: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"] input`, firstTagSelectOptionOne: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"] vn-drop-down ul > li:nth-child(1)`, firstValueInput: `vn-item-tags vn-horizontal:nth-child(2) > vn-textfield[label="Value"] input`, @@ -272,7 +272,7 @@ export default { addBarcodeButton: `vn-icon[icon="add_circle"]`, thirdCodeInput: `vn-item-barcode vn-horizontal:nth-child(4) > ${components.vnTextfield}`, submitBarcodesButton: `${components.vnSubmit}`, - firstCodeRemoveButton: `vn-item-barcode vn-horizontal vn-none vn-icon[icon="remove_circle_outline"]` + firstCodeRemoveButton: `vn-item-barcode vn-horizontal vn-none vn-icon[icon="delete"]` }, itemNiches: { nicheButton: `vn-left-menu a[ui-sref="item.card.niche"]`, @@ -282,7 +282,7 @@ export default { firstCodeInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Code"] input`, secondWarehouseSelect: `vn-horizontal:nth-child(3) > vn-autocomplete[field="niche.warehouseFk"] input`, secondCodeInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Code"] input`, - secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-none > vn-icon[icon="remove_circle_outline"]`, + secondNicheRemoveButton: `vn-horizontal:nth-child(3) > vn-none > vn-icon[icon="delete"]`, thirdWarehouseSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] input`, thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`, thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] input`, @@ -343,7 +343,7 @@ export default { }, ticketNotes: { notesButton: `vn-left-menu a[ui-sref="ticket.card.observation"]`, - firstNoteRemoveButton: `vn-icon[icon="remove_circle_outline"]`, + firstNoteRemoveButton: `vn-icon[icon="delete"]`, addNoteButton: `vn-icon[icon="add_circle"]`, firstNoteSelect: `vn-autocomplete[field="observation.observationTypeFk"] input`, firstNoteSelectSecondOption: `vn-autocomplete[field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`, From 4e5ab09ee7e3865cd9d33c369e96f773baafe4f2 Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 11 Dec 2018 11:59:44 +0100 Subject: [PATCH 13/22] =?UTF-8?q?#861=20mostrar=20feedback=20de=20b=C3=BAs?= =?UTF-8?q?queda=20sin=20resultados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/claim/src/index/index.html | 5 ++++- client/client/src/index/index.html | 6 +++++- client/item/src/index/index.html | 6 +++++- client/order/src/index/index.html | 5 ++++- client/ticket/src/index/index.html | 5 ++++- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/client/claim/src/index/index.html b/client/claim/src/index/index.html index 0b574d78d..486c99020 100644 --- a/client/claim/src/index/index.html +++ b/client/claim/src/index/index.html @@ -50,7 +50,10 @@ - + + No results + + Enter a new search diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index c82338aad..580cc49dc 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -23,7 +23,11 @@ client="::client"> + ng-if="model.data.length === 0" translate> + No results + + Enter a new search diff --git a/client/item/src/index/index.html b/client/item/src/index/index.html index 3626fb5c4..51561d285 100644 --- a/client/item/src/index/index.html +++ b/client/item/src/index/index.html @@ -23,7 +23,11 @@ item="::item"> + ng-if="model.data.length === 0" translate> + No results + + Enter a new search diff --git a/client/order/src/index/index.html b/client/order/src/index/index.html index d648fd4b7..6c05f0d05 100644 --- a/client/order/src/index/index.html +++ b/client/order/src/index/index.html @@ -56,7 +56,10 @@ - + + No results + + Enter a new search diff --git a/client/ticket/src/index/index.html b/client/ticket/src/index/index.html index ba2509f50..36af7f144 100644 --- a/client/ticket/src/index/index.html +++ b/client/ticket/src/index/index.html @@ -87,7 +87,10 @@ - + + No results + + Enter a new search From c0e68655233f7950c20cac6a40a5b0f4d39174e8 Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 11 Dec 2018 12:57:07 +0100 Subject: [PATCH 14/22] #886 vn-check refactor to use the info property --- client/core/src/components/check/check.html | 5 +++++ client/core/src/components/check/check.js | 7 +++++-- client/core/src/components/check/style.scss | 11 +++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/client/core/src/components/check/check.html b/client/core/src/components/check/check.html index b261a53a7..b2f5558b2 100644 --- a/client/core/src/components/check/check.html +++ b/client/core/src/components/check/check.html @@ -2,3 +2,8 @@ {{::$ctrl.label}} + + info_outline + \ No newline at end of file diff --git a/client/core/src/components/check/check.js b/client/core/src/components/check/check.js index 1f8aa7969..af2c11347 100644 --- a/client/core/src/components/check/check.js +++ b/client/core/src/components/check/check.js @@ -3,11 +3,14 @@ import Input from '../../lib/input'; import './style.scss'; export default class Controller extends Input { - constructor($element, $scope) { + constructor($element, $scope, $attrs, vnTemplate) { super($element, $scope); + vnTemplate.normalizeInputAttrs($attrs); componentHandler.upgradeElement(this.element.firstChild); this.mdlElement = this.element.firstChild.MaterialCheckbox; this.input.addEventListener('change', () => this.onChange()); + this.hasInfo = Boolean($attrs.info); + this.info = $attrs.info || null; } set field(value) { this._field = value; @@ -35,7 +38,7 @@ export default class Controller extends Input { this.$.$applyAsync(); } } -Controller.$inject = ['$element', '$scope', '$injector']; +Controller.$inject = ['$element', '$scope', '$attrs', 'vnTemplate']; ngModule.component('vnCheck', { template: require('./check.html'), diff --git a/client/core/src/components/check/style.scss b/client/core/src/components/check/style.scss index 3ff40e1e7..c9348d9b7 100644 --- a/client/core/src/components/check/style.scss +++ b/client/core/src/components/check/style.scss @@ -1,5 +1,16 @@ +@import 'colors'; + vn-check { + position: relative; & > .mdl-checkbox { width: initial; } + + & > i { + padding-left: 5px; + position: absolute; + bottom: 3px; + color: $secondary-font-color; + font-size: 20px !important + } } \ No newline at end of file From 3b9df59df201048e1732779a8b4ab4e7eae8fe5f Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 11 Dec 2018 13:16:33 +0100 Subject: [PATCH 15/22] =?UTF-8?q?#886=20client.fiscal-data=20comprobaci?= =?UTF-8?q?=C3=B3n=20recargo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client/src/fiscal-data/index.html | 3 ++- client/client/src/fiscal-data/index.js | 16 ++++++++++------ client/client/src/fiscal-data/locale/es.yml | 3 ++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/client/client/src/fiscal-data/index.html b/client/client/src/fiscal-data/index.html index e526acb1d..561244586 100644 --- a/client/client/src/fiscal-data/index.html +++ b/client/client/src/fiscal-data/index.html @@ -100,7 +100,8 @@ + field="$ctrl.client.isEqualizated" + info="In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not."> this.checkEtChanges()); @@ -37,17 +38,20 @@ export default class Controller { let equals = this.isEqualizated == this.client.isEqualizated; this.isEqualizated = this.client.isEqualizated; - if (!equals) + if (!equals && !this.oldHasToInvoiceByAddress) this.$.propagateIsEqualizated.show(); + else if (!equals) + this.returnDialogEt('ACCEPT'); + + delete this.oldHasToInvoiceByAddress; } returnDialogEt(response) { if (response === 'ACCEPT') { this.$http.patch(`/client/api/Clients/${this.client.id}/addressesPropagateRe`, {isEqualizated: this.client.isEqualizated}).then( res => { - if (res.data) { + if (res.data) this.vnApp.showMessage(this.translate.instant('Equivalent tax spreaded')); - } } ); } diff --git a/client/client/src/fiscal-data/locale/es.yml b/client/client/src/fiscal-data/locale/es.yml index 4b6e97e3f..a427c100d 100644 --- a/client/client/src/fiscal-data/locale/es.yml +++ b/client/client/src/fiscal-data/locale/es.yml @@ -1,4 +1,5 @@ Yes, notify: Sí, notificar You changed the equalization tax: Has cambiado el recargo de equivalencia Do you want to spread the change?: ¿Deseas propagar el cambio a sus consignatarios? -Frozen: Congelado \ No newline at end of file +Frozen: Congelado +In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not.: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automáticamente el cambio a todos los consignatarios, en caso contrario preguntará al usuario si quiere o no propagar. \ No newline at end of file From a5132e33e51b2368d5884890746e316d85f94ecf Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 12 Dec 2018 09:20:31 +0100 Subject: [PATCH 16/22] #909 claim.index --- client/claim/src/index/index.html | 7 +++++-- client/claim/src/search-panel/index.html | 9 +++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/client/claim/src/index/index.html b/client/claim/src/index/index.html index 486c99020..013a781d4 100644 --- a/client/claim/src/index/index.html +++ b/client/claim/src/index/index.html @@ -31,7 +31,10 @@ - + {{::claim.id}} @@ -48,7 +51,7 @@ icon="desktop_windows"> - + No results diff --git a/client/claim/src/search-panel/index.html b/client/claim/src/search-panel/index.html index f38e2d332..bf0d0e3f0 100644 --- a/client/claim/src/search-panel/index.html +++ b/client/claim/src/search-panel/index.html @@ -39,11 +39,12 @@ + url="/client/api/Clients/activeWorkersWithRole" + search-function="{firstName: $search}" + value-field="id" + where="{role: 'employee'}" + label="Worker"> {{firstName}} {{name}} From fc59d9a38345d2281a132b7131d46645e8d107c8 Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 12 Dec 2018 09:36:45 +0100 Subject: [PATCH 17/22] unnecesary vnTemplate removed --- client/core/src/components/check/check.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/core/src/components/check/check.js b/client/core/src/components/check/check.js index af2c11347..83a94a2df 100644 --- a/client/core/src/components/check/check.js +++ b/client/core/src/components/check/check.js @@ -3,9 +3,8 @@ import Input from '../../lib/input'; import './style.scss'; export default class Controller extends Input { - constructor($element, $scope, $attrs, vnTemplate) { + constructor($element, $scope, $attrs) { super($element, $scope); - vnTemplate.normalizeInputAttrs($attrs); componentHandler.upgradeElement(this.element.firstChild); this.mdlElement = this.element.firstChild.MaterialCheckbox; this.input.addEventListener('change', () => this.onChange()); @@ -38,7 +37,7 @@ export default class Controller extends Input { this.$.$applyAsync(); } } -Controller.$inject = ['$element', '$scope', '$attrs', 'vnTemplate']; +Controller.$inject = ['$element', '$scope', '$attrs']; ngModule.component('vnCheck', { template: require('./check.html'), From e9d303ccfa81bcc502ae24ba053b84e02232527b Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 12 Dec 2018 11:43:57 +0100 Subject: [PATCH 18/22] #870 order.descriptor --- client/order/src/descriptor/index.js | 18 ++++++++++++++++++ client/order/src/descriptor/locale/es.yml | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/client/order/src/descriptor/index.js b/client/order/src/descriptor/index.js index 3a3933d8f..4b052526c 100644 --- a/client/order/src/descriptor/index.js +++ b/client/order/src/descriptor/index.js @@ -6,6 +6,24 @@ class Controller { this.translate = $translate; } + set order(value) { + this._order = value; + + if (value.isConfirmed) { + this._quicklinks = { + btnOne: { + icon: 'icon-ticket', + state: `ticket.index({q: '{"orderFk": ${value.id}}'})`, + tooltip: 'Order ticket list' + } + }; + } + } + + get order() { + return this._order; + } + set quicklinks(value = {}) { this._quicklinks = Object.assign(value, this._quicklinks); } diff --git a/client/order/src/descriptor/locale/es.yml b/client/order/src/descriptor/locale/es.yml index feb0b4c55..88a0c1dda 100644 --- a/client/order/src/descriptor/locale/es.yml +++ b/client/order/src/descriptor/locale/es.yml @@ -5,4 +5,5 @@ State: Estado Landed: F. entrega Items: Articulos Agency: Agencia -Sales person: Comercial \ No newline at end of file +Sales person: Comercial +Order ticket list: Ticket del pedido \ No newline at end of file From 832d3f7a0a9d7592e71ee40ddfc5e153aa0117bc Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 12 Dec 2018 14:30:48 +0100 Subject: [PATCH 19/22] #857 ticket/index buscador avanzado --- client/ticket/src/search-panel/index.html | 9 +++++- client/ticket/src/search-panel/locale/es.yml | 2 +- .../loopback/common/methods/ticket/filter.js | 30 +++++++++++++++---- .../common/models/worker-team-collegues.json | 26 ++++++++++++++++ services/loopback/common/models/worker.json | 5 ++++ services/loopback/server/model-config.json | 3 ++ 6 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 services/loopback/common/models/worker-team-collegues.json diff --git a/client/ticket/src/search-panel/index.html b/client/ticket/src/search-panel/index.html index f65aabae5..d1492ba1c 100644 --- a/client/ticket/src/search-panel/index.html +++ b/client/ticket/src/search-panel/index.html @@ -78,9 +78,16 @@ field="filter.stateFk" url="/api/States"> + + + + diff --git a/client/ticket/src/search-panel/locale/es.yml b/client/ticket/src/search-panel/locale/es.yml index 20ef1ee23..f63f2baf9 100644 --- a/client/ticket/src/search-panel/locale/es.yml +++ b/client/ticket/src/search-panel/locale/es.yml @@ -8,4 +8,4 @@ Warehouse: Almacén Sales person: Comercial Province: Provincia My team: Mi equipo -My tickets: Mis tickets \ No newline at end of file +Order id: Id pedido \ No newline at end of file diff --git a/services/loopback/common/methods/ticket/filter.js b/services/loopback/common/methods/ticket/filter.js index 7dfc955d7..413b31a0f 100644 --- a/services/loopback/common/methods/ticket/filter.js +++ b/services/loopback/common/methods/ticket/filter.js @@ -63,6 +63,10 @@ module.exports = Self => { arg: 'myTeam', type: 'Boolean', description: `Whether to show only tickets for the current logged user team (For now it shows only the current user tickets)` + }, { + arg: 'orderFk', + type: 'Number', + description: `The order id filter` } ], returns: { @@ -79,10 +83,18 @@ module.exports = Self => { let conn = Self.dataSource.connector; let worker = await Self.app.models.Worker.findOne({ - fields: ['id'], - where: {userFk: ctx.req.accessToken.userId} + where: {userFk: ctx.req.accessToken.userId}, + include: [ + {relation: 'collegues'} + ] }); - let teamIds = [worker && worker.id]; + + let teamIds = []; + worker.collegues().forEach(collegue => { + teamIds.push(collegue.collegueFk); + }); + console.log(teamIds); + let where = buildFilter(ctx.args, (param, value) => { switch (param) { @@ -102,6 +114,8 @@ module.exports = Self => { return {'a.provinceFk': value}; case 'stateFk': return {'ts.stateFk': value}; + case 'orderFk': + return {'ot.orderFk': value}; case 'myTeam': return {'c.salesPersonFk': {inq: teamIds}}; case 'id': @@ -136,7 +150,8 @@ module.exports = Self => { w.name AS warehouse, am.name AS agencyMode, st.name AS state, - wk.name AS salesPerson + wk.name AS salesPerson, + ot.orderFk AS orderFk FROM ticket t LEFT JOIN address a ON a.id = t.addressFk LEFT JOIN province p ON p.id = a.provinceFk @@ -145,8 +160,11 @@ module.exports = Self => { LEFT JOIN ticketState ts ON ts.ticketFk = t.id LEFT JOIN state st ON st.id = ts.stateFk LEFT JOIN client c ON c.id = t.clientFk - LEFT JOIN worker wk ON wk.id = c.salesPersonFk`); - stmt.merge(conn.makeSuffix(filter)); + LEFT JOIN worker wk ON wk.id = c.salesPersonFk + LEFT JOIN orderTicket ot ON ot.ticketFk = t.id`); + stmt.merge(conn.makeWhere(filter.where)); + stmt.merge('GROUP BY t.id'); + stmt.merge(conn.makePagination(filter)); stmts.push(stmt); stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticketGetProblems'); diff --git a/services/loopback/common/models/worker-team-collegues.json b/services/loopback/common/models/worker-team-collegues.json new file mode 100644 index 000000000..2e4a0a4f8 --- /dev/null +++ b/services/loopback/common/models/worker-team-collegues.json @@ -0,0 +1,26 @@ +{ + "name": "WorkerTeamCollegues", + "base": "VnModel", + "options": { + "mysql": { + "table": "workerTeamCollegues" + } + }, + "properties": { + "workerFk": { + "id": true, + "type": "Number" + }, + "collegueFk": { + "id": true, + "type": "Number" + } + }, + "relations": { + "worker": { + "type": "belongsTo", + "model": "Worker", + "foreignKey": "workerFk" + } + } +} \ No newline at end of file diff --git a/services/loopback/common/models/worker.json b/services/loopback/common/models/worker.json index 81807e6f6..6b382a16c 100644 --- a/services/loopback/common/models/worker.json +++ b/services/loopback/common/models/worker.json @@ -31,6 +31,11 @@ "type": "belongsTo", "model": "Account", "foreignKey": "userFk" + }, + "collegues": { + "type": "hasMany", + "model": "WorkerTeamCollegues", + "foreignKey": "workerFk" } } } \ No newline at end of file diff --git a/services/loopback/server/model-config.json b/services/loopback/server/model-config.json index 6532f6bf9..b41bad50b 100644 --- a/services/loopback/server/model-config.json +++ b/services/loopback/server/model-config.json @@ -165,6 +165,9 @@ "WorkerTeam": { "dataSource": "vn" }, + "WorkerTeamCollegues": { + "dataSource": "vn" + }, "TicketRequest": { "dataSource": "vn" }, From bac9b1c4ef973a0f2017ccb669839b28734faa0e Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 12 Dec 2018 14:52:20 +0100 Subject: [PATCH 20/22] #857 added to (tomorrow) restriction --- client/ticket/src/index/index.js | 6 +++++- services/loopback/common/methods/ticket/filter.js | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/ticket/src/index/index.js b/client/ticket/src/index/index.js index fa75c20b7..d53ec2b57 100644 --- a/client/ticket/src/index/index.js +++ b/client/ticket/src/index/index.js @@ -15,7 +15,11 @@ export default class Controller { today.setHours(0, 0, 0, 0); today.setTime(today.getTime() - offset); - this.filter = {myTeam: true, from: today}; + let tomorrow = new Date(today); + tomorrow.setHours(23, 59, 59, 59); + tomorrow.setTime(tomorrow.getTime() - offset); + + this.filter = {myTeam: true, from: today, to: tomorrow}; } goToTurns() { diff --git a/services/loopback/common/methods/ticket/filter.js b/services/loopback/common/methods/ticket/filter.js index 413b31a0f..aaba6ea93 100644 --- a/services/loopback/common/methods/ticket/filter.js +++ b/services/loopback/common/methods/ticket/filter.js @@ -93,8 +93,6 @@ module.exports = Self => { worker.collegues().forEach(collegue => { teamIds.push(collegue.collegueFk); }); - console.log(teamIds); - let where = buildFilter(ctx.args, (param, value) => { switch (param) { From da17f826a7d34a805d957815160cd39bdc4a510f Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 13 Dec 2018 08:31:05 +0100 Subject: [PATCH 21/22] #910 claim.descriptor --- client/claim/src/descriptor/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/claim/src/descriptor/index.html b/client/claim/src/descriptor/index.html index b37eb255c..c623c078b 100644 --- a/client/claim/src/descriptor/index.html +++ b/client/claim/src/descriptor/index.html @@ -19,14 +19,16 @@ - + - + + From aba12013667a3ccf570ec9c7ab157ef160334d58 Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 13 Dec 2018 08:44:58 +0100 Subject: [PATCH 22/22] locale deleted --- client/ticket/src/log/locale/es.yml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 client/ticket/src/log/locale/es.yml diff --git a/client/ticket/src/log/locale/es.yml b/client/ticket/src/log/locale/es.yml deleted file mode 100644 index 75deeb63b..000000000 --- a/client/ticket/src/log/locale/es.yml +++ /dev/null @@ -1,9 +0,0 @@ -Model: Modelo -Action: Acción -Changed by: Cambiado por -Before: Antes -After: Despues -History: Historial -insert: Crear -delete: Eliminar -update: Actualizar \ No newline at end of file