Hi,
I am having an issue where the 'sync' operation of my crud manager is not sending through (sync request) any assignment records using Scheduler Pro (4.2.1). Loading works fine
Upon creating a new event on the scheduler, I can see the event being created along with the assignment model within the relevant stores. Checking project.assignmentStore i can see the new assignment record there and then calling project.assignmentStore.getByInternalId(XX).event confirms it is linked to the event I just created.
The result of project.changes only shows the addition of an event, no assignment.
Here Payload being sent after creating an event and committing the changes.
{
"type": "sync",
"requestId": 16268271073161,
"revision": 1626827099,
"events": {
"added": [
{
"start_time": "2021-07-15T09:00:00+10:00",
"end_time": "2021-07-16T18:00:00+10:00",
"duration": 33,
"durationUnit": "hour",
"cls": "",
"name": "New event",
"direction": "Forward",
"manuallyScheduled": false,
"constraintType": "startnoearlierthan",
"constraintDate": "2021-07-15T09:00:00+10:00",
"percentDone": 0,
"exceptionDates": [],
"all_day": false,
"$PhantomId": "_generatedClassDefEx1"
}
]
}
}
Here is my project config
export const Project = new MyProject({
transport: {
load: {
url: '/loancars/events/',
params: {
timezone: moment().format('Z'),
},
dataKey: 'data'
},
sync: {
url: '/loancars/events/',
params: {
timezone: moment().format('Z'),
},
dataKey: 'data'
},
},
autoLoad: true,
autoSync: true,
// Custom model classes that have additional fields
resourceModelClass: LoanCarResourceModel,
eventModelClass: LoanCarEventModel,
assignmentModelClass: LoanCarEventAssignmentModel,
eventStoreClass: LoanCarEventStore,
resourceStoreClass: LoanCarResourceStore,
assignmentStoreClass: LoanCarAssignmentStore,
});