Page 1 of 4

[INFO REQ] multiple resource editor

Posted: Tue Jan 12, 2021 5:54 pm
by eugenem

https://bryntum.com/examples/scheduler-pro/grouping/

How can the editor be adjusted to have every resource type as its own field? Now both resources are in a single field. E.g. one field for operators, and another for machines.


Re: [INFO REQ] multiple resource editor

Posted: Tue Jan 12, 2021 6:11 pm
by pmiklashevich

Could you please provide more details on the requirements. Maybe add a screenshot showing what you're trying to achieve?


Re: [INFO REQ] multiple resource editor

Posted: Tue Jan 12, 2021 6:34 pm
by eugenem

https://www.dropbox.com/s/yphtcepv8rpkgqc/Annotation%202021-01-12%20183217.jpg?dl=0

here I want to have instead of Resources, 2 fields: Operators and Machines


Re: [INFO REQ] multiple resource editor

Posted: Tue Jan 12, 2021 7:05 pm
by pmiklashevich

Please see the guide: https://www.bryntum.com/docs/scheduler/#guides/customization/eventedit.md#customizing-the-fields
You can disable "resourceField" and add 2 new combos. You can use makeChained on the resource store to create a slice of resources.


Re: [INFO REQ] multiple resource editor

Posted: Thu Jan 14, 2021 6:03 pm
by eugenem

But in this case how would I configure grouping? I want it to look at grid like at sample:

Machines
-- m1
-- m2
Operators
-- o1
-- o2

Now it's grouped by 'type' which is the resource field. I don't see an option to group by 2 fields, and even with such option it would probably have 2-level grouping which I don't want.


Re: [INFO REQ] multiple resource editor

Posted: Fri Jan 15, 2021 1:18 pm
by pmiklashevich

I want to have instead of Resources, 2 fields: Operators and Machines

I thought you want to have 2 combos with resources filtered by the type? For example the first combo contains machines only, the second combo contains operators only? Or you want to have one combo with all resources, and see the title of the group above each type?

Please explain better your requirements and provide a screenshot showing the result


Re: [INFO REQ] multiple resource editor

Posted: Fri Jan 15, 2021 1:58 pm
by Animal

You should be able to use a grouped store OK with a resource selector combo.

The dropdown of a combo is the "picker" which can be configured by specifying a config object: https://www.bryntum.com/docs/grid/#Core/widget/Combo#config-picker

That is used to configure a List which acts as the dropdown (we call it the "picker").

And a List can render its rows in a configurable way: https://www.bryntum.com/docs/grid/#Core/widget/List#config-itemTpl

So you should be able to give the group header rows different HTML content and a CSS class which makes it pointer-action : none so that it's not clickable.


Re: [INFO REQ] multiple resource editor

Posted: Sun Jan 17, 2021 3:01 pm
by eugenem

Re: [INFO REQ] multiple resource editor

Posted: Mon Jan 18, 2021 3:53 pm
by alex.l

Hi eugenem,

Could you please be more specific in your question? Did you check the guide https://www.bryntum.com/docs/scheduler/#guides/customization/eventedit.md#customizing-the-fields that Pavel suggested?
In your screenshot I see 2 combos, but in your last message you said you want one combo with grouped data inside. For both cases there are the answers above. What exactly you have problems with?

Thanks,
Alex


Re: [INFO REQ] multiple resource editor

Posted: Mon Jan 18, 2021 4:00 pm
by eugenem

I want to have 2 combos (e.g. 2 fields) editor. But at calendar I want to have one column with groups, like at sample. And I don't get how to implement it...