All day events for employee scheduling, best practice

I would like to use the Scheduler component to schedule working days for each employee such that a manager can see which employees are scheduled to work each day.  The actual time of day is not important.  An employee is either scheduled to work that day or not.  For example, the manager should be able to see that John, Bill, and Sally are working on Monday and that John, Frank and Nancy are working on Tues and Thurs.  I would also like to display some custom data for each day, for example the weather forecast.  

Would this be best tracked as "all-day" events, or should I just use default hours for each assignment.  Is there a resource by day view?  What would be the best practice for this use case?

1 Reply 1 reply marked as answer

HB Hareesh Balasubramanian Syncfusion Team March 8, 2021 10:00 AM UTC

Hi John, 

Greetings from Syncfusion Support..! 

We have validated your shared query “identify easily whether any work/events are assigned for employees in the current view” and prepared a sample using dataBound event of the Scheduler in which number of events assigned to the each employee is shown in corresponding employee resource column, which can be viewed from the following link. 


  onDataBound(): void { 
    let renderedEvents = this.scheduleObj.getCurrentViewEvents(); 
    let resCol = this.resourceDataSource; 
    for (let i = 0; i < resCol.length; i++) { 
      let eventColByRes = (renderedEvents as any).filter( 
        x => x.AirlineId == (resCol[i] as any).AirlineId 
      ); 
      let eventsCount = 0; 
      for (let j = 0; j < eventColByRes.length; j++) { 
        eventsCount = j + 1; 
      } 
      (document.querySelectorAll(".e-resource-text")[i + 1] as any).innerText = 
        (resCol[i] as any).AirlineName + 
        " (Events : " + 
        eventsCount.toString() + 
        ")"; 
    } 
  } 

And for the further refence, we have taken a screenshot of the above sample, 
 

Also in the meantime we can able to view the entire cells of the date in a single cell by disabling the timeScale property of the Scheduler and for further assistance, kindly refer to the below UG link, 

Kindly try the above solutions and get back to us if you need any further assistance. 

We will happy to assist you..! 

Regards, 
Hareesh 


Marked as answer
Loader.
Up arrow icon