Some extensions and fixes

This commit is contained in:
Torsten Schulz
2025-01-28 09:55:36 +01:00
parent 2f60741116
commit 90b4f51dcb
27 changed files with 910 additions and 53 deletions

View File

@@ -409,12 +409,15 @@ export default {
return;
}
const message = JSON.parse(event.data);
if (message.event === 'production_ready' && message.branch_id === this.selectedBranch?.id) {
if ((message.event === 'production_ready' || message.event === 'production_started') && message.branch_id == this.selectedBranch?.id) {
this.handleProductionReadyEvent(message);
}
if (message.event === 'stock_change' && message.branch_id === this.selectedBranch?.id) {
if (message.event === 'stock_change' && message.branch_id == this.selectedBranch?.id) {
this.stockChange();
}
if (message.event === 'selled_items' && message.branch_id == this.selectedBranch?.id) {
this.loadInventory();
}
} catch (error) {
console.error('Error processing WebSocket message in BranchView:', error);
}