Support for our reactive computational engine


Post by nickolay »

Thats a bug - all the code, that is used by engine should be isomorphic. Please post which lines you had to comment.


Post by rahulranjan »

HI Line Commented

In BroweserHelper.js

   const params = new URL(window.location.href).searchParams;
        return Object.fromEntries(params.entries());

In AjaxHelper.js

 resourceRoot     = BrowserHelper.queryString.__resourceRoot  || '',

In LocaleManager.js

//     scriptTag = document.querySelector('script[data-default-locale]');
        // if (scriptTag) {
        //     me.defaultLocaleName = scriptTag.dataset.defaultLocale;
        // }

The Above lines are commented to run the code


Post by nickolay »

Ok, thanks, we'll sort these out in the next release.


Post by rahulranjan »

HI We need to pass ResourceAssignment , Calendars , Resources and Dependences Data but it seems it not working correctly.

import { GanttProjectMixin } from "./lib/Engine/quark/model/gantt/GanttProjectMixin.js";
const project = new GanttProjectMixin({
  startDate: new Date(2020, 0, 1),
  eventsData: [
    {
      id: "e1",
      name: "Event1",
      startDate: new Date(2020, 2, 1),
      duration: 15,
      manuallyScheduled: true
    },
    {
      id: "e2",
      name: "Event2",
      startDate: new Date(2020, 10, 10),
      duration: 10,
      manuallyScheduled: false
    }
  ],
  dependencyStore: [
    {
      fromTask: "e1",
      toTask: "e2",
      type: 2,
      id: 1
    }
  ]
});

await project.commitAsync();
const event1 = project.getEventById("e1");



Do we need to Import SchedulerPro ?


Post by mats »

"but it seems it not working correctly."

Please share a few words how "it's not working"


Post by rahulranjan »

When i pass the dependency store the relationships does not take into account and dates are not shifted


Post by nickolay »

The dependency in engine uses "fromEvent" and "toEvent" fields instead of "fromTask", "toTask".

See: https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_scheduler_basic_basedependencymixin_.basedependencymixin.html


Post by rahulranjan »

Hi

import { GanttProjectMixin } from "./lib/Engine/quark/model/gantt/GanttProjectMixin.js";
const project = new GanttProjectMixin({
  startDate: new Date(2020, 0, 1),
  eventsData: [
    {
      id: "e1",
      name: "Event1",
      startDate: new Date(2020, 2, 1),
      duration: 15,
      manuallyScheduled: false
    },
    {
      id: "e2",
      name: "Event2",
      startDate: new Date(2020, 10, 10),
      duration: 10,
      manuallyScheduled: false
    }
  ],
  dependencyStore: [
    {
      fromEvent: "e1",
      toEvent: "e2",
      type: 2,
      id: 1
    }
  ]
});

await project.commitAsync();
const event1 = project.getEventById("e1");
console.log("Start Date is :" + event1.startDate);
const event2 = project.getEventById("e2");
console.log("E2 Start: " + event2.startDate);

Done with it but still dates don't shift of e2 as it is end to start so after ending e1 then e2 should start and start date of e2 should be starting after e1 ends


Post by nickolay »

dependencyStore => dependencyData


Post Reply