I've just checked the extjsmodern demo and everything works fine. First I added a store instance (in Main.js file):
...
// adding assignment store instance
assignmentStore : new bryntum.scheduler.AssignmentStore(),
resourceStore : {
readUrl : 'data/resources.json',
autoLoad : true
},
Now to reach the Bryntum Scheduler API we made a special proxy class Bryntum.SchedulerPanel (you can find it in Bryntum folder of the extjsmodern demo). The class build getters and setters to map certain Scheduler properties.
So to reach the assignment store you should use getAssignmentStore getter:
// get SchedulerPanel instance
var scheduler = Ext.first('schedulerpanel');
// get assignment store
scheduler.getAssignmentStore();
Now let's ensure that it works:
// add "Foo" event
scheduler.getEventStore().add({ id : 1, startDate : p.getStartDate(), endDate : new Date(p.getStartDate().getTime()+3600000), name : "Foo" });
// assign it to the first event
scheduler.getAssignmentStore().add({ resourceId : "r1", eventId : 1 });
After the above steps I saw a new "Foo" event in the scheduler assigned to "Mike" resource.
assignmentStore : new bryntum.scheduler.AssignmentStore(),
in Main.js
but the console still have error
Uncaught ReferenceError: bryntum is not defined
I don't know why the error comes out.
I used listener in eventStore, when the data change, it will upload to backend, and I use
bryntum.scheduler.Mask.mask()
this is fine.
So that error is very stranger.
I also tried other way in MainController.js
var me = this,
schedulerPanel = me.lookupReference('schedulerPanel');
schedulerPanel.setAssignmentStore(new bryntum.scheduler.AssignmentStore())
schedulerPanel.getAssignmentStore().add(data)