Hi,
I have implemented the React (EJ2) version of the schedule component. I am using the WebApiAdaptor and the datamanager to tie it my server backend which is processing the scheduling requests from the frontend.
Now for my server to know who is sending the event add (or update or delete) request, i need to send a user Id in the body of the request (alongwith the EventId, starttime, endtime, startdate, enddate, description etc. of the event information itself. I cant use the Query option since it only works with GET functions and is not appearing in the POST or PUT functions.
I dont want to introduce an additional field in the event editor template (since the ID is something that is not an user input in the event itself). What are the other options available to send additional data to server alongwith the event data (going via the data manager + adaptor)
this is what the relevant sections of my code look like.. Below the datamanager part
const dataManager = new DataManager({
url: `https://vcxxxxx.execute-xx.-west-2.amazonaws.com/dev/calendar/`,
adaptor: new CustomAdaptor(userDetails),
crossDomain: true,
});
const addedQuery = new Query().addParams('userId', userDetails._id);
and the part where i am invoking the scheduler component itself
<ScheduleComponent
height="650px"
ref={schedule => (localProps.scheduleObj = schedule)}
selectedDate={new Date()}
dragStart={onDragStart}
eventSettings={{ dataSource: dataManager, query: addedQuery }}
dataBinding={onDataBinding}
popupOpen={onPopupOpen}
>
{ViewDirectiveOptions(viewOption)}
<Inject services={InjectServicesOptions(viewOption)} />
</ScheduleComponent>
any pointers would help.
thanks much
Madhukar