mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 06:47:07 +00:00
Handle event changes
This commit is contained in:
@@ -48,6 +48,15 @@ export default {
|
||||
|
||||
methods: {
|
||||
|
||||
handleEvents (context, {payload}) {
|
||||
if (payload.pid != this.projectId) {
|
||||
console.warn(`${this.projectId} ignoring notification for ${payload.pid}`);
|
||||
return;
|
||||
}
|
||||
|
||||
this.refreshEvents();
|
||||
},
|
||||
|
||||
handleLines (context, {payload}) {
|
||||
if (payload.pid != this.projectId) {
|
||||
console.warn(`${this.projectId} ignoring notification for ${payload.pid}`);
|
||||
@@ -79,6 +88,14 @@ export default {
|
||||
registerNotificationHandlers () {
|
||||
|
||||
|
||||
this.$store.dispatch('registerHandler', {
|
||||
table: 'event',
|
||||
|
||||
handler: (context, message) => {
|
||||
this.handleEvents(context, message);
|
||||
}
|
||||
});
|
||||
|
||||
["preplot_lines", "preplot_points"].forEach( table => {
|
||||
this.$store.dispatch('registerHandler', {
|
||||
table,
|
||||
|
||||
Reference in New Issue
Block a user