pull request changes
This commit is contained in:
parent
e92030ec6e
commit
d0b0c9d060
|
@ -167,6 +167,9 @@ export default class Watcher extends Component {
|
|||
);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* return the request method.
|
||||
*/
|
||||
|
||||
requestMethod() {
|
||||
return this.$attrs.save && this.$attrs.save.toLowerCase();
|
||||
|
@ -183,7 +186,7 @@ export default class Watcher extends Component {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks if data is ready to send.
|
||||
* Checks if the form is valid.
|
||||
*/
|
||||
isInvalid() {
|
||||
if (this.form && this.form.$invalid)
|
||||
|
|
|
@ -129,5 +129,5 @@
|
|||
"ORDER_ROW_UNAVAILABLE": "No hay disponibilidad de este producto",
|
||||
"Distance must be lesser than 1000": "La distancia debe ser inferior a 1000",
|
||||
"This ticket is deleted": "Este ticket está eliminado",
|
||||
"The introduced data already exists": "La información introducida ya existe"
|
||||
"A travel with this data already exists": "Ya existe un travel con estos datos"
|
||||
}
|
|
@ -10,7 +10,7 @@ module.exports = Self => {
|
|||
|
||||
Self.rewriteDbError(function(err) {
|
||||
if (err.code === 'ER_DUP_ENTRY')
|
||||
return new UserError('The introduced data already exists');
|
||||
return new UserError('A travel with this data already exists');
|
||||
return err;
|
||||
});
|
||||
};
|
||||
|
|
|
@ -5,21 +5,11 @@ class Controller extends Section {
|
|||
constructor($element, $, $stateParams) {
|
||||
super($element, $);
|
||||
this.$stateParams = $stateParams;
|
||||
this.travel = {};
|
||||
}
|
||||
|
||||
$onChanges() {
|
||||
if (this.$stateParams && this.$stateParams.q)
|
||||
this._travel = JSON.parse(this.$stateParams.q);
|
||||
}
|
||||
|
||||
get travel() {
|
||||
return this._travel;
|
||||
}
|
||||
|
||||
set travel(value) {
|
||||
this._travel = value;
|
||||
if (!value) return;
|
||||
this.travel = JSON.parse(this.$stateParams.q);
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
|
|
|
@ -36,7 +36,7 @@ describe('Travel Component vnTravelCreate', () => {
|
|||
|
||||
controller.$onChanges();
|
||||
|
||||
expect(controller._travel).toEqual(json);
|
||||
expect(controller.travel).toEqual(json);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
Do you want to clone this travel?: ¿Desea clonar este envio?
|
||||
All it's properties will be copied: Todas sus propiedades serán copiadas
|
||||
Clone: Clonar
|
Loading…
Reference in New Issue