add material selection

This commit is contained in:
Seth Ladygo
2019-05-18 00:50:34 -07:00
parent 0dfb38f87a
commit cb26908f3b
2 changed files with 20 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export const store = new Vuex.Store({
materials: {},
selectedSectionID: null,
selectedModelID: null,
selectedMaterial: null,
selectedMaterialID: null,
loadingCatalog: false,
savingCatalog: false,
loadingProducts: false,
@ -100,6 +100,10 @@ export const store = new Vuex.Store({
return []
},
selectedMaterial: (state, getters) => (id) => {
return getters.material(id)
},
/// OLD STUFF
//
// catalog info
@ -181,6 +185,10 @@ export const store = new Vuex.Store({
state.selectedModelID = id
},
selectMaterial(state, id) {
state.selectedMaterialID = id
},
//
// manipulation
//
@ -293,6 +301,10 @@ export const store = new Vuex.Store({
context.commit('selectModel', id)
},
selectMaterial(context, id) {
context.commit('selectMaterial', id)
},
//
// manipulation
//