diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Constants/AdminConstant.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Constants/AdminConstant.cs
index f677163..d392f7d 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Constants/AdminConstant.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Constants/AdminConstant.cs
@@ -15,5 +15,6 @@ namespace AIAHTML5.Server.Constants
public const string SUCCESS = "Success";
public const string FAILED = "Failed";
+ public const string SQL_CONNECTION_ERROR = "We are unable to connect with database. Please contact customer support.";
}
}
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
index 5c44246..1f5cbbd 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
@@ -128,7 +128,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
catch (Exception ex)
{
// Log exception code goes here
- return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, AdminConstant.SQL_CONNECTION_ERROR);
}
}
@@ -183,19 +183,20 @@ namespace AIAHTML5.ADMIN.API.Controllers
[Route("Users")]
[HttpGet]
- public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid,
+ public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid, string userLoginStatus,
int pageNo, int pageLength, int iLoginUserType,string loggedIn="")
{
try
{
int UserTypeId = (!string.IsNullOrEmpty(usertypeid) ? Convert.ToInt32(usertypeid) : 0);
int AccountTypeId = (!string.IsNullOrEmpty(accounttypeid) ? Convert.ToInt32(accounttypeid) : 0);
+ bool loginStatus = Convert.ToBoolean(userLoginStatus);
int recordCount = 0;
dbContext.Configuration.ProxyCreationEnabled = false;
//var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0);
//recordCount = (int)spRecordCount.Value;
- List Users = dbContext.usp_GetUsersList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, iLoginUserType, pageNo, pageLength, spRecordCount).ToList();
+ List Users = dbContext.usp_GetUsersList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, iLoginUserType, loginStatus, pageNo, pageLength, spRecordCount).ToList();
if (!string.IsNullOrEmpty(loggedIn))
{
if (Users.Where(s => s.LoginId == loggedIn).Count() > 0)
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
index 8d91ed6..10f87d7 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -4399,7 +4399,7 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetUserList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount);
}
- public virtual ObjectResult usp_GetUsersList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable iUserTypeId, Nullable iAccountTypeId, Nullable iLoginUserType, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount)
+ public virtual ObjectResult usp_GetUsersList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable iUserTypeId, Nullable iAccountTypeId, Nullable iLoginUserType, Nullable iLoginStatus, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount)
{
var sFirstNameParameter = sFirstName != null ?
new ObjectParameter("sFirstName", sFirstName) :
@@ -4429,6 +4429,10 @@ namespace AIAHTML5.ADMIN.API.Entity
new ObjectParameter("iLoginUserType", iLoginUserType) :
new ObjectParameter("iLoginUserType", typeof(int));
+ var iLoginStatusParameter = iLoginStatus.HasValue ?
+ new ObjectParameter("iLoginStatus", iLoginStatus) :
+ new ObjectParameter("iLoginStatus", typeof(bool));
+
var pageNoParameter = pageNo.HasValue ?
new ObjectParameter("pageNo", pageNo) :
new ObjectParameter("pageNo", typeof(int));
@@ -4437,7 +4441,7 @@ namespace AIAHTML5.ADMIN.API.Entity
new ObjectParameter("pageLength", pageLength) :
new ObjectParameter("pageLength", typeof(int));
- return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetUsersList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount);
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetUsersList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, iLoginStatusParameter, pageNoParameter, pageLengthParameter, recordCount);
}
public virtual ObjectResult usp_GetUserTyeByAccountNumber(Nullable iUserTypeId, Nullable iLicenseId)
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
index dd0e4c6..abdcea5 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -1228,6 +1228,7 @@
+
@@ -2847,6 +2848,7 @@
+
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
index 4a15fe3..c30625d 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
@@ -76,7 +76,7 @@ namespace AIAHTML5.ADMIN.API.Models
}
catch (Exception ex)
{
- return false;
+ throw new Exception();
}
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index b904e43..421c30a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -777,11 +777,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
.then(
function (result) {
- // update result with session detail
- result.aiaIdleTime=$rootScope.aiaIdleTime;
- result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut;
- result.aiaPingInterval=$rootScope.aiaPingInterval;
-
+
if (result == LoginConstants.USER_NOT_FOUND) {
$rootScope.LoginEnableUI();
$rootScope.isVisibleLogin = true;
@@ -793,6 +789,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
// birendra// initialize exp img detail object
$rootScope.initializeUserForExportImage(result.Id);
+ // update result with session detail
+ result.aiaIdleTime=$rootScope.aiaIdleTime;
+ result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut;
+ result.aiaPingInterval=$rootScope.aiaPingInterval;
//code for modesty setting
if (result.LicenseInfo != null) {
@@ -982,9 +982,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
if (result.UserTypeId == 8) {
$rootScope.haveRoleAdmin = false;
- }
-
+ }
+
if (result.UserTypeId == 6) {
$('#modestyDiv').css('pointerEvent', 'none');
$('#modestyDiv').css('opacity', 0.4);
@@ -1246,11 +1246,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
.then(
function (result) {
- console.log(result);
- // update result with session detail
- result.aiaIdleTime=$rootScope.aiaIdleTime;
- result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut;
- result.aiaPingInterval=$rootScope.aiaPingInterval;
+ console.log(result);
if (result != null) {
console.log(result);
if (result == LoginConstants.INVALID_CLIENT) {
@@ -1293,6 +1289,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
else {
+ // update result with session detail
+ result.aiaIdleTime=$rootScope.aiaIdleTime;
+ result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut;
+ result.aiaPingInterval=$rootScope.aiaPingInterval;
if (typeof result.FirstName != undefined || result.FirstName != "" || result.FirstName != null) {
//code for modesty setting
if (result.LicenseInfo != null) {
diff --git a/400-SOURCECODE/Admin/src/app/app.component.ts b/400-SOURCECODE/Admin/src/app/app.component.ts
index c8714a6..65bcacb 100644
--- a/400-SOURCECODE/Admin/src/app/app.component.ts
+++ b/400-SOURCECODE/Admin/src/app/app.component.ts
@@ -12,6 +12,8 @@ import { LoadingService } from './shared/loading.service';
import {Idle, DEFAULT_INTERRUPTSOURCES} from '@ng-idle/core';
import {Keepalive} from '@ng-idle/keepalive';
import { Title } from '@angular/platform-browser';
+import { ConfirmService } from './shared/confirm/confirm.service';
+import { timeout } from 'rxjs/operator/timeout';
//import { HttpClient } from '@angular/common/http';
//import { HttpErrorResponse } from '@angular/common/http';
@@ -32,9 +34,10 @@ export class AppComponent implements OnInit {
public UpdateProfileVisible: boolean;
public UserManageRightsList: Array;
- constructor(private idle: Idle, private keepalive: Keepalive,private titleService: Title,private userservice: UserService,private _loadingService: LoadingService, public global: GlobalService, private router: Router,) {
+ constructor(private idle: Idle, private keepalive: Keepalive,private titleService: Title,private _confirmService: ConfirmService,private userservice: UserService,private _loadingService: LoadingService, public global: GlobalService, private router: Router,) {
const projectTitle= this.titleService.getTitle();
+ console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval);
// sets an idle timeout of 20 minutes.
this.idle.setIdle(this.global.aiaIdleTime);
@@ -149,7 +152,15 @@ export class AppComponent implements OnInit {
}
- },error => console.log(error));
+ },error =>{
+ console.log(error);
+ this.idle.stop();
+ this._confirmService.activate(error, "alertMsg");
+ this._loadingService.HideLoading("global-loading");
+ setTimeout(function(){
+ window.location.href = window.location.origin;
+ },5000);
+ })
}
Product() {
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
index 2bfd771..ce31558 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
@@ -100,6 +100,7 @@ export class UserService {
"&accountnumber=" + obj.AccountNumber +
"&usertypeid=" + obj.UserTypeId +
"&accounttypeid=" + obj.AccountTypeId +
+ "&userLoginStatus=" + obj.LoginStatus +
"&pageNo=" + pageNo +
"&pageLength=" + pageLength +
"&iLoginUserType=" + this.commonService.UserType +
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
index d2470c6..f9dc695 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
@@ -28,7 +28,7 @@
-
+
@@ -80,6 +80,15 @@
+
+
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
index ffc6877..f7dc406 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
@@ -82,7 +82,8 @@ export class UsersList implements OnInit, AfterViewChecked {
EmailId: [''],
AccountNumber: [''],
UserTypeId: [0],
- AccountTypeId:[0]
+ AccountTypeId:[0],
+ LoginStatus:[false]
// Gender: ['', Validators.required],
// Email: ['']
@@ -290,7 +291,8 @@ export class UsersList implements OnInit, AfterViewChecked {
EmailId: this.Users.controls['EmailId'].value,
AccountNumber: this.Users.controls['AccountNumber'].value,
UserTypeId: (this.Users.controls['UserTypeId'].value != null && this.Users.controls['UserTypeId'].value !='' ? this.Users.controls['UserTypeId'].value:0),
- AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0),
+ AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0),
+ LoginStatus: this.Users.controls['LoginStatus'].value,
},this.pageNo, this.pageLength
)
.subscribe(x => { this.BindFormFields(x) }, error => this.error = error);
diff --git a/400-SOURCECODE/Admin/src/app/shared/global.ts b/400-SOURCECODE/Admin/src/app/shared/global.ts
index 24ace20..a759929 100644
--- a/400-SOURCECODE/Admin/src/app/shared/global.ts
+++ b/400-SOURCECODE/Admin/src/app/shared/global.ts
@@ -74,7 +74,7 @@ export class GlobalService {
//**** for localhost:4200 *****//
localStorage.setItem('loggedInUserDetails', JSON.stringify(
{
- "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016", "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null
+ "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016","aiaIdleTime": 300,"aiaIdleTimeOut": 30,"aiaPingInterval": 10, "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": { "Id": 0, "AccountNumber": "AIAS000319" }, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null
}));
}