Hide Transactions Page again
This commit is contained in:
@@ -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),
|
||||
},
|
||||
|
||||
@@ -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');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user