diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index f52e80e..d88c2a4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -85,6 +85,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.passwordMismatchMessage; $rootScope.isVisibleLogin; $rootScope.haveRoleAdmin; + $rootScope.checked = false; var isfilloptionChecked = ""; var isOutlineOptionChecked = ""; $rootScope.forgotPwdModalShow = function () @@ -163,19 +164,38 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic else if ((!result.IsSubscriptionExpired) && (result.License != null) && (result.License.IsActive) && result.IsActive) { if (result.UserType == UserTypeConstants.CLIENT_ADMIN || result.UserType == UserTypeConstants.DISTRICT_ADMIN || result.UserType == UserTypeConstants.SINGLE_USER || result.UserType == UserTypeConstants.RESELLER) { - if (result.License.IsTermAccepted) { + //if (result.License.IsTermAccepted) { $rootScope.userData = result; $rootScope.userModules = result.Modules; $rootScope.isVisibleLogin = false; $rootScope.haveRoleAdmin = true; localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); $('#dvUserModulesInfo').modal('show'); - } - else { - $rootScope.isVisibleLogin = true; - $('#dvTermCondition').modal('show'); - UpdateUserTermAndCondition(result.License.AccountNumber) - } + //} + //else { + // $rootScope.isVisibleLogin = true; + // $('#dvTermCondition').modal('show'); + + //if ($rootScope.checked) { + // UpdateUserTermAndCondition(result.License.AccountNumber); + //$rootScope.userData = result; + //$rootScope.userModules = result.Modules; + //$rootScope.isVisibleLogin = false; + //$rootScope.haveRoleAdmin = true; + //localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); + //$('#dvUserModulesInfo').modal('show'); + //} + //else { + // //$rootScope.isVisibleLogin = true; + // $('#dvTermCondition').modal('show'); + //} + + + //} + + if (!result.License.IsTermAccepted) { + $('#dvTermCondition').modal('show'); + } } else { $rootScope.userData = result; @@ -235,6 +255,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic } function UpdateUserTermAndCondition(accountNumber) { + AuthenticationService.UpdateTermAndConditionAcceptanceStatus(accountNumber) .then(function (result) { console.log(' Term and Condition acceptance status updated successfully.'); diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index ec9ca5e..d8dfad4 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -1311,8 +1311,8 @@