Hello,
I'm looking for a way to correctly refresh my schedule which includes resources.
Currently I have something like this : with the select above I can choose a team of employees and display their schedule.
When I change the teams with the select, It should change the displayed resources (Employees) and Appointment according to the teams I've chosen
However when I choose a new Team it is not refreshing well and I have this error:
My refresh function looks like this :
async refreshSchedule(){
this.Loader=true;
this.resourceDataSource=[] //resources data source of the schedule
this.CalendarData=[]; //data loaded from an API to create the appointment
this.TeamsCollaborators=[]; //Employees format : {Name : , Id : , Color: }
this.LoadCollaborators(this.Forms.get('selectedTeam').value).then(res=>{
console.log(this.scheduleObj);
this.resourceDataSource=this.TeamsCollaborators;
this.scheduleObj.eventSettings.dataSource=this.CalendarData;
this.scheduleObj.changeDate(new Date());
this.scheduleObj.refresh();
this.Loader=false;
});
}
is there a better way to refresh this kind of schedule ?
Regards,
William