Skip to content

Commit

Permalink
edit & delete buttons work for section tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Oct 24, 2023
1 parent e1980eb commit 52ef0cf
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,15 @@
},
methods: {
handleActiveSectionAction(opt) {
switch (opt.id) {
case 'edit':
console.log('Editing, ', this.quizForge.activeSection.value.section_id);
const section_id = this.quizForge.activeSection.value.section_id;
switch (opt.label) {
case this.editSectionLabel$():
this.$router.replace({ path: 'new/' + section_id + '/edit' });
break;
case 'delete':
case this.deleteSectionLabel$():
console.log('Deleting, ', this.quizForge.activeSection.value.section_id);
this.quizForge.removeSection(this.quizForge.activeSection.value.section_id);
break;
default:
console.error('BAD OPTION GIVEN OHHHHHH NOOOOO');
}
},
tabRefLabel(section_id) {
Expand Down

0 comments on commit 52ef0cf

Please sign in to comment.