I implemented IsSlotAvailable to prevent double scheduling on my calendar/scheduler
It prevent sliding an event on top of another or adding a new one on top of another.
However, a problem that I did not have before is now present.
If I try to move an event and drop it on top of it previous self, ie moving an 1h event ahead by 30 minutes. IsSlotAvailable returns false. If I move it up 60 minutes, it does not. So as I understand it, it does not exclude itself from the potential conflict candidates.
How would I go about fixing that ?
Snippet public async void OnResizeStop(ResizeEventArgs<ScheduleData.ResourceData> data )
{
if (!await SfScheduleVets.IsSlotAvailable(data.StartTime, data.EndTime, data.GroupIndex))
{
toastService.ShowWarning($"Moving visit {data.Data.Subject} to {data.StartTime} is not possible because of a conflict", "Failure");
data.Cancel = true;
return;
}
MyViewModel.Update(data.Data).SafeFireAndForget();
toastService.ShowSuccess($"Visit {data.Data.Subject} has been moved to {data.StartTime}. It will end at {data.EndTime}", "Success");
}thanks