Skip to content

Commit fc95820

Browse files
committed
fixed pagination, implemeted download report etc.
1 parent 20adfaa commit fc95820

File tree

4 files changed

+4856
-5558
lines changed

4 files changed

+4856
-5558
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
"fs": "^0.0.1-security",
3939
"gh-pages": "^1.2.0",
4040
"hs-ssi-sdk": "^7.0.1",
41+
"html2canvas": "^1.4.1",
4142
"jsonld": "^8.3.2",
43+
"jspdf": "^3.0.1",
4244
"lds-sdk": "^4.0.1",
4345
"leaflet": "^1.9.4",
4446
"mdbvue": "^6.7.1",
@@ -59,9 +61,9 @@
5961
"vue-sidebar-menu": "^4.7.4",
6062
"vue2-leaflet": "^2.7.1",
6163
"vuejs-datetimepicker": "^1.1.13",
64+
"vuetify": "^2.7.2",
6265
"vuex": "^3.4.0",
6366
"vuex-persistedstate": "^4.1.0",
64-
"vuetify": "^2.7.2",
6567
"webpack": "^5.90.3"
6668
},
6769
"devDependencies": {

src/views/playground/Sessions.vue

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ h5 span {
149149
<div class="col-md-4">
150150
<div class="input-group mb-3">
151151
<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)">
153153
<div class="input-group-append" style="cursor: grab;">
154154
<span class="input-group-text" id="basic-addon2" @click="filterSessions(sessionIdTemp)"><i
155155
class="fa fa-search" aria-hidden="true"></i></span>
@@ -332,9 +332,9 @@ export default {
332332
const usrStr = localStorage.getItem("user");
333333
this.user = JSON.parse(usrStr);
334334
this.updateSideNavStatus(true)
335-
const storedStatus = localStorage.getItem('selectedSessionStatus');
336-
this.selectedSessionStatus = storedStatus !== null ? storedStatus : '';
337-
this.handleSessionFilter(this.selectedSessionStatus);
335+
336+
337+
338338
// appId
339339
this.isLoading = true
340340
this.checkIfHasPermission()
@@ -343,14 +343,22 @@ export default {
343343
}
344344
this.isLoading = false
345345
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+
346354
} catch (e) {
347355
this.isLoading = false
348356
this.notifyErr(e)
349357
this.$router.push({ path: '/studio/dashboard' });
350358
}
351359
},
352360
beforeRouteEnter(to, from, next) {
353-
localStorage.removeItem('selectedSessionStatus');
361+
// localStorage.removeItem('selectedSessionStatus');
354362
next((vm) => {
355363
vm.prevRoute = from;
356364
});
@@ -393,9 +401,10 @@ export default {
393401
async handleGetPageNumberEvent(pageNumber) {
394402
try {
395403
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 })
399408
this.isLoading = false
400409
} catch (e) {
401410
this.isLoading = false
@@ -404,14 +413,15 @@ export default {
404413
},
405414
async handleSessionFilter(status){
406415
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)
415425
}
416426
},
417427
async filterSessions(filterText) {

0 commit comments

Comments
 (0)