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 Price: Precio
Quantity: Cantidad Quantity: Cantidad
Sale: Lineas del pedido Sale: Lineas del pedido
Sale Checked: Control clientes
Shipment: Salida Shipment: Salida
Next: Siguiente Next: Siguiente
Some fields are invalid: Algunos campos no son válidos Some fields are invalid: Algunos campos no son válidos

View File

@ -1,9 +1,11 @@
import ngModule from '../../module'; import ngModule from '../../module';
export default class Controller { class Controller {
constructor($scope, $state) { constructor($scope, $state, vnApp, $translate) {
this.$ = $scope; this.$ = $scope;
this.$state = $state; this.$state = $state;
this.vnApp = vnApp;
this.$translate = $translate;
this.ticket = { this.ticket = {
ticketFk: $state.params.id, ticketFk: $state.params.id,
text: null text: null
@ -17,7 +19,7 @@ export default class Controller {
); );
} }
} }
Controller.$inject = ['$scope', '$state']; Controller.$inject = ['$scope', '$state', 'vnApp', '$translate'];
ngModule.component('vnTicketTrackingEdit', { ngModule.component('vnTicketTrackingEdit', {
template: require('./edit.html'), template: require('./edit.html'),

View File

@ -9,5 +9,7 @@
"Quantity cannot be zero": "Quantity cannot be zero", "Quantity cannot be zero": "Quantity cannot be zero",
"can't be blank": "can't be blank", "can't be blank": "can't be blank",
"DNI Incorrecto": "DNI Incorrecto", "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", "Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre",
"is invalid": "is invalid", "is invalid": "is invalid",
"Enter an integer different to zero": "Introduce un entero distinto de cero", "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) { module.exports = function(Self) {
require('../methods/ticketTracking/filter')(Self); require('../methods/ticketTracking/filter')(Self);
Self.validatesPresenceOf('stateFk', {message: 'State cannot be blank'});
Self.observe('before save', function(ctx, next) { Self.observe('before save', function(ctx, next) {
let token = ctx.options.accessToken; let token = ctx.options.accessToken;
let userId = token && token.userId; let userId = token && token.userId;