Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler resource time range name (label) not visible #3297

Closed
jsakalos opened this issue Aug 17, 2021 · 0 comments
Closed

Scheduler resource time range name (label) not visible #3297

jsakalos opened this issue Aug 17, 2021 · 0 comments
Assignees
Labels
bug Something isn't working forum Issues from forum premium resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@jsakalos
Copy link

Reproduced (the label appears on scrolling). The steps are on the following screencast:

resource-tr-label-bug

Forum post

Hello,
If we try to use the resource time ranges feature and we specify the start date (time), for some item, to be less than the current start date (time) of the scheduler then the label for that item will not be visible initially. We have managed to find a workaround for this by setting the start date of the item to be the same as the start date (time) of the calendar.

Is there some other solution for this or this is a bug?

Example:

If we set the startDate for an item: new Date(2019, 0, 1, 6), where the 6 is starting hour everything is working fine because that is the same startDate for the scheduler. If we set the start date to be new Date(2019, 0, 1) then the "TEST" label is not visible initially. It becomes visible if a user changes the window size.

We have manged to reproduce this behaveiour here

https://www.bryntum.com/examples/scheduler/resourcetimeranges/
with the following code:

const resources          = [
        { id : 'r1', name : 'Mike' },
        { id : 'r2', name : 'Linda' },
    ],

events             = [
],

resourceTimeRanges = [
    {
      id: 1,
      resourceId: "r2",
      startDate: new Date(2019, 0, 1, 6),      // <---
      endDate: new Date(2019, 0, 5),
      name: 'TEST',                           // <---
      timeRangeColor: 'red',
    },
];

class MyResourceTimeRange extends RecurringTimeSpan(ResourceTimeRangeModel) {};

class MyResourceTimeRangeStore extends RecurringTimeSpansMixin(ResourceTimeRangeStore) {

static get defaultConfig() {
    return {
        // use our new MyResourceTimeRange model
        modelClass : MyResourceTimeRange
    };
}
};

const resourceTimeRangeStore = new MyResourceTimeRangeStore({
    data : resourceTimeRanges
});

let newRangeCount = 0;
 
const scheduler = new Scheduler({
    appendTo : 'container',
    startDate         : new Date(2019, 0, 1, 6),      // <---
    endDate           : new Date(2019, 0, 1, 20),
    viewPreset        : 'hourAndDay',
    rowHeight         : 90,
    barMargin         : 3,
    resourceMargin    : 25,
    resourceImagePath : '../_shared/images/users/',
    eventStyle : 'plain',
    eventColor : 'blue',
    columns : [
        { type : 'resourceInfo', text : 'Name', field : 'name', width : 130 }
    ],
    features : {
        resourceTimeRanges : true
    },
    resources,
    events,
    // the store will be used by the "resourceTimeRanges" feature
    resourceTimeRangeStore,
});

@jsakalos jsakalos added bug Something isn't working premium forum Issues from forum labels Aug 17, 2021
@matsbryntse matsbryntse self-assigned this Aug 18, 2021
@matsbryntse matsbryntse added the ready for review Issue is fixed, the pull request is being reviewed label Aug 18, 2021
@SergeyMaltsev SergeyMaltsev added this to the 4.2.4 milestone Aug 27, 2021
@SergeyMaltsev SergeyMaltsev added resolved Fixed but not yet released (available in the nightly builds) and removed ready for review Issue is fixed, the pull request is being reviewed labels Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum premium resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

3 participants