Commit 76df990d5fbd0eb38b3e03eb65aad880385b6dd4
1 parent
908fbb63c9
Exists in
master
and in
1 other branch
validación tiene cisternas
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -36,6 +36,11 @@ angular.module('focaModalDetalleCisternas') |
36 | 36 | $scope.cargandoDatos = false; |
37 | 37 | $scope.vehiculo = res[0].data; |
38 | 38 | $scope.cisternas = res[1].data; |
39 | + if(!$scope.cisternas.length) { | |
40 | + focaModalService.alert('El vehículo no tiene cisternas'); | |
41 | + $uibModalInstance.dismiss(); | |
42 | + return; | |
43 | + } | |
39 | 44 | if(!res[2]) { |
40 | 45 | $scope.$digest(); |
41 | 46 | return; |