This commit is contained in:
Juan 2018-04-05 13:40:12 +02:00
commit 98edab2869
5 changed files with 9 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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

View File

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