Skip to content

Commit

Permalink
fixed login
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlumbcgov committed Nov 1, 2024
1 parent 7c0c986 commit 0c49308
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
14 changes: 8 additions & 6 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<v-app>
<Snackbar></Snackbar>

<Bcheader class="bcheader">
<div v-if="isAuthenticatedGet && dataReady">
<v-btn @click="dialog = true">{{ userInfoGet.userName }}</v-btn>
Expand Down Expand Up @@ -57,13 +58,13 @@
<v-card-text>
<p v-if="tokenExpired">Your session has expired. Please Login.</p>
<p v-else>
Your session is about to expire in {{ timerValue }} seconds. Are
you still there?
Your session is about to expire in {{ timerValue }} seconds. Do
you want to extend your session?
</p>
</v-card-text>

<v-card-actions>
<v-btn @click="login" v-if="tokenExpired">Login</v-btn>
<v-btn :href="authRoutes.LOGIN" v-if="tokenExpired">Login</v-btn>
<v-btn @click="resumeSession" v-else>Yes</v-btn>
<v-btn @click="logout">Logout</v-btn>
</v-card-actions>
Expand Down Expand Up @@ -133,8 +134,8 @@ export default {
dataReady: function () {
return this.userInfoGet;
},
loginUrl: function () {
return this.authRoutes.LOGIN;
timeRemaining: function () {
return Math.floor(this.timerValue);
},
},
methods: {
Expand Down Expand Up @@ -177,7 +178,8 @@ export default {
},
login() {
// Use Vue Router to navigate to the login route
this.$router.push(this.loginUrl);
console.log(this.authRoutes.LOGIN);
this.$router.push(this.authRoutes.LOGIN);
},
},
};
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/components/DisplayTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,7 @@ export default {
editableFields() {
return this.fields.filter((field) => field.editable);
},
// totalRows: function () {
// if (this.items?.length) {
// return this.items.length;
// } else return this.totalRows;
// },
sortOptions() {
return this.fields
.filter((f) => f.sortable)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
valid IDIR.
</v-card-text>
<v-card-actions>
<v-btn color="primary" variant="text" href="authRoutes.LOGIN">
<v-btn color="primary" variant="text">
<a :href="authRoutes.LOGIN">Login</a>
</v-btn>
</v-card-actions>
Expand Down

0 comments on commit 0c49308

Please sign in to comment.