Premium support for our pure JavaScript UI components


Post by NARESH.RAI »

Hello,

I want to get different events on scheduler pro to perform actions like save / delete / update
so tried with this ->

<bry-schedulerpro
      (onSchedulerEvents) = "onSchedulerEvents($event)"

but here getting multiple events and not able to identify exact one for different actions.

So please let me know exact event type name for -
1) Event Save (when u click save button on event editor)
2) Event Delete (when we delete event using right click OR using delete button from keyboard )
3) Event Update (event drag for different date OR assignees)
4) Add /remove Assignee ( when u update assignees in event editor box)


Post by alex.l »

All the best,
Alex


Post by NARESH.RAI »

Tried event -> destory (as mentioned in Scheduler.feature.EventEdit#events)

but its not working when i try to get this event using ->

<bry-schedulerpro
      (onSchedulerEvents) = "onSchedulerEvents($event)"

Can u provide any example ? which can show how to get these events ?


Post by alex.l »

Hi NARESH.RAI,

When exactly do you expect to have destroy event of EventEdit feature? If you are listening it on onSchedulerEvents(), destroy event will be triggered on scheduler destroy, not eventEdit feature destroy.
Btw, I see you use SchedulerPro / Gantt, so I pointed you on wrong article, you use TaskEdit: https://bryntum.com/docs/scheduler-pro/#SchedulerPro/feature/TaskEdit#events
Be aware that some of events have the note "Fires on the owning Scheduler", so you will be able to catch them using onSchedulerEvents(). All the rest need to be catched using the link or passing configs on init:

scheduler.features.taskEdit.taskEditor.on('beforeClose', this.doSomething);

// or in schedulerConfig

  taskEditFeature : {
    editorConfig: {
      listeners: {
        beforeShow: () => {
          // do something
        }
      }
    }
  },

Also, it might be helpful to you to know that TaskEditor doesn't destroyed on close. It's hide/show.

All best,
Alex

All the best,
Alex


Post by NARESH.RAI »

ok,
In same context, i am trying to add new text box in task editor by referring ->

Its not working in angular
I am defining this as config- >

taskEditFeature : {
      generalTab : {
          items : {
              milestoneField : {
                  type     : 'text',
                  weight   : 611,
                  readOnly : true,
                  editable : false,
                  label    : 'My field',
                  name     : 'milestone',
                  flex     : '1 0 50%'
              }
          }
        },
  },

and passing to angular ->

[taskEditFeature]  = "schedulerConfig.taskEditFeature"

anything wrong i am doing here ? as not able to find angular scheduler pro examples on this.


Post by alex.l »

You need to refer to feature's documentation: https://bryntum.com/docs/scheduler-pro/#SchedulerPro/feature/TaskEdit

It has an example:

const scheduler = new SchedulerPro({
    features : {
        taskEdit : {
            items : {
                generalTab : {
                    items : {
                        // Remove "Duration" and "% Complete" fields in the "General" tab
                        durationField    : false,
                        percentDoneField : false
                    }
                },
                // Remove all tabs except the "General" tab
                notesTab               : false,
                predecessorsTab : false,
                successorsTab     : false,
                advancedTab       : false
            }
        }
    }
})

So you missed items wrapper:

taskEditFeature : {
   items : {   
generalTab : { items : { milestoneField : { type : 'text', weight : 611, readOnly : true, editable : false, label : 'My field', name : 'milestone', flex : '1 0 50%' } } } } },

All best,
Alex

All the best,
Alex


Post by NARESH.RAI »

Resolved, Thanks


Post by NARESH.RAI »

HI,

Scheduler Pro - version RC-1
I have added new Items under taskEditFeature which was working and when i create new event and save it i was getting those new Items data from event store

Now i have upgraded to version - 4.0
and same code is not working, means i am able to see those new items under Task edit popup.
but entered data is not able to get from event store, even i am not able to see those parameter for that event.

can u guy check it?


Post by NARESH.RAI »

Any updates?


Post by mats »

Please provide the code which does not work for you.


Post Reply