Skip to content

Commit

Permalink
vuex mutation testing
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Dec 19, 2023
1 parent 1ac2954 commit 64451eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/store/block.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ const actions = {
console.log(chartSpace)
// Example chartSpace: chart_29
// As a generalization, the first part of whatever is the input of store.commit determines where it goes. Check src/store
// Example: store.commit('chart_<something>`) will go to src\store\chart.module.js,
// Example: store.commit('chart_<something>`) will go to src\store\chart.module.js,
// store.commit('map/<something>') will go to src\store\map.module.js
// Example: store.commit(chartSpace/building) > search "buildings" in "mutations" section (I think), in chart.module file

// Example: store.commit(chartSpace/building) > search "buildings" in "mutations" section, in chart.module file
// Mutations = change store value, getters = retrieve value. https://vuex.vuejs.org/guide/mutations
store.commit(chartSpace + '/building', this.getters['map/meterGroup'](chart.meters).building)
store.commit(chartSpace + '/meterGroupPath', this.getters['map/meterGroup'](chart.meters).path)
Expand Down
3 changes: 3 additions & 0 deletions src/store/chart.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ const mutations = {
},

building (state, building) {
// example call triggered from block.module.js's updateCharts()
// commented out for now as this triggers many times
// console.log(building)
state.building = building
},

Expand Down

0 comments on commit 64451eb

Please sign in to comment.