@@ -32,7 +32,7 @@ limitations under the License.
3232 min =" 0"
3333 />
3434 <q-input
35- v-if =" $store.state.zap.isProfileIdShown"
35+ v-show =" $store.state.zap.isProfileIdShown"
3636 label =" Profile ID"
3737 v-model =" computedProfileId"
3838 ref =" profile"
@@ -52,7 +52,7 @@ limitations under the License.
5252 hide-selected
5353 fill-input
5454 :options =" deviceTypeOptions"
55- v-model =" deviceTypeRefAndDeviceIdPair "
55+ v-model =" devicePair "
5656 :rules =" [(val) => val != null || '* Required']"
5757 :option-label =" getDeviceOptionLabel"
5858 @filter =" filterDeviceTypes"
@@ -141,7 +141,7 @@ export default {
141141 this .shownEndpoint .deviceVersion = parseInt (
142142 this .endpointVersion [this .endpointReference ]
143143 )
144- this .deviceTypeRefAndDeviceIdPair = {
144+ this .devicePair = {
145145 deviceTypeRef:
146146 this .endpointDeviceTypeRef [this .endpointType [this .endpointReference ]],
147147 deviceIdentifier: this .endpointDeviceId [this .endpointReference ],
@@ -213,11 +213,6 @@ export default {
213213 return this .$store .state .zap .endpointView .deviceId
214214 },
215215 },
216- deviceTypeRefAndDeviceIdPair: {
217- get () {
218- return this .$store .state .zap .deviceTypeRefAndDeviceIdPair
219- },
220- },
221216 computedProfileId: {
222217 get () {
223218 let profileOption =
@@ -262,9 +257,8 @@ export default {
262257 profileId = this .asHex (this .zclDeviceTypes [deviceTypeRef].profileId , 4 )
263258 }
264259 this .shownEndpoint .profileIdentifier = profileId
265- this .deviceTypeRefAndDeviceIdPair .deviceTypeRef = value .deviceTypeRef
266- this .deviceTypeRefAndDeviceIdPair .deviceIdentifier =
267- value .deviceIdentifier
260+ this .devicePair .deviceTypeRef = value .deviceTypeRef
261+ this .devicePair .deviceIdentifier = value .deviceIdentifier
268262 },
269263 saveOrCreateHandler () {
270264 let profile = this .$store .state .zap .isProfileIdShown
@@ -308,7 +302,7 @@ export default {
308302 this .$store
309303 .dispatch (` zap/addEndpointType` , {
310304 name: ' Anonymous Endpoint Type' ,
311- deviceTypeRef: this .deviceTypeRefAndDeviceIdPair .deviceTypeRef ,
305+ deviceTypeRef: this .devicePair .deviceTypeRef ,
312306 })
313307 .then ((response ) => {
314308 this .$store
@@ -318,8 +312,7 @@ export default {
318312 profileId: parseInt (this .shownEndpoint .profileIdentifier ),
319313 endpointType: response .id ,
320314 endpointVersion: this .shownEndpoint .deviceVersion ,
321- deviceIdentifier:
322- this .deviceTypeRefAndDeviceIdPair .deviceIdentifier ,
315+ deviceIdentifier: this .devicePair .deviceIdentifier ,
323316 })
324317 .then ((res ) => {
325318 if (this .shareClusterStatesAcrossEndpoints ()) {
@@ -362,7 +355,7 @@ export default {
362355 this .$store .dispatch (' zap/updateEndpointType' , {
363356 endpointTypeId: endpointTypeReference,
364357 updatedKey: RestApi .updateKey .deviceTypeRef ,
365- updatedValue: this .deviceTypeRefAndDeviceIdPair .deviceTypeRef ,
358+ updatedValue: this .devicePair .deviceTypeRef ,
366359 })
367360
368361 this .$store .dispatch (' zap/updateEndpoint' , {
@@ -386,7 +379,7 @@ export default {
386379 },
387380 {
388381 updatedKey: RestApi .updateKey .deviceId ,
389- value: parseInt (this .deviceTypeRefAndDeviceIdPair .deviceIdentifier ),
382+ value: parseInt (this .devicePair .deviceIdentifier ),
390383 },
391384 ],
392385 })
@@ -434,8 +427,8 @@ export default {
434427 try {
435428 done (
436429 {
437- deviceTypeRef: this .deviceTypeRefAndDeviceIdPair .deviceTypeRef
438- ? this .deviceTypeRefAndDeviceIdPair .deviceTypeRef
430+ deviceTypeRef: this .devicePair .deviceTypeRef
431+ ? this .devicePair .deviceTypeRef
439432 : this .customDeviceIdReference ,
440433 deviceIdentifier: parseInt (val),
441434 },
0 commit comments