Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Daniel Herrero 2018-04-30 13:57:14 +02:00
commit 628dd5a99b
6 changed files with 27 additions and 20 deletions

View File

@ -1,4 +1,4 @@
<mg-ajax path="/ticket/api/sales/filter" options="vnIndex"></mg-ajax>
<mg-ajax path="/ticket/api/sales/filter" options="vnIndexNonAuto"></mg-ajax>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>

View File

@ -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'),

View File

@ -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');
});
});
});

View File

@ -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'));
});
/**

View File

@ -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);

View File

@ -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