Our state of the art Gantt chart


Post by thijs4ef »

I'm trying to customize ResourceAllocationInfo class and even without any methods override it's throwing an error.

import {
  ResourceAllocationInfo,
} from "@bryntum/schedulerpro/schedulerpro.umd";
import { ProjectModel,} from "@bryntum/gantt/gantt.umd";

class CustomResourceAllocationInfo extends ResourceAllocationInfo {}

function createProject() {
  /**
   * @type Partial<ProjectModelConfig>
   */
  const props = {
    calendar: "DefaultCompanyCalendar",
    hoursPerDay: 8,
    daysPerWeek: 5,
    daysPerMonth: 20,
    calendarsData: resourcesAndCalendarsData.calendars,
    calendarManagerStore: { useRawData: true },
    enableProgressNotifications: true,
    taskStore: { useRawData: true },
    assignmentStore: { useRawData: true },
    dependencyStore: { useRawData: true },
    tasksData: data.tasks,
    resourceStore: { useRawData: true },
    resourcesData,
    dependenciesData: data.bryntumDependencies,
    assignmentsData: data.bryntumAssignments,
    resourceAllocationInfoClass: CustomResourceAllocationInfo,
  };
  return new ProjectModel(props);
  }
  

And error is

Screenshot 2022-01-13 174851.png
Screenshot 2022-01-13 174851.png (43.1 KiB) Viewed 249 times

some more debugging showed that effect.handler is undefined for custom class

Screenshot 2022-01-13 175326.png
Screenshot 2022-01-13 175326.png (80.77 KiB) Viewed 249 times

Maybe you have some ideas.


Post by arcady »

Why do you use classes from different bundles? ResourceAllocationInfo is shipped w/ the Gantt bundle too.


Post Reply