merge conflict

This commit is contained in:
Carlos Jimenez 2018-03-21 15:56:20 +01:00
commit f7cac19be4
7 changed files with 10 additions and 16 deletions

View File

@ -84,14 +84,8 @@
}, },
{ {
"url" : "/package", "url" : "/package",
"abstract": true,
"state": "ticket.card.package", "state": "ticket.card.package",
"component": "ui-view" "component": "vn-ticket-package",
},
{
"url": "/list",
"state": "ticket.card.package.list",
"component": "vn-ticket-package-list",
"params": { "params": {
"ticket": "$ctrl.ticket" "ticket": "$ctrl.ticket"
}, },

View File

@ -1,4 +1,4 @@
import ngModule from '../../module'; import ngModule from '../module';
class Controller { class Controller {
@ -64,8 +64,8 @@ class Controller {
Controller.$inject = ['$http', '$scope']; Controller.$inject = ['$http', '$scope'];
ngModule.component('vnTicketPackageList', { ngModule.component('vnTicketPackage', {
template: require('./package-list.html'), template: require('./package.html'),
controller: Controller, controller: Controller,
bindings: { bindings: {
ticket: '<' ticket: '<'

View File

@ -1,7 +1,7 @@
import './package-list.js'; import './package.js';
describe('Ticket', () => { describe('Ticket', () => {
describe('Component vnTicketPackageList', () => { describe('Component vnTicketPackage', () => {
let $componentController; let $componentController;
let controller; let controller;
let $httpBackend; let $httpBackend;
@ -19,7 +19,7 @@ describe('Ticket', () => {
accept: function() {} accept: function() {}
} }
}; };
controller = $componentController('vnTicketPackageList', {$scope: $scope}); controller = $componentController('vnTicketPackage', {$scope: $scope});
})); }));
describe('removePackage()', () => { describe('removePackage()', () => {

View File

@ -8,6 +8,6 @@ import './data/ticket-data';
import './note/ticket-observation'; import './note/ticket-observation';
import './expedition/ticket-expedition'; import './expedition/ticket-expedition';
import './volume/ticket-volume'; import './volume/ticket-volume';
import './package/list/package-list'; import './package/package';
import './sale/sale'; import './sale/sale';
import './tracking/tracking'; import './tracking/tracking';

View File

@ -289,7 +289,7 @@ export default {
submitNotesButton: `${components.vnSubmit}` submitNotesButton: `${components.vnSubmit}`
}, },
ticketPackages: { ticketPackages: {
packagesButton: `${components.vnMenuItem}[ui-sref="ticket.card.package.list"]`, packagesButton: `${components.vnMenuItem}[ui-sref="ticket.card.package"]`,
firstPackageSelect: `${components.vnAutocomplete}[label="Package"] input` firstPackageSelect: `${components.vnAutocomplete}[label="Package"] input`
} }
}; };

View File

@ -8,7 +8,7 @@ module.exports = function(Self) {
}); });
function validateQuantity(quantity) { function validateQuantity(quantity) {
return quantity != 0; return !isNaN(quantity) && quantity != 0;
} }
Self.validatesPresenceOf('packagingFk', {message: 'Package cannot be blank'}); Self.validatesPresenceOf('packagingFk', {message: 'Package cannot be blank'});