TT#96810 CSC: Fix PBX Model selection while filtering by Device Model

In addition there was fixed a migration issue with labels for some filter inputs.
Change-Id: Ib1125ce8994ab86fe4d17c5977ad2407f98cd585
mr9.1.1
Sergii Leonenko 5 years ago
parent eccc51c3f6
commit 9639b3484a

@ -39,6 +39,8 @@ export function getDeviceList (options) {
}
if (params.profile_id === null || params.profile_id === undefined || params.profile_id === '') {
delete params.profile_id
} else {
params.profile_id = String(params.profile_id)
}
if (params.identifier === null || params.identifier === undefined || params.identifier === '') {
delete params.identifier

@ -8,7 +8,7 @@
<q-input
v-model="phraseInput"
dark
:float-label="label"
:label="label"
:disable="searching"
@keyup.enter="search"
/>

@ -4,7 +4,7 @@
v-model="source"
dark
autofocus
:float-label="$t('pages.callForward.sources.source')"
:label="$t('pages.callForward.sources.source')"
color="primary"
@keyup.enter="addSource()"
/>

@ -82,13 +82,11 @@
</q-field>
<csc-pbx-model-select
v-model="changes.profile"
:label="$t('pbxConfig.deviceModel')"
:profile="changes.profile"
:profiles="profiles"
:profile-map="profileMap"
:model-image-map="modelImageMap"
:has-reset-button="false"
@opened="$emit('model-select-opened')"
@input="selectedProfile"
>
<template
v-if="hasProfileChanged"
@ -266,6 +264,9 @@ export default {
resetIdentifier () {
this.changes.identifier = this.device.identifier
},
selectedProfile (profileId) {
this.changes.profile = profileId
},
resetProfile () {
this.changes.profile = this.device.profile_id
},

@ -23,13 +23,11 @@
/>
<csc-pbx-model-select
v-model="formData.profile"
:profile="formData.profile"
:profiles="profiles"
:profile-map="profileMap"
:model-image-map="modelImageMap"
:has-reset-button="true"
@opened="$emit('model-select-opened')"
@selected="selectedProfile"
@input="selectedProfile"
@reset="resetProfile"
/>
<div

@ -20,13 +20,12 @@
@reset="resetIdentifier"
/>
<csc-pbx-model-select
:profile="profileFilter"
:value="profileFilter"
:profiles="profiles"
:profile-map="profileMap"
:model-image-map="modelImageMap"
:has-reset-button="true"
@opened="$emit('model-select-opened')"
@selected="filterProfile"
@input="filterProfile"
@reset="resetProfile"
/>
</div>
@ -73,8 +72,8 @@ export default {
default: ''
},
profileFilter: {
type: String,
default: ''
type: Number,
default: null
},
profiles: {
type: Array,
@ -117,7 +116,7 @@ export default {
this.$emit('reset-identifier')
},
filterProfile (profile) {
this.$emit('filter-profile', profile)
this.$emit('filter-profile', Number(profile))
},
resetProfile () {
this.$emit('reset-profile')

@ -170,10 +170,6 @@ export default {
type: Number,
default: undefined
},
profile: {
type: Number,
default: undefined
},
profiles: {
type: Array,
default: () => []
@ -182,10 +178,6 @@ export default {
type: Object,
default: null
},
modelImageMap: {
type: Object,
default: null
},
disable: {
type: Boolean,
default: false
@ -197,7 +189,7 @@ export default {
},
data () {
return {
selectedProfile: this.getProfileById(this.profile)
selectedProfile: this.getProfileById(this.value)
}
},
computed: {
@ -224,8 +216,8 @@ export default {
}
},
watch: {
profile (id) {
this.selectedProfile = this.getProfileById(id)
value () {
this.selectedProfile = this.getProfileById(this.value)
}
},
methods: {

@ -70,7 +70,7 @@
chips
:disable="loading || numberOptionsLoading"
:readonly="loading"
:float-label="$t('pbxConfig.msConfigNumberSelectionLabel')"
:label="$t('pbxConfig.msConfigNumberSelectionLabel')"
:options="numberOptions"
>
<template

@ -45,7 +45,7 @@
radio
:disable="loading || !data.copy_from_default"
:readonly="loading"
:float-label="$t('pbxConfig.language')"
:label="$t('pbxConfig.language')"
:options="languageOptions"
/>
<div

Loading…
Cancel
Save