feat(vocab): add dashboard learning summary and related endpoints
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
- Introduced `getDashboardLearningSummary` method in `VocabService` to provide a compact overview of enrolled courses and current lessons for users. - Updated `vocabController` to include a new route for the dashboard widget, allowing users to access their learning summary. - Enhanced `vocabRouter` to route requests for the new dashboard widget endpoint. - Added localization support for the new dashboard features across multiple languages, improving user engagement and accessibility. - Updated UI components to integrate the new dashboard widget, ensuring a seamless user experience.
This commit is contained in:
@@ -28,10 +28,12 @@ import ListWidget from './widgets/ListWidget.vue';
|
||||
import BirthdayWidget from './widgets/BirthdayWidget.vue';
|
||||
import UpcomingEventsWidget from './widgets/UpcomingEventsWidget.vue';
|
||||
import MiniCalendarWidget from './widgets/MiniCalendarWidget.vue';
|
||||
import VocabCoursesWidget from './widgets/VocabCoursesWidget.vue';
|
||||
|
||||
function getWidgetComponent(endpoint) {
|
||||
if (!endpoint || typeof endpoint !== 'string') return ListWidget;
|
||||
const ep = endpoint.toLowerCase();
|
||||
if (ep.includes('vocab/dashboard-widget')) return VocabCoursesWidget;
|
||||
if (ep.includes('falukant')) return FalukantWidget;
|
||||
if (ep.includes('news')) return NewsWidget;
|
||||
if (ep.includes('calendar/widget/birthdays')) return BirthdayWidget;
|
||||
@@ -42,7 +44,7 @@ function getWidgetComponent(endpoint) {
|
||||
|
||||
export default {
|
||||
name: 'DashboardWidget',
|
||||
components: { FalukantWidget, NewsWidget, ListWidget, BirthdayWidget, UpcomingEventsWidget, MiniCalendarWidget },
|
||||
components: { FalukantWidget, NewsWidget, ListWidget, BirthdayWidget, UpcomingEventsWidget, MiniCalendarWidget, VocabCoursesWidget },
|
||||
props: {
|
||||
widgetId: { type: String, required: true },
|
||||
title: { type: String, required: true },
|
||||
|
||||
Reference in New Issue
Block a user