MT#64678 Remove unnecessary preferences from PBX Seats creation form and actions menu

- Removed "Hide number within own PBX" from PBX Seat creation form
- Removed "Hide number within own PBX" from PBX Seats actions menu
- Removed "Music on hold" from PBX Seats actions menu

These preferences are now only configurable in the PBX Seat details to avoid duplication and simplify the UI.

Change-Id: I8c9c8967bf4039f02b5848dea33285d04b0451c1
(cherry picked from commit 2971827b0a)
(cherry picked from commit a357d10bf2)
mr26.0.1
nidrissi-zouggari 2 months ago committed by Nouhaila Idrissi-Zouggari
parent 27f88cb952
commit 3d67318c77

@ -158,7 +158,6 @@ export async function createSeat (seat) {
}, { forceCli: seat.forceCli }) }, { forceCli: seat.forceCli })
}).then(($subscriberId) => { }).then(($subscriberId) => {
subscriberId = $subscriberId subscriberId = $subscriberId
setSeatIntraPbx(subscriberId, seat.clirIntrapbx)
if (seat.soundSet !== null && seat.soundSet !== undefined) { if (seat.soundSet !== null && seat.soundSet !== undefined) {
return getSoundSet(seat.soundSet) return getSoundSet(seat.soundSet)
} }

@ -81,35 +81,6 @@
<csc-popup-menu-item-delete <csc-popup-menu-item-delete
@click="deleteSeat" @click="deleteSeat"
/> />
<q-separator v-if="showClirIntraPbx || showMusicOnHold" />
<q-item
v-if="showClirIntraPbx"
class="no-padding"
>
<q-item-section>
<q-toggle
v-model="changes.clirIntrapbx"
class="q-pa-sm"
:label="$t('Hide number within own PBX')"
:disable="loading"
@update:model-value="changeIntraPbx"
/>
</q-item-section>
</q-item>
<q-item
v-if="showMusicOnHold"
class="no-padding"
>
<q-item-section>
<q-toggle
v-model="changes.musicOnHold"
class="q-pa-sm"
:label="$t('Music on Hold')"
:disable="loading"
@update:model-value="changeMusicOnHold"
/>
</q-item-section>
</q-item>
</csc-more-menu> </csc-more-menu>
</q-item-section> </q-item-section>
</q-item> </q-item>
@ -121,8 +92,6 @@ import CscMoreMenu from 'components/CscMoreMenu'
import CscPopupMenuItem from 'components/CscPopupMenuItem' import CscPopupMenuItem from 'components/CscPopupMenuItem'
import CscPopupMenuItemDelete from 'components/CscPopupMenuItemDelete' import CscPopupMenuItemDelete from 'components/CscPopupMenuItemDelete'
import _ from 'lodash' import _ from 'lodash'
import { PROFILE_ATTRIBUTES_MAP, PROFILE_ATTRIBUTE_MAP } from 'src/constants'
import { mapGetters } from 'vuex'
export default { export default {
name: 'CscPbxSeat', name: 'CscPbxSeat',
components: { components: {
@ -146,10 +115,6 @@ export default {
loading: { loading: {
type: Boolean, type: Boolean,
default: undefined default: undefined
},
musicOnHold: {
type: Boolean,
default: undefined
} }
}, },
emits: ['save-intra-pbx', 'save-music-on-hold', 'remove'], emits: ['save-intra-pbx', 'save-music-on-hold', 'remove'],
@ -158,18 +123,6 @@ export default {
changes: this.getSeatData() changes: this.getSeatData()
} }
}, },
computed: {
...mapGetters('user', [
'hasSubscriberProfileAttribute',
'hasSomeSubscriberProfileAttributes'
]),
showClirIntraPbx () {
return this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.clir_intrapbx)
},
showMusicOnHold () {
return this.hasSomeSubscriberProfileAttributes(PROFILE_ATTRIBUTES_MAP.callSettings)
}
},
watch: { watch: {
seat () { seat () {
this.changes = this.getSeatData() this.changes = this.getSeatData()
@ -184,8 +137,6 @@ export default {
name: this.seat.display_name, name: this.seat.display_name,
extension: this.seat.pbx_extension, extension: this.seat.pbx_extension,
webPassword: this.seat.webpassword, webPassword: this.seat.webpassword,
clirIntrapbx: this.intraPbx,
musicOnHold: this.musicOnHold,
groups: this.getGroupIds() groups: this.getGroupIds()
} }
}, },
@ -231,18 +182,6 @@ export default {
seatSIPPassword: password seatSIPPassword: password
}) })
}, },
changeIntraPbx () {
this.$emit('save-intra-pbx', {
seatId: this.seat.id,
intraPbx: this.changes.clirIntrapbx
})
},
changeMusicOnHold () {
this.$emit('save-music-on-hold', {
seatId: this.seat.id,
musicOnHold: this.changes.musicOnHold
})
},
showSeatDetails () { showSeatDetails () {
this.$router.push(`/user/pbx-configuration/seat/${this.seat.id}`) this.$router.push(`/user/pbx-configuration/seat/${this.seat.id}`)
} }

@ -111,13 +111,6 @@
/> />
</template> </template>
</q-select> </q-select>
<q-toggle
v-model="data.clirIntrapbx"
:label="$t('Hide number within own PBX')"
:disable="loading"
class="q-pa-md"
dense
/>
</div> </div>
<div <div
class="col-xs-12 col-lg-3" class="col-xs-12 col-lg-3"
@ -374,8 +367,7 @@ export default {
}, },
aliasNumbers: [], aliasNumbers: [],
groups: [], groups: [],
soundSet: null, soundSet: null
clirIntrapbx: false
} }
}, },
cancel () { cancel () {
@ -398,8 +390,7 @@ export default {
sipPassword: this.data.sipPassword.password, sipPassword: this.data.sipPassword.password,
aliasNumbers: this.data.aliasNumbers, aliasNumbers: this.data.aliasNumbers,
groups: this.data.groups, groups: this.data.groups,
soundSet: this.data.soundSet, soundSet: this.data.soundSet
clirIntrapbx: this.data.clirIntrapbx
}) })
}, },
reset () { reset () {

@ -77,7 +77,6 @@
:class="'col-xs-12 col-md-6 col-lg-4 csc-item-' + ((index % 2 === 0)?'odd':'even')" :class="'col-xs-12 col-md-6 col-lg-4 csc-item-' + ((index % 2 === 0)?'odd':'even')"
:seat="seat" :seat="seat"
:intra-pbx="getIntraPbx(seat.id)" :intra-pbx="getIntraPbx(seat.id)"
:music-on-hold="getMusicOnHold(seat.id)"
:groups="groupMapById" :groups="groupMapById"
:loading="isSeatLoading(seat.id)" :loading="isSeatLoading(seat.id)"
@remove="openSeatRemovalDialog(seat.id)" @remove="openSeatRemovalDialog(seat.id)"
@ -178,7 +177,6 @@ export default {
'isSeatRemoving', 'isSeatRemoving',
'isSeatLoading', 'isSeatLoading',
'getIntraPbx', 'getIntraPbx',
'getMusicOnHold',
'getSeatRemoveDialogMessage', 'getSeatRemoveDialogMessage',
'getSeatCreationToastMessage', 'getSeatCreationToastMessage',
'getSeatRemovalToastMessage', 'getSeatRemovalToastMessage',

Loading…
Cancel
Save