update SectionInfoDialog to work again

This commit is contained in:
Seth Ladygo
2019-05-17 22:45:43 -07:00
parent a9a971d3d6
commit 151a16d0c5
3 changed files with 83 additions and 33 deletions

View File

@ -11,7 +11,6 @@ export const store = new Vuex.Store({
catalog: null,
materials: {},
selectedSectionID: null,
//selectedFamilyID: null,
selectedModelID: null,
selectedMaterial: null,
loadingCatalog: false,
@ -190,6 +189,10 @@ export const store = new Vuex.Store({
state.catalog.sections.push(section)
},
setSectionName(state, { section, name }) {
section.name = name
},
reorderSection(state, { from, to }) {
if (from === to) return
state.catalog.sections = arrayMove(state.catalog.sections, from, to)
@ -293,6 +296,10 @@ export const store = new Vuex.Store({
commit('addSection', section)
},
setSectionName({ commit }, payload) {
commit('setSectionName', payload)
},
reorderSection({ commit }, payload) {
commit('reorderSection', payload)
},