diff --git a/src/components/CscMainMenuTop.vue b/src/components/CscMainMenuTop.vue index 503f2548..02801ba3 100644 --- a/src/components/CscMainMenuTop.vue +++ b/src/components/CscMainMenuTop.vue @@ -196,31 +196,31 @@ export default { { icon: 'settings', label: this.$t('PBX Settings'), - visible: this.isPbxEnabled && this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.pbxSettings), + visible: this.isPbxEnabled && this.hasSubscriberProfileAttributes(PROFILE_ATTRIBUTES_MAP.pbxSettings), children: [ { to: '/user/pbx-settings/general', icon: 'settings', label: this.$t('General'), - visible: true + visible: this.isPbxEnabled && this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.clir_intrapbx) }, { to: '/user/pbx-settings/call-queues', icon: 'filter_none', label: this.$t('Call Queues'), - visible: true + visible: this.isPbxEnabled && this.hasSubscriberProfileAttributes(PROFILE_ATTRIBUTES_MAP.pbxSettingsCallQueue) }, { to: '/user/pbx-settings/ms-configs', icon: 'arrow_forward', label: this.$t('Manager Secretary'), - visible: true + visible: this.isPbxEnabled && this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.manager_secretary) }, { to: '/user/pbx-settings/auto-attendant', icon: 'dialpad', label: this.$t('Auto-attendant'), - visible: true + visible: this.isPbxEnabled && this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.auto_attendant) } ] }, diff --git a/src/constants.js b/src/constants.js index 2c772948..4c2947f3 100644 --- a/src/constants.js +++ b/src/constants.js @@ -12,12 +12,16 @@ export const PROFILE_ATTRIBUTE_MAP = { voiceMail: 'voice_mail', callBlockingPrivacy: 'clir', faxServer: 'fax_server', - pbxSettings: 'clir_intrapbx', - cscCalls: 'csc_calls' + cscCalls: 'csc_calls', + clir_intrapbx: 'clir_intrapbx', + manager_secretary: 'manager_secretary', + auto_attendant: 'auto_attendant' } export const PROFILE_ATTRIBUTES_MAP = { callBlockingIncoming: ['block_in_clir', 'block_in_mode', 'block_in_list'], callBlockingOutgoing: ['block_out_mode', 'block_out_list'], - callSettings: ['music_on_hold', 'language'] + callSettings: ['music_on_hold', 'language'], + pbxSettings: ['clir_intrapbx', 'auto_attendant', 'cloud_pbx_callqueue', 'max_queue_length', 'queue_wrap_up_time', 'manager_secretary'], + pbxSettingsCallQueue: ['cloud_pbx_callqueue', 'max_queue_length', 'queue_wrap_up_time'] } diff --git a/src/router/routes.js b/src/router/routes.js index 7283e035..34c80cf0 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -343,7 +343,7 @@ export default function routes (app) { get subtitle () { return i18n.t('Set your PBX settings') }, - profileAttribute: PROFILE_ATTRIBUTE_MAP.pbxSettings + profileAttributes: PROFILE_ATTRIBUTE_MAP.clir_intrapbx } }, { @@ -355,7 +355,8 @@ export default function routes (app) { }, get subtitle () { return i18n.t('Call Queues') - } + }, + profileAttributes: PROFILE_ATTRIBUTES_MAP.pbxSettingsCallQueue } }, { @@ -367,7 +368,8 @@ export default function routes (app) { }, get subtitle () { return i18n.t('Manager Secretary') - } + }, + profileAttribute: PROFILE_ATTRIBUTE_MAP.manager_secretary } }, { @@ -379,7 +381,8 @@ export default function routes (app) { }, get subtitle () { return i18n.t('Auto-attendant') - } + }, + profileAttribute: PROFILE_ATTRIBUTE_MAP.auto_attendant } }, {