alert check

This commit is contained in:
venbatechnologies@gmail.com 2019-01-10 11:40:46 +05:30
parent b73c6674f7
commit 4d09990c9c
2 changed files with 27 additions and 15 deletions

View File

@ -26,7 +26,8 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
$scope.form = {
submit: function (form) {
// alert('in');
// alert($scope.Empcheck);
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@ -94,9 +95,13 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
} else {
// alert(response.data.message);
if($scope.Empcheck == false)
{
swal("Warning!", response.data.message, "warning");
}
$scope.show = true;
//$(".alert").delay(200).addClass("in").fadeOut(3500);
$(".alert").delay(200).addClass("in").fadeOut(3500);
}
});
}
@ -137,10 +142,15 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
*/
$scope.Empcheck = false;
$scope.OTP_or_PWD = 0;
$scope.checkMobileNumber = function (MobileNumber) {
//alert($scope.myModel.userMobile);
// var studentNumber = $scope.myModel.userMobile;
// alert(MobileNumber);
$scope.OTP_or_PWD = MobileNumber;
var otpcheck= MobileNumber;
if($scope.myModel.userMobile !=''){
// swal({
@ -156,11 +166,16 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
data:{mobilenum:$scope.myModel.userMobile,otpcheck:otpcheck,pwd:$scope.myModel.passwordemp}
};
$http(req).then(function(response){
//console.log(response);
swal.close();
//alert(otpcheck);
//console.log(response)
if(otpcheck == undefined)
{
swal.close();
}
if((response.data.loginstudent ==true)||(response.data.loginemployee ==true)){
console.log('if');
//console.log('if');
if(response.data.checkstudent == true)
{
$scope.typeInput = 'text';
@ -182,9 +197,12 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
else
{
if(otpcheck != undefined)
{
swal("Warning!", response.data.message, "warning");
$scope.show = true;
// $(".alert").delay(200).addClass("in").fadeOut(3500);
$(".alert").delay(200).addClass("in").fadeOut(3500);
}
}
}else{
$scope.typeInput = 'password';

View File

@ -219,7 +219,7 @@
/*overflow:visible !important;*/
}
.bgheight{
height: 300px;
height: 370px;
background: rgba(15, 19, 162, 0.51);;
/*background: -webkit-linear-gradient(to left, #00ff80 , #FFFF00);
background: linear-gradient(to left, #00ff80 , #FFFF00); */
@ -336,7 +336,7 @@
<div class="row" id="home">
<!-- Start: View Of Announcement -->
<div class="main-login col-xs-11 col-sm-9 col-md-8">
<div class="container-fluid container-fullw bglogin" style="height:300px;" data-ng-init="init()">
<div class="container-fluid container-fullw bglogin" style="height:370px;" data-ng-init="init()">
<div class="row">
<div class="col-sm-12 col-xs-12" style="margin-top: -17px;">
<carousel interval="myInterval">
@ -393,7 +393,7 @@
<div class="form-group" ng-if="Empcheck">
<button class="btn btn-success btn" ng-click="checkMobileNumber(1);" tabindex="8">
<button class="btn btn-success" ng-click="checkMobileNumber(1);" tabindex="8">
Generate OTP
</button>
</div>
@ -401,12 +401,6 @@
<div class="form-group" ng-class="{'has-error':Form.password.$dirty && Form.password.$invalid, 'has-success':Form.password.$valid}">
<span class="input-icon">