Hide Transactions Page again

This commit is contained in:
negue
2023-06-25 21:09:07 +02:00
parent 8b5ae17f02
commit 4915f2a3fb
2 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { mapState } from '@/libs/store';
export const userCustomStateMixin = fieldname => {
const map = { };
map[fieldname] = 'user.data';
return { // eslint-disable-line import/prefer-default-export
return {
computed: {
...mapState(map),
},
+25 -8
View File
@@ -1,16 +1,21 @@
<template>
<div class="row">
<secondary-menu class="col-12">
<router-link
<template
v-for="routePath in tabs"
:key="routePath"
class="nav-link"
:to="{name: routePath}"
exact="exact"
:class="{'active': $route.name === routePath}"
>
{{ $t(pathTranslateKey(routePath)) }}
</router-link>
<router-link
v-if="allowedToShowTab(routePath)"
:key="routePath"
class="nav-link"
:to="{name: routePath}"
exact="exact"
:class="{'active': $route.name === routePath}"
>
{{ $t(pathTranslateKey(routePath)) }}
</router-link>
</template>
</secondary-menu>
<div
v-if="$route.name === 'subscription' && promo === 'g1g1'"
@@ -203,6 +208,18 @@ export default {
},
},
methods: {
/**
* @param {String} tabName
* @returns {Boolean}
*/
allowedToShowTab (tabName) {
const transactionsTab = tabName === 'transactions';
return transactionsTab
? this.hasPermission(this.user, 'userSupport')
: true;
},
showSelectUser () {
this.$root.$emit('bv::show::modal', 'select-user-modal');
},