TT#124277 SubscriberProfiles - Integrate cfu/cfb/cfna/cft

TT#124407 SubscriberProfiles - Show all features if no SubscriberProfile and no SubscriberProfileSet is set

Change-Id: Ibfa3ae28ec40fd1b0a7221ed77e903884d6907cd
mr9.5.2
Carlo Venusino 4 years ago committed by Hans-Peter Herzog
parent cd17075bfb
commit e16ccb6423

@ -186,7 +186,7 @@
>
<csc-more-menu>
<csc-popup-menu-item
v-if="mapping.type === 'cfu'"
v-if="mapping.type === 'cfu' && hasSubscriberProfileAttribute('cft')"
icon="ring_volume"
:label="$t('Ring primary number')"
@click="ringPrimaryNumberEvent"
@ -266,7 +266,7 @@
<script>
import _ from 'lodash'
import {
mapActions
mapActions, mapGetters
} from 'vuex'
import CscMoreMenu from 'components/CscMoreMenu'
import CscPopupMenuItemDelete from 'components/CscPopupMenuItemDelete'
@ -315,6 +315,9 @@ export default {
}
},
computed: {
...mapGetters('user', [
'hasSubscriberProfileAttribute'
]),
clickableClasses () {
return ['cursor-pointer', 'text-weight-bold', 'text-primary']
},

@ -4,6 +4,7 @@
class="q-pa-lg"
>
<template
v-if="hasSubscriberProfileAttributes(['cfu', 'cfna', 'cfb'])"
v-slot:header
>
<q-btn
@ -16,16 +17,19 @@
>
<csc-popup-menu>
<csc-popup-menu-item
v-if="hasSubscriberProfileAttribute('cfu')"
color="primary"
:label="$t('If available')"
@click="createMapping({ type: 'cfu'})"
/>
<csc-popup-menu-item
v-if="hasSubscriberProfileAttribute('cfna')"
color="primary"
:label="$t('If not available')"
@click="createMapping({ type: 'cfna'})"
/>
<csc-popup-menu-item
v-if="hasSubscriberProfileAttribute('cfb')"
color="primary"
:label="$t('If busy')"
@click="createMapping({ type: 'cfb'})"
@ -111,6 +115,10 @@ export default {
]),
...mapGetters('callForwarding', [
'groups'
]),
...mapGetters('user', [
'hasSubscriberProfileAttribute',
'hasSubscriberProfileAttributes'
])
},
async mounted () {

@ -186,7 +186,10 @@ export default {
return state.logoRequested
},
hasSubscriberProfileAttribute: (state) => (attribute) => {
return state.profile?.attributes.includes(attribute) || false
return state.profile ? state.profile.attributes.includes(attribute) : true
},
hasSubscriberProfileAttributes: (state) => (attributes) => {
return state.profile ? state.profile.attributes.some(item => attributes.includes(item)) : true
}
},
mutations: {

Loading…
Cancel
Save