Diverse Fixes nach refactoring
This commit is contained in:
@@ -34,7 +34,7 @@ async function initDashboard() {
|
||||
|
||||
// User is authenticated, show dashboard
|
||||
if (session.user) {
|
||||
console.log('User data:', session.user);
|
||||
|
||||
currentUser = session.user;
|
||||
displayUserInfo(session.user);
|
||||
} else {
|
||||
@@ -1041,6 +1041,8 @@ async function loadPlayerAchievements() {
|
||||
}
|
||||
|
||||
const result = await response.json();
|
||||
|
||||
|
||||
window.allAchievements = result.data;
|
||||
playerAchievements = result.data.filter(achievement => achievement.is_completed);
|
||||
|
||||
@@ -1126,10 +1128,6 @@ function displayAchievements() {
|
||||
// Translate achievement
|
||||
const translatedAchievement = translateAchievement(achievement);
|
||||
|
||||
// Debug logging
|
||||
if (achievement.name === 'Tageskönig') {
|
||||
console.log('Tageskönig Debug:', { isCompleted, progress, earnedAt, completionCount });
|
||||
}
|
||||
|
||||
let progressText = '';
|
||||
if (isCompleted) {
|
||||
@@ -1155,6 +1153,7 @@ function displayAchievements() {
|
||||
const pointsText = currentLanguage === 'de' ? 'Punkte' : 'Points';
|
||||
const totalPoints = completionCount > 0 ? achievement.points * completionCount : achievement.points;
|
||||
|
||||
|
||||
return `
|
||||
<div class="achievement-card ${isCompleted ? 'completed' : 'incomplete'}"
|
||||
onclick="showAchievementDetails('${achievement.id}')">
|
||||
|
||||
Reference in New Issue
Block a user