When I second time open the page with scheduler component, i get the error https://clip2net.com/s/4cnx0iO
here is my code
assistant: WorkOrderAssistant;
woCode = this.route.parent.snapshot.params.id;
features = {
cellEdit: true,
filter: true,
quickFind: true,
regionResize: true,
stripe: true,
eventEdit: false,
eventMenu : {
processItems({ eventRecord }) {
return !eventRecord.data.readonly;
}
},
scheduleMenu : {
items : {
addEvent : false
}
}
};
resourceStore = {
remove: (e) => {
if (e && e[0]) {
this.removeUserFromSchedule(e[0].data.id);
}
}
};
viewPreset = {
base: 'hourAndDay',
columnLinesFor: 0,
headers: [
{
unit: 'd',
align: 'center',
dateFormat: 'ddd DD MMM'
},
{
unit: 'h',
align: 'center',
dateFormat: 'HH'
}
]
};
columns = [
{ text: 'Name', field: 'name', width: 150, locked: true },
{ text: 'LOE', field: 'loe_human', width: 100, locked: true, align: 'center' }
];
<bryntum-scheduler *ngIf="assistant"
#scheduler
tooltip = "My cool Scheduler component"
[resources]="assistant.resources"
[events]="assistant.events"
[features]="features"
[startDate]="assistant.startDate"
[endDate]="assistant.endDate"
[viewPreset]="viewPreset"
[useInitialAnimation]="false"
[allowOverlap]="false"
[resourceStore]="resourceStore"
[rowHeight]="30"
[resourceMargin]="5"
[createEventOnDblClick]="false"
(onBeforeEventAdd)="onBeforeEventAdd($event)"
(onAfterDragCreate)="onAfterDragCreate($event)"
(onBeforeDragCreate)="onBeforeDragCreate($event)"
(onBeforeEventDrag)="onBeforeEventDrag($event)"
(onBeforeEventEditShow)="onBeforeEventEditShow($event)"
(onBeforeEventEdit)="onBeforeEventEdit($event)"
(onDragCreateEnd)="onDragCreateEnd($event)"
(onBeforeEventResizeFinalize)="onBeforeEventResizeFinalize($event)"
(onBeforeDragCreateFinalize) = "onBeforeDragCreateFinalize($event)"
(onBeforeEventDropFinalize) = "onBeforeEventDropFinalize($event)"
(onBeforeEventDelete) = "onBeforeEventDelete($event)"
(onBeforeDestroy) = "onBeforeDestroy($event)"
(onBeforeAssignmentDelete) = "onBeforeAssignmentDelete($event)"
[columns]="columns"
(onCatchAll) = "onSchedulerEvents($event)">
</bryntum-scheduler>
can you help?)