From b42ef396d44993e7c64a8244d6cf86c3556045b8 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Sun, 6 Dec 2020 09:34:58 -0500 Subject: [PATCH] only show billing and payment when configs.paymentsEnabled is true --- src/_pages/main/account/MyAccount.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pages/main/account/MyAccount.vue b/src/_pages/main/account/MyAccount.vue index e8da2c6..41da92d 100644 --- a/src/_pages/main/account/MyAccount.vue +++ b/src/_pages/main/account/MyAccount.vue @@ -72,7 +72,8 @@ export default { if (this.messages) { const account_actions = this.configs.bubbleNode === true ? 'manage_account_node_actions' : 'manage_account_sage_actions'; if (this.messages[account_actions]) { - const actions = this.messages[account_actions].split(','); + const vue = this; + const actions = this.messages[account_actions].split(',').filter(a => vue.configs.paymentsEnabled ? a : a !== 'billing' && a !== 'payment'); if (this.currentUser.admin && this.currentUser.firstAdmin) { const delete_index = actions.indexOf('delete'); if (delete_index !== -1) actions.splice(delete_index, 1);