MT#56403 Add new internal preferences to show/hide CSC menus

Preferences imported to be used as selectors:
* contract_sound_set
* record_call

Totally new ad hoc preferences:
* csc_registered_devices
* csc_conversations
* csc_device_provisioning
* csc_hunt_groups

Change-Id: I90686e8874fc0c95f0929481f53680dffe0d7cee
pull/27/merge
Marco Capetta 3 years ago
parent f30a83023d
commit 45d9967f24

@ -74,7 +74,7 @@ export default {
icon: 'question_answer',
label: this.$t('Conversations'),
sublabel: this.$t('Calls, Faxes, VoiceMails'),
visible: true
visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.conversations)
},
{
icon: 'settings_phone',
@ -133,7 +133,7 @@ export default {
to: '/user/recordings',
icon: 'play_circle',
label: this.$t('Recordings'),
visible: true
visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.recordings)
}
]
},
@ -159,13 +159,13 @@ export default {
to: '/user/pbx-configuration/groups',
icon: 'group',
label: this.$t('Groups'),
visible: true
visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.huntGroups)
},
{
to: '/user/pbx-configuration/devices',
icon: 'fas fa-fax',
label: this.$t('Devices'),
visible: true
visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.deviceProvisioning)
},
{
to: '/user/pbx-configuration/call-queues',
@ -177,7 +177,7 @@ export default {
to: '/user/pbx-configuration/sound-sets',
icon: 'queue_music',
label: this.$t('Sound Sets'),
visible: true
visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.soundSet)
},
{
to: '/user/pbx-configuration/ms-configs',
@ -228,7 +228,7 @@ export default {
to: '/user/registered-devices',
icon: 'devices',
label: this.$t('Registered Devices'),
visible: true
visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.registeredDevices)
},
{
to: '/customer/' + this.getCustomerId + '/details',

@ -15,7 +15,13 @@ export const PROFILE_ATTRIBUTE_MAP = {
cscCalls: 'csc_calls',
clir_intrapbx: 'clir_intrapbx',
manager_secretary: 'manager_secretary',
auto_attendant: 'auto_attendant'
auto_attendant: 'auto_attendant',
soundSet: 'contract_sound_set',
deviceProvisioning: 'csc_device_provisioning',
conversations: 'csc_conversations',
registeredDevices: 'csc_registered_devices',
recordings: 'record_call',
huntGroups: 'csc_hunt_groups'
}
export const PROFILE_ATTRIBUTES_MAP = {

@ -4,6 +4,7 @@
class="row justify-center"
>
<csc-card-dashboard
v-if= "showConvList"
:title="$t('Voicebox Messages')"
:count="voicemailsCount"
:count-title="$t('Messages')"
@ -17,6 +18,7 @@
@action="downloadVoicemail"
/>
<csc-card-dashboard
v-if= "showConvList"
:title="$t('Call List')"
:count="callsCount"
:count-title="$t('Calls')"
@ -39,6 +41,7 @@
</template>
</csc-card-dashboard>
<csc-card-dashboard
v-if= "showRegDevices"
:title="$t('Registered Devices')"
:count="registeredDevicesCount"
:count-title="$t('Registered Devices')"
@ -61,6 +64,9 @@ import { mapWaitingActions } from 'vue-wait'
import {
showGlobalError
} from 'src/helpers/ui'
import {
mapGetters
} from 'vuex'
import {
date
} from 'quasar'
@ -70,6 +76,7 @@ import {
callIcon
} from 'src/helpers/call-utils'
import { mapState } from 'vuex'
import { PROFILE_ATTRIBUTE_MAP } from 'src/constants'
export default {
name: 'CscPageDashboard',
components: {
@ -93,7 +100,16 @@ export default {
computed: {
...mapState('call', [
'callEnabled'
])
]),
...mapGetters('user', [
'hasSubscriberProfileAttribute'
]),
showConvList () {
return this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.conversations)
},
showRegDevices () {
return this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.registeredDevices)
},
},
watch: {
async callEnabled () {

@ -78,7 +78,8 @@ export default function routes (app) {
},
get subtitle () {
return i18n.t('Calls, Faxes, VoiceMails')
}
},
profileAttribute: PROFILE_ATTRIBUTE_MAP.conversations
}
},
{
@ -138,7 +139,8 @@ export default function routes (app) {
},
get subtitle () {
return i18n.t('Call recordings')
}
},
profileAttribute: PROFILE_ATTRIBUTE_MAP.recordings
}
},
{
@ -176,7 +178,8 @@ export default function routes (app) {
},
get subtitle () {
return i18n.t('Groups')
}
},
profileAttribute: PROFILE_ATTRIBUTE_MAP.huntGroups
}
},
{
@ -224,7 +227,8 @@ export default function routes (app) {
},
get subtitle () {
return i18n.t('Devices')
}
},
profileAttribute: PROFILE_ATTRIBUTE_MAP.deviceProvisioning
}
},
{
@ -249,7 +253,8 @@ export default function routes (app) {
},
get subtitle () {
return i18n.t('Sound Sets')
}
},
profileAttribute: PROFILE_ATTRIBUTE_MAP.soundSet
}
},
{
@ -398,7 +403,8 @@ export default function routes (app) {
},
get subtitle () {
return i18n.t('List of registered devices for the subscriber')
}
},
profileAttribute: PROFILE_ATTRIBUTE_MAP.registeredDevices
}
},
{

Loading…
Cancel
Save