Enhance VocabService logging and update VocabCourseListView state management
- Added debug logging in VocabService to track course retrieval details, aiding in troubleshooting and performance monitoring. - Updated VocabCourseListView to include additional state properties for managing share codes and search functionality, improving user experience and interaction capabilities.
This commit is contained in:
@@ -615,6 +615,15 @@ export default class VocabService {
|
|||||||
order: [['createdAt', 'DESC']]
|
order: [['createdAt', 'DESC']]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Debug-Logging (kann später entfernt werden)
|
||||||
|
console.log(`[getCourses] Gefunden: ${courses.length} Kurse`, {
|
||||||
|
userId: user.id,
|
||||||
|
languageId,
|
||||||
|
nativeLanguageId,
|
||||||
|
search,
|
||||||
|
where: JSON.stringify(where, null, 2)
|
||||||
|
});
|
||||||
|
|
||||||
const coursesData = courses.map(c => c.get({ plain: true }));
|
const coursesData = courses.map(c => c.get({ plain: true }));
|
||||||
|
|
||||||
// Lade Sprachnamen für alle Kurse
|
// Lade Sprachnamen für alle Kurse
|
||||||
|
|||||||
@@ -141,10 +141,17 @@ export default {
|
|||||||
courses: [],
|
courses: [],
|
||||||
languages: [],
|
languages: [],
|
||||||
showCreateDialog: false,
|
showCreateDialog: false,
|
||||||
|
showShareCodeDialog: false,
|
||||||
|
searchTerm: '',
|
||||||
|
selectedLanguageId: '',
|
||||||
|
selectedNativeLanguageId: '',
|
||||||
|
shareCode: '',
|
||||||
|
searchTimeout: null,
|
||||||
newCourse: {
|
newCourse: {
|
||||||
title: '',
|
title: '',
|
||||||
description: '',
|
description: '',
|
||||||
languageId: null,
|
languageId: null,
|
||||||
|
nativeLanguageId: null,
|
||||||
difficultyLevel: 1,
|
difficultyLevel: 1,
|
||||||
isPublic: false
|
isPublic: false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user