Skip to content

Commit

Permalink
fixing CMP GUI so it does not always react + bug fix (project-chip#1434)
Browse files Browse the repository at this point in the history
* fixing CMP GUI so it does not always react + fixing bug where user clicks on endpoint then state has to be updated

* update to dbEnum reference
  • Loading branch information
paulr34 authored Sep 26, 2024
1 parent 8c50f6e commit 323ad2e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/ZclCreateModifyEndpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ export default {
// Set / unset multiple device option in mcp
if (this.$store.state.zap.isMultiConfig) {
if (categoryTmp === 'zigbee') {
if (categoryTmp === DbEnum.helperCategory.zigbee) {
this.$store.state.zap.cmpEnableZigbeeFeatures = true
this.$store.state.zap.cmpEnableMatterFeatures = false
} else {
Expand Down
33 changes: 29 additions & 4 deletions src/components/ZclEndpointCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ limitations under the License.
}}</strong>
</div>
</q-item>
<q-item class="row" v-if="enableNetworkId">
<q-item class="row">
<div class="col-6">
<strong>Network</strong>
</div>
Expand All @@ -173,14 +173,14 @@ limitations under the License.
</div>
</q-item>
<q-item class="row">
<div class="col-6" v-if="enableParentEndpoint">
<div class="col-6" v-if="showParentEndpointIdentifier">
<strong>Parent Endpoint</strong>
</div>
<div class="col-6" v-if="enableParentEndpoint">
<div class="col-6" v-if="showParentEndpointIdentifier">
<strong>{{ parentEndpointIdentifier[endpointReference] }}</strong>
</div>
</q-item>
<q-item class="row" v-if="enableProfileId">
<q-item class="row" v-if="showProfileId">
<div class="col-6">
<strong>Profile ID</strong>
</div>
Expand Down Expand Up @@ -419,6 +419,15 @@ export default {
if (this.$route.path !== '/') {
this.$router.push({ path: '/' })
}
if (this.$store.state.zap.isMultiConfig) {
if (categoryTmp === dbEnum.helperCategory.zigbee) {
this.$store.state.zap.cmpEnableZigbeeFeatures = true
this.$store.state.zap.cmpEnableMatterFeatures = false
} else {
this.$store.state.zap.cmpEnableZigbeeFeatures = false
this.$store.state.zap.cmpEnableMatterFeatures = true
}
}
}
},
computed: {
Expand Down Expand Up @@ -491,11 +500,27 @@ export default {
return this.$store.state.zap.endpointView.parentEndpointIdentifier
}
},
showParentEndpointIdentifier: {
get() {
return (
this.getDeviceCategory(this.deviceType[0].packageRef) === 'matter'
)
}
},
profileId: {
get() {
return this.$store.state.zap.endpointView.profileId
}
},
showProfileId: {
get() {
return (
this.getDeviceCategory(this.deviceType[0].packageRef) === 'zigbee' &&
this.$store.state.zap.isProfileIdShown &&
this.enableProfileId
)
}
},
deviceId: {
get() {
return this.$store.state.zap.endpointTypeView.deviceIdentifier
Expand Down

0 comments on commit 323ad2e

Please sign in to comment.