diff --git a/client/ticket/src/locale/es.yml b/client/ticket/src/locale/es.yml index dafc3ca1c..3d996caab 100644 --- a/client/ticket/src/locale/es.yml +++ b/client/ticket/src/locale/es.yml @@ -25,7 +25,6 @@ Package type: Tipo de porte Price: Precio Quantity: Cantidad Sale: Lineas del pedido -Sale Checked: Control clientes Shipment: Salida Next: Siguiente Some fields are invalid: Algunos campos no son válidos diff --git a/client/ticket/src/tracking/edit/edit.js b/client/ticket/src/tracking/edit/edit.js index 2d1f5e5a0..6b92f48ff 100644 --- a/client/ticket/src/tracking/edit/edit.js +++ b/client/ticket/src/tracking/edit/edit.js @@ -1,9 +1,11 @@ import ngModule from '../../module'; -export default class Controller { - constructor($scope, $state) { +class Controller { + constructor($scope, $state, vnApp, $translate) { this.$ = $scope; this.$state = $state; + this.vnApp = vnApp; + this.$translate = $translate; this.ticket = { ticketFk: $state.params.id, text: null @@ -17,7 +19,7 @@ export default class Controller { ); } } -Controller.$inject = ['$scope', '$state']; +Controller.$inject = ['$scope', '$state', 'vnApp', '$translate']; ngModule.component('vnTicketTrackingEdit', { template: require('./edit.html'), diff --git a/services/loopback/common/locale/en.json b/services/loopback/common/locale/en.json index 7f83a1124..117e45e79 100644 --- a/services/loopback/common/locale/en.json +++ b/services/loopback/common/locale/en.json @@ -16,5 +16,6 @@ "Invalid email": "Invalid email", "The IBAN does not have the correct format": "The IBAN does not have the correct format", "That payment method requires an IBAN": "That payment method requires an IBAN", + "State cannot be blank": "State cannot be blank", "Cannot change the payment method if no salesperson": "Cannot change the payment method if no salesperson" } \ No newline at end of file diff --git a/services/loopback/common/locale/es.json b/services/loopback/common/locale/es.json index 1943c4a95..50f3de9d1 100644 --- a/services/loopback/common/locale/es.json +++ b/services/loopback/common/locale/es.json @@ -16,5 +16,6 @@ "Invalid email": "Correo electrónico inválido", "The IBAN does not have the correct format": "El IBAN no tiene el formato correcto", "That payment method requires an IBAN": "El método de pago seleccionado requiere que se especifique el IBAN", + "State cannot be blank": "El estado no puede estar en blanco", "Cannot change the payment method if no salesperson": "No se puede cambiar la forma de pago si no hay comercial asignado" } \ No newline at end of file diff --git a/services/ticket/common/models/ticketTracking.js b/services/ticket/common/models/ticketTracking.js index 91f890af5..248b5e281 100644 --- a/services/ticket/common/models/ticketTracking.js +++ b/services/ticket/common/models/ticketTracking.js @@ -1,6 +1,8 @@ module.exports = function(Self) { require('../methods/ticketTracking/filter')(Self); + Self.validatesPresenceOf('stateFk', {message: 'State cannot be blank'}); + Self.observe('before save', function(ctx, next) { let token = ctx.options.accessToken; let userId = token && token.userId;