Implements move, copy and delete item, and delete section functionality

This commit is contained in:
Alicia Sykes
2021-10-25 19:11:13 +01:00
parent f398a374e7
commit 31e172befb
10 changed files with 75 additions and 15 deletions

View File

@@ -60,6 +60,7 @@
v-click-outside="closeContextMenu"
@openEditSection="openEditSection"
@navigateToSection="navigateToSection"
@removeSection="removeSection"
/>
</Collapsable>
</template>
@@ -217,6 +218,12 @@ export default {
this.$modal.hide(modalNames.EDIT_SECTION);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
},
/* Deletes current section, in local state */
removeSection() {
const payload = { sectionIndex: this.index, sectionName: this.title };
this.$store.commit(StoreKeys.REMOVE_SECTION, payload);
this.closeContextMenu();
},
/* Open custom context menu, and set position */
openContextMenu(e) {
this.contextMenuOpen = true;