TT#123750 SubscriberProfiles - As Subscriber, I want to see the "VoiceMail"-Feature if I have the permission to do so

Change-Id: Ieba8d87ba5aec141e2fc22c36b73e17005c4184d
mr9.5.2
Carlo Venusino 4 years ago
parent 5388fe2128
commit 508205bbec

@ -25,8 +25,8 @@ module.exports = function (/* ctx */) {
'i18n',
// 'axios',
'vue-resource',
'routes',
'user',
'routes',
'components',
'vue-scrollto',
'constants',

@ -35,7 +35,11 @@ export default ({ app, router, store }) => {
})
break
default:
next()
if (to.meta?.profileAttribute) {
app.store.getters['user/hasSubscriberProfileAttribute'](to.meta.profileAttribute) ? next() : next('/')
} else {
next()
}
}
}
})

@ -87,7 +87,7 @@ export default {
to: '/user/voicebox',
icon: 'voicemail',
label: this.$t('Voicebox'),
visible: true
visible: this.hasSubscriberProfileAttribute('voice_mail')
},
{
to: '/user/call-forwarding',

@ -133,14 +133,8 @@ export default function routes (app) {
component: CscPageReminder,
meta: {
title: i18n.t('Reminder'),
subtitle: i18n.t('Set your personal alarm')
},
async beforeEnter (routeTo, routeFrom, next) {
if (app.store.getters['user/hasSubscriberProfileAttribute']('reminder')) {
next()
} else {
next('/')
}
subtitle: i18n.t('Set your personal alarm'),
profileAttribute: 'reminder'
}
},
{
@ -212,7 +206,8 @@ export default function routes (app) {
component: CscPageVoicebox,
meta: {
title: i18n.t('Voicebox'),
subtitle: i18n.t('Set your voicebox settings')
subtitle: i18n.t('Set your voicebox settings'),
profileAttribute: 'voice_mail'
}
},
{

Loading…
Cancel
Save