feat(falukant): enhance relationship state handling and director updates
All checks were successful
Deploy to production / deploy (push) Successful in 2m58s
All checks were successful
Deploy to production / deploy (push) Successful in 2m58s
- Updated FalukantService to return user information alongside relationship state for improved context in relationship management. - Modified DirectorInfo component to trigger a refresh when a new director is hired, ensuring up-to-date information. - Added socket event handling for 'directorchanged' in BranchView to manage director updates effectively, enhancing real-time responsiveness in the application.
This commit is contained in:
@@ -552,6 +552,7 @@ export default {
|
||||
this.socket.on('falukantBranchUpdate', (data) => this.handleEvent({ event: 'falukantBranchUpdate', ...data }));
|
||||
this.socket.on('transport_arrived', (data) => this.handleEvent({ event: 'transport_arrived', ...data }));
|
||||
this.socket.on('inventory_updated', (data) => this.handleEvent({ event: 'inventory_updated', ...data }));
|
||||
this.socket.on('directorchanged', (data) => this.handleEvent({ event: 'directorchanged', ...(data || {}) }));
|
||||
}
|
||||
// Load taxes for the initially selected branch (if any)
|
||||
await this.loadBranchTaxes();
|
||||
@@ -573,6 +574,7 @@ export default {
|
||||
this.socket.off('falukantBranchUpdate');
|
||||
this.socket.off('transport_arrived');
|
||||
this.socket.off('inventory_updated');
|
||||
this.socket.off('directorchanged');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -631,6 +633,7 @@ export default {
|
||||
this.$refs.revenueSection.products = this.products;
|
||||
this.$refs.revenueSection.refresh && this.$refs.revenueSection.refresh();
|
||||
}
|
||||
this.$refs.directorInfo?.refresh?.();
|
||||
}, 120);
|
||||
},
|
||||
async loadBranches() {
|
||||
@@ -950,6 +953,7 @@ export default {
|
||||
this.$refs.revenueSection?.refresh();
|
||||
break;
|
||||
case 'director_death':
|
||||
case 'directorchanged':
|
||||
this.$refs.directorInfo?.loadDirector();
|
||||
break;
|
||||
case 'production_started':
|
||||
|
||||
Reference in New Issue
Block a user