I'd like to have 2 schedulers that display the same events but with different resources.
I tried to make both scheduler point to the same event and dependy store :
eventStore,
dependencyStore,
But with two different stores for resources and assignments:
resourceStore1
assignmentStore1
resourceStore2
assignmentStore2
But I get errors when modifying assignmentStore2 :
Can you help me?
Thanks for your help.
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0')
at get isPersistable (AssignmentModelMixin.js:275:5)
at StoreCRUD.js:22:5
at Array.filter (<anonymous>)
at StoreBag.add (StoreCRUD.js:22:5)
at AssignmentStore2.onDataChange (Store.js:822:17)
at _Collection.trigger (Events.js:1372:46)
at _Collection.splice (Collection.js:729:17)
at _Collection.add (Collection.js:443:5)
at AssignmentStore2.add (StoreCRUD.js:446:5)
at AssignmentStore2.add (StoreStm.js:84:19)
Revision.js:8 Uncaught (in promise) Error: Unknown identifier ModelClass-1.$.endDateDirection
at throwUnknownIdentifier (Revision.js:8:9)
at EngineTransaction.addEdge (Transaction.js:563:5)
at EngineTransaction.onReadIdentifier (Transaction.js:624:38)
at EngineTransaction.calculateTransitionsStackGen (Transaction.js:770:36)
at calculateTransitionsStackGen.next (<anonymous>)
at EngineTransaction.calculateTransitions (Transaction.js:666:5)
at calculateTransitions.next (<anonymous>)
at runGeneratorAsyncWithEffect (Quark.js:8:23)
at Transaction.js:528:16
As you see here, i juste have the same resourceStore and my event aren't show in my scheduler 1.
But they are shown if in the seconde scheduler i link the second resourcestore :
// création du resource store
window.MonresourceStore2 = MonresourceStore.chain();
// création de l'event store
window.MoneventStore2 = MoneventStore.chain();
// création du assignement store
window.MonassignmentStore2 = MonassignmentStore.chain();
//--------------------------------------------------------------------------------------------------- création du scheduler
window.Monscheduler2 = new SchedulerPro({
appendTo: 'cible_scheduler2',
startDate: new Date(),
endDate: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // 7 days
eventStyle: 'colored',
minHeight : '10em',
flex : '1 1 50%',
viewPreset: 'FullDayAndTime',
eventStore: MoneventStore2,
resourceStore: MonresourceStore2,
assignmentStore: MonassignmentStore2,
//colonnes des ressources
columns: [
{
text: 'Name',
field: 'name',
width: 150,
editor: null //empeche la modification
},
{
text: 'Prénom',
field: 'prenom',
width: 150,
editor: null
}
],
});
but i've this error, directly when i try to add resources to my first scheduler :
Uncaught (in promise) Error: Unknown identifier ProjectModel2.$.effectiveCalendar
at throwUnknownIdentifier (Revision.js:8:9)
at EngineTransaction.addEdge (Transaction.js:563:5)
at EngineTransaction.onReadIdentifier (Transaction.js:624:38)
at EngineTransaction.calculateTransitionsStackGen (Transaction.js:770:36)
at calculateTransitionsStackGen.next (<anonymous>)
at EngineTransaction.calculateTransitions (Transaction.js:666:5)
at calculateTransitions.next (<anonymous>)
at runGeneratorAsyncWithEffect (Quark.js:6:22)
at async EngineReplica2.doCommitAsync (Graph.js:379:31)
at async ProjectModel2.internalDelayCalculation (SchedulerBasicProjectMixin.js:414:9)
Could you please attach runnable code to debug that runtime exception? You could apply required changes to one of our demos, if you don't want share your application.