revive SectionDeleteDialog

This commit is contained in:
Seth Ladygo
2019-05-17 22:55:47 -07:00
parent 151a16d0c5
commit 70c532daad
3 changed files with 52 additions and 12 deletions

View File

@ -189,6 +189,12 @@ export const store = new Vuex.Store({
state.catalog.sections.push(section)
},
deleteSection(state, section) {
if (section) {
state.catalog.sections = state.catalog.sections.filter(s => s.id !== section.id)
}
},
setSectionName(state, { section, name }) {
section.name = name
},
@ -296,6 +302,10 @@ export const store = new Vuex.Store({
commit('addSection', section)
},
deleteSection({ commit, getters }, section) {
commit('deleteSection', section)
},
setSectionName({ commit }, payload) {
commit('setSectionName', payload)
},