Our pure JavaScript Scheduler component


Post by bizzcoo »

Hello!
Having an issue when using "group" with resources.
When rows with resources are collapsed then the events passed to the store seems not to be available when we do some calculations based upon them.
Is this a known issue or by-design?

I have found this:
https://www.bryntum.com/docs/scheduler/api/Scheduler/data/EventStore#config-excludeCollapsedRecords
But might not be what I am looking for..

Sorry for a bit of a vague question.

Version : "@bryntum/schedulerpro": "4.1.5",


Post by mats »

Could you please share a little code showing the issue you're facing?


Post by bizzcoo »

Have omitted a lot of the code below but hopefully you get a sense of the issue we experience.

export class PlannerComponent implements OnInit, OnDestroy {

kpiSummaryConfig;

// Subject sent the the schedulerComponent as observables to pass information before the component is loaded
summaries$: Subject<any[]> = new ReplaySubject(1);

ngOnInit(): void {

    this.schedulerConfig = generateConfig(
        {
            events: combinedResult.eventResults.events,
        }
    );

    this.kpiSummaryConfig = [
        {
            id: 'occupancy',
            label: 'Utilization rate',
            renderer: this.summaryRenderer(
                this.statisticsService.computeOccupancyForPlanner
            )
        }
    ];

    this.addSummaries()
}

private summaryRenderer(
    computeOccupancyFn: (
        events: PlannerEvent[],
        resources: Employee[],
        dateInterval: { startDate: Date; endDate: Date },
        typeId?: string
    ) => number,
    typeId?: string
) {
    return ({ startDate, endDate, events, eventStore, resourceStore }) => {
        // events empty here if collapsed group?
    };
}

private addSummaries() {
    const selectedKpis = this.kpiSummaryConfig.filter(
        (_, i) => this.kpiSummaries.value[i]
    );
    this.summaries$.next([...selectedKpis]);
}

}



Post by alex.l »

Hi bizzcoo,

That's not clear how did you use that column with your renderer. Is it a column at all? I see startDate/endDate params in the renderer, so I suppose it isn't.
Did you see our summaries demos? Is it reproducible in our examples?
https://bryntum.com/examples/examples-scheduler/groupsummary/
https://bryntum.com/examples/examples-scheduler/multisummary/
https://bryntum.com/examples/examples-scheduler/summary/

All the best,
Alex


Post by bizzcoo »

Hello,
no cant reproduce in demos.
Any way, having some trouble figure out how all code is connected an describe this more in detail.
Would it help if I email you a couple of complete code files?
Alternative to have a Team meet to show the issue


Post by alex.l »

Hi bizzcoo,

Yes please, you can email us on support at bryntum.com with all sensitive information you don't want to share here.
Unfortunately, meetings are not possible in bounds of forum support, only as Professional Services https://www.bryntum.com/services

All the best,
Alex


Post by bizzcoo »

Thank you, much appreciated! Has sent an email.


Post by mats »

Where did you send it? Did not see it in the inbox...


Post Reply