diff --git a/Apollo/assets/js/controllers/loginCtrl.js b/Apollo/assets/js/controllers/loginCtrl.js index cc30944f..d3b94c3c 100755 --- a/Apollo/assets/js/controllers/loginCtrl.js +++ b/Apollo/assets/js/controllers/loginCtrl.js @@ -50,7 +50,7 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc $http(req).then(function (response) { if (response.data.loginStatus == true) { $scope.responseData = response.data.details; - // {"loginStatus":true,"details":{"MobileNumber":"9876543210","ListCode":"R004","ID":"1"}} + /* * After logined user details store to local client detail */ @@ -64,7 +64,14 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc } ipCookie('cookiechk', $scope.localStore, { expires: 21 }); localStorage.setItem('localObj', JSON.stringify($scope.localStore)); - $state.go('app.dashboard'); + if($scope.responseData.ListCode=='R001'){ + $state.go('app.studentView'); + + } + else{ + $state.go('app.dashboard'); + } + } else { // alert(response.data.message); swal("Warning!", response.data.message, "warning");