Some extensions and fixes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user