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:
@@ -132,7 +132,10 @@ export default {
|
||||
methods: {
|
||||
setupSocketEvents() {
|
||||
if (this.socket) {
|
||||
this.socket.on('falukantUpdateStatus', this.loadBankOverview);
|
||||
this.socket.on('falukantUpdateStatus', (data) => {
|
||||
console.log('📨 BankView: falukantUpdateStatus empfangen:', data);
|
||||
this.loadBankOverview();
|
||||
});
|
||||
console.log('✅ BankView: Socket.io Events registriert');
|
||||
} else {
|
||||
console.log('⚠️ BankView: Socket.io noch nicht verfügbar');
|
||||
|
||||
@@ -106,7 +106,10 @@ export default {
|
||||
methods: {
|
||||
setupSocketEvents() {
|
||||
if (this.socket) {
|
||||
this.socket.on('falukantUpdateStatus', this.loadDirectors);
|
||||
this.socket.on('falukantUpdateStatus', (data) => {
|
||||
console.log('📨 DirectorView: falukantUpdateStatus empfangen:', data);
|
||||
this.loadDirectors();
|
||||
});
|
||||
console.log('✅ DirectorView: Socket.io Events registriert');
|
||||
} else {
|
||||
console.log('⚠️ DirectorView: Socket.io noch nicht verfügbar');
|
||||
|
||||
@@ -206,8 +206,14 @@ export default {
|
||||
methods: {
|
||||
setupSocketEvents() {
|
||||
if (this.socket) {
|
||||
this.socket.on('falukantUpdateStatus', this.loadFamilyData);
|
||||
this.socket.on('familychanged', this.loadFamilyData);
|
||||
this.socket.on('falukantUpdateStatus', (data) => {
|
||||
console.log('📨 FamilyView: falukantUpdateStatus empfangen:', data);
|
||||
this.loadFamilyData();
|
||||
});
|
||||
this.socket.on('familychanged', (data) => {
|
||||
console.log('📨 FamilyView: familychanged empfangen:', data);
|
||||
this.loadFamilyData();
|
||||
});
|
||||
console.log('✅ FamilyView: Socket.io Events registriert');
|
||||
} else {
|
||||
console.log('⚠️ FamilyView: Socket.io noch nicht verfügbar');
|
||||
|
||||
@@ -97,7 +97,10 @@ export default {
|
||||
methods: {
|
||||
setupSocketEvents() {
|
||||
if (this.socket) {
|
||||
this.socket.on('falukantUpdateStatus', this.loadHealthData);
|
||||
this.socket.on('falukantUpdateStatus', (data) => {
|
||||
console.log('📨 HealthView: falukantUpdateStatus empfangen:', data);
|
||||
this.loadHealthData();
|
||||
});
|
||||
console.log('✅ HealthView: Socket.io Events registriert');
|
||||
} else {
|
||||
console.log('⚠️ HealthView: Socket.io noch nicht verfügbar');
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -82,7 +82,10 @@
|
||||
methods: {
|
||||
setupSocketEvents() {
|
||||
if (this.socket) {
|
||||
this.socket.on('falukantUpdateStatus', this.loadNobility);
|
||||
this.socket.on('falukantUpdateStatus', (data) => {
|
||||
console.log('📨 NobilityView: falukantUpdateStatus empfangen:', data);
|
||||
this.loadNobility();
|
||||
});
|
||||
console.log('✅ NobilityView: Socket.io Events registriert');
|
||||
} else {
|
||||
console.log('⚠️ NobilityView: Socket.io noch nicht verfügbar');
|
||||
|
||||
Reference in New Issue
Block a user