Commit 91466682a9f56049696174ddb6d87f7db10aa3c7
1 parent
2a0f7ec7
changed msg in error
Showing
4 changed files
with
44 additions
and
35 deletions
400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs
... | ... | @@ -39,9 +39,9 @@ namespace AIAHTML5.API.Controllers |
39 | 39 | |
40 | 40 | try |
41 | 41 | { |
42 | - dynamic user = AIAHTML5.API.Models.DBModel.GetUserDetailsByEmailId(emailId); | |
42 | + User user = AIAHTML5.API.Models.DBModel.GetUserDetailsByEmailId(emailId); | |
43 | 43 | |
44 | - if (user!=null && user.Count > 0) | |
44 | + if (user!=null) | |
45 | 45 | { |
46 | 46 | int result = 0; |
47 | 47 | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
... | ... | @@ -430,11 +430,12 @@ namespace AIAHTML5.API.Models |
430 | 430 | |
431 | 431 | if (ds!= null && ds.Tables.Count > 0) |
432 | 432 | { |
433 | - license = new License(); | |
434 | - | |
433 | + | |
435 | 434 | DataTable dt = ds.Tables[0]; |
436 | 435 | if (dt.Rows.Count > 0) |
437 | 436 | { |
437 | + license = new License(); | |
438 | + | |
438 | 439 | foreach (DataRow dr in dt.Rows) |
439 | 440 | { |
440 | 441 | DateTime date; |
... | ... | @@ -820,10 +821,7 @@ namespace AIAHTML5.API.Models |
820 | 821 | blockedUsersList.Add(blockedUser); |
821 | 822 | } |
822 | 823 | } |
823 | - else | |
824 | - { | |
825 | - blockedUser = new BlockedUser(); | |
826 | - } | |
824 | + | |
827 | 825 | |
828 | 826 | |
829 | 827 | return blockedUsersList; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -102,11 +102,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
102 | 102 | document.getElementById("forgetPwdForm").reset() |
103 | 103 | $("#forgotPwdModal").modal("show"); |
104 | 104 | $(".modal-backdrop").css("opacity", ".5"); |
105 | + $("body.modal-open").css("padding-right", "0px"); | |
105 | 106 | } |
106 | 107 | $rootScope.forgotUserModalShow = function () { |
107 | 108 | document.getElementById("forgetUSerIdForm").reset(); |
108 | 109 | $("#forgotUserModal").modal("show"); |
109 | 110 | $(".modal-backdrop").css("opacity", ".5"); |
111 | + $("body.modal-open").css("padding-right", "0px"); | |
110 | 112 | |
111 | 113 | } |
112 | 114 | $rootScope.initializeAIA = function () { |
... | ... | @@ -170,26 +172,26 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
170 | 172 | $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED; |
171 | 173 | $("#messageModal").modal('show'); |
172 | 174 | } |
173 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) | |
175 | + else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) | |
174 | 176 | { |
175 | 177 | $rootScope.isVisibleLogin = true; |
176 | 178 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
177 | 179 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
178 | 180 | $("#messageModal").modal('show'); |
179 | 181 | } |
180 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
182 | + else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
181 | 183 | $rootScope.isVisibleLogin = true; |
182 | 184 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
183 | 185 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
184 | 186 | $("#messageModal").modal('show'); |
185 | 187 | } |
186 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
188 | + else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | |
187 | 189 | $rootScope.isVisibleLogin = true; |
188 | 190 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
189 | 191 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
190 | 192 | $("#messageModal").modal('show'); |
191 | 193 | } |
192 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
194 | + else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
193 | 195 | $rootScope.isVisibleLogin = true; |
194 | 196 | $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
195 | 197 | $("#messageModal").modal('show'); |
... | ... | @@ -199,18 +201,18 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
199 | 201 | $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE; |
200 | 202 | $("#messageModal").modal('show'); |
201 | 203 | } |
202 | - else if (result.LicenseInfo!=null && (!result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
204 | + else if ( (result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (!result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
203 | 205 | $rootScope.isVisibleLogin = true; |
204 | 206 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
205 | 207 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE; |
206 | 208 | $("#messageModal").modal('show'); |
207 | 209 | } |
208 | - else if (result.LicenseInfo != null && (result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
210 | + else if ((result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (result.LicenseInfo.IsActive) && (result.IsSubscriptionExpired)) { | |
209 | 211 | $rootScope.isVisibleLogin = true; |
210 | 212 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
211 | 213 | $("#messageModal").modal('show'); |
212 | 214 | } |
213 | - else if (result.LicenseInfo != null && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
215 | + else if ((result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | |
214 | 216 | $rootScope.isVisibleLogin = true; |
215 | 217 | $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE; |
216 | 218 | $("#messageModal").modal('show'); |
... | ... | @@ -261,7 +263,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
261 | 263 | console.log(' Error in authentication = ' + error.statusText); |
262 | 264 | // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
263 | 265 | $rootScope.isVisibleLogin = true; |
264 | - $rootScope.errorMessage = LoginConstant.EXCEPTION_OCCURED; | |
266 | + $rootScope.errorMessage = error; | |
265 | 267 | $("#messageModal").modal('show'); |
266 | 268 | } |
267 | 269 | } |
... | ... | @@ -307,7 +309,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
307 | 309 | console.log(' Error in Term and Condition acceptance status update = ' + error);//.statusText |
308 | 310 | $rootScope.isVisibleLogin = true; |
309 | 311 | $rootScope.isVisibleLogin = true; |
310 | - $rootScope.errorMessage = LoginConstant.EXCEPTION_OCCURED; | |
312 | + $rootScope.errorMessage = error; | |
311 | 313 | $("#messageModal").modal('show'); |
312 | 314 | $('#dvTermCondition').fadeIn(); |
313 | 315 | }); |
... | ... | @@ -385,11 +387,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
385 | 387 | AuthenticationService.SendMailToUser(userInfo) |
386 | 388 | .then(function (result) { |
387 | 389 | if (result == LoginConstants.USER_NOT_FOUND) { |
390 | + removeEmailPopUp(); | |
388 | 391 | // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); |
389 | 392 | $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID; |
390 | 393 | $("#messageModal").modal('show'); |
391 | 394 | } |
392 | - else if (result == LoginConstants.MAIL_NOT_SENT) { | |
395 | + else if (result == LoginConstants.MAIL_NOT_SENT) { | |
396 | + removeEmailPopUp(); | |
393 | 397 | // alert(LoginMessageConstants.MAIL_NOT_SENT); |
394 | 398 | $rootScope.errorMessage = LoginMessageConstants.MAIL_NOT_SENT; |
395 | 399 | $("#messageModal").modal('show'); |
... | ... | @@ -397,14 +401,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
397 | 401 | else { |
398 | 402 | if (result == LoginMessageConstants.MAIL_SENT) { |
399 | 403 | var message; |
400 | - if ($('.forgot-sm').length > 0) { | |
401 | - $('.forgot-sm').fadeOut(); | |
402 | - $('.forgot-sm').modal('hide'); | |
403 | - } | |
404 | - if ($('.forgot-sm1').length > 0) { | |
405 | - $('.forgot-sm1').fadeOut(); | |
406 | - $('.forgot-sm1').modal('hide'); | |
407 | - } | |
404 | + removeEmailPopUp(); | |
405 | + | |
408 | 406 | if (isMailForForgotPassword) { |
409 | 407 | if (userInfo.unblockUser) |
410 | 408 | message = LoginMessageConstants.USER_UNBLOCK_LINK_IN_EMAIL; |
... | ... | @@ -424,26 +422,39 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
424 | 422 | }, |
425 | 423 | function (error) { |
426 | 424 | console.log(' Error in authentication = ' + error.statusText); |
425 | + removeEmailPopUp(); | |
427 | 426 | // alert(LoginConstants.ERROR_IN_FECTHING_DETAILS); |
428 | - $rootScope.errorMessage = LoginConstants.EXCEPTION_OCCURED; | |
427 | + $rootScope.errorMessage = error; | |
429 | 428 | $("#messageModal").modal('show'); |
430 | 429 | }); |
431 | 430 | } |
432 | 431 | else { |
433 | - // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); | |
432 | + // alert(LoginMessageConstants.INCORRECT_EMAIL_ID); | |
433 | + removeEmailPopUp(); | |
434 | 434 | $rootScope.errorMessage = LoginMessageConstants.INCORRECT_EMAIL_ID; |
435 | 435 | $("#messageModal").modal('show'); |
436 | 436 | } |
437 | 437 | } |
438 | 438 | else { |
439 | 439 | //alert(LoginMessageConstants.BLANK_EMAIL_ID); |
440 | + removeEmailPopUp(); | |
440 | 441 | $rootScope.errorMessage = LoginMessageConstants.BLANK_EMAIL_ID; |
441 | 442 | $("#messageModal").modal('show'); |
442 | 443 | |
443 | 444 | } |
444 | 445 | }; |
445 | 446 | |
446 | - | |
447 | + function removeEmailPopUp() | |
448 | + { | |
449 | + if ($('#forgotUserModal').length > 0) { | |
450 | + $('#forgotUserModal').fadeOut(); | |
451 | + $('#forgotUserModal').modal('hide'); | |
452 | + } | |
453 | + if ($('#forgotPwdModal').length > 0) { | |
454 | + $('#forgotPwdModal').fadeOut(); | |
455 | + $('#forgotPwdModal').modal('hide'); | |
456 | + } | |
457 | + } | |
447 | 458 | |
448 | 459 | |
449 | 460 | function validateEmail(email) { |
... | ... | @@ -505,7 +516,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
505 | 516 | function (error) { |
506 | 517 | console.log(' Error in authentication = ' + error.statusText); |
507 | 518 | // alert(LoginMessageConstants.ERROR_IN_FECTHING_DETAILS); |
508 | - $rootScope.errorMessage = LoginMessageConstants.ERROR_IN_FECTHING_DETAILS; | |
519 | + $rootScope.errorMessage = error; | |
509 | 520 | $("#messageModal").modal('show'); |
510 | 521 | |
511 | 522 | }); |
... | ... | @@ -549,7 +560,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic |
549 | 560 | }, |
550 | 561 | function (error) { |
551 | 562 | console.log(' Error in authentication = ' + error.statusText); |
552 | - $rootScope.errorMessage = LoginMessageConstants.EXCEPTION_OCCURED; | |
563 | + $rootScope.errorMessage = error; | |
553 | 564 | $("#messageModal").modal('show'); |
554 | 565 | } |
555 | 566 | ); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | deferred.resolve(data); |
36 | 36 | }).error(function (data, status, headers, config) { |
37 | 37 | console.log('error') |
38 | - deferred.reject(status); | |
38 | + deferred.reject(data); | |
39 | 39 | |
40 | 40 | $rootScope.isVisibleLogin = true; |
41 | 41 | $rootScope.errorMessage = data; |
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 | deferred.resolve(data); |
58 | 58 | }).error(function (data, status, headers, config) { |
59 | 59 | console.log('error') |
60 | - deferred.reject(status); | |
60 | + deferred.reject(data); | |
61 | 61 | |
62 | 62 | $rootScope.isVisibleLogin = true; |
63 | 63 | $rootScope.errorMessage = data; |
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | deferred.resolve(data); |
80 | 80 | }).error(function (data, status, headers, config) { |
81 | 81 | console.log('error') |
82 | - deferred.reject(status); | |
82 | + deferred.reject(data); | |
83 | 83 | |
84 | 84 | $rootScope.isVisibleLogin = true; |
85 | 85 | $rootScope.errorMessage = data; |
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 | deferred.resolve(data); |
102 | 102 | }).error(function (data, status, headers, config) { |
103 | 103 | console.log('error') |
104 | - deferred.reject(status); | |
104 | + deferred.reject(data); | |
105 | 105 | |
106 | 106 | $rootScope.isVisibleLogin = true; |
107 | 107 | $rootScope.errorMessage = data; | ... | ... |