[29874] Refresh table after relation draw

pull/7226/head
Oliver Günther 6 years ago
parent c0bc3d75f3
commit f295a021f6
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 9
      frontend/src/app/components/wp-table/timeline/container/wp-timeline-container.directive.ts

@ -59,6 +59,10 @@ import {WorkPackageTableTimelineState} from "core-components/wp-fast-table/wp-ta
import {WorkPackageTimelineCell} from "core-components/wp-table/timeline/cells/wp-timeline-cell";
import {selectorTimelineSide} from "core-components/wp-table/wp-table-scroll-sync";
import {debugLog, timeOutput} from "core-app/helpers/debug_output";
import {
WorkPackageTableRefreshRequest,
WorkPackageTableRefreshService
} from "core-components/wp-table/wp-table-refresh-request.service";
@Component({
selector: 'wp-timeline-container',
@ -103,6 +107,7 @@ export class WorkPackageTimelineTableController implements AfterViewInit, OnDest
private wpTableTimeline:WorkPackageTableTimelineService,
private wpNotificationsService:WorkPackageNotificationService,
private wpRelations:WorkPackageRelationsService,
private wpTableRefresh:WorkPackageTableRefreshService,
private wpTableHierarchies:WorkPackageTableHierarchiesService,
readonly I18n:I18nService) {
}
@ -268,7 +273,7 @@ export class WorkPackageTimelineTableController implements AfterViewInit, OnDest
this.activateSelectionMode(start.id!, end => {
this.wpRelations
.addCommonRelation(start.id!, 'follows', end.id!)
.then(() => this.refreshRequest.putValue(undefined))
.then(() => this.wpTableRefresh.request('Timeline relation'))
.catch((error:any) => this.wpNotificationsService.handleRawError(error, end));
});
}
@ -277,7 +282,7 @@ export class WorkPackageTimelineTableController implements AfterViewInit, OnDest
this.activateSelectionMode(start.id!, end => {
this.wpRelations
.addCommonRelation(start.id!, 'precedes', end.id!)
.then(() => this.refreshRequest.putValue(undefined))
.then(() => this.wpTableRefresh.request('Timeline relation'))
.catch((error:any) => this.wpNotificationsService.handleRawError(error, end));
});
}

Loading…
Cancel
Save