Our pure JavaScript Scheduler component


Post by SIM-LTD »

Hi

We noticed that setting in the features nonWorkingTime=true' return an error message.

The scheduler is displayed but cannot operate properly; due to this message (look at the screenshot)

If the feature is set to false, the scheduler works perfectly; But as we need to see the none working time, we must set this to true; and once set, the error message appears.

As you can read this error message "Cannot read property 'parentElement" of null.

Do you have any idea that could help us to fix this issue ?
Attachments
Capture d’écran 2019-08-12 à 08.45.28.png
Capture d’écran 2019-08-12 à 08.45.28.png (66.94 KiB) Viewed 1208 times

Post by pmiklashevich »

How to reproduce?

Pavlo Miklashevych
Sr. Frontend Developer


Post by SIM-LTD »

Hi Pavel

First, thank you for the answer regarding the features 'Pan' & 'ColumnsLines'

Look to reproduce it, I'm sorry to say that you got to get back to the sample you have in your sandbow 'sch-gnt'
This occurs only when you have both "Scheduler & Gantt" module in te same application.
Moreover it only occurs with the Nigthly Release (both "Scheduler & Gantt" August 10)

To be tranparent with you (as usual) we have created our own "Sync" Partner. :D
Indeed, since we do not know when the issue with "Partner" will be fixed between Scheduler & Gantt, and we're getting behing our project planning, we then decided to move forward, and we did succeed to create our own 'Sync' or Partner (whatever you call this)

The Extra thing we wanted is to have the Gantt as the Master and the Scheduler as a Child.
Meaning, whatever we do in the Gantt (Zoom, Scroll, ect..) the sync work perfectly to the Scheduler.
But the Scheduler is free too, meaning any direct action onto the scheduler got not impact on the Gantt.
(The Syn work only one way Gantt toward Scheduler; this is the way we wanted :P )

So, based on the online document ( https://www.bryntum.com/docs/scheduler/#Scheduler/view/TimelineBase#config-partner )
partner:
Scheduler.view.TimelineBase
Partners this Timeline panel with another Timeline in order to sync their region sizes (sub-grids like locked, normal will get the same width), start and end dates, view preset, zoom level and scrolling position. All these values will be synced with the timeline defined as the partner.
We managed to build up our own Partner.... (Look the Screenshot).
We do not have any issue with the Timeline or TimeAxis... the Sync is working like a charm...

Then only issue we are facing are : :o
1) In the Gantt we cannot have the feature "ColumnsLine"... once we set the fetaures "ColumnsLines : true"
then the app craches... But we do have "noneWorkingTime"
2) In the Scheduler we cannot set the features "noneWorkingTime"... if we set this to true, the the application crashes... AND this is the error message we sent you, in the previous post. But we do have the colomnsLine"

Those 2 issues mainly regardind the features, occurs only with the Nightly Build (both Gantt & Scheduler).
Look at the screenshot... We cannot afford to go back to the official release since the Agust 10th Nigthly build covers a couple other main issue we reported.

In conclusion, having read your answer from the post "Pan" + "ColumnsLines" features; maybe the code you proposed us could be the solution for both issue in our Sync, to wit :
a) features "NoneWorkingTime" does not work in the Scheduler
b) features "ColumnsLines" does not work in the Gantt

We will really apreciate a tiny help on that; so any advise or hint on how to cover those 2 issues ! ;)

Thank you
Attachments
Capture d’écran 2019-08-12 à 08.46.53.png
Capture d’écran 2019-08-12 à 08.46.53.png (64.65 KiB) Viewed 1202 times
Capture d’écran 2019-08-12 à 08.38.50.png
Capture d’écran 2019-08-12 à 08.38.50.png (159.72 KiB) Viewed 1202 times
Capture d’écran 2019-08-11 à 14.51.09.png
Capture d’écran 2019-08-11 à 14.51.09.png (58.63 KiB) Viewed 1202 times

Post by pmiklashevich »

I've got the latest scheduler and gantt and tried in my sandbox (gnt-sch). Partnering is off, but both scheduler and gantt are on the page.
import {Scheduler} from '../../../Scheduler/build/scheduler.module.js';
import {Gantt} from '../../build/gantt.module.js';

const tasks = [];

const dependencies = [];

const resources = [];

const assignments = [];

const events = [];

const startDate = new Date(2017, 0, 15);
const endDate = new Date(2017, 1, 27);
const preset = 'dayAndWeek';

const gantt = new Gantt({
    features : {
        nonWorkingTime : true
    },
    appendTo : 'gantt-container',

    tasks        : tasks,
    dependencies : dependencies,
    resources    : resources,
    assignments  : assignments,

    columns : [
        { type : 'name', width : 150 }
    ],

    startDate  : startDate,
    endDate    : endDate,
    viewPreset : preset
});

const scheduler = new Scheduler({
    features : {
        nonWorkingTime : true
    },
    appendTo : 'gantt-container',
    // partner  : gantt,

    resources : resources,
    events    : events,

    columns : [
        { text : 'Name', field : 'name', width : 150 }
    ],

    startDate  : startDate,
    endDate    : endDate,
    viewPreset : preset
});

window.gantt = gantt;
window.scheduler = scheduler;
Снимок экрана 2019-08-13 в 15.25.46.png
Снимок экрана 2019-08-13 в 15.25.46.png (162.57 KiB) Viewed 1194 times
When partnering is enabled I see nonWorkingTime feature in Scheduler works wrong. Here is the ticket: https://app.assembla.com/spaces/bryntum/tickets/9030-nonworkingtime-feature-works-wrong-for-scheduler-which-partners-gantt-/details?tab=associations

Though I don't see the error you see. Maybe something else is required to be taken into account?

Pavlo Miklashevych
Sr. Frontend Developer


Post by SIM-LTD »

Hi Pavel

Thank you very much for having taken a bit of your time to see this.

Can we suggest you to take the sample, that is the package, "Gantt xxx / examples / vue / javascript / adavanced"
as the bases for having in your sandbox a new version of "Gantt & Scheduler".
Indeed, you sample is based on pure Javascript, whilst our app is build with VUECLI.

Once you have grabbed the Gantt / Advance demo; please add the Scheduler like this :
methods : {

    getPanelConfig(gantt, scheduler, me) {
    ......
    return {
                    items : [
                        gantt,                    
                        scheduler,
                    ],
     .......
}
........
mounted() {
.......
 const
           gantt         = this.gantt = new Gantt(ganttConfig), 
           scheduler = this.scheduler = new Scheduler(schedulerConfig),
......
 panel = this.panel = new Panel(this.getPanelConfig(gantt, scheduler, me)), updateUndoRedoButtons = () => {        

......
}     
Then the schedulerConfig is pretty simple :
const schedulerConfig = {

    flex         : '1 1 100%',

   columns       : [ ....],

   features     : {
       columnLines     : true, 
       nonWorkingTime  : true,     // 'true' , causes an error in Scheduler 
      // timeRanges      : {
      //     showCurrentTimeLine : true,
      //     showHeaderElements  : true,
      //    enableResizing      : false,
     //   },
     // PLEASE uncomment those line above and to see error message
}
Please add in the 'ganttConfig' only this:

const ganttConfig = {
....
       features : { 
        ColumnLines     : true,    // 'true' causes an error in Gantt 
This shouldn't take your more than 5 minutes.
One all set please run it and you seel what all messages error (have a look at the screenshot)

Let us know if you find a way to solve the issue when both Gantt & Scheduler in same app :
a) features "ColumnsLines" does not work in the Gantt
#9027: Columnlines feature doesn't work in gantt
b) features "NoneWorkingTime" does not work in the Scheduler
9030: Nonworkingtime feature works wrong for scheduler which partners gantt

By the way do not set "Partner", because this peature does not wrok at all. Just add the scheduler.
Attachments
Capture d’écran 2019-08-11 à 14.51.09.png
Capture d’écran 2019-08-11 à 14.51.09.png (58.63 KiB) Viewed 1192 times
Capture d’écran 2019-08-12 à 08.45.28.png
Capture d’écran 2019-08-12 à 08.45.28.png (66.94 KiB) Viewed 1192 times
Capture d’écran 2019-08-12 à 08.38.50.png
Capture d’écran 2019-08-12 à 08.38.50.png (159.72 KiB) Viewed 1192 times

Post by pmiklashevich »

Hello,

I've tried to follow your instructions but I see non errors. The only file I changed is examples/vue/javascript/advanced/src/components/Panel.vue
Panel.vue.zip
(3.57 KiB) Downloaded 100 times
Please keep in mind this demos references to the /build folder, and I complied sources based on the latest scheduler code (2.2.2) and all feature issues are fixed there. Please try out today's "-release" nightly build which has 2.2.2 changes already.
Снимок экрана 2019-08-16 в 12.39.41.png
Снимок экрана 2019-08-16 в 12.39.41.png (371.57 KiB) Viewed 1172 times
Also I'd like to highlight that we're aware that you're waiting for partnering Scheduler and Gantt, but we're planning few more patch releases, before minor release is out where Scheduler Pro + partnering with Gantt is introduced. Current priority is to reduce number of bugs we have.

Best regards,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply