Detect if Slot is Avalilable for multiple users

Hi!

a) I would like to know if it is possible to detect if a slot is occupied in a certain time for many clients.

That is, I would like, for example, to schedule a meeting at 12 o'clock with my team but 2 members of my team are already busy at that time. I would like to be able to detect that, is it possible?

(this view is a room scheduler https://ej2.syncfusion.com/demos/#/material/schedule/timeline-resources.html)

Captura de Pantalla 2021-11-02 a la(s) 15.26.21.png


b) If this is possible, I would like to know if there is a way to review the free spaces in which I can schedule with all the team members. In other words, a period or several periods of time in which everyone is free.


1 Reply

VM Vengatesh Maniraj Syncfusion Team November 3, 2021 11:28 AM UTC

Hi Brandon, 
 
Greetings from Syncfusion Support. 
 
We have validated your query “Detect if Slot is Avalilable for multiple users” at our and we let you know that it would be possible by making use of the isSlotAvailable method. We have modified the sample to detect if the slot is available.  
 
  onPopupOpen(args) { 
    let data = args.data; 
    if ( 
      args.type === 'QuickInfo' || 
      args.type === 'Editor' || 
      args.type === 'RecurrenceAlert' || 
      args.type === 'DeleteAlert' 
    ) { 
      let target = 
        args.type === 'RecurrenceAlert' || args.type === 'DeleteAlert' 
          ? args.element[0] 
          : args.target; 
      if ( 
        !isNullOrUndefined(target) && 
        target.classList.contains('e-work-cells') 
      ) { 
        if ( 
          target.classList.contains('e-read-only-cells') || 
          !this.scheduleObj.isSlotAvailable(data) 
        ) { 
          args.cancel = true; 
          alert('This slot is already booked'); 
        } 
      } else if ( 
        !isNullOrUndefined(target) && 
        target.classList.contains('e-appointment') && 
        this.isReadOnly(data.EndTime) 
      ) { 
        args.cancel = true; 
      } 
    } 
  } 
  
 
And for your other query, we suggest to use the same method isSlotAvailable to find the specific time periods are available or not. For more reference, please visit our UG documentation. 
 
 
Kindly check the above solution and get back to us if you need any further assistance. 
 
Regards, 
Vengatesh 


Loader.
Up arrow icon