MT#58500 [CSC]Cannot assign seat on SNOM D865 devices

Change-Id: Ic2e13a012435783e7e919c49bd9e39db55a8e7a7
mr11.5.1
Hugo Zigha 2 years ago committed by Marco Capetta
parent fe4e211213
commit fd01bacbf3

@ -1,6 +1,8 @@
<template> <template>
<q-select <q-select
:label="selectedKeyLabel" :label="selectedKeyLabel"
:model-value="modelValue"
:options="options"
v-bind="$attrs" v-bind="$attrs"
> >
<template <template
@ -37,6 +39,14 @@
export default { export default {
name: 'CscPbxAutoAttendantSelection', name: 'CscPbxAutoAttendantSelection',
props: { props: {
modelValue: {
type: Object,
default: undefined
},
options: {
type: Array,
default: () => []
},
showSelectedItemIcon: { showSelectedItemIcon: {
type: Boolean, type: Boolean,
default: true default: true
@ -44,19 +54,15 @@ export default {
}, },
computed: { computed: {
selectedKeyLabel () { selectedKeyLabel () {
const selectedValue = this.$attrs.value || { type: null } const selectedValue = this.modelValue || { subscriberTypeTitle: null }
let label = this.$t('Group/Seat/Pilot') let label = this.$t('Group/Seat/Pilot')
if (selectedValue.type !== null) { if (selectedValue.subscriberTypeTitle !== null) {
label = ({ label = this.$t(selectedValue.subscriberTypeTitle)
pilot: this.$t('Pilot'),
seat: this.$t('Seat'),
group: this.$t('Group')
})[selectedValue.type]
} }
return label return label
}, },
selectedKeyIcon () { selectedKeyIcon () {
return this.$attrs.value?.icon return this.modelValue?.icon
} }
} }
} }

@ -256,7 +256,7 @@ export default {
}, },
onSave (newLine) { onSave (newLine) {
const newLines = [] const newLines = []
const lines = _.clone(this.lines) const lines = _.cloneDeep(this.lines)
const line = this.getLineByKey(this.selectedKey) const line = this.getLineByKey(this.selectedKey)
if (line !== null && newLine.type === null) { if (line !== null && newLine.type === null) {
delete lines[line.index] delete lines[line.index]

@ -48,10 +48,10 @@
/> />
<csc-pbx-auto-attendant-selection <csc-pbx-auto-attendant-selection
v-if="changes.type && !hasTargetNumber" v-if="changes.type && !hasTargetNumber"
:value="selectedKeySubscriber" v-model="selectedKeySubscriber"
:options="subscriberOptions" :options="subscriberOptions"
:disable="loading" :disable="loading"
@input="keySubscriberChanged" @update:model-value="keySubscriberChanged"
/> />
<csc-input <csc-input
v-if="showCustomNumberToggle && hasTargetNumber" v-if="showCustomNumberToggle && hasTargetNumber"
@ -64,7 +64,7 @@
:error="v$.changes.target_number.$errors.length > 0" :error="v$.changes.target_number.$errors.length > 0"
:error-message="targetNumberErrorMessage" :error-message="targetNumberErrorMessage"
:label="$t('Number')" :label="$t('Number')"
@input="v$.changes.target_number.$touch()" @update:model-value="v$.changes.target_number.$touch()"
/> />
<csc-list-spinner <csc-list-spinner
v-if="loading" v-if="loading"

@ -51,14 +51,14 @@
/> />
<csc-pbx-auto-attendant-selection <csc-pbx-auto-attendant-selection
v-if="filterType === 'display_name'" v-if="filterType === 'display_name'"
v-model="typedFilter"
use-input use-input
dense dense
:show-selected-item-icon="false" :show-selected-item-icon="false"
:value="typedFilter"
:options="subscribersOptionsFiltered" :options="subscribersOptionsFiltered"
:disable="loading" :disable="loading"
@filter="filterSubscriberOptions" @filter="filterSubscriberOptions"
@input="triggerFilter" @update:model-value="triggerFilter"
/> />
</div> </div>
</div> </div>

Loading…
Cancel
Save