Our pure JavaScript Scheduler component

Post by applysia »

I wonder how I would implement the scheduler with different types of resources. At the moment I am already using the event, assignment and resource stores, which allow a many-to-many relationship between events and resources. I would like to implement this construct but with an additional resource type. So that I effectively have two combo boxes with an resource assignment in the event editor.

Is there any way to have multiple resource/assignment stores? I have already tried modelling the relationship in the event editor, but as far as I can tell, there is no array or object field type that would make this possible.

Thank you very much for your support!

Post by mats »

This is not supported no, but if you explain in a bit more detail we should be able to give you some advice. You want to assign two sets of resources to a single event? And you cannot do this using our current multi-select resource combo?

Tired of debugging javascript errors in web applications? Try our powerful error logging service RootCause

Post by applysia »

So far I am using the following model:

class MyEvent extends EventModel {

  static get fields() {
    return [
      { name: 'resourceType2Id', type: 'string', persist: true },

An as I wrote, I'm using the event, assignment and resource (for resourceType1) stores to map the many-to-many relationship between resource type 1 and events. But now I need to assign several resources of type 2 to an event, which means that I can no longer use the reference to a single ID in the event model.

Post by mats »

It could still be done using one multi-assignment combo box, or you definitely want it done in two separate ones?

Tired of debugging javascript errors in web applications? Try our powerful error logging service RootCause

Post by applysia »

Yes, I think two combo boxes would be better, as the types should be semantically separated. Also, only the one type of resource should be displayed as columns.

Post by saki »

Could you have one resource store with a custom modelClass introducing the resourceType (type 1 or type 2) and filter the stores of combo boxes depending on which resource is being assigned?

Post by applysia »

That would probably solve the problem with the different combo boxes. Is there also a way to filter the displayed resource columns? And how do you filter the stores of the combo boxes? :D

Post by pmiklashevich »

Please see my reply here: viewtopic.php?p=81692#p81692
I hope this is exactly what you're looking for.

We have opened a feature request. Please subscribe to the ticket to get notified when it's done.

Pavlo Miklashevych
Sr. Frontend Developer

Post by applysia »

Hi pmiklashevich,

thanks for your reply. The example you provided helped a lot. In the example the "master" store was grouped by the type field, but my use case requires one type to be hidden entirely. How would could I solve this?

Post by Maxim Gorkovsky »

If I understood you correctly, you can try to filter out records with certain type from the store:

Post Reply