We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Question about Scheduler

Hey,

We are trying to use your schedule feature. But we are running into issues.

Basically we can add one resourceSetting and appointmentSettings and the appointmentSettings will show.

But as soon as we add another resourcesetting (i.e we have Task > TaskOne) the appointment settings will not show up on any of the sections. (for example we are trying to make it work similarly to the Doctor example)

Is there something we are missing?

I have attached the JavaScript file we are using, as well as the sample data we are trying to use. As well as pictures


(Sample Data for the AppointmentSetting)
List<ScheduledTaskObject> scheduledTaskObject = new List<ScheduledTaskObject>()
      {
        new ScheduledTaskObject() { id = "1", PlannedTaskId = "1", StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(2), TaskCode = "T1-1" },
        new ScheduledTaskObject() { id = "2", PlannedTaskId = "1", StartDate = DateTime.Now.AddDays(7), EndDate = DateTime.Now.AddDays(9), TaskCode = "T1-2" },
        new ScheduledTaskObject() { id = "3", PlannedTaskId = "2", StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(2), TaskCode = "T2-1" },
        new ScheduledTaskObject() { id = "4", PlannedTaskId = "2", StartDate = DateTime.Now.AddDays(7), EndDate = DateTime.Now.AddDays(9), TaskCode = "T2-2" }
      };

Sample Data for the Resource Setting
  List<PlannedTaskResource> taskResourceList = new List<PlannedTaskResource>()
      {
        new PlannedTaskResource() { id = "1", FacilityCode = "TestFacility", TaskCode ="Groundwater samples - T1", ScheduledTasksTotal = 2 },
        new PlannedTaskResource() { id = "2", FacilityCode = "TestFacility", TaskCode ="Water levels - T2", ScheduledTasksTotal = 2 }
      };




Attachment: SyncfusionSch_af242a6b.zip

1 Reply

MP Mahesh Palanisamy Syncfusion Team February 20, 2017 09:29 AM UTC

Hi James, 

Thanks for contacting syncfusion support. 

We have analyzed your provided code and found that the field mapping for resourceFields within the appointmentSettings property is not done properly in it which should be defined as highlighted below (The Id field names of both the resourceSettings needs to be defined in the resourceFields property separated by a comma).  

Refer the below code, 
<Code> 
appointmentSettings: { 
                      dataSource: $scope.scheduledTasks, 
resourceFields: "parentGroupId, PlannedTaskId", 
description: "TaskCode", 
id: "id", 
startTime: "javaStartDate", 
endTime: "javaEndDate" 
                    } 
</Code> 

Note - Also, we recommend you to define the resource id value as either string or of integer type. 

We have prepared the sample from your shared code snippet, which can be downloaded from the below location: 

Kindly try the above sample and let us know, if it solves your problem and also, if you need any further assistance on this. 
  
Regards, 
Mahesh 


Loader.
Live Chat Icon For mobile
Up arrow icon