diff --git a/client/ticket/src/sale/sale.html b/client/ticket/src/sale/sale.html index 94b6d06da..7b57f603a 100644 --- a/client/ticket/src/sale/sale.html +++ b/client/ticket/src/sale/sale.html @@ -1,4 +1,4 @@ - + diff --git a/client/ticket/src/sale/sale.js b/client/ticket/src/sale/sale.js index 71c8fb7ba..e9f7b4fb6 100644 --- a/client/ticket/src/sale/sale.js +++ b/client/ticket/src/sale/sale.js @@ -1,9 +1,12 @@ import ngModule from '../module'; +import FilterTicketList from '../filter-ticket-list'; -class Controller { - constructor($scope, $timeout) { +class Controller extends FilterTicketList { + constructor($scope, $timeout, $stateParams) { + super($scope, $timeout, $stateParams); this.$ = $scope; this.$timeout = $timeout; + this.onOrder('itemFk', 'ASC'); } showDescriptor(event, itemFk) { @@ -16,7 +19,7 @@ class Controller { } } -Controller.$inject = ['$scope', '$timeout']; +Controller.$inject = ['$scope', '$timeout', '$state']; ngModule.component('vnTicketSale', { template: require('./sale.html'), diff --git a/e2e/paths/ticket-module/03_list_sale.spec.js b/e2e/paths/ticket-module/03_list_sale.spec.js index aa151a783..983b45d67 100644 --- a/e2e/paths/ticket-module/03_list_sale.spec.js +++ b/e2e/paths/ticket-module/03_list_sale.spec.js @@ -52,10 +52,10 @@ describe('Ticket', () => { .getInnerText(selectors.ticketSales.firstSaleText) .then(value => { expect(value).toContain('Color Yellow'); - expect(value).toContain('2'); + expect(value).toContain('5'); expect(value).toContain('€1.50'); expect(value).toContain('0 %'); - expect(value).toContain('€3.00'); + expect(value).toContain('€7.50'); }); }); @@ -65,10 +65,10 @@ describe('Ticket', () => { .getInnerText(selectors.ticketSales.secondSaleText) .then(value => { expect(value).toContain('Color Yellow'); - expect(value).toContain('5'); + expect(value).toContain('2'); expect(value).toContain('€1.50'); expect(value).toContain('0 %'); - expect(value).toContain('€7.50'); + expect(value).toContain('€3.00'); }); }); }); diff --git a/gulpfile.js b/gulpfile.js index 9c82e608e..5d86d5972 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -435,7 +435,7 @@ gulp.task('docker-build', async () => { } catch (e) {} log('Building image...'); - await execP('docker build -t dblocal:latest ./services/db'); + log(await execP('docker build -t dblocal:latest ./services/db > ./services/db/docker.log')); }); /** diff --git a/services/db/install/dump/fixtures.sql b/services/db/install/dump/fixtures.sql index d8857ef27..49cd56143 100644 --- a/services/db/install/dump/fixtures.sql +++ b/services/db/install/dump/fixtures.sql @@ -115,6 +115,14 @@ INSERT INTO `vn`.`province`(`id`, `name`, `countryFk`, `warehouseFk`, `zoneFk`) (4, 'Province four', 1, NULL, 2), (5, 'Province five', 1, NULL, 1); +INSERT INTO `vn`.`agencyHour`(`id`, `agencyFk`, `weekDay`, `warehouseFk`, `provinceFk`, `maxHour`) + VALUES + ( 1, 2, 0, 1, 1, 13), + ( 2, 2, 1, 1, 1, 14), + ( 3, 2, 2, 1, 1, 15), + ( 4, 2, 3, 1, 1, 16), + ( 5, 2, 4, 1, 1, 17); + INSERT INTO `vn`.`clientType`(`id`, `code`, `type`) VALUES (1, 'normal', 'Normal'), @@ -578,7 +586,4 @@ INSERT INTO `cache`.`cache_calc`(`id`, `cache_id`, `cacheName`, `params`, `last_ INSERT INTO `bs`.`workerMana`(`workerFk`, `amount`) VALUES ( 1, -500), - ( 3, 0), - ( 5, 250), - ( 6, 1000), - ( 9, 1500); \ No newline at end of file + \ No newline at end of file diff --git a/services/db/install/install.sh b/services/db/install/install.sh index f38f6cd9f..b99c6e387 100644 --- a/services/db/install/install.sh +++ b/services/db/install/install.sh @@ -8,21 +8,20 @@ mysql -u root -proot -e "SET GLOBAL sql_mode='NO_ENGINE_SUBSTITUTION';" # Dump structure for file in dump/*-*.sql; do - echo "Imported $file" >> log.txt + echo "Imported $file" mysql -u root -proot < $file done # Import changes for file in changes/*/*.sql; do - echo "Imported $file" >> log.txt + echo "Imported $file" mysql -u root -proot < $file done # Import fixtures -echo "Imported fixtures.sql" >> log.txt -mysql -u root -proot < dump/fixtures.sql >> log.txt +echo "Imported fixtures.sql" +mysql -u root -proot < dump/fixtures.sql + # Remove installation -rm -rf changes dump install.sh - - +rm -rf changes dump install.sh \ No newline at end of file