Multiple schedule

Hi,
I reasearching https://ej2.syncfusion.com/angular/demos/#/material/schedule/group-custom-work-days.
this demo close to what I want, but missing the below for my use case.
I would like to get your assistant how to achieve the below

1. A doctor can have different schedule each day. example.
    Monday - 9AM - 5PM
    Tuesday - 10AM - 3PM
    Friday - 9AM - 3PM


2. A doctor can have multiple session/shift in A single day. example.
     Monday - Shift 1 - 9AM - 12PM
     Monday - Shift 2 - 1PM - 3PM
     Monday - Shift 3 - 8PM - 10PM

can you please guide me.
thanks




3 Replies 1 reply marked as answer

SK Satheesh Kumar Balasubramanian Syncfusion Team December 28, 2020 07:16 AM UTC

Hi Chin, 
  
Greetings from Syncfusion Support..! 
  
We have validated your reported query at our end and we regret to let you know that it is not feasible to assign different work hours for particular resource. We can assign only different work days for different resources. 

Regards, 
Satheesh Kumar B 



CK Chin Kok Kein January 4, 2021 02:28 AM UTC

Hi,
is there any workaround or plan to include this features in coming release?

thanks



NR Nevitha Ravi Syncfusion Team January 4, 2021 06:24 AM UTC

Hi Chin, 

Sorry for the inconvenience caused. 

We can set different work hours for different resources using setWorkHours public method , and for the same we have prepared a sample which can be viewed from the following link. In the below sample, we have set work hours as your shared details. 
  1. Doctor 2 have different schedule each day.
                             Monday - 9AM - 5PM 
                             Tuesday - 10AM - 3PM 
                             Friday - 9AM - 3PM 
      2. Doctor 1 have multiple session/shift in a single day. 
              Monday - Shift 1 - 9AM - 12PM 
              Monday - Shift 2 - 1PM - 3PM 
              Monday - Shift 3 - 8PM - 10PM 


let currentDates: Date[] = this.scheduleObj.getCurrentViewDates() as Date[]; //get current view dates 
    let proxy: any = this; 
    currentDates.forEach(function(e) { 
      if (e.getDay() == 1) { 
        proxy.scheduleObj.setWorkHours([e], "09:00", "12:00", 0); 
        proxy.scheduleObj.setWorkHours([e], "13:00", "15:00", 0); 
        proxy.scheduleObj.setWorkHours([e], "20:00", "22:00", 0); 
        proxy.scheduleObj.setWorkHours([e], "09:00", "17:00", 1); 
      } 
      if (e.getDay() == 2) { 
        proxy.scheduleObj.setWorkHours([e], "10:00", "15:00", 1); 
      } 
      if (e.getDay() == 5) { 
        proxy.scheduleObj.setWorkHours([e], "09:00", "15:00", 1); 
      } 
    }); 
  } 

Please try the above sample and let us know if you need any further assistance. 

Regards, 
Nevitha 


Marked as answer
Loader.
Up arrow icon