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

This commit is contained in:
Carlos Jimenez 2018-04-05 11:10:01 +02:00
commit 904768ee63
5 changed files with 12 additions and 6 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

@ -9,5 +9,7 @@
"Quantity cannot be zero": "Quantity cannot be zero",
"can't be blank": "can't be blank",
"DNI Incorrecto": "DNI Incorrecto",
"El NIF/CIF debe ser único": "El NIF/CIF debe ser único"
"El NIF/CIF debe ser único": "El NIF/CIF debe ser único",
"State cannot be blank": "State cannot be blank",
"La razón social debe ser única": "La razón social debe ser única"
}

View File

@ -10,5 +10,6 @@
"Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre",
"is invalid": "is invalid",
"Enter an integer different to zero": "Introduce un entero distinto de cero",
"Package cannot be blank": "Package cannot be blank"
"Package cannot be blank": "Package cannot be blank",
"State cannot be blank": "El estado no puede estar en blanco"
}

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;