Commit dba4e5610f199223cf57096194e0f16498dc0cf9
1 parent
78c07a91
Null check
Showing
1 changed file
with
7 additions
and
7 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -161,42 +161,42 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -161,42 +161,42 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
161 | if ($("#messageModal").length > 0) { | 161 | if ($("#messageModal").length > 0) { |
162 | $("#messageModal").modal('hide'); | 162 | $("#messageModal").modal('hide'); |
163 | } | 163 | } |
164 | - if (result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) { | 164 | + if (result.LoginFailureCauseId!=undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_PASSWORD_NOT_MATCH) { |
165 | $rootScope.isVisibleLogin = true; | 165 | $rootScope.isVisibleLogin = true; |
166 | $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD; | 166 | $rootScope.errorMessage = LoginMessageConstants.INVALID_PASSWORD; |
167 | $("#messageModal").modal('show'); | 167 | $("#messageModal").modal('show'); |
168 | } | 168 | } |
169 | - else if (result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) | 169 | + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_ID_BLOCKED_24_HRS) |
170 | { | 170 | { |
171 | $rootScope.isVisibleLogin = true; | 171 | $rootScope.isVisibleLogin = true; |
172 | $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED; | 172 | $rootScope.errorMessage = LoginMessageConstants.USER_BLOCKED; |
173 | $("#messageModal").modal('show'); | 173 | $("#messageModal").modal('show'); |
174 | } | 174 | } |
175 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo!= null) && (result.LicenseInfo!= undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) | 175 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) |
176 | { | 176 | { |
177 | $rootScope.isVisibleLogin = true; | 177 | $rootScope.isVisibleLogin = true; |
178 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | 178 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
179 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | 179 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
180 | $("#messageModal").modal('show'); | 180 | $("#messageModal").modal('show'); |
181 | } | 181 | } |
182 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | 182 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { |
183 | $rootScope.isVisibleLogin = true; | 183 | $rootScope.isVisibleLogin = true; |
184 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | 184 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
185 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | 185 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
186 | $("#messageModal").modal('show'); | 186 | $("#messageModal").modal('show'); |
187 | } | 187 | } |
188 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { | 188 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && result.IsSubscriptionExpired) { |
189 | $rootScope.isVisibleLogin = true; | 189 | $rootScope.isVisibleLogin = true; |
190 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; | 190 | $rootScope.errorMessage = LoginMessageConstants.SUBSCRIPTION_EXPIRATION_MESSAGE + result.SubscriptionExpirationDate + '.'; |
191 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | 191 | $rootScope.errorMessage = $rootScope.errorMessage + ' ' + LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
192 | $("#messageModal").modal('show'); | 192 | $("#messageModal").modal('show'); |
193 | } | 193 | } |
194 | - else if ((result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { | 194 | + else if ((result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) && (result.LicenseInfo != null) && (result.LicenseInfo != undefined) && (!result.LicenseInfo.IsActive) && (!result.IsSubscriptionExpired)) { |
195 | $rootScope.isVisibleLogin = true; | 195 | $rootScope.isVisibleLogin = true; |
196 | $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; | 196 | $rootScope.errorMessage = LoginMessageConstants.LICENSE_INACTIVE_MESSAGE + ' ' + LoginMessageConstants.USER_INACTIVE_MESSAGE; |
197 | $("#messageModal").modal('show'); | 197 | $("#messageModal").modal('show'); |
198 | } | 198 | } |
199 | - else if (result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) { | 199 | + else if (result.LoginFailureCauseId != undefined && result.LoginFailureCauseId.toString() == LoginConstants.E_USER_NOT_ACTIVE) { |
200 | $rootScope.isVisibleLogin = true; | 200 | $rootScope.isVisibleLogin = true; |
201 | $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE; | 201 | $rootScope.errorMessage = LoginMessageConstants.USER_INACTIVE_MESSAGE; |
202 | $("#messageModal").modal('show'); | 202 | $("#messageModal").modal('show'); |