Skip to content

Commit

Permalink
Merge pull request #12137 from AllanOXDi/Update-resources
Browse files Browse the repository at this point in the history
Add "Update resources" option to Options dropdown
  • Loading branch information
AllanOXDi authored May 14, 2024
2 parents 8ff5292 + a300c42 commit 51c4207
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@
questionList$,
sectionDeletedNotification$,
deleteConfirmation$,
updateResources$,
} = enhancedQuizManagementStrings;
const {
Expand Down Expand Up @@ -467,6 +468,7 @@
updateQuiz,
addQuestionToSelection,
removeQuestionFromSelection,
updateResources$,
// Computed
channels,
Expand Down Expand Up @@ -538,6 +540,11 @@
icon: 'delete',
id: 'delete',
},
{
label: this.updateResources$(),
icon: 'plus',
id: 'plus',
},
];
},
},
Expand Down Expand Up @@ -572,13 +579,19 @@
handleActiveSectionAction(opt) {
const section_id = this.activeSection.section_id;
const editRoute = this.$router.getRoute(PageNames.QUIZ_SECTION_EDITOR, { section_id });
const resourcesRoute = this.$router.getRoute(PageNames.QUIZ_SELECT_RESOURCES, {
section_id,
});
switch (opt.label) {
case this.editSectionLabel$():
this.$router.push(editRoute);
break;
case this.deleteSectionLabel$():
this.handleShowConfirmation(section_id);
break;
case this.updateResources$():
this.$router.push(resourcesRoute);
break;
}
},
tabRefLabel(section_id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,7 @@ export const enhancedQuizManagementStrings = createTranslator('EnhancedQuizManag
message: "Section '{ section_title }' deleted",
context: 'A snackbar message that appears when the user deletes a section',
},
updateResources: {
message: 'Update resources',
},
});

0 comments on commit 51c4207

Please sign in to comment.