diff --git a/app/views/fbo-admin/dashboard.controller.js b/app/views/fbo-admin/dashboard.controller.js
index d0c8bfd..c0dd435 100644
--- a/app/views/fbo-admin/dashboard.controller.js
+++ b/app/views/fbo-admin/dashboard.controller.js
@@ -37,7 +37,9 @@
console.log($scope.user)
var formdata = "companyName=" + $scope.user.companyName + "&email=" + $scope.user.email + "&username=" + $scope.user.username + "&firstName=" + $scope.user.firstName + "&lastName=" + $scope.user.lastName + "&password=" + $scope.user.password + "&phone=" + $scope.user.phone + "&mobile=" + $scope.user.mobile + "&status=" + $scope.user.status + "&userType=" + $scope.user.userType + "&clientNote=" + $scope.user.clientNote;
FBOAdmin.registerUser(formdata).then(function(result) {
-
+ toastr.success('Created Successfully', {
+ closeButton: true
+ })
$scope.feature.accountId = result;
var featureControlData = "accountId=" + $scope.feature.accountId + "&level=" + $scope.feature.level + "&essintaPosSystem=" + $scope.feature.essintaPosSystem
+ "&acuQuote=" + $scope.feature.acuQuote + "&acuTrack=" + $scope.feature.acuTrack + "&fuelProgram=" + $scope.feature.fuelProgram + "&amstatIntegration=" + $scope.feature.amstatIntegration+ "&posAccountingIntegration="
@@ -48,7 +50,11 @@
console.log(response)
})
- })
+ }, function (err) {
+ toastr.error('Error in registering', {
+ closeButton: true
+ })
+ });
}
$scope.enableEssId = function(){
diff --git a/app/views/fbo-admin/dashboard.service.js b/app/views/fbo-admin/dashboard.service.js
index 3d41c22..a91cb90 100644
--- a/app/views/fbo-admin/dashboard.service.js
+++ b/app/views/fbo-admin/dashboard.service.js
@@ -17,6 +17,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}
diff --git a/app/views/fbo-flight/flight.html b/app/views/fbo-flight/flight.html
index 5b74def..f5c6ec9 100644
--- a/app/views/fbo-flight/flight.html
+++ b/app/views/fbo-flight/flight.html
@@ -80,7 +80,7 @@
Aircraft List
-
+
diff --git a/app/views/fbo-flight/flightDept.controller.js b/app/views/fbo-flight/flightDept.controller.js
index c1c53c4..4d38872 100644
--- a/app/views/fbo-flight/flightDept.controller.js
+++ b/app/views/fbo-flight/flightDept.controller.js
@@ -24,21 +24,32 @@
toastr.success('Created Successfully', {
closeButton: true
})
- })
+ }, function (err) {
+ toastr.error('Error in registering', {
+ closeButton: true
+ })
+ });
}
$scope.data.cardType = 'creditCard';
var cardData = {}
cardData.paymentMethodList = [];
$scope.addCard = function(){
- cardData.paymentMethodList.push($scope.data);
- console.log("cardData", cardData);
- FBOFlight.addCardInformation(cardData).then(function(result) {
- console.log(result)
- toastr.success('Created Successfully', {
- closeButton: true
- })
- })
+ if($scope.aircraft.accountId == undefined){
+ toastr.error('Please Add Contact Information', {
+ closeButton: true
+ })
+ }else{
+ cardData.paymentMethodList.push($scope.data);
+ console.log("cardData", cardData);
+ FBOFlight.addCardInformation(cardData).then(function(result) {
+ console.log(result)
+ toastr.success('Created Successfully', {
+ closeButton: true
+ })
+ })
+ }
+
}
getData();
@@ -70,10 +81,23 @@
})
}
+
+ $scope.openModal = function(){
+ if($scope.aircraft.accountId == undefined){
+ toastr.error('Please Add Contact Information', {
+ closeButton: true
+ })
+ $('#myModal4').modal('hide');
+ }else{
+ $('#myModal4').modal('show');
+ }
+
+ }
$scope.aircraftData = {};
$scope.aircraftData.aircraftList = [];
$scope.getCraftList = [];
$scope.addAircraft = function(){
+ console.log($scope.aircraft.accountId)
$scope.aircraftData.aircraftList.push($scope.aircraft);
console.log($scope.aircraftData.aircraftList)
if ($scope.getCraftList.indexOf($scope.aircraft) == -1) {
@@ -88,6 +112,7 @@
closeButton: true
})
})
+
}
$scope.reset = function() {
diff --git a/app/views/fbo-flight/flightDeptService.js b/app/views/fbo-flight/flightDeptService.js
index 1494f78..41227cd 100644
--- a/app/views/fbo-flight/flightDeptService.js
+++ b/app/views/fbo-flight/flightDeptService.js
@@ -17,6 +17,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}
diff --git a/app/views/update-airports/updateAirportController.js b/app/views/update-airports/updateAirportController.js
index 2be0ef4..070178f 100644
--- a/app/views/update-airports/updateAirportController.js
+++ b/app/views/update-airports/updateAirportController.js
@@ -73,7 +73,13 @@ angular.module('acuefuel')
toastr.success('Copied', {
closeButton: true
})
- })
+ }, function (err) {
+ localStorage.removeItem('airportLoader');
+ $scope.showAirports = true;
+ toastr.error('Error in uploading', {
+ closeButton: true
+ })
+ });
}else {
localStorage.removeItem('airportLoader');
$scope.showAirports = true;
@@ -110,7 +116,13 @@ angular.module('acuefuel')
toastr.success('File Upload Successfully', {
closeButton: true
})
- })
+ }, function (err) {
+ localStorage.removeItem('suppDetailLoader');
+ $scope.suppDetail = true;
+ toastr.error('Error in uploading', {
+ closeButton: true
+ })
+ });
}else {
localStorage.removeItem('suppDetailLoader');
$scope.suppDetail = true;
@@ -146,7 +158,13 @@ angular.module('acuefuel')
toastr.success('File Upload Successfully', {
closeButton: true
})
- })
+ }, function (err) {
+ localStorage.removeItem('countryLoader');
+ $scope.showCountries = true;
+ toastr.error('Error in uploading', {
+ closeButton: true
+ })
+ });
}else {
localStorage.removeItem('countryLoader');
$scope.showCountries = true;
@@ -182,7 +200,13 @@ angular.module('acuefuel')
toastr.success('File Upload Successfully', {
closeButton: true
})
- })
+ }, function (err) {
+ localStorage.removeItem('subDivStateLoader');
+ $scope.subDivState = true;
+ toastr.error('Error in uploading', {
+ closeButton: true
+ })
+ });
}else {
localStorage.removeItem('subDivStateLoader');
$scope.subDivState = true;
@@ -218,7 +242,13 @@ angular.module('acuefuel')
toastr.success('File Upload Successfully', {
closeButton: true
})
- })
+ }, function (err) {
+ localStorage.removeItem('fboHandleLoader');
+ $scope.fboHandlerDetail = true;
+ toastr.error('Error in uploading', {
+ closeButton: true
+ })
+ });
}else {
localStorage.removeItem('fboHandleLoader');
$scope.fboHandlerDetail = true;
diff --git a/app/views/update-airports/updateAirportService.js b/app/views/update-airports/updateAirportService.js
index af0ea1f..8ba8c90 100644
--- a/app/views/update-airports/updateAirportService.js
+++ b/app/views/update-airports/updateAirportService.js
@@ -24,6 +24,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}
@@ -46,6 +48,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}
@@ -68,6 +72,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}
@@ -90,6 +96,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}
@@ -112,6 +120,8 @@
})
.success(function(result) {
deferred.resolve(result);
+ }).error(function(error){
+ deferred.reject(error);
})
return deferred.promise;
}