@@ -149,7 +149,7 @@ h5 span {
149
149
<div class =" col-md-4" >
150
150
<div class =" input-group mb-3" >
151
151
<input type =" text" class =" form-control" placeholder =" Search by session Id or user Id"
152
- aria-label =" Search by session Id or user Id" aria-describedby =" basic-addon2" v-model =" sessionIdTemp" >
152
+ aria-label =" Search by session Id or user Id" aria-describedby =" basic-addon2" v-model =" sessionIdTemp" @keyup.enter = " filterSessions(sessionIdTemp) " >
153
153
<div class =" input-group-append" style =" cursor : grab ;" >
154
154
<span class =" input-group-text" id =" basic-addon2" @click =" filterSessions(sessionIdTemp)" ><i
155
155
class =" fa fa-search" aria-hidden =" true" ></i ></span >
@@ -332,9 +332,9 @@ export default {
332
332
const usrStr = localStorage .getItem (" user" );
333
333
this .user = JSON .parse (usrStr);
334
334
this .updateSideNavStatus (true )
335
- const storedStatus = localStorage . getItem ( ' selectedSessionStatus ' );
336
- this . selectedSessionStatus = storedStatus !== null ? storedStatus : ' ' ;
337
- this . handleSessionFilter ( this . selectedSessionStatus );
335
+
336
+
337
+
338
338
// appId
339
339
this .isLoading = true
340
340
this .checkIfHasPermission ()
@@ -343,14 +343,22 @@ export default {
343
343
}
344
344
this .isLoading = false
345
345
346
+
347
+ const storedStatus = localStorage .getItem (' selectedSessionStatus' );
348
+ this .selectedSessionStatus = storedStatus ? storedStatus : ' ' ;
349
+ this .currentPage = localStorage .getItem (' selectedPage' );
350
+ this .handleSessionFilter (this .selectedSessionStatus );
351
+
352
+
353
+
346
354
} catch (e) {
347
355
this .isLoading = false
348
356
this .notifyErr (e)
349
357
this .$router .push ({ path: ' /studio/dashboard' });
350
358
}
351
359
},
352
360
beforeRouteEnter (to , from , next ) {
353
- localStorage .removeItem (' selectedSessionStatus' );
361
+ // localStorage.removeItem('selectedSessionStatus');
354
362
next ((vm ) => {
355
363
vm .prevRoute = from;
356
364
});
@@ -393,9 +401,10 @@ export default {
393
401
async handleGetPageNumberEvent (pageNumber ) {
394
402
try {
395
403
this .isLoading = true
396
- this .currentPage = pageNumber;
397
- await this .fetchAppsUsersSessions ({ appId: " " , page: pageNumber, status: this .selectedSessionStatus || ' '
398
- })
404
+ this .currentPage = pageNumber;
405
+ const status = this .selectedSessionStatus ? (this .selectedSessionStatus == ' All' ? ' ' : this .selectedSessionStatus ) : ' ' ;
406
+ localStorage .setItem (' selectedPage' , this .currentPage );
407
+ await this .fetchAppsUsersSessions ({ appId: " " , page: pageNumber, status })
399
408
this .isLoading = false
400
409
} catch (e) {
401
410
this .isLoading = false
@@ -404,14 +413,15 @@ export default {
404
413
},
405
414
async handleSessionFilter (status ){
406
415
try {
407
- this .isLoading = true
408
- this .selectedSessionStatus = status || ' All' ;
409
- localStorage .setItem (' selectedSessionStatus' , status);
410
- await this .fetchAppsUsersSessions ({ appId: " " , page: this .currentPage , status: status })
411
- this .isLoading = false
412
- } catch (e) {
413
- this .isLoading = false
414
- this .notifyErr (e)
416
+ this .isLoading = true
417
+ this .selectedSessionStatus = status || ' All' ;
418
+ localStorage .setItem (' selectedSessionStatus' , status);
419
+ localStorage .setItem (' selectedPage' , this .currentPage );
420
+ await this .fetchAppsUsersSessions ({ appId: " " , page: this .currentPage , status: status })
421
+ this .isLoading = false
422
+ } catch (e) {
423
+ this .isLoading = false
424
+ this .notifyErr (e)
415
425
}
416
426
},
417
427
async filterSessions (filterText ) {
0 commit comments