diff --git a/src/components/pages/PbxConfiguration/CscPbxSeat.vue b/src/components/pages/PbxConfiguration/CscPbxSeat.vue index d1a186c1..981fc050 100644 --- a/src/components/pages/PbxConfiguration/CscPbxSeat.vue +++ b/src/components/pages/PbxConfiguration/CscPbxSeat.vue @@ -223,7 +223,7 @@ radio emit-value map-options - :options="soundSetOptions" + :options="internalSoundSetOptions" :label="$t('Sound Set')" :disable="loading" > @@ -391,6 +391,25 @@ export default { } else { return '' } + }, + internalSoundSetOptions () { + const items = [] + if (this.soundSet) { + items.push({ + label: this.soundSet.name, + value: this.soundSet.id + }) + } + if (_.isArray(this.soundSetOptions)) { + this.soundSetOptions.forEach((soundSet) => { + if (this.soundSet && this.soundSet.id !== soundSet.value) { + items.push(soundSet) + } else if (!this.soundSet) { + items.push(soundSet) + } + }) + } + return items } }, watch: { diff --git a/src/store/pbx.js b/src/store/pbx.js index 12aec9a2..7cd4bf4a 100644 --- a/src/store/pbx.js +++ b/src/store/pbx.js @@ -90,16 +90,12 @@ export default { }, getSoundSetOptions (state) { const options = [] - let defaultLabel = i18n.t('Default') + const defaultLabel = i18n.t('Default') state.soundSetList.forEach((soundSet) => { - if (soundSet.contract_default) { - defaultLabel = i18n.t('Default') + ' (' + soundSet.name + ')' - } else { - options.push({ - label: soundSet.name, - value: soundSet.id - }) - } + options.push({ + label: soundSet.name, + value: soundSet.id + }) }) options.unshift({ label: defaultLabel,