Our pure JavaScript Scheduler component


Post by jsalguero »

Hi , we want use multiple assignment approach (without manage Assignment Store manually), and we use this function in event in order to supply the array of resources ID

event.assign(resourcesIdArray)

But bryntum doesn't render events.
It's mandatory fill a AssignmentStore manually?
We want to avoid it, due to business logic.
Thanks


Post by alex.l »

Hi jsalguero,

I am not sure what you mean by "manually", but for multi-assignment mode it is mandatory to use AssignmentStore approach and don't use resourceId field. So, yes, you must have records in AssignmentStore to make it work.

All the best,
Alex


Post by jsalguero »

Ok, thanks for your quick response.
Only in order to clarify and understanding, If I have to manage a list of AssignmentModel for multi-assignment mode, what is this function for?
https://www.bryntum.com/products/scheduler/docs/api/Scheduler/model/mixin/EventModelMixin#function-assign
If I'm right, if I supply this function one list of resourceID's which I want to assign the event, and my event model hasn't got resourceId property filled, this should add internally in bryntum a list of assignment models relating the event model and the resourcesIds I supply, without having to manage an Assignment Model list on my own and without having to add it to the AssignmentStore manually.
Please, let me know your thought.
Thanks.


Post by alex.l »

I was talking about initial dataset. You cannot use resourceId notation for EventModel, if multi-assignment enabled. You need to fill in AssignmentStore data instead and remove resourceId field.
For the runtime, feel free to use methods we provided, included https://www.bryntum.com/products/scheduler/docs/api/Scheduler/model/mixin/EventModelMixin#function-assign

All the best,
Alex


Post Reply