subtasks

I need some help to point me in the right direction.  I have a list if employees that I want to list in alph order in the first column.  I then want to show horizontally when  they are taking time off. I think I can use subtasks but I saw the data format page for that but not an example.  Could I use sub tasks and do you have an example.

Also can I use an EndDate in a subtask rather than a duration and can I change the color of each subtask?

Thanks

Example data code

     TaskID: 1,

           TaskName: 'Project Initiation',
           StartDate: new Date('04/02/2019'),
           EndDate: new Date('04/21/2019'),
           subtasks: [
               { TaskID: 2, TaskName: 'Identify Site location', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50 },
               { TaskID: 3, TaskName: 'Perform Soil test', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50 },
               { TaskID: 4, TaskName: 'Soil test approval', StartDate: new Date('04/02/2019'), Duration: 4, Progress: 50 },

           ]






4 Replies

LA Lokesh Arjunan Syncfusion Team November 19, 2021 09:15 AM UTC

Hi William 
 
Thanks for contacting Syncfusion support. 
 
We validated your query and you can use EndDate rather than Duration in subtask in datasource. Also you can change the color of each subtask using queryTaskbarInfo event. We have attached sample for your reference. 
 
 
Please contact us If you need further assistance. 
 
Regards, 
Lokesh 



WM William Morgenweck November 19, 2021 12:57 PM UTC

Thank you very much for your reply but maybe subtask is not the correct wording.  I need something closer to 



One person on the left with only one line  but the tasks or availability is identified with a start and end date.  and each of the tasks can be identified with a separate color


Very similar to the scheduling assistant in Outlook, but instead of hours I need days


can you place more than one start and end dates within a taskid?


        TaskID: 3,

        TaskName: 'Bob Smith',

        StartDate: new Date('04/02/2019'),

        EndDate: new Date('04/04/2019'),

        Color: 'Blue',

         StartDate: new Date('04/010/2019'),

        EndDate: new Date('04/20/2019'),

        Color: 'Green',







WM William Morgenweck November 19, 2021 01:06 PM UTC

I maybe looking at the wrong component,  I think the scheduler may be a better fit.  


https://ej2.syncfusion.com/vue/demos/?_ga=2.25583421.1218262012.1637243972-1078370700.1616083429#/material/schedule/timeline-resource.html


Is much closer to what I need.  Instead of hours can the time slots be days using start and end dates?


I can change the room to a person and show when they would be available


Sorry for the confusion





NR Nevitha Ravi Syncfusion Team November 22, 2021 10:44 AM UTC

Hi William, 

Thanks for your update. 

Yes, scheduler component will be helpful to meet your requirement. You can use timeline month view which don’t have hours, or you can disable timescale in timeline week. 

Please let us know if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon