Commit a6b8fd27b39994592d61a3c67cabd6e24cf61ff2
1 parent
91885af4
add login status filter in userlist
Showing
14 changed files
with
134 additions
and
52 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Constants/AdminConstant.cs
... | ... | @@ -15,5 +15,6 @@ namespace AIAHTML5.Server.Constants |
15 | 15 | |
16 | 16 | public const string SUCCESS = "Success"; |
17 | 17 | public const string FAILED = "Failed"; |
18 | + public const string SQL_CONNECTION_ERROR = "We are unable to connect with database. Please contact customer support."; | |
18 | 19 | } |
19 | 20 | } |
20 | 21 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
... | ... | @@ -128,7 +128,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
128 | 128 | catch (Exception ex) |
129 | 129 | { |
130 | 130 | // Log exception code goes here |
131 | - return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | |
131 | + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, AdminConstant.SQL_CONNECTION_ERROR); | |
132 | 132 | } |
133 | 133 | } |
134 | 134 | |
... | ... | @@ -183,19 +183,20 @@ namespace AIAHTML5.ADMIN.API.Controllers |
183 | 183 | |
184 | 184 | [Route("Users")] |
185 | 185 | [HttpGet] |
186 | - public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid, | |
186 | + public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid, string userLoginStatus, | |
187 | 187 | int pageNo, int pageLength, int iLoginUserType,string loggedIn="") |
188 | 188 | { |
189 | 189 | try |
190 | 190 | { |
191 | 191 | int UserTypeId = (!string.IsNullOrEmpty(usertypeid) ? Convert.ToInt32(usertypeid) : 0); |
192 | 192 | int AccountTypeId = (!string.IsNullOrEmpty(accounttypeid) ? Convert.ToInt32(accounttypeid) : 0); |
193 | + bool loginStatus = Convert.ToBoolean(userLoginStatus); | |
193 | 194 | int recordCount = 0; |
194 | 195 | dbContext.Configuration.ProxyCreationEnabled = false; |
195 | 196 | //var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); |
196 | 197 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
197 | 198 | //recordCount = (int)spRecordCount.Value; |
198 | - List<usp_GetUsersList_Result> Users = dbContext.usp_GetUsersList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, iLoginUserType, pageNo, pageLength, spRecordCount).ToList(); | |
199 | + List<usp_GetUsersList_Result> Users = dbContext.usp_GetUsersList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, iLoginUserType, loginStatus, pageNo, pageLength, spRecordCount).ToList(); | |
199 | 200 | if (!string.IsNullOrEmpty(loggedIn)) |
200 | 201 | { |
201 | 202 | if (Users.Where(s => s.LoginId == loggedIn).Count() > 0) | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... | ... | @@ -4399,7 +4399,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
4399 | 4399 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<string>("usp_GetUserList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount); |
4400 | 4400 | } |
4401 | 4401 | |
4402 | - public virtual ObjectResult<usp_GetUsersList_Result> usp_GetUsersList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable<int> iUserTypeId, Nullable<int> iAccountTypeId, Nullable<int> iLoginUserType, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
4402 | + public virtual ObjectResult<usp_GetUsersList_Result> usp_GetUsersList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable<int> iUserTypeId, Nullable<int> iAccountTypeId, Nullable<int> iLoginUserType, Nullable<bool> iLoginStatus, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
4403 | 4403 | { |
4404 | 4404 | var sFirstNameParameter = sFirstName != null ? |
4405 | 4405 | new ObjectParameter("sFirstName", sFirstName) : |
... | ... | @@ -4429,6 +4429,10 @@ namespace AIAHTML5.ADMIN.API.Entity |
4429 | 4429 | new ObjectParameter("iLoginUserType", iLoginUserType) : |
4430 | 4430 | new ObjectParameter("iLoginUserType", typeof(int)); |
4431 | 4431 | |
4432 | + var iLoginStatusParameter = iLoginStatus.HasValue ? | |
4433 | + new ObjectParameter("iLoginStatus", iLoginStatus) : | |
4434 | + new ObjectParameter("iLoginStatus", typeof(bool)); | |
4435 | + | |
4432 | 4436 | var pageNoParameter = pageNo.HasValue ? |
4433 | 4437 | new ObjectParameter("pageNo", pageNo) : |
4434 | 4438 | new ObjectParameter("pageNo", typeof(int)); |
... | ... | @@ -4437,7 +4441,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
4437 | 4441 | new ObjectParameter("pageLength", pageLength) : |
4438 | 4442 | new ObjectParameter("pageLength", typeof(int)); |
4439 | 4443 | |
4440 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetUsersList_Result>("usp_GetUsersList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount); | |
4444 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetUsersList_Result>("usp_GetUsersList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, iLoginStatusParameter, pageNoParameter, pageLengthParameter, recordCount); | |
4441 | 4445 | } |
4442 | 4446 | |
4443 | 4447 | public virtual ObjectResult<usp_GetUserTyeByAccountNumber_Result> usp_GetUserTyeByAccountNumber(Nullable<byte> iUserTypeId, Nullable<int> iLicenseId) | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... | ... | @@ -1228,6 +1228,7 @@ |
1228 | 1228 | <Parameter Name="iUserTypeId" Type="int" Mode="In" /> |
1229 | 1229 | <Parameter Name="iAccountTypeId" Type="int" Mode="In" /> |
1230 | 1230 | <Parameter Name="iLoginUserType" Type="int" Mode="In" /> |
1231 | + <Parameter Name="iLoginStatus" Type="bit" Mode="In" /> | |
1231 | 1232 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
1232 | 1233 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
1233 | 1234 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
... | ... | @@ -2847,6 +2848,7 @@ |
2847 | 2848 | <Parameter Name="iUserTypeId" Mode="In" Type="Int32" /> |
2848 | 2849 | <Parameter Name="iAccountTypeId" Mode="In" Type="Int32" /> |
2849 | 2850 | <Parameter Name="iLoginUserType" Mode="In" Type="Int32" /> |
2851 | + <Parameter Name="iLoginStatus" Mode="In" Type="Boolean" /> | |
2850 | 2852 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2851 | 2853 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2852 | 2854 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
400-SOURCECODE/AIAHTML5.API/Controllers/ConfigurationController.cs
1 | -๏ปฟ๏ปฟusing System; | |
1 | +๏ปฟusing System; | |
2 | 2 | using System.Collections.Generic; |
3 | 3 | using System.Linq; |
4 | 4 | using System.Net; |
5 | 5 | using System.Net.Http; |
6 | 6 | using System.Web.Http; |
7 | 7 | using System.Configuration; |
8 | +using Newtonsoft.Json; | |
9 | + | |
8 | 10 | namespace AIAHTML5.API.Controllers |
9 | 11 | { |
10 | 12 | public class ConfigurationController : ApiController |
... | ... | @@ -13,12 +15,24 @@ namespace AIAHTML5.API.Controllers |
13 | 15 | [HttpGet] |
14 | 16 | public HttpResponseMessage GetConfigurationvalues() |
15 | 17 | { |
16 | - // int current_year = Int32.Parse(ConfigurationManager.AppSettings["Copyrightyear"]); | |
18 | + dynamic responseData; | |
19 | + MyConfig mconfig = new MyConfig(); | |
20 | + mconfig.current_year= DateTime.Now.Year; | |
21 | + mconfig.idleTime = Int32.Parse(ConfigurationManager.AppSettings["IDLE_TIME"]); | |
22 | + mconfig.idelTimeOut = Int32.Parse(ConfigurationManager.AppSettings["IDLE_TIME_OUT"]); | |
23 | + mconfig.pingInterval = Int32.Parse(ConfigurationManager.AppSettings["PING_INTERVAL"]); | |
17 | 24 | |
18 | - int current_year = DateTime.Now.Year; | |
19 | 25 | |
20 | - HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, current_year); | |
21 | - return response; | |
26 | + responseData = JsonConvert.SerializeObject(mconfig); | |
27 | + | |
28 | + return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(responseData) }; | |
22 | 29 | } |
23 | 30 | } |
31 | +} | |
32 | +public class MyConfig | |
33 | +{ | |
34 | + public int current_year { get; set; } | |
35 | + public int idleTime { get; set; } | |
36 | + public int idelTimeOut { get; set; } | |
37 | + public int pingInterval { get; set; } | |
24 | 38 | } |
25 | 39 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.API/Web.config
... | ... | @@ -31,6 +31,12 @@ |
31 | 31 | </log4net> |
32 | 32 | |
33 | 33 | <appSettings> |
34 | + <!-- set Idel time 20 minute --> | |
35 | + <add key="IDLE_TIME" value="1200" /> | |
36 | + <!-- set idle timeout 30 seconds --> | |
37 | + <add key="IDLE_TIME_OUT" value="30" /> | |
38 | + <!-- set ping time interval 30 seconds --> | |
39 | + <add key="PING_INTERVAL" value="10" /> | |
34 | 40 | <add key="Copyrightyear" value="2018" /> |
35 | 41 | |
36 | 42 | <add key="SenderEmailAddress" value="support@interactiveanatomy.com" /> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -165,7 +165,18 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
165 | 165 | //get user is already loggedin or not |
166 | 166 | $scope.currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); |
167 | 167 | if ($scope.currentUserDetails != undefined) { |
168 | - AuthenticateAlreadyLoggedInUser(); | |
168 | + $rootScope.isVisibleLogin = false; | |
169 | + ConfigurationService.getCofigValue() | |
170 | + .then( | |
171 | + function (configresult) { | |
172 | + $rootScope.current_year = configresult.current_year; | |
173 | + $rootScope.aiaIdleTime = configresult.idleTime; | |
174 | + $rootScope.aiaIdleTimeOut = configresult.idelTimeOut; | |
175 | + $rootScope.aiaPingInterval = configresult.pingInterval; | |
176 | + | |
177 | + AuthenticateAlreadyLoggedInUser(); | |
178 | + }); | |
179 | + | |
169 | 180 | } |
170 | 181 | var isRememberChecked = $rootScope.getLocalStorageValue('isRememberMeChecked'); |
171 | 182 | |
... | ... | @@ -188,15 +199,21 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
188 | 199 | $rootScope.promptUserForCookies(); |
189 | 200 | } |
190 | 201 | |
202 | + $scope.currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); | |
203 | + if ($scope.currentUserDetails == undefined) { | |
191 | 204 | $rootScope.getConfigurationValues(); |
205 | + } | |
192 | 206 | } |
193 | 207 | } |
194 | 208 | $rootScope.getConfigurationValues = function () |
195 | 209 | { |
196 | 210 | ConfigurationService.getCofigValue() |
197 | 211 | .then( |
198 | - function (configresult) { | |
199 | - $rootScope.current_year = configresult; | |
212 | + function (configresult) { | |
213 | + $rootScope.current_year = configresult.current_year; | |
214 | + $rootScope.aiaIdleTime = configresult.idleTime; | |
215 | + $rootScope.aiaIdleTimeOut = configresult.idelTimeOut; | |
216 | + $rootScope.aiaPingInterval = configresult.pingInterval; | |
200 | 217 | |
201 | 218 | }); |
202 | 219 | } |
... | ... | @@ -241,8 +258,12 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
241 | 258 | } |
242 | 259 | else { |
243 | 260 | |
244 | - // birendra// initialize exp img detail object | |
245 | - $rootScope.initializeUserForExportImage(result.Id); | |
261 | + // birendra// initialize exp img detail object | |
262 | + $rootScope.initializeUserForExportImage(result.Id); | |
263 | + // update result with session detail | |
264 | + result.aiaIdleTime=$rootScope.aiaIdleTime; | |
265 | + result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut; | |
266 | + result.aiaPingInterval=$rootScope.aiaPingInterval; | |
246 | 267 | |
247 | 268 | //code for modesty setting |
248 | 269 | if (result.LicenseInfo != null) { |
... | ... | @@ -368,14 +389,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
368 | 389 | $rootScope.userData = result; |
369 | 390 | $rootScope.userModules = result.Modules; |
370 | 391 | |
371 | - if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") { | |
372 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
373 | - } | |
374 | - | |
375 | - if (isCommingSoonModel == true) | |
376 | - { | |
377 | - | |
378 | - // ShowAssignedModulesPopup(result.Modules); | |
392 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
393 | + | |
394 | + if (isCommingSoonModel == true) { | |
395 | + | |
396 | + // ShowAssignedModulesPopup(result.Modules); | |
379 | 397 | |
380 | 398 | if (userInfo.rememberChk) { |
381 | 399 | |
... | ... | @@ -446,11 +464,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
446 | 464 | $("#modestyDiv").css("pointer-events", "none"); |
447 | 465 | $("#modestyDiv").css("opacity", 0.5); |
448 | 466 | //2. |
449 | - if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") { | |
450 | - | |
451 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
452 | - } | |
453 | - | |
467 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
468 | + | |
454 | 469 | // 3.ShowAssignedModulesPopup |
455 | 470 | //isCommingSoonModel =true only when user comes first time on application and login |
456 | 471 | if (isCommingSoonModel == true) { |
... | ... | @@ -658,6 +673,10 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
658 | 673 | |
659 | 674 | |
660 | 675 | else { |
676 | + // update result with session detail | |
677 | + result.aiaIdleTime=$rootScope.aiaIdleTime; | |
678 | + result.aiaIdleTimeOut=$rootScope.aiaIdleTimeOut; | |
679 | + result.aiaPingInterval=$rootScope.aiaPingInterval; | |
661 | 680 | if (typeof result.FirstName != undefined || result.FirstName != "" || result.FirstName != null) { |
662 | 681 | //code for modesty setting |
663 | 682 | if (result.LicenseInfo != null) { |
... | ... | @@ -713,10 +732,8 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
713 | 732 | $rootScope.userData = result; |
714 | 733 | $rootScope.userModules = result.Modules; |
715 | 734 | |
716 | - if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") { | |
717 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
718 | - } | |
719 | - | |
735 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
736 | + | |
720 | 737 | if (isCommingSoonModel == true) { |
721 | 738 | |
722 | 739 | ShowAssignedModulesPopup(result.Modules); |
... | ... | @@ -767,10 +784,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
767 | 784 | $rootScope.haveRoleAdmin = false; |
768 | 785 | |
769 | 786 | //2. |
770 | - if ($scope.currentUserDetails == null || $scope.currentUserDetails == undefined || $scope.currentUserDetails == "") { | |
771 | - | |
772 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
773 | - } | |
787 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
774 | 788 | |
775 | 789 | |
776 | 790 | //5. |
... | ... | @@ -951,6 +965,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
951 | 965 | } |
952 | 966 | |
953 | 967 | $rootScope.loadUserSession = function () { |
968 | + //update session config from API | |
969 | + Idle.setIdle($rootScope.aiaIdleTime); | |
970 | + Idle.setTimeout($rootScope.aiaIdleTimeOut); | |
971 | + Keepalive.setInterval($rootScope.aiaPingInterval); | |
972 | + | |
954 | 973 | Idle.watch();// start the session |
955 | 974 | $rootScope.isSessionTimeout=false; |
956 | 975 | $rootScope.isRedirectToAdmin=false; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -367,7 +367,7 @@ AIA.constant("LoginConstants", { |
367 | 367 | }); |
368 | 368 | |
369 | 369 | AIA.constant("LoginMessageConstants", { |
370 | - "USER_UPDATE_PROFILE":"Please update your profile first", | |
370 | + "USER_UPDATE_PROFILE":"Please update your profile first.", | |
371 | 371 | "USER_OR_PASSWORD_INCORRECT": "UserId or Password is incorrect.", |
372 | 372 | "RESET_PASSWORD": "Please check you email and reset your password.", |
373 | 373 | "USERID_SENT_IN_EMAIL": "We have sent you userId in email.", | ... | ... |
400-SOURCECODE/Admin/src/app/app.component.ts
... | ... | @@ -12,6 +12,8 @@ import { LoadingService } from './shared/loading.service'; |
12 | 12 | import {Idle, DEFAULT_INTERRUPTSOURCES} from '@ng-idle/core'; |
13 | 13 | import {Keepalive} from '@ng-idle/keepalive'; |
14 | 14 | import { Title } from '@angular/platform-browser'; |
15 | +import { ConfirmService } from './shared/confirm/confirm.service'; | |
16 | +import { timeout } from 'rxjs/operator/timeout'; | |
15 | 17 | |
16 | 18 | //import { HttpClient } from '@angular/common/http'; |
17 | 19 | //import { HttpErrorResponse } from '@angular/common/http'; |
... | ... | @@ -32,17 +34,18 @@ export class AppComponent implements OnInit { |
32 | 34 | public UpdateProfileVisible: boolean; |
33 | 35 | public UserManageRightsList: Array<UserManageRightsModel>; |
34 | 36 | |
35 | - constructor(private idle: Idle, private keepalive: Keepalive,private titleService: Title,private userservice: UserService,private _loadingService: LoadingService, public global: GlobalService, private router: Router,) { | |
37 | + 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,) { | |
36 | 38 | const projectTitle= this.titleService.getTitle(); |
37 | 39 | |
38 | - // sets an idle timeout of 20 minutes. | |
39 | - this.idle.setIdle(20*60); | |
40 | + console.log("idleTime: "+this.global.aiaIdleTime+" aiaIdleTimeOut: "+this.global.aiaIdleTimeOut+" Interval: "+this.global.aiaPingInterval); | |
41 | + // sets an idle timeout of 20 minutes. | |
42 | + this.idle.setIdle(this.global.aiaIdleTime); | |
40 | 43 | |
41 | 44 | // sets a timeout period of 30 seconds. after 30 seconds of inactivity, the user will be considered timed out. |
42 | - this.idle.setTimeout(30); | |
45 | + this.idle.setTimeout(this.global.aiaIdleTimeOut); | |
43 | 46 | |
44 | 47 | // sets the ping interval to 10 seconds |
45 | - this.keepalive.interval(10); | |
48 | + this.keepalive.interval(this.global.aiaPingInterval); | |
46 | 49 | |
47 | 50 | // sets the default interrupts, in this case, things like clicks, scrolls,mousemove touches to the document |
48 | 51 | this.idle.setInterrupts(DEFAULT_INTERRUPTSOURCES); |
... | ... | @@ -139,14 +142,25 @@ export class AppComponent implements OnInit { |
139 | 142 | { |
140 | 143 | this._loadingService.HideLoading("global-loading"); |
141 | 144 | } |
142 | - | |
143 | - // comments below statement while unit testing on 'ng serve --open' command | |
145 | + | |
146 | + if(window.location.hostname!="localhost") | |
147 | + { | |
148 | + localStorage.removeItem('loggedInUserDetails'); | |
149 | + window.location.href = window.location.origin; | |
144 | 150 | |
145 | - localStorage.removeItem('loggedInUserDetails'); | |
146 | - window.location.href = window.location.origin; | |
151 | + } | |
152 | + | |
147 | 153 | } |
148 | 154 | |
149 | - },error => console.log(error)); | |
155 | + },error =>{ | |
156 | + console.log(error); | |
157 | + this.idle.stop(); | |
158 | + this._confirmService.activate(error, "alertMsg"); | |
159 | + this._loadingService.HideLoading("global-loading"); | |
160 | + setTimeout(function(){ | |
161 | + window.location.href = window.location.origin; | |
162 | + },5000); | |
163 | + }) | |
150 | 164 | } |
151 | 165 | |
152 | 166 | Product() { | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
... | ... | @@ -100,6 +100,7 @@ export class UserService { |
100 | 100 | "&accountnumber=" + obj.AccountNumber + |
101 | 101 | "&usertypeid=" + obj.UserTypeId + |
102 | 102 | "&accounttypeid=" + obj.AccountTypeId + |
103 | + "&userLoginStatus=" + obj.LoginStatus + | |
103 | 104 | "&pageNo=" + pageNo + |
104 | 105 | "&pageLength=" + pageLength + |
105 | 106 | "&iLoginUserType=" + this.commonService.UserType + | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | <input type="text" class="form-control input-sm" id="LastNames" placeholder="Last Name" formControlName="LastName"> |
29 | 29 | </div> |
30 | 30 | </div> |
31 | - </div> | |
31 | + </div> | |
32 | 32 | </div> |
33 | 33 | </div> |
34 | 34 | <div class="col-lg-3 col-sm-3"> |
... | ... | @@ -80,6 +80,15 @@ |
80 | 80 | </div> |
81 | 81 | </div> |
82 | 82 | </div> |
83 | + | |
84 | + <div class="col-sm-12"> | |
85 | + <div class="form-group marginTop5"> | |
86 | + <label for="LoginStatus" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Logged-In Status :</label> | |
87 | + <div> | |
88 | + <input type="checkbox" class="radio-inline" style="height: 25px;width: 20px" id="LoginStatus" formControlName="LoginStatus"> | |
89 | + </div> | |
90 | + </div> | |
91 | + </div> | |
83 | 92 | </div> |
84 | 93 | </div> |
85 | 94 | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
... | ... | @@ -82,7 +82,8 @@ export class UsersList implements OnInit, AfterViewChecked { |
82 | 82 | EmailId: [''], |
83 | 83 | AccountNumber: [''], |
84 | 84 | UserTypeId: [0], |
85 | - AccountTypeId:[0] | |
85 | + AccountTypeId:[0], | |
86 | + LoginStatus:[false] | |
86 | 87 | // Gender: ['', Validators.required], |
87 | 88 | // Email: [''] |
88 | 89 | |
... | ... | @@ -290,7 +291,8 @@ export class UsersList implements OnInit, AfterViewChecked { |
290 | 291 | EmailId: this.Users.controls['EmailId'].value, |
291 | 292 | AccountNumber: this.Users.controls['AccountNumber'].value, |
292 | 293 | UserTypeId: (this.Users.controls['UserTypeId'].value != null && this.Users.controls['UserTypeId'].value !='' ? this.Users.controls['UserTypeId'].value:0), |
293 | - AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0), | |
294 | + AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0), | |
295 | + LoginStatus: this.Users.controls['LoginStatus'].value, | |
294 | 296 | },this.pageNo, this.pageLength |
295 | 297 | ) |
296 | 298 | .subscribe(x => { this.BindFormFields(x) }, error => this.error = <any>error); | ... | ... |
400-SOURCECODE/Admin/src/app/shared/global.ts
... | ... | @@ -24,6 +24,9 @@ export class GlobalService { |
24 | 24 | AccLicId: number = 0; |
25 | 25 | LoginId:string=""; |
26 | 26 | ProtocolType:string=""; |
27 | + aiaIdleTime:number=0; | |
28 | + aiaIdleTimeOut:number=0; | |
29 | + aiaPingInterval:number=0; | |
27 | 30 | RemoveColumns: Array<string> = ["Serial_No", "LicenseId","RowNum"] |
28 | 31 | error; |
29 | 32 | public href: string = ""; |
... | ... | @@ -35,6 +38,10 @@ export class GlobalService { |
35 | 38 | this.UserTypeName = this.loggedInUser.UserType; |
36 | 39 | this.DisplayName = this.loggedInUser.FirstName + " " + this.loggedInUser.LastName; |
37 | 40 | this.LoginId=this.loggedInUser.LoginId; |
41 | + this.aiaIdleTime=this.loggedInUser.aiaIdleTime; | |
42 | + this.aiaIdleTimeOut=this.loggedInUser.aiaIdleTimeOut; | |
43 | + this.aiaPingInterval=this.loggedInUser.aiaPingInterval; | |
44 | + | |
38 | 45 | } |
39 | 46 | |
40 | 47 | this.NoRecords = 'No Record Found.'; |
... | ... | @@ -49,6 +56,7 @@ export class GlobalService { |
49 | 56 | |
50 | 57 | if(window.location.hostname=="localhost") |
51 | 58 | { |
59 | + // for 'ng serve --open' command | |
52 | 60 | //**** for localhost:4200 *****// |
53 | 61 | this.resourceBaseUrl = this.hostURL; |
54 | 62 | } |
... | ... | @@ -62,10 +70,11 @@ export class GlobalService { |
62 | 70 | if (this.resourceBaseUrl == this.ProtocolType+"192.168.81.63:92/API/Adminapi/") { |
63 | 71 | if(window.location.hostname=="localhost") |
64 | 72 | { |
73 | + // for 'ng serve --open' command | |
65 | 74 | //**** for localhost:4200 *****// |
66 | 75 | localStorage.setItem('loggedInUserDetails', JSON.stringify( |
67 | 76 | { |
68 | - "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 | |
77 | + "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 | |
69 | 78 | })); |
70 | 79 | } |
71 | 80 | ... | ... |