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