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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem with resources.

Thread ID:

Created:

Updated:

Platform:

Replies:

128258 Jan 11,2017 11:05 AM UTC Jun 13,2017 04:11 AM UTC JavaScript 2
loading
Tags: ejSchedule
Jasper van der Bijl
Asked On January 11, 2017 11:05 AM UTC

Hey guys!

I've been trying out the schedule widget for some time now and am really enjoying it so far. Right now i am however running into a couple of problems.

I'm trying to add multiple resources to a single appointment, but in doing so it creates an appointment per resource added. I was wondering if there is a way i can add multiple resources to a single appointment?

I am also having problems adding more the one resourcefield to the schedule. It adds the second field to the edit appointment modal but the datasource seems to be empty.
So everything works like it should when adding only one resource field. But when adding a second one the same way, it doesnt show the resources in the edit appointment field.

I am using the angular 1 version in combination with a .net core web application.

//HTML template
    <ej-schedule id="schedule" e-width="100%" e-height="1024" e-currentview="currentView" e-currentdate="setDate"
                    e-beforeAppointmentChange="beforeChangeAppointment"
                    e-beforeAppointmentCreate="beforeCreateAppointment"
                    e-beforeAppointmentRemove="beforeRemoveAppointment"
                    e-appointmentCreated="onCreateAppointment" 
                    e-appointmentRemoved="onRemoveAppointment" 
                    e-appointmentChanged="onChangeAppointment"
                    e-appointmentsettings-datasource="Appointments" 
           e-appointmentsettings-id="id" 
           e-appointmentsettings-subject="subject" 
           e-appointmentsettings-starttime="startTime"
           e-appointmentsettings-endtime="endTime" 
           e-appointmentsettings-description="description" 
           e-appointmentsettings-allday="allDay" 
           e-appointmentsettings-recurrence="recurrence" 
           e-appointmentsettings-recurrencerule="recurrenceRule"
                    e-appointmentsettings-resourcefields="actionId, vmId">
    </ej-schedule>

//JS, Then in my controller i load the resources from my API
$http.get(url,....).then(functin(result){
$("#schedule").ejSchedule("option", "resources", result.data);
}, function(error){
});

//c# code returning the resource objects, the datasources are Lists
resourceSettings.Add(new ScheduleResourceSettings { dataSource = virtualMachinesResources, text = "text", id = "id", groupId = "groupId"});
resourceSettings.Add(new ScheduleResourceSettings { dataSource = actions, text = "text", id = "id", groupId = "groupId", color = "color" });
resources.Add(new ScheduleResource { field = "vmId", title = "Virtual Machines", name = "Virtual Machines", allowMultiple = true, resourceSettings = resourceSettings[0] });
resources.Add(new ScheduleResource { field = "actionId", title = "Action", name = "Actions", allowMultiple = false, resourceSettings = resourceSettings[0] });

Thanks in advance!



Tim Mohr
Replied On June 13, 2017 02:52 AM UTC

Hey guys!

I've been trying out the schedule widget for some time now and am really enjoying it so far. Right now i am however running into a couple of problems.

I'm trying to add multiple resources to a single appointment, but in doing so it creates an appointment per resource added. I was wondering if there is a way i can add multiple resources to a single appointment?

I am also having problems adding more the one resourcefield to the schedule. It adds the second field to the edit appointment modal but the datasource seems to be empty.
So everything works like it should when adding only one resource field. But when adding a second one the same way, it doesnt show the resources in the edit appointment field.

I am using the angular 1 version in combination with a .net core web application.

//HTML template
    <ej-schedule id="schedule" e-width="100%" e-height="1024" e-currentview="currentView" e-currentdate="setDate"
                    e-beforeAppointmentChange="beforeChangeAppointment"
                    e-beforeAppointmentCreate="beforeCreateAppointment"
                    e-beforeAppointmentRemove="beforeRemoveAppointment"
                    e-appointmentCreated="onCreateAppointment" 
                    e-appointmentRemoved="onRemoveAppointment" 
                    e-appointmentChanged="onChangeAppointment"
                    e-appointmentsettings-datasource="Appointments" 
           e-appointmentsettings-id="id" 
           e-appointmentsettings-subject="subject" 
           e-appointmentsettings-starttime="startTime"
           e-appointmentsettings-endtime="endTime" 
           e-appointmentsettings-description="description" 
           e-appointmentsettings-allday="allDay" 
           e-appointmentsettings-recurrence="recurrence" 
           e-appointmentsettings-recurrencerule="recurrenceRule"
                    e-appointmentsettings-resourcefields="actionId, vmId">
    </ej-schedule>

//JS, Then in my controller i load the resources from my API
$http.get(url,....).then(functin(result){
$("#schedule").ejSchedule("option", "resources", result.data);
}, function(error){
});

//c# code returning the resource objects, the datasources are Lists
resourceSettings.Add(new ScheduleResourceSettings { dataSource = virtualMachinesResources, text = "text", id = "id", groupId = "groupId"});
resourceSettings.Add(new ScheduleResourceSettings { dataSource = actions, text = "text", id = "id", groupId = "groupId", color = "color" });
resources.Add(new ScheduleResource { field = "vmId", title = "Virtual Machines", name = "Virtual Machines", allowMultiple = true, resourceSettings = resourceSettings[0] });
resources.Add(new ScheduleResource { field = "actionId", title = "Action", name = "Actions", allowMultiple = false, resourceSettings = resourceSettings[0] });

Thanks in advance!



Hello,

I also have the same question, regarding "I'm trying to add multiple resources to a single appointment, but in doing so it creates an appointment per resource added. I was wondering if there is a way i can add multiple resources to a single appointment?"

Is there a solution for this?

Thanks,
Tim

Karthigeyan Krishnamurthi [Syncfusion]
Replied On June 13, 2017 04:11 AM UTC

Hi Tim/Jasper, 
 
Thank you for contacting Syncfusion support. 
 
We would like to inform that currently there is no option to render single appointment for multiple resources. When an appointment is created for multiple resources, appointments will be rendered for each resource separately. In order to save/update the recurrence and split appointments correctly, multiple resource appointments were rendered separately. It is the default behavior. 
 
Regards, 
Karthigeyan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;