diff --git a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts index f83ef18897..cb479f047d 100644 --- a/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts +++ b/frontend/src/app/features/team-planner/team-planner/planner/team-planner.component.ts @@ -18,7 +18,6 @@ import { import { BehaviorSubject, combineLatest, - from, Subject, } from 'rxjs'; import { @@ -362,9 +361,7 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit, // DnD configuration editable: true, droppable: true, - eventResize: (resizeInfo:EventResizeDoneArg) => { - const updater = from(this.updateEvent(resizeInfo)); - }, + eventResize: (resizeInfo:EventResizeDoneArg) => this.updateEvent(resizeInfo), eventDragStart: (dragInfo:EventDragStartArg) => { const { el } = dragInfo; el.style.pointerEvents = 'none'; @@ -408,6 +405,8 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit, this.viewLookup.destroyDetached(); + this.removeExternalEvents(); + successCallback(events); }, failureCallback, @@ -687,4 +686,16 @@ export class TeamPlannerComponent extends UntilDestroyedMixin implements OnInit, this.showAddExistingPane.next(!this.showAddExistingPane.getValue()); (this.addExistingToggle.nativeElement as HTMLElement).blur(); } + + private removeExternalEvents():void { + this + .ucCalendar + .getApi() + .getEvents() + .forEach((evt) => { + if (evt.id.includes('external')) { + evt.remove(); + } + }); + } }