Our powerful JS Calendar component


Post by dunnbri »

Hello,

is assigning multiple resources to the same event supported in Calendar (like it is in Scheduler)? When I try to implement it, an event is only rendered for the "first" resource -- for example, if I assign resources "John," "Jane," and "Jim" to event "Weekly Meeting," "Weekly Meeting" is only rendered on the calendar for "John." I would expect three rectangles for "Weekly Meeting" for John, Jane, and Jim to render -- please let me know if this is not supported functionality.

Thanks for your assistance!


Post by saki »

In Calendar, we only have one event that is assigned to multiple resources (calendars, teams, rooms, etc.) Therefore, we only have one event rectangle. It will stay displayed for any matching checkbox selected in the filter on the left side.

If the event disappears when it should be displayed, post please a showcase that we can run and debug.


Post by dunnbri »

Hi Saki, thanks for the clarification about display for multiple resources, that's helpful. The issue I described above appears to have been data related, so all set for now. Thanks again.


Post by dunnbri »

Hi, sorry, I spoke too soon. Would you be able to point me in the direction to achieve resource multi-assignment with the calendar? I have a feeling it works differently than in the scheduler but I'm having trouble seeing the way forward.

In this example:

  • double click on "FOM II Recording" at 1PM on Mon, Oct 26 to open the Event Editor to verify that "Chrysler 165" and "Maria" are both assigned to the event
  • in the resource filter along the left, uncheck everything except for "Maria" -- the event does not show on the calendar

Any suggestions on what is wrong will be much appreciated.

Thank you.

PS: we do have a license for Calendar and Scheduler-Pro, but I just realized this example is still running off the trial

Attachments
calendar-multiassign.zip
(19.14 MiB) Downloaded 169 times

Post by dunnbri »

Hello, can anyone point me in the right direction for this? Thank you


Post by fabio.mazza »

Hi dunnbri,

There is an open issue to allow multi selection on calendar, please, read more information here: https://github.com/bryntum/support/issues/1851

If you need this feature urgently, please consider professional services: https://www.bryntum.com/services/

Best regards,
Fabio


Post by Animal »

It's just about loading the data correctly.

For example:

{
    "success"    : true,
    "resources"  : {
        "rows" : [
            { "id" :  "r1", "name" :  "Celia", "city" :  "Barcelona", "eventColor" : "red" },
            { "id" :  "r2", "name" :  "Lee", "city" :  "London", "eventColor" : "purple" },
            { "id" :  "r3", "name" :  "Macy", "city" :  "New York", "eventColor" : "blue" },
            { "id" :  "r4", "name" :  "Madison", "city" :  "Barcelona", "eventColor" : "teal" },
            { "id" :  "r5", "name" :  "Rob", "city" :  "Rome", "eventColor" : "green" },
            { "id" :  "r6", "name" :  "Dave", "city" :  "Barcelona", "eventColor" : "yellow" },
            { "id" :  "r7", "name" :  "Dan", "city" :  "London", "eventColor" : "deep-orange" }
        ]
    },
    "events" : {
        "rows"    : [
            {
                "id" :  1,
                "startDate" :  "2020-12-31T10:00",
                "endDate" :  "2020-12-31T12:00",
                "name" :  "Multi assigned",
                "iconCls" :  "b-fa b-fa-users"
            },
            {
                "id" :  2,
                "startDate" :  "2021-01-01T13:00",
                "endDate" :  "2021-01-01T15:00",
                "name" :  "Single assigned",
                "iconCls" :  "b-fa b-fa-user",
                "eventColor" :  "indigo"
            },
            {
                "id" :  3,
                "startDate" :  "2020-12-29T8:00",
                "endDate" :  "2020-12-29T11:00",
                "name" :  "Single assigned",
                "iconCls" :  "b-fa b-fa-user",
                "eventColor" :  "cyan"
            },
            {
                "id" :  4,
                "startDate" :  "2020-12-30T10:00",
                "endDate" :  "2020-12-30T13:00",
                "name" :  "Single assigned",
                "iconCls" :  "b-fa b-fa-user",
                "eventColor" :  "blue"
            },
            {
                "id" :  5,
                "startDate" :  "2021-01-02T13:00",
                "endDate" :  "2021-01-02T15:00",
                "name" :  "Single assigned",
                "iconCls" :  "b-fa b-fa-user",
                "eventColor" :  "violet"
            }
        ]
    },
    "assignments" : {
        "rows": [
            { "id" :  1, "resourceId" :  "r1", "eventId" :  1 },
            { "id" :  2, "resourceId" :  "r2", "eventId" :  1 },
            { "id" :  3, "resourceId" :  "r3", "eventId" :  1 },
            { "id" :  4, "resourceId" :  "r4", "eventId" :  2 },
            { "id" :  5, "resourceId" :  "r5", "eventId" :  3 },
            { "id" :  6, "resourceId" :  "r6", "eventId" :  4 },
            { "id" :  7, "resourceId" :  "r7", "eventId" :  5 }
        ]
    }
}

One of those events is assigned to multiple resources.

When you edit the events, the resource chooser is multiselect:

Screenshot 2020-12-19 at 15.25.45.png
Screenshot 2020-12-19 at 15.25.45.png (130.36 KiB) Viewed 1968 times

As I said, the calendar is a one dimension (time) oriented view of the event flow. There is only one event, and only one block or bar will be rendered.

As the linked ticket states, we have done some prototyping on displaying per-resource calendars, but this has not been assigned to a specific version yet.

Below you see calendars split so that there is one display per resource in the resource store:

PerResourceCalendar.png
PerResourceCalendar.png (184.08 KiB) Viewed 1968 times

Post by dunnbri »

Thanks for the additional info. I am a bit confused as fabio.policeno and Animal's responses seem to be at odds, so I will rephrase:

I understand that only one block/bar will ever be rendered for an event (no matter how many resources are assigned to it), but shouldn't the single block/bar stay visible if any one of the resources assigned to the event are checked/selected in the resource filter in the sidebar? Currently, if I load the data that Animal provided above and then select Lee and Macy in the sidebar resource filter, no events display at all, even though these two resources are assigned to the event "Multi assigned" on 12/31/20 at 10am -- this event doesn't show until I select Celia. Is this expected behavior?

Thanks for your assistance.


Post by Animal »

Sorry, I had not understood that the problem lay solely with the filtering. I was thinking it was a larger issue that that with the actual linkup between event and resource not functioning.

Now that we've dug into the filtering, there is a bug in the ResourceFilter widget (Which is what that List of checkboxes is). It assumes single assignment. This will be a fairly easy fix, and will be with you in the next release.


Post by dunnbri »

Fantastic, thank you very much.


Post Reply