[ANGULAR] Scheduler Pro events

Premium support for our pure JavaScript UI components


Post Reply
User avatar
NARESH.RAI
Premium Member
Premium Member
Posts: 71
Joined: Mon Aug 17, 2020 12:33 pm

[ANGULAR] Scheduler Pro events

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 ->

Code: Select all

<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)



User avatar
NARESH.RAI
Premium Member
Premium Member
Posts: 71
Joined: Mon Aug 17, 2020 12:33 pm

Re: [ANGULAR] Scheduler Pro events

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 ->

Code: Select all

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

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


User avatar
alex.l
Core Developer
Core Developer
Posts: 338
Joined: Sat Apr 11, 2020 1:56 pm

Re: [ANGULAR] Scheduler Pro 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:

Code: Select all

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


User avatar
NARESH.RAI
Premium Member
Premium Member
Posts: 71
Joined: Mon Aug 17, 2020 12:33 pm

Re: [ANGULAR] Scheduler Pro events

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- >

Code: Select all

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 ->

Code: Select all

[taskEditFeature]  = "schedulerConfig.taskEditFeature"

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


User avatar
alex.l
Core Developer
Core Developer
Posts: 338
Joined: Sat Apr 11, 2020 1:56 pm

Re: [ANGULAR] Scheduler Pro events

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:

Code: Select all

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:

Code: Select all

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


User avatar
NARESH.RAI
Premium Member
Premium Member
Posts: 71
Joined: Mon Aug 17, 2020 12:33 pm

Re: [ANGULAR] Scheduler Pro events

Post by NARESH.RAI »

Resolved, Thanks


Post Reply