diff --git a/doc/router-navigation-guard.md b/doc/router-navigation-guard.md index 8960a761..712850bb 100644 --- a/doc/router-navigation-guard.md +++ b/doc/router-navigation-guard.md @@ -148,7 +148,6 @@ Each menu item includes a `visible` property that determines whether it should b 3. **Platform and User Capability Checks** - Verifies that the ngcp platform has the necessary modules activated and that the module is enabled for the user. This check also incudes the license check for the feature: - `this.isFaxFeatureEnabled()` checks if the fax feature is enabled in the platform, if it is enabled for the user and if the license fax is active. Note, this doesn't include the checks about fax server settings. - `this.isPbxEnabled()` checks if the pbx feature is enabled in the platform, if it's enabled for the user and if the license pbx is active. - - `this.isSmsEnabled()` checks if the sms feature is enabled in the platform, if it's enabled for the user and if the license sms is active. **IMPORTANT** The Menu Item Visibility Logic needs to be aligned with with Route Guards diff --git a/src/components/pages/PbxStatistics/CscCdrFilters.vue b/src/components/pages/PbxStatistics/CscCdrFilters.vue index 78ea8c3c..c194cf65 100644 --- a/src/components/pages/PbxStatistics/CscCdrFilters.vue +++ b/src/components/pages/PbxStatistics/CscCdrFilters.vue @@ -178,8 +178,7 @@ export default { ]), ...mapGetters('user', [ 'isFaxFeatureEnabled', - 'hasSubscriberProfileAttribute', - 'isSmsEnabled' + 'hasSubscriberProfileAttribute' ]), ...mapState('user', [ 'platformInfo' @@ -225,10 +224,10 @@ export default { label: this.$t('Voicemail'), value: 'voicemail' }] : []), - ...(this.isSmsEnabled ? [{ + { label: this.$t('Sms'), value: 'sms' - }] : []), + }, ...(this.isFaxFeatureEnabled ? [{ label: this.$t('Fax'), value: 'fax' diff --git a/src/constants.js b/src/constants.js index 4c4ed62a..76731715 100644 --- a/src/constants.js +++ b/src/constants.js @@ -50,7 +50,7 @@ export const PROFILE_ATTRIBUTES_MAP = { callSettings: ['music_on_hold', 'language'], pbxSettings: ['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'], - callForwarding: ['cfu', 'cfb', 'cfna', 'cft', 'cfs', 'cfo', 'cfr', 'rerouting_mode', 'rerouting_codes'] + callForwarding: ['cfu', 'cfb', 'cfna', 'cft', 'cfs', 'cfo', 'cfr'] } export const LICENSES = { @@ -66,6 +66,5 @@ export const FEATURES = { cloudPbx: 'cloudpbx', sms: 'sms', faxServer: 'faxserver', - fileShare: 'fileshare', mobilePush: 'mobilepush' } diff --git a/src/store/user.js b/src/store/user.js index 9d0c20cd..59d49177 100644 --- a/src/store/user.js +++ b/src/store/user.js @@ -123,11 +123,6 @@ export default { return state?.platformInfo?.[feature] } }, - isSmsEnabled (state) { - return state?.platformInfo?.sms && - state?.capabilities?.sms && - state?.platformInfo?.licenses?.includes(LICENSES.sms) - }, isFaxFeatureEnabled (state, getters) { return state?.capabilities?.faxserver && state?.platformInfo?.faxserver &&