Fix: Hinzufügen von Protokollausgaben für empfangene Socket.io-Events in mehreren Views

Änderung:
- In den Views BankView, DirectorView, FamilyView, HealthView, HouseView und NobilityView wurden Protokollausgaben hinzugefügt, um empfangene Daten von den Socket.io-Events 'falukantUpdateStatus' und 'familychanged' zu dokumentieren.
- Diese Anpassung verbessert die Nachvollziehbarkeit der Datenaktualisierungen und erleichtert die Fehlersuche bei der Eventverarbeitung.

Diese Änderungen sorgen für eine bessere Transparenz und Debugging-Möglichkeiten in der Anwendung.
This commit is contained in:
Torsten Schulz (local)
2025-09-08 13:18:26 +02:00
parent d9f967b33c
commit fbe41e627b
6 changed files with 33 additions and 8 deletions

View File

@@ -201,14 +201,21 @@ export default {
methods: {
setupSocketEvents() {
if (this.socket) {
this.socket.on('falukantHouseUpdate', this.loadData);
this.socket.on('falukantUpdateStatus', this.loadData);
this.socket.on('falukantHouseUpdate', (data) => {
console.log('📨 HouseView: falukantHouseUpdate empfangen:', data);
this.loadData();
});
this.socket.on('falukantUpdateStatus', (data) => {
console.log('📨 HouseView: falukantUpdateStatus empfangen:', data);
this.loadData();
});
console.log('✅ HouseView: Socket.io Events registriert');
} else {
console.log('⚠️ HouseView: Socket.io noch nicht verfügbar');
setTimeout(() => this.setupSocketEvents(), 1000);
}
}
}
};
</script>