diff --git a/src/components/CscNcos.vue b/src/components/CscNcos.vue index 1ec0df98..55bb488b 100644 --- a/src/components/CscNcos.vue +++ b/src/components/CscNcos.vue @@ -1,6 +1,7 @@ <template> <div v-if="pageType === 'typeoutgoing'" + class="q-mb-lg" > <q-item class="col col-xs-12 col-md-6" @@ -12,6 +13,7 @@ no-wrap > <q-select + v-if="hasSubscriberProfileAttribute('ncos') && (this.isPbxAdmin || ! this.isPbxEnabled)" v-model="ncosLevel" use-chips radio @@ -34,7 +36,8 @@ </template> </q-select> <q-select - v-model="ncosSet" + v-if="hasSubscriberProfileAttribute('ncos_set') && (this.isPbxAdmin || ! this.isPbxEnabled)" + v-model="ncosSet" use-chips radio emit-value @@ -59,9 +62,11 @@ </q-item> </div> </template> + <script> import { - mapActions + mapActions, + mapGetters } from 'vuex' import CscInputButtonSave from 'src/components/form/CscInputButtonSave' import CscInputButtonReset from 'src/components/form/CscInputButtonReset' @@ -94,6 +99,11 @@ export default { await this.getCurrentNcosSetsSubscriber(); }, computed: { + ...mapGetters('user', [ + 'hasSubscriberProfileAttribute', + 'isPbxAdmin', + 'isPbxEnabled' + ]), hasNcosChanged () { return this.ncosLevel !== this.originalNcosLevel }, diff --git a/src/constants.js b/src/constants.js index afe1e1b4..abfff053 100644 --- a/src/constants.js +++ b/src/constants.js @@ -26,7 +26,7 @@ export const PROFILE_ATTRIBUTE_MAP = { export const PROFILE_ATTRIBUTES_MAP = { callBlockingIncoming: ['block_in_clir', 'block_in_mode', 'block_in_list'], - callBlockingOutgoing: ['block_out_mode', 'block_out_list'], + callBlockingOutgoing: ['block_out_mode', 'block_out_list', 'ncos', 'ncos_set'], callBlockingPrivacy: ['clir', 'clir_intrapbx'], callSettings: ['music_on_hold', 'language'], pbxSettings: ['auto_attendant', 'cloud_pbx_callqueue', 'max_queue_length', 'queue_wrap_up_time', 'manager_secretary'],