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']]
|
||||
});
|
||||
|
||||
// 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 }));
|
||||
|
||||
// Lade Sprachnamen für alle Kurse
|
||||
|
||||
@@ -141,10 +141,17 @@ export default {
|
||||
courses: [],
|
||||
languages: [],
|
||||
showCreateDialog: false,
|
||||
showShareCodeDialog: false,
|
||||
searchTerm: '',
|
||||
selectedLanguageId: '',
|
||||
selectedNativeLanguageId: '',
|
||||
shareCode: '',
|
||||
searchTimeout: null,
|
||||
newCourse: {
|
||||
title: '',
|
||||
description: '',
|
||||
languageId: null,
|
||||
nativeLanguageId: null,
|
||||
difficultyLevel: 1,
|
||||
isPublic: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user