Page 1 of 1

[ANGULAR]

Posted: Thu Aug 18, 2022 9:02 am
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",


Re: [ANGULAR]

Posted: Thu Aug 18, 2022 11:55 am
by mats

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


Re: [ANGULAR]

Posted: Tue Aug 23, 2022 8:08 am
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]);
}

}



Re: [ANGULAR]

Posted: Tue Aug 23, 2022 11:10 am
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/


Re: [ANGULAR]

Posted: Wed Aug 24, 2022 9:49 am
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


Re: [ANGULAR]

Posted: Wed Aug 24, 2022 9:56 am
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


Re: [ANGULAR]

Posted: Wed Aug 24, 2022 2:14 pm
by bizzcoo

Thank you, much appreciated! Has sent an email.


Re: [ANGULAR]

Posted: Wed Aug 24, 2022 2:19 pm
by mats

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