I have been customizing the EventEditor, extending it with separate fields for client and employee selection:
custom_event_edit.png (104.65 KiB) Viewed 1314 times
I can't seem to figure out how to get the custom data however, as it is not added to the data returned by the 'beforeeventsave' event.
I am reacting to the Event using the onCatchAll property of the component. The configuration is as follows:
calendar_component_setup.png (110.39 KiB) Viewed 1314 times
And the event handler method looks like this:
event_handler.png (104.84 KiB) Viewed 1314 times
Could you please help me and let me know if and how I can add my custom event data to this object, so that I can make a backend request containing the entered calendar data?
I implemented the AppEventModel as you wrote in above example with Bryntum Scheduler and add it in eventStore (same as above). Now I want to prepare one array of events like following:
The events will then be displayed successful in Scheduler. But I want to avoid this any in my project. Could please help me with the right way to push data into events array?
Since we do not have a runnable code and full picture about your application (framework, version), I can only give you a theory based on similar problems in past.
In case of using resourceId notation, under the hood, SchedulerPro (and Scheduler) is trying to resolve resource ID you passed, find resource in ResourceStore and create a record in AssignmentStore https://bryntum.com/products/schedulerpro/docs/api/Scheduler/model/AssignmentModel
{
id : 1,
resourceId : 'r1',
eventId : 'ev1'
}
In your case, you created EventModel instance before you put in into EventStore, so resourceId cannot be resolved - there is no access to ResourceStore data. It will be cleaned as invalid.
In this scenario you need to pass simple data into the store instead of model instance to allow Scheduler resolve resourceId while creating a record, or take care of AssignmentStore data by yourself and fill it in with assignment records https://bryntum.com/products/schedulerpro/docs/api/Scheduler/model/AssignmentModel
Examples of work with AssignmentStore you can find in /examples folder of sources you downloaded, as example in demos:
/bigdataset
/conflicts
/constraints
/dependencies
and others.
I don't know if you use framework and which one. Framework based demos are placed in /examples/frameworks/
For Angular you can check
/angular11
/conflicts
/inline-data
and others
For React check demos in examples/frameworks/react folder
For Vue in examples/frameworks/vue folder