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 === '') { if (params.profile_id === null || params.profile_id === undefined || params.profile_id === '') {
delete params.profile_id delete params.profile_id
} else {
params.profile_id = String(params.profile_id)
} }
if (params.identifier === null || params.identifier === undefined || params.identifier === '') { if (params.identifier === null || params.identifier === undefined || params.identifier === '') {
delete params.identifier delete params.identifier

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

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

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

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

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

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

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

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

Loading…
Cancel
Save