refs #4770 manejo de errores
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
2ba333e714
commit
af1c080e0c
|
@ -1,6 +1,7 @@
|
|||
import ngModule from '../../module';
|
||||
import Component from 'core/lib/component';
|
||||
import './style.scss';
|
||||
const UserError = require('vn-loopback/util/user-error');
|
||||
|
||||
class Controller extends Component {
|
||||
set roadmap(value) {
|
||||
|
@ -34,10 +35,9 @@ class Controller extends Component {
|
|||
this.expeditionTruck.ETD = this.expeditionTruck.etdDate.setHours(hours, minutes);
|
||||
|
||||
try {
|
||||
// if (!this.expense.code)
|
||||
// throw new Error(`The code can't be empty`);
|
||||
// if (!this.expense.description)
|
||||
// throw new UserError(`The description can't be empty`);
|
||||
if (!this.expeditionTruck.warehouseFk || !this.expeditionTruck.etdDate ||
|
||||
!this.expeditionTruck.etdHour || !this.expeditionTruck.description)
|
||||
throw new UserError(`You must fill all the fields`);
|
||||
|
||||
const data = {
|
||||
roadmapFk: this.roadmap.id,
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
Stops: Paradas
|
||||
Wharehouse: Almacén
|
||||
You must fill all the fields: Debes rellenar todos los campos
|
||||
|
|
Loading…
Reference in New Issue