panel sync

This commit is contained in:
Yuri Kuznetsov
2024-12-06 18:56:36 +02:00
parent 3b4699fb17
commit 0c8a28f640

View File

@@ -121,6 +121,14 @@ export default class TasksRelationshipPanelView extends RelationshipPanelView {
this.collection.fetch();
}
});
let events = `update-related:${this.link} update-all`;
if (this.parentScope === 'Account') {
events += ' update-related:tasks';
}
this.listenTo(this.model, events, () => this.collection.fetch());
}
afterRender() {
@@ -180,7 +188,7 @@ export default class TasksRelationshipPanelView extends RelationshipPanelView {
view.notify(false);
this.listenToOnce(view, 'after:save', () => {
this.collection.fetch();
this.model.trigger(`update-related:${this.link}`);
this.model.trigger('after:relate');
});
});