@ -18,7 +18,7 @@
class = "col-xs-12 col-md-2"
class = "col-xs-12 col-md-2"
>
>
< q -input
< q -input
v - if = "filterType !== 'profile Filter '"
v - if = "filterType !== 'profile _id '"
v - model = "typedFilter"
v - model = "typedFilter"
type = "text"
type = "text"
dense
dense
@ -40,7 +40,7 @@
< / template >
< / template >
< / q - i n p u t >
< / q - i n p u t >
< csc -pbx -model -select
< csc -pbx -model -select
v - if = "filterType === 'profile Filter '"
v - if = "filterType === 'profile _id '"
v - model = "typedFilter"
v - model = "typedFilter"
: profiles = "deviceProfileList"
: profiles = "deviceProfileList"
: profile - map = "deviceProfileMap"
: profile - map = "deviceProfileMap"
@ -109,22 +109,30 @@ export default {
return [
return [
{
{
label : this . $t ( 'pbxConfig.deviceStationName' ) ,
label : this . $t ( 'pbxConfig.deviceStationName' ) ,
value : 'station NameFilter '
value : 'station _name '
} ,
} ,
{
{
label : this . $t ( 'pbxConfig.deviceIdentifier' ) ,
label : this . $t ( 'pbxConfig.deviceIdentifier' ) ,
value : 'identifier Filter '
value : 'identifier '
} ,
} ,
{
{
label : this . $t ( 'pbxConfig.deviceModel' ) ,
label : this . $t ( 'pbxConfig.deviceModel' ) ,
value : 'profileFilter'
value : 'profile_id'
} ,
{
label : this . $t ( 'pbxConfig.extension' ) ,
value : 'pbx_extension'
} ,
{
label : this . $t ( 'pbxConfig.queueExtensionName' ) ,
value : 'display_name'
}
}
]
]
} ,
} ,
filtersList ( ) {
filtersList ( ) {
return this . filters . map ( ( filterItem ) => {
return this . filters . map ( ( filterItem ) => {
let filterDisplayValue = filterItem . value
let filterDisplayValue = filterItem . value
if ( filterItem . name === 'profileFilter' ) {
if ( filterItem . name === 'profile _id ') {
filterDisplayValue = this . deviceProfileMap [ filterItem . value ] . name
filterDisplayValue = this . deviceProfileMap [ filterItem . value ] . name
}
}
return {
return {
@ -171,6 +179,12 @@ export default {
this . filters . forEach ( filter => {
this . filters . forEach ( filter => {
params [ filter . name ] = filter . value
params [ filter . name ] = filter . value
} )
} )
/ / a s p e c i a l f i x b e c a u s e o f q - s e l e c t b e h a v i o u r . i t s t o r e s 0 f o r e m p t y s e l e c t i o n
if ( ! params . profile _id ) {
delete params . profile _id
}
this . $emit ( 'filter' , params )
this . $emit ( 'filter' , params )
}
}
}
}