feat(dashboard): add content page options menu (#757)

* feat(dashboard): add content page options menu

Add a three-dot menu on the course Content page with actions to unlock
all locked lessons/exercises and toggle content grouping. Reuse shared
locked-content collection logic from course settings.

Co-authored-by: Rotimi Best <[email protected]>

* fix(dashboard): keep unlock-all enabled and add menu icons

Show a success snackbar when all content is already unlocked instead of
disabling the action. Add lock-open and table-of-contents icons to menu items.

Co-authored-by: Rotimi Best <[email protected]>

* fix(dashboard): check courseApi.update return for grouping toggle

Use the update() return value instead of courseApi.success, which can be
false after a successful PUT if the follow-up refresh request fails.

Co-authored-by: Rotimi Best <[email protected]>

---------

Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
Rotimi Best
2026-07-15 22:28:23 +01:00
committed by GitHub
co-authored by Rotimi Best
parent bfafc685e0
commit 656fa4fa7e
14 changed files with 231 additions and 26 deletions
@@ -289,7 +289,10 @@
"successful_integration": "Integration lykkedes",
"successful_deletion": "Integration slettet",
"update_successful": "Opdateringen lykkedes",
"unlocked_all_content": "Alle kursusartikler er låst op"
"unlocked_all_content": "Alle kursusartikler er låst op",
"all_content_already_unlocked": "Alt indhold er allerede låst op",
"content_grouping_enabled": "Indholdsgruppering aktiveret",
"content_grouping_disabled": "Indholdsgruppering deaktiveret"
}
},
"people": {
@@ -1320,6 +1323,12 @@
"add_content_create_lesson": "Opret lektion",
"add_content_section_title_placeholder": "f.eks. Modul 1: Introduktion",
"add_content_lesson_title_placeholder": "f.eks. Kom godt i gang med variabler",
"content_menu": {
"label": "Indholdsindstillinger",
"unlock_all": "Lås alt indhold op",
"enable_grouping": "Aktivér indholdsgruppering",
"disable_grouping": "Deaktivér indholdsgruppering"
},
"join_lesson": "Deltag i lektionen",
"no_link": "Intet link",
"no_tutor": "Ingen underviser tilføjet",