From 74751e3ecdd69dfd842e3b9fc28210fee2d6fa8a Mon Sep 17 00:00:00 2001 From: Bernat Date: Fri, 18 May 2018 09:25:24 +0200 Subject: [PATCH 1/5] drop deprecated views in salix --- .../changes/1.0.5/{sale.sql => 13-sale.sql} | 0 ...tTypeRate.sql => 14-componentTypeRate.sql} | 0 .../changes/1.0.5/15-dropViewSalix.sql | 27 +++++++++++++++++++ 3 files changed, 27 insertions(+) rename services/db/install/changes/1.0.5/{sale.sql => 13-sale.sql} (100%) rename services/db/install/changes/1.0.5/{componentTypeRate.sql => 14-componentTypeRate.sql} (100%) create mode 100644 services/db/install/changes/1.0.5/15-dropViewSalix.sql diff --git a/services/db/install/changes/1.0.5/sale.sql b/services/db/install/changes/1.0.5/13-sale.sql similarity index 100% rename from services/db/install/changes/1.0.5/sale.sql rename to services/db/install/changes/1.0.5/13-sale.sql diff --git a/services/db/install/changes/1.0.5/componentTypeRate.sql b/services/db/install/changes/1.0.5/14-componentTypeRate.sql similarity index 100% rename from services/db/install/changes/1.0.5/componentTypeRate.sql rename to services/db/install/changes/1.0.5/14-componentTypeRate.sql diff --git a/services/db/install/changes/1.0.5/15-dropViewSalix.sql b/services/db/install/changes/1.0.5/15-dropViewSalix.sql new file mode 100644 index 000000000..c0d4810fb --- /dev/null +++ b/services/db/install/changes/1.0.5/15-dropViewSalix.sql @@ -0,0 +1,27 @@ +DROP VIEW `salix`.`Accounting`; +DROP VIEW `salix`.`Address`; +DROP VIEW `salix`.`Agency`; +DROP VIEW `salix`.`AgencyMode`; +DROP VIEW `salix`.`Bank`; +DROP VIEW `salix`.`City`; +DROP VIEW `salix`.`Client`; +DROP VIEW `salix`.`ClientCredit`; +DROP VIEW `salix`.`ClientCreditLimit`; +DROP VIEW `salix`.`ClientObservation`; +DROP VIEW `salix`.`ClientType`; +DROP VIEW `salix`.`ContactChannel`; +DROP VIEW `salix`.`Country`; +DROP VIEW `salix`.`CreditClassification`; +DROP VIEW `salix`.`Delivery`; +DROP VIEW `salix`.`Employee`; +DROP VIEW `salix`.`PayMethod`; +DROP VIEW `salix`.`Province`; +DROP VIEW `salix`.`Route`; +DROP VIEW `salix`.`State`; +DROP VIEW `salix`.`Ticket`; +DROP VIEW `salix`.`TicketState`; +DROP VIEW `salix`.`Vehicle`; +DROP VIEW `salix`.`Warehouse`; +DROP VIEW `salix`.`WarehouseAlias`; +DROP VIEW `salix`.`Worker`; +DROP VIEW `salix`.`Zone`; \ No newline at end of file From ec38ed64e501a0812f3e02c2624cb598a2792da6 Mon Sep 17 00:00:00 2001 From: Bernat Date: Fri, 18 May 2018 11:58:04 +0200 Subject: [PATCH 2/5] add new procedure in the BD --- .../changes/1.0.5/ticketListCreate.sql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 services/db/install/changes/1.0.5/ticketListCreate.sql diff --git a/services/db/install/changes/1.0.5/ticketListCreate.sql b/services/db/install/changes/1.0.5/ticketListCreate.sql new file mode 100644 index 000000000..bb72a1cfb --- /dev/null +++ b/services/db/install/changes/1.0.5/ticketListCreate.sql @@ -0,0 +1,23 @@ +USE `vn`; +DROP procedure IF EXISTS `ticketListCreate`; + +DELIMITER $$ +USE `vn`$$ +CREATE DEFINER=`root`@`%` PROCEDURE `ticketListCreate`( + vClientId INT + ,vShipped DATE + ,vWarehouseId INT + ,vCompanyFk INT + ,vAddressFk INT + ,vAgencyType INT + ,vRouteFk INT + ,vlanded DATE) +BEGIN + + DECLARE vNewTicket INT; + CALL vn.ticketCreate(vClientId, vShipped, vWarehouseId, vCompanyFk, vAddressFk, vAgencyType, vRouteFk, vlanded,vNewTicket); + SELECT vNewTicket; + +END$$ + +DELIMITER ; \ No newline at end of file From 4ce1af97dff7b73ca39672a3716e631ed44c79c6 Mon Sep 17 00:00:00 2001 From: Bernat Date: Fri, 18 May 2018 12:15:31 +0200 Subject: [PATCH 3/5] update table ACL --- services/db/install/changes/1.0.5/12-ACL.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/db/install/changes/1.0.5/12-ACL.sql b/services/db/install/changes/1.0.5/12-ACL.sql index f3885c01f..cbcbe0b0a 100644 --- a/services/db/install/changes/1.0.5/12-ACL.sql +++ b/services/db/install/changes/1.0.5/12-ACL.sql @@ -3,3 +3,8 @@ UPDATE `salix`.`ACL` SET `principalId`='production' WHERE `id`='67'; INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('78', 'TicketTracking', '*', 'WRITE', 'ALLOW', 'ROLE', 'production'); INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `permission`, `principalType`, `principalId`) VALUES ('79', 'TicketTracking', 'changeState', 'ALLOW', 'ROLE', 'employe'); +UPDATE `salix`.`ACL` SET `accessType`='READ' WHERE `id`='65'; +INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('80', 'Sale', 'removes', '*', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('81', 'Sale', 'moveToTicket', '*', 'ALLOW', 'ROLE', 'employee'); +UPDATE `salix`.`ACL` SET `principalId`='employee' WHERE `id`='79'; +UPDATE `salix`.`ACL` SET `accessType`='*' WHERE `id`='79'; \ No newline at end of file From f612cab8c09356fddd3cf94e90ac313451b38dfa Mon Sep 17 00:00:00 2001 From: Daniel Herrero Date: Sun, 20 May 2018 19:18:05 +0200 Subject: [PATCH 4/5] autoPaging bug fixed --- client/core/src/components/auto-paging/auto-paging.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/core/src/components/auto-paging/auto-paging.js b/client/core/src/components/auto-paging/auto-paging.js index f8b07f2ad..3278e6869 100644 --- a/client/core/src/components/auto-paging/auto-paging.js +++ b/client/core/src/components/auto-paging/auto-paging.js @@ -2,13 +2,14 @@ import ngModule from '../../module'; import getWatchers from '../../lib/get-watchers'; class AutoPaging { - constructor($http, $window, $element, $timeout, vnApp, $translate) { + constructor($http, $window, $element, $timeout, vnApp, $translate, $scope) { this.$http = $http; this.$window = $window; this.$element = $element; this.$timeout = $timeout; this.vnApp = vnApp; this.$translate = $translate; + this.$scope = $scope; this.numPerPage = null; this.maxItems = 0; @@ -31,6 +32,7 @@ class AutoPaging { res.instances.forEach(item => { this.items.push(item); }); + this.$scope.$apply(); this.checkWatchers(); }); if (this.index.filter.page == this.numPages) { @@ -108,7 +110,7 @@ class AutoPaging { } } -AutoPaging.$inject = ['$http', '$window', '$element', '$timeout', 'vnApp', '$translate']; +AutoPaging.$inject = ['$http', '$window', '$element', '$timeout', 'vnApp', '$translate', '$scope']; ngModule.component('vnAutoPaging', { template: require('./auto-paging.html'), From 88cf75e088004c6995592310392837bdebdb6375 Mon Sep 17 00:00:00 2001 From: Joan Date: Mon, 21 May 2018 07:31:38 +0200 Subject: [PATCH 5/5] Active client debt icon when has debt greather than zero. --- client/client/src/descriptor/descriptor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client/src/descriptor/descriptor.html b/client/client/src/descriptor/descriptor.html index 7e76550df..54e47396f 100644 --- a/client/client/src/descriptor/descriptor.html +++ b/client/client/src/descriptor/descriptor.html @@ -49,7 +49,7 @@ vn-tooltip="Client has debt" tooltip-position = "right" icon="icon-risk" - ng-class="{bright: $ctrl.clientDebt < 0}"> + ng-class="{bright: $ctrl.clientDebt > 0}">