From 089f3a3c290d0fb2434193b8d25a006f73fdfc84 Mon Sep 17 00:00:00 2001 From: Rishav Date: Thu, 18 May 2017 23:23:12 +0530 Subject: [PATCH] check username available --- app/views/fbo-admin/dashboard.controller.js | 12 ++++++++++++ app/views/fbo-admin/dashboard.html | 2 +- app/views/fbo-admin/dashboard.service.js | 15 +++++++++++++++ app/views/fbo-flight/flight.html | 2 +- app/views/fbo-flight/flightDept.controller.js | 14 +++++++++++++- app/views/updateAllFBO/updateAllFBO.controller.js | 13 ++++++++++++- app/views/updateAllFBO/updateAllFBO.html | 2 +- app/views/updateFBODept/updateFBODept.controller.js | 13 ++++++++++++- app/views/updateFBODept/updateFBODept.html | 2 +- 9 files changed, 68 insertions(+), 7 deletions(-) diff --git a/app/views/fbo-admin/dashboard.controller.js b/app/views/fbo-admin/dashboard.controller.js index b275f38..9c4e902 100644 --- a/app/views/fbo-admin/dashboard.controller.js +++ b/app/views/fbo-admin/dashboard.controller.js @@ -24,6 +24,18 @@ $scope.feature.amstatIntegration = false; $scope.feature.posAccountingIntegration = false; $scope.feature.posVeederRootIntegration = false; + + $scope.checkUsername = function(){ + FBOAdmin.checkUsernameEmail($scope.user.email).then(function(status) { + console.log(status) + if(status != 200){ + toastr.error('This email has alreay taken', { + closeButton: true + }) + } + }) + } + $scope.userData = function(){ if($scope.user.email == undefined || $scope.user.email == null){ toastr.error('Please enter your email first', { diff --git a/app/views/fbo-admin/dashboard.html b/app/views/fbo-admin/dashboard.html index 0269402..b25da29 100644 --- a/app/views/fbo-admin/dashboard.html +++ b/app/views/fbo-admin/dashboard.html @@ -36,7 +36,7 @@
-
+
-
+
-
+
-
+