add material selection
This commit is contained in:
@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user