diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json
index 7820a6def8..27e379f4aa 100644
--- a/auth-web/package-lock.json
+++ b/auth-web/package-lock.json
@@ -13214,9 +13214,9 @@
}
},
"sbc-common-components": {
- "version": "2.1.30",
- "resolved": "https://registry.npmjs.org/sbc-common-components/-/sbc-common-components-2.1.30.tgz",
- "integrity": "sha512-leVTGfC+gRL78yLJ+GftSCJ+k5GT6hyALQB71RrKGnFh++uDg4CEuHNN6CUsQHr7GjPw+4unMH7gcpC/shP/KQ==",
+ "version": "2.1.34",
+ "resolved": "https://registry.npmjs.org/sbc-common-components/-/sbc-common-components-2.1.34.tgz",
+ "integrity": "sha512-KcWIbSXdNrnwVg2hwtwhrz+TGv9cpQIRTzxRoLjSQYIYSQoL2LZfpVMaGMm6bBix5WTUbkkMm1BjqJqQTIDWSQ==",
"requires": {
"@mdi/font": "^4.5.95",
"axios": "^0.18.0",
diff --git a/auth-web/package.json b/auth-web/package.json
index 071b4666eb..d8744ab24f 100644
--- a/auth-web/package.json
+++ b/auth-web/package.json
@@ -20,7 +20,7 @@
"moment": "^2.24.0",
"regenerator-runtime": "^0.13.3",
"register-service-worker": "^1.6.2",
- "sbc-common-components": "^2.1.30",
+ "sbc-common-components": "^2.1.34",
"vue": "^2.6.11",
"vue-i18n": "^8.0.0",
"vue-property-decorator": "^8.3.0",
diff --git a/auth-web/src/components/auth/Transactions.vue b/auth-web/src/components/auth/Transactions.vue
index c48967e256..9a8b9e9d43 100644
--- a/auth-web/src/components/auth/Transactions.vue
+++ b/auth-web/src/components/auth/Transactions.vue
@@ -64,28 +64,21 @@
-
-
- {{showDateRangeSelected}}
-
-
-
-
-
- No Dates Selected
-
-
+
+ {{showDateRangeSelected}}
+
+
@@ -118,7 +111,7 @@
@click="exportCSV"
>Export CSV
-
+
{{totalTransactionsCount}} Records found
diff --git a/auth-web/src/router.ts b/auth-web/src/router.ts
index 9d0cebfabc..2c17044e1f 100644
--- a/auth-web/src/router.ts
+++ b/auth-web/src/router.ts
@@ -1,5 +1,5 @@
-import { LoginSource, Pages, Role, SessionStorageKeys } from '@/util/constants'
-import { Member, MembershipStatus, Organization } from '@/models/Organization'
+import { Account, LoginSource, Pages, Role, SessionStorageKeys } from '@/util/constants'
+import { Member, MembershipStatus, MembershipType, Organization } from '@/models/Organization'
import Router, { Route, RouteConfig } from 'vue-router'
import AcceptInviteLandingView from '@/views/auth/AcceptInviteLandingView.vue'
import AcceptInviteView from '@/views/auth/AcceptInviteView.vue'
@@ -109,7 +109,10 @@ export function getRoutes (): RouteConfig[] {
{
path: 'transactions',
name: 'transactions',
- component: transaction
+ component: transaction,
+ meta: {
+ isPremiumOnly: true
+ }
}
]
},
@@ -177,6 +180,18 @@ router.beforeEach((to, from, next) => {
query: { redirect: to.fullPath }
})
}
+ if (to.matched.some(record => record.meta.isPremiumOnly)) {
+ const currentOrganization: Organization = (store.state as any)?.org?.currentOrganization
+ const currentMembership: Member = (store.state as any)?.org?.currentMembership
+ // redirect to unauthorized page if the account selected is not Premium
+ if (!(currentOrganization?.orgType === Account.PREMIUM &&
+ [MembershipType.Admin, MembershipType.Coordinator].includes(currentMembership.membershipTypeCode))) {
+ return next({
+ path: '/unauthorized',
+ query: { redirect: to.fullPath }
+ })
+ }
+ }
}
// Enforce navigation guards are checked before navigating anywhere else
diff --git a/auth-web/src/views/auth/AccountSettings.vue b/auth-web/src/views/auth/AccountSettings.vue
index e67742e331..ff90a35efd 100644
--- a/auth-web/src/views/auth/AccountSettings.vue
+++ b/auth-web/src/views/auth/AccountSettings.vue
@@ -73,22 +73,29 @@