Verbesserung: Hinzufügen von Protokollausgaben zur Eventverarbeitung in StatusBar.vue und BranchView.vue
Änderungen: - In der StatusBar.vue wurden Protokollausgaben hinzugefügt, um den Event-Typ und den Erfolg oder Fehler des fetchStatus-Aufrufs zu dokumentieren. - In der BranchView.vue wurden Protokollausgaben hinzugefügt, um den Event-Typ und den Status der Aktualisierung aller Sektionen zu protokollieren. Diese Anpassungen verbessern die Nachvollziehbarkeit der Eventverarbeitung und erleichtern die Fehlersuche.
This commit is contained in:
@@ -126,11 +126,17 @@ export default {
|
|||||||
},
|
},
|
||||||
handleEvent(eventData) {
|
handleEvent(eventData) {
|
||||||
console.log('🔄 StatusBar: handleEvent aufgerufen mit:', eventData);
|
console.log('🔄 StatusBar: handleEvent aufgerufen mit:', eventData);
|
||||||
|
console.log('🔄 StatusBar: Event-Typ:', eventData.event);
|
||||||
switch (eventData.event) {
|
switch (eventData.event) {
|
||||||
case 'falukantUpdateStatus':
|
case 'falukantUpdateStatus':
|
||||||
case 'stock_change':
|
case 'stock_change':
|
||||||
case 'familychanged':
|
case 'familychanged':
|
||||||
this.fetchStatus();
|
console.log('🔄 StatusBar: Rufe fetchStatus() auf...');
|
||||||
|
this.fetchStatus().then(() => {
|
||||||
|
console.log('✅ StatusBar: fetchStatus() erfolgreich abgeschlossen');
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error('❌ StatusBar: fetchStatus() Fehler:', error);
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('⚠️ StatusBar: Unbekanntes Event:', eventData.event);
|
console.log('⚠️ StatusBar: Unbekanntes Event:', eventData.event);
|
||||||
|
|||||||
@@ -218,6 +218,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleEvent(eventData) {
|
handleEvent(eventData) {
|
||||||
|
console.log('🔄 BranchView: handleEvent aufgerufen mit:', eventData);
|
||||||
|
console.log('🔄 BranchView: Event-Typ:', eventData.event);
|
||||||
switch (eventData.event) {
|
switch (eventData.event) {
|
||||||
case 'production_ready':
|
case 'production_ready':
|
||||||
this.$refs.productionSection?.loadProductions();
|
this.$refs.productionSection?.loadProductions();
|
||||||
@@ -243,10 +245,13 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'falukantUpdateStatus':
|
case 'falukantUpdateStatus':
|
||||||
case 'falukantBranchUpdate':
|
case 'falukantBranchUpdate':
|
||||||
|
console.log('🔄 BranchView: Lade alle Sektionen für', eventData.event);
|
||||||
|
console.log('🔄 BranchView: StatusBar ref:', this.$refs.statusBar);
|
||||||
this.$refs.statusBar?.fetchStatus();
|
this.$refs.statusBar?.fetchStatus();
|
||||||
this.$refs.productionSection?.loadProductions();
|
this.$refs.productionSection?.loadProductions();
|
||||||
this.$refs.storageSection?.loadStorageData();
|
this.$refs.storageSection?.loadStorageData();
|
||||||
this.$refs.saleSection?.loadInventory();
|
this.$refs.saleSection?.loadInventory();
|
||||||
|
console.log('✅ BranchView: Alle Sektionen aktualisiert');
|
||||||
break;
|
break;
|
||||||
case 'knowledge_update':
|
case 'knowledge_update':
|
||||||
this.loadProducts();
|
this.loadProducts();
|
||||||
|
|||||||
Reference in New Issue
Block a user