TT#94801 Fix intra pbx flag in PBXConfig

Change-Id: I2dc59ee6092331eb74a7005e92864406b41fa8ec
mr9.1.1
Hans-Peter Herzog 5 years ago
parent 77e67e5d1c
commit dd191ffb33

@ -45,7 +45,8 @@ export default {
}, },
computed: { computed: {
...mapGetters('user', [ ...mapGetters('user', [
'isRtcEngineUiVisible' 'isRtcEngineUiVisible',
'isPbxEnabled'
]), ]),
items () { items () {
return [ return [
@ -182,6 +183,12 @@ export default {
visible: true visible: true
} }
] ]
},
{
to: '/user/pbx-settings',
icon: 'settings',
label: this.$t('navigation.pbxSettings.title'),
visible: this.isPbxEnabled
} }
] ]
} }

@ -19,7 +19,7 @@
:value="conferenceIdInput" :value="conferenceIdInput"
:placeholder="$t('conferencing.idPlaceholder')" :placeholder="$t('conferencing.idPlaceholder')"
:disable="isJoining || !hasRtcEngineCapabilityEnabled" :disable="isJoining || !hasRtcEngineCapabilityEnabled"
@change="conferenceIdChanged" @input="conferenceIdChanged"
> >
<template <template
v-slot:prepend v-slot:prepend

@ -212,7 +212,7 @@
<div class="col text-left col-xs-12 col-md-2 csc-cf-dest-number-cont"> <div class="col text-left col-xs-12 col-md-2 csc-cf-dest-number-cont">
<q-toggle <q-toggle
v-model="isEnabled" v-model="isEnabled"
@change="toggleGroupChange" @input="toggleGroupChange"
/> />
</div> </div>
<div class="col col-xs-12 col-md-5 csc-cf-group-actions"> <div class="col col-xs-12 col-md-5 csc-cf-group-actions">

@ -23,7 +23,7 @@
<q-toggle <q-toggle
v-if="forwardGroups.length > 0" v-if="forwardGroups.length > 0"
v-model="toggleDefaultNumber" v-model="toggleDefaultNumber"
@change="toggleChange" @input="toggleChange"
/> />
</div> </div>
<div <div

@ -69,7 +69,7 @@
<q-pagination <q-pagination
:value="deviceListCurrentPage" :value="deviceListCurrentPage"
:max="deviceListLastPage" :max="deviceListLastPage"
@change="loadDeviceListItemsFiltered" @input="loadDeviceListItemsFiltered"
/> />
</div> </div>
<csc-list-spinner <csc-list-spinner

@ -40,7 +40,7 @@
<q-pagination <q-pagination
:value="groupListCurrentPage" :value="groupListCurrentPage"
:max="groupListLastPage" :max="groupListLastPage"
@change="loadGroupListItemsPaginated" @input="loadGroupListItemsPaginated"
/> />
</div> </div>
<csc-list-spinner <csc-list-spinner

@ -201,7 +201,7 @@
class="q-pa-sm" class="q-pa-sm"
:label="$t('pbxConfig.toggleIntraPbx')" :label="$t('pbxConfig.toggleIntraPbx')"
:disable="loading" :disable="loading"
@change="changeIntraPbx" @input="changeIntraPbx"
/> />
<q-btn <q-btn
v-if="hasCallQueue" v-if="hasCallQueue"

@ -113,7 +113,7 @@
<q-pagination <q-pagination
:value="seatListCurrentPage" :value="seatListCurrentPage"
:max="seatListLastPage" :max="seatListLastPage"
@change="loadSeatListItemsPaginated" @input="loadSeatListItemsPaginated"
/> />
</div> </div>
<div <div

@ -79,7 +79,7 @@
<q-checkbox <q-checkbox
:label="$t('pbxConfig.soundSetDefault')" :label="$t('pbxConfig.soundSetDefault')"
:value="soundSet.contract_default" :value="soundSet.contract_default"
@change="saveAsDefault" @input="saveAsDefault"
/> />
<csc-list-spinner <csc-list-spinner
v-if="soundHandlesLoading || soundFilesLoading" v-if="soundHandlesLoading || soundFilesLoading"

@ -25,7 +25,7 @@
ref="fileUpload" ref="fileUpload"
accept=".wav,.mp3,.ogg" accept=".wav,.mp3,.ogg"
type="file" type="file"
@change="selectFile" @input="selectFile"
> >
<q-icon <q-icon
v-if="soundFile || selectedFile" v-if="soundFile || selectedFile"

@ -34,7 +34,7 @@
<q-pagination <q-pagination
:value="soundSetListCurrentPage" :value="soundSetListCurrentPage"
:max="soundSetListLastPage" :max="soundSetListLastPage"
@change="loadSoundSetListPaginated" @input="loadSoundSetListPaginated"
/> />
</div> </div>
<csc-list-spinner <csc-list-spinner

@ -1,31 +1,32 @@
<template> <template>
<csc-page <csc-page
class="csc-simple-page" class="q-pa-lg"
> >
<div <q-list>
class="row" <q-item>
> <q-item-section
<div side
class="col col-xs-12 col-md-12" >
> <q-toggle
<q-toggle v-model="clirIntrapbx"
v-model="clirIntrapbx" :disabled="isLoading"
:disabled="isLoading" class="csc-pbx-settings-toggle"
class="csc-pbx-settings-toggle" :label="clirIntrapbx ? $t('pbxConfig.selfPbxHidden') : $t('pbxConfig.selfPbxVisible')"
:label="clirIntrapbx ? $t('pbxConfig.selfPbxHidden') : $t('pbxConfig.selfPbxVisible')" checked-icon="visibility_off"
checked-icon="visibility_off" unchecked-icon="visibility"
unchecked-icon="visibility" @input="changeIntraPbx"
@change="changeIntraPbx" />
/> </q-item-section>
<q-spinner-dots <q-item-section
v-if="isLoading" class="text-right"
class="csc-pbx-settings-spinner" >
color="primary" <csc-spinner
:size="24" v-if="isLoading"
/> />
</div> </q-item-section>
</div> </q-item>
</q-list>
</csc-page> </csc-page>
</template> </template>
@ -39,8 +40,11 @@ import {
import { import {
RequestState RequestState
} from 'src/store/common' } from 'src/store/common'
import CscSpinner from 'components/CscSpinner'
import { getSubscriberId } from 'src/auth'
export default { export default {
components: { components: {
CscSpinner,
CscPage CscPage
}, },
data () { data () {
@ -51,8 +55,7 @@ export default {
}, },
async mounted () { async mounted () {
this.requestInProgress(true) this.requestInProgress(true)
const subscriberId = localStorage.getItem('subscriberId') const preferences = await this.loadPreferences(getSubscriberId())
const preferences = await this.loadPreferences(subscriberId)
this.clirIntrapbx = preferences.clir_intrapbx this.clirIntrapbx = preferences.clir_intrapbx
this.requestInProgress(false) this.requestInProgress(false)
}, },
@ -90,7 +93,7 @@ export default {
changeIntraPbx () { changeIntraPbx () {
const msg = this.clirIntrapbx ? this.$t('pbxConfig.selfPbxHidden') : this.$t('pbxConfig.selfPbxVisible') const msg = this.clirIntrapbx ? this.$t('pbxConfig.selfPbxHidden') : this.$t('pbxConfig.selfPbxVisible')
this.setIntraPbx({ this.setIntraPbx({
seatId: localStorage.getItem('subscriberId'), seatId: getSubscriberId(),
intraPbx: this.clirIntrapbx, intraPbx: this.clirIntrapbx,
message: msg message: msg
}) })
@ -101,12 +104,3 @@ export default {
} }
} }
</script> </script>
<style lang="stylus" rel="stylesheet/stylus">
@import '../../../themes/quasar.variables';
.csc-pbx-settings-toggle
margin-top 18px
.csc-pbx-settings-spinner
margin-left 10px
padding-top 18px
</style>

@ -18,6 +18,7 @@ import PbxConfigurationDevices from 'src/components/pages/PbxConfiguration/CscPb
import PbxConfigurationCallQueues from 'src/components/pages/PbxConfiguration/CscPbxCallQueues' import PbxConfigurationCallQueues from 'src/components/pages/PbxConfiguration/CscPbxCallQueues'
import PbxConfigurationSoundSets from 'src/components/pages/PbxConfiguration/CscPbxSoundSets' import PbxConfigurationSoundSets from 'src/components/pages/PbxConfiguration/CscPbxSoundSets'
import PbxConfigurationMsConfigs from 'src/components/pages/PbxConfiguration/CscPbxMsConfigs' import PbxConfigurationMsConfigs from 'src/components/pages/PbxConfiguration/CscPbxMsConfigs'
import CscPbxSettings from 'src/components/pages/PbxSettings/CscPbxSettings'
import Voicebox from 'src/components/pages/Voicebox/CscPageVoicebox' import Voicebox from 'src/components/pages/Voicebox/CscPageVoicebox'
import Login from 'src/components/CscPageLogin' import Login from 'src/components/CscPageLogin'
import CscUserSettings from 'src/components/pages/CscUserSettings' import CscUserSettings from 'src/components/pages/CscUserSettings'
@ -176,6 +177,14 @@ export default function routes (app) {
title: i18n.t('navigation.userSettings.title'), title: i18n.t('navigation.userSettings.title'),
subtitle: i18n.t('navigation.userSettings.subTitle') subtitle: i18n.t('navigation.userSettings.subTitle')
} }
},
{
path: 'pbx-settings',
component: CscPbxSettings,
meta: {
title: i18n.t('navigation.pbxSettings.title'),
subtitle: i18n.t('navigation.pbxSettings.subTitle')
}
} }
] ]
}, },
@ -221,7 +230,6 @@ export default function routes (app) {
// { path: '', component: () => import('pages/Index.vue') } // { path: '', component: () => import('pages/Index.vue') }
// ] // ]
// }, // },
//
// // Always leave this as last one, // // Always leave this as last one,
// // but you can also remove it // // but you can also remove it
// { // {
@ -229,5 +237,5 @@ export default function routes (app) {
// component: () => import('pages/Error404.vue') // component: () => import('pages/Error404.vue')
// } // }
// ] // ]
//
// export default routes // export default routes

Loading…
Cancel
Save